mirror of
https://github.com/acpica/acpica/
synced 2025-01-15 05:49:18 +03:00
Removed PARSER_ONLY, renamed ENABLE_DEBUGGER to ACPI_DEBUGGER.
renamed ACPI_DEBUG to ACPI_DEBUG_OUTPUT date 2002.07.26.21.45.00; author rmoore1; state Exp;
This commit is contained in:
parent
280629081c
commit
539eb89dc7
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: utmisc - common utility procedures
|
||||
* $Revision: 1.78 $
|
||||
* $Revision: 1.79 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -202,7 +202,7 @@ AcpiUtSetIntegerWidth (
|
||||
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtDisplayInitPathname
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utxface - External interfaces for "global" ACPI functions
|
||||
* $Revision: 1.87 $
|
||||
* $Revision: 1.98 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -119,18 +119,13 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acevents.h"
|
||||
#include "achware.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acinterp.h"
|
||||
#include "amlcode.h"
|
||||
#include "acdebug.h"
|
||||
#include "acexcep.h"
|
||||
#include "acparser.h"
|
||||
#include "acdispat.h"
|
||||
|
||||
#include "acdebug.h"
|
||||
|
||||
#define _COMPONENT ACPI_UTILITIES
|
||||
MODULE_NAME ("utxface")
|
||||
ACPI_MODULE_NAME ("utxface")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -152,10 +147,10 @@ AcpiInitializeSubsystem (
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
FUNCTION_TRACE ("AcpiInitializeSubsystem");
|
||||
ACPI_FUNCTION_TRACE ("AcpiInitializeSubsystem");
|
||||
|
||||
|
||||
DEBUG_EXEC(AcpiUtInitStackPtrTrace ());
|
||||
ACPI_DEBUG_EXEC (AcpiUtInitStackPtrTrace ());
|
||||
|
||||
|
||||
/* Initialize all globals used by the subsystem */
|
||||
@ -167,7 +162,7 @@ AcpiInitializeSubsystem (
|
||||
Status = AcpiOsInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
REPORT_ERROR (("OSD failed to initialize, %s\n",
|
||||
ACPI_REPORT_ERROR (("OSD failed to initialize, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
@ -177,7 +172,7 @@ AcpiInitializeSubsystem (
|
||||
Status = AcpiUtMutexInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
REPORT_ERROR (("Global mutex creation failure, %s\n",
|
||||
ACPI_REPORT_ERROR (("Global mutex creation failure, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
@ -190,7 +185,7 @@ AcpiInitializeSubsystem (
|
||||
Status = AcpiNsRootInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
REPORT_ERROR (("Namespace initialization failure, %s\n",
|
||||
ACPI_REPORT_ERROR (("Namespace initialization failure, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
@ -198,7 +193,7 @@ AcpiInitializeSubsystem (
|
||||
|
||||
/* If configured, initialize the AML debugger */
|
||||
|
||||
DEBUGGER_EXEC (AcpiDbInitialize ());
|
||||
ACPI_DEBUGGER_EXEC (Status = AcpiDbInitialize ());
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
@ -224,27 +219,19 @@ AcpiEnableSubsystem (
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("AcpiEnableSubsystem");
|
||||
ACPI_FUNCTION_TRACE ("AcpiEnableSubsystem");
|
||||
|
||||
|
||||
/* Sanity check the FADT for valid values */
|
||||
|
||||
Status = AcpiUtValidateFadt ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Install the default OpRegion handlers. These are
|
||||
* installed unless other handlers have already been
|
||||
* installed via the InstallAddressSpaceHandler interface
|
||||
* Install the default OpRegion handlers. These are installed unless
|
||||
* other handlers have already been installed via the
|
||||
* InstallAddressSpaceHandler interface
|
||||
*/
|
||||
if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing default address space handlers\n"));
|
||||
|
||||
Status = AcpiEvInstallDefaultAddressSpaceHandlers ();
|
||||
Status = AcpiEvInitAddressSpaces ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -253,6 +240,7 @@ AcpiEnableSubsystem (
|
||||
|
||||
/*
|
||||
* We must initialize the hardware before we can enable ACPI.
|
||||
* FADT values are validated here.
|
||||
*/
|
||||
if (!(Flags & ACPI_NO_HARDWARE_INIT))
|
||||
{
|
||||
@ -297,6 +285,44 @@ AcpiEnableSubsystem (
|
||||
}
|
||||
}
|
||||
|
||||
/* Install SCI handler, Global Lock handler, GPE handlers */
|
||||
|
||||
if (!(Flags & ACPI_NO_HANDLER_INIT))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing SCI/GL/GPE handlers\n"));
|
||||
|
||||
Status = AcpiEvHandlerInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInitializeObjects
|
||||
*
|
||||
* PARAMETERS: Flags - Init/enable Options
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Completes namespace initialization by initializing device
|
||||
* objects and executing AML code for Regions, buffers, etc.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiInitializeObjects (
|
||||
UINT32 Flags)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiInitializeObjects");
|
||||
|
||||
/*
|
||||
* Initialize all device objects in the namespace
|
||||
* This runs the _STA and _INI methods.
|
||||
@ -355,12 +381,15 @@ AcpiEnableSubsystem (
|
||||
ACPI_STATUS
|
||||
AcpiTerminate (void)
|
||||
{
|
||||
FUNCTION_TRACE ("AcpiTerminate");
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiTerminate");
|
||||
|
||||
|
||||
/* Terminate the AML Debugger if present */
|
||||
|
||||
DEBUGGER_EXEC(AcpiGbl_DbTerminateThreads = TRUE);
|
||||
ACPI_DEBUGGER_EXEC(AcpiGbl_DbTerminateThreads = TRUE);
|
||||
|
||||
/* Shutdown and free all resources */
|
||||
|
||||
@ -372,7 +401,7 @@ AcpiTerminate (void)
|
||||
AcpiUtMutexTerminate ();
|
||||
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
#ifdef ACPI_DEBUGGER
|
||||
|
||||
/* Shut down the debugger */
|
||||
|
||||
@ -381,10 +410,8 @@ AcpiTerminate (void)
|
||||
|
||||
/* Now we can shutdown the OS-dependent layer */
|
||||
|
||||
AcpiOsTerminate ();
|
||||
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
Status = AcpiOsTerminate ();
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
@ -444,7 +471,7 @@ AcpiGetSystemInfo (
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("AcpiGetSystemInfo");
|
||||
ACPI_FUNCTION_TRACE ("AcpiGetSystemInfo");
|
||||
|
||||
|
||||
/* Parameter validation */
|
||||
@ -455,9 +482,9 @@ AcpiGetSystemInfo (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Validate buffer size or allocate new buffer */
|
||||
/* Validate/Allocate/Clear caller buffer */
|
||||
|
||||
Status = AcpiUtValidateBufferSize (OutBuffer, sizeof (ACPI_SYSTEM_INFO));
|
||||
Status = AcpiUtInitializeBuffer (OutBuffer, sizeof (ACPI_SYSTEM_INFO));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -472,7 +499,7 @@ AcpiGetSystemInfo (
|
||||
|
||||
/* System flags (ACPI capabilities) */
|
||||
|
||||
InfoPtr->Flags = SYS_MODE_ACPI;
|
||||
InfoPtr->Flags = ACPI_SYS_MODE_ACPI;
|
||||
|
||||
/* Timer resolution - 24 or 32 bits */
|
||||
|
||||
@ -511,6 +538,41 @@ AcpiGetSystemInfo (
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInstallInitializationHandler
|
||||
*
|
||||
* PARAMETERS: Handler - Callback procedure
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install an initialization handler
|
||||
*
|
||||
* TBD: When a second function is added, must save the Function also.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiInstallInitializationHandler (
|
||||
ACPI_INIT_HANDLER Handler,
|
||||
UINT32 Function)
|
||||
{
|
||||
|
||||
if (!Handler)
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
if (AcpiGbl_InitHandler)
|
||||
{
|
||||
return (AE_ALREADY_EXISTS);
|
||||
}
|
||||
|
||||
AcpiGbl_InitHandler = Handler;
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiPurgeCachedObjects
|
||||
@ -526,7 +588,7 @@ AcpiGetSystemInfo (
|
||||
ACPI_STATUS
|
||||
AcpiPurgeCachedObjects (void)
|
||||
{
|
||||
FUNCTION_TRACE ("AcpiPurgeCachedObjects");
|
||||
ACPI_FUNCTION_TRACE ("AcpiPurgeCachedObjects");
|
||||
|
||||
|
||||
AcpiUtDeleteGenericStateCache ();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acconfig.h - Global configuration constants
|
||||
* $Revision: 1.54 $
|
||||
* $Revision: 1.107 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -125,12 +125,13 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* ACPI_DEBUG - This switch enables all the debug facilities of the ACPI
|
||||
* subsystem. This includes the DEBUG_PRINT output statements
|
||||
* When disabled, all DEBUG_PRINT statements are compiled out.
|
||||
* ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the
|
||||
* ACPI subsystem. This includes the DEBUG_PRINT output
|
||||
* statements. When disabled, all DEBUG_PRINT
|
||||
* statements are compiled out.
|
||||
*
|
||||
* ACPI_APPLICATION - Use this switch if the subsystem is going to be run
|
||||
* at the application level.
|
||||
* at the application level.
|
||||
*
|
||||
*/
|
||||
|
||||
@ -144,57 +145,50 @@
|
||||
|
||||
/* Version string */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20010125
|
||||
#define ACPI_CA_VERSION 0x20020725
|
||||
|
||||
/* Version of ACPI supported */
|
||||
|
||||
#define ACPI_CA_SUPPORT_LEVEL 2
|
||||
|
||||
/* Maximum objects in the various object caches */
|
||||
|
||||
#define MAX_STATE_CACHE_DEPTH 64 /* State objects for stacks */
|
||||
#define MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */
|
||||
#define MAX_EXTPARSE_CACHE_DEPTH 64 /* Parse tree objects */
|
||||
#define MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */
|
||||
#define MAX_WALK_CACHE_DEPTH 2 /* Objects for parse tree walks (method execution) */
|
||||
|
||||
#define MAX_STATE_CACHE_DEPTH 64 /* State objects for stacks */
|
||||
#define MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */
|
||||
#define MAX_EXTPARSE_CACHE_DEPTH 64 /* Parse tree objects */
|
||||
#define MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */
|
||||
#define MAX_WALK_CACHE_DEPTH 4 /* Objects for parse tree walks */
|
||||
|
||||
/* String size constants */
|
||||
|
||||
#define MAX_STRING_LENGTH 512
|
||||
#define PATHNAME_MAX 256 /* A full namespace pathname */
|
||||
|
||||
#define MAX_STRING_LENGTH 512
|
||||
#define PATHNAME_MAX 256 /* A full namespace pathname */
|
||||
|
||||
/* Maximum count for a semaphore object */
|
||||
|
||||
#define MAX_SEMAPHORE_COUNT 256
|
||||
|
||||
#define MAX_SEMAPHORE_COUNT 256
|
||||
|
||||
/* Max reference count (for debug only) */
|
||||
|
||||
#define MAX_REFERENCE_COUNT 0x200
|
||||
|
||||
#define MAX_REFERENCE_COUNT 0x400
|
||||
|
||||
/* Size of cached memory mapping for system memory operation region */
|
||||
|
||||
#define SYSMEM_REGION_WINDOW_SIZE 4096
|
||||
#define SYSMEM_REGION_WINDOW_SIZE 4096
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Configuration of subsystem behavior
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* Debugger threading model
|
||||
* Use single threaded if the entire subsystem is contained in an application
|
||||
* Use multiple threaded when the the subsystem is running in the kernel.
|
||||
*
|
||||
* By default the model is single threaded if ACPI_APPLICATION is set,
|
||||
* multi-threaded if ACPI_APPLICATION is not set.
|
||||
* Should the subystem abort the loading of an ACPI table if the
|
||||
* table checksum is incorrect?
|
||||
*/
|
||||
|
||||
#define DEBUGGER_SINGLE_THREADED 0
|
||||
#define DEBUGGER_MULTI_THREADED 1
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
|
||||
|
||||
#else
|
||||
#define DEBUGGER_THREADING DEBUGGER_MULTI_THREADED
|
||||
#endif
|
||||
#define ACPI_CHECKSUM_ABORT FALSE
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
@ -203,41 +197,78 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* Number of distinct GPE register blocks */
|
||||
|
||||
#define ACPI_MAX_GPE_BLOCKS 2
|
||||
|
||||
/*
|
||||
* Method info (in WALK_STATE), containing local variables and argumetns
|
||||
*/
|
||||
#define MTH_NUM_LOCALS 8
|
||||
#define MTH_MAX_LOCAL 7
|
||||
|
||||
#define MTH_NUM_LOCALS 8
|
||||
#define MTH_MAX_LOCAL 7
|
||||
|
||||
#define MTH_NUM_ARGS 7
|
||||
#define MTH_MAX_ARG 6
|
||||
#define MTH_NUM_ARGS 7
|
||||
#define MTH_MAX_ARG 6
|
||||
|
||||
/* Maximum length of resulting string when converting from a buffer */
|
||||
|
||||
#define ACPI_MAX_STRING_CONVERSION 200
|
||||
#define ACPI_MAX_STRING_CONVERSION 200
|
||||
|
||||
/*
|
||||
* Operand Stack (in WALK_STATE), Must be large enough to contain MTH_MAX_ARG
|
||||
*/
|
||||
|
||||
#define OBJ_NUM_OPERANDS 8
|
||||
#define OBJ_MAX_OPERAND 7
|
||||
#define OBJ_NUM_OPERANDS 8
|
||||
#define OBJ_MAX_OPERAND 7
|
||||
|
||||
/* Names within the namespace are 4 bytes long */
|
||||
|
||||
#define ACPI_NAME_SIZE 4
|
||||
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */
|
||||
#define PATH_SEPARATOR '.'
|
||||
|
||||
#define ACPI_NAME_SIZE 4
|
||||
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
|
||||
#define PATH_SEPARATOR '.'
|
||||
|
||||
/* Constants used in searching for the RSDP in low memory */
|
||||
|
||||
#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */
|
||||
#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */
|
||||
#define LO_RSDP_WINDOW_SIZE 0x400
|
||||
#define HI_RSDP_WINDOW_SIZE 0x20000
|
||||
#define RSDP_SCAN_STEP 16
|
||||
#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */
|
||||
#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */
|
||||
#define LO_RSDP_WINDOW_SIZE 0x400
|
||||
#define HI_RSDP_WINDOW_SIZE 0x20000
|
||||
#define RSDP_SCAN_STEP 16
|
||||
|
||||
/* Operation regions */
|
||||
|
||||
#define ACPI_NUM_PREDEFINED_REGIONS 8
|
||||
#define ACPI_USER_REGION_BEGIN 0x80
|
||||
|
||||
/* Maximum SpaceIds for Operation Regions */
|
||||
|
||||
#define ACPI_MAX_ADDRESS_SPACE 255
|
||||
|
||||
/* Array sizes. Used for range checking also */
|
||||
|
||||
#define NUM_ACCESS_TYPES 6
|
||||
#define NUM_UPDATE_RULES 3
|
||||
#define NUM_LOCK_RULES 2
|
||||
#define NUM_MATCH_OPS 6
|
||||
#define NUM_OPCODES 256
|
||||
#define NUM_FIELD_NAMES 2
|
||||
|
||||
/* RSDP checksums */
|
||||
|
||||
#define ACPI_RSDP_CHECKSUM_LENGTH 20
|
||||
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* ACPI AML Debugger
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */
|
||||
|
||||
#define ACPI_DEBUGGER_COMMAND_PROMPT '-'
|
||||
#define ACPI_DEBUGGER_EXECUTE_PROMPT '%'
|
||||
|
||||
|
||||
#endif /* _ACCONFIG_H */
|
||||
|
Loading…
Reference in New Issue
Block a user