This commit was generated by cvs2svn to compensate for changes in r99146,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
733e46c474
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdebug.h - ACPI/AML debugger
|
||||
* $Revision: 57 $
|
||||
* $Revision: 58 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -362,6 +362,9 @@ ACPI_STATUS
|
||||
AcpiDbLoadAcpiTable (
|
||||
NATIVE_CHAR *Filename);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbGetAcpiTable (
|
||||
NATIVE_CHAR *Filename);
|
||||
|
||||
/*
|
||||
* dbhistry - debugger HISTORY command
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdispat.h - dispatcher (parser to interpreter interface)
|
||||
* $Revision: 51 $
|
||||
* $Revision: 52 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -156,6 +156,14 @@ ACPI_STATUS
|
||||
AcpiDsGetRegionArguments (
|
||||
ACPI_OPERAND_OBJECT *RgnDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsGetBufferArguments (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsGetPackageArguments (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
|
||||
/* dsctrl - Parser/Interpreter interface, control stack routines */
|
||||
|
||||
@ -357,16 +365,24 @@ AcpiDsInitializeObjects (
|
||||
ACPI_TABLE_DESC *TableDesc,
|
||||
ACPI_NAMESPACE_NODE *StartNode);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsBuildInternalBufferObj (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
UINT32 BufferLength,
|
||||
ACPI_OPERAND_OBJECT **ObjDescPtr);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsBuildInternalPackageObj (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *op,
|
||||
UINT32 PackageLength,
|
||||
ACPI_OPERAND_OBJECT **ObjDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsBuildInternalObject (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *op,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_OPERAND_OBJECT **ObjDescPtr);
|
||||
|
||||
ACPI_STATUS
|
||||
@ -395,6 +411,12 @@ AcpiDsEvalRegionOperands (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsEvalDataObjectOperands (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_OPERAND_OBJECT *ObjDesc);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsInitializeRegion (
|
||||
ACPI_HANDLE ObjHandle);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdos16.h - DOS specific defines, etc.
|
||||
* $Revision: 1 $
|
||||
* $Revision: 2 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -134,10 +134,9 @@
|
||||
#define ACPI_INTERNAL_VAR_XFACE __cdecl
|
||||
|
||||
#define ACPI_ASM_MACROS
|
||||
#define causeinterrupt(level)
|
||||
#define BREAKPOINT3
|
||||
#define acpi_disable_irqs()
|
||||
#define acpi_enable_irqs()
|
||||
#define ACPI_DISABLE_IRQS()
|
||||
#define ACPI_ENABLE_IRQS()
|
||||
#define halt()
|
||||
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq)
|
||||
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acefi.h - OS specific defines, etc.
|
||||
* $Revision: 9 $
|
||||
* $Revision: 10 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -126,7 +126,8 @@
|
||||
|
||||
/* _int64 works for both IA32 and IA64 */
|
||||
|
||||
#define COMPILER_DEPENDENT_UINT64 unsigned __int64
|
||||
#define COMPILER_DEPENDENT_INT64 __int64
|
||||
#define COMPILER_DEPENDENT_UINT64 unsigned __int64
|
||||
|
||||
/*
|
||||
* Calling conventions:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acenv.h - Generation environment specific items
|
||||
* $Revision: 85 $
|
||||
* $Revision: 86 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -375,11 +375,9 @@ typedef char *va_list;
|
||||
#define ACPI_INTERNAL_VAR_XFACE
|
||||
|
||||
#define ACPI_ASM_MACROS
|
||||
#define causeinterrupt(level)
|
||||
#define BREAKPOINT3
|
||||
#define acpi_disable_irqs()
|
||||
#define acpi_enable_irqs()
|
||||
#define halt()
|
||||
#define ACPI_DISABLE_IRQS()
|
||||
#define ACPI_ENABLE_IRQS()
|
||||
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq)
|
||||
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq)
|
||||
|
||||
@ -390,9 +388,7 @@ typedef char *va_list;
|
||||
|
||||
/* Don't want software interrupts within a ring3 application */
|
||||
|
||||
#undef causeinterrupt
|
||||
#undef BREAKPOINT3
|
||||
#define causeinterrupt(level)
|
||||
#define BREAKPOINT3
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acevents.h - Event subcomponent prototypes and defines
|
||||
* $Revision: 75 $
|
||||
* $Revision: 76 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -148,6 +148,10 @@ AcpiEvFixedEventDispatch (
|
||||
* Evmisc
|
||||
*/
|
||||
|
||||
BOOLEAN
|
||||
AcpiEvIsNotifyObject (
|
||||
ACPI_NAMESPACE_NODE *Node);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvAcquireGlobalLock(
|
||||
UINT32 Timeout);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
|
||||
* $Revision: 57 $
|
||||
* $Revision: 59 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -165,8 +165,9 @@
|
||||
#define AE_ALREADY_ACQUIRED (ACPI_STATUS) (0x0018 | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_NO_HARDWARE_RESPONSE (ACPI_STATUS) (0x0019 | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_NO_GLOBAL_LOCK (ACPI_STATUS) (0x001A | AE_CODE_ENVIRONMENTAL)
|
||||
#define AE_LOGICAL_ADDRESS (ACPI_STATUS) (0x001B | AE_CODE_ENVIRONMENTAL)
|
||||
|
||||
#define AE_CODE_ENV_MAX 0x001A
|
||||
#define AE_CODE_ENV_MAX 0x001B
|
||||
|
||||
/*
|
||||
* Programmer exceptions
|
||||
@ -177,8 +178,11 @@
|
||||
#define AE_BAD_DATA (ACPI_STATUS) (0x0004 | AE_CODE_PROGRAMMER)
|
||||
#define AE_BAD_ADDRESS (ACPI_STATUS) (0x0005 | AE_CODE_PROGRAMMER)
|
||||
#define AE_ALIGNMENT (ACPI_STATUS) (0x0006 | AE_CODE_PROGRAMMER)
|
||||
#define AE_BAD_HEX_CONSTANT (ACPI_STATUS) (0x0007 | AE_CODE_PROGRAMMER)
|
||||
#define AE_BAD_OCTAL_CONSTANT (ACPI_STATUS) (0x0008 | AE_CODE_PROGRAMMER)
|
||||
#define AE_BAD_DECIMAL_CONSTANT (ACPI_STATUS) (0x0009 | AE_CODE_PROGRAMMER)
|
||||
|
||||
#define AE_CODE_PGM_MAX 0x0006
|
||||
#define AE_CODE_PGM_MAX 0x0009
|
||||
|
||||
|
||||
/*
|
||||
@ -279,7 +283,8 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Env[] =
|
||||
"AE_NOT_ACQUIRED",
|
||||
"AE_ALREADY_ACQUIRED",
|
||||
"AE_NO_HARDWARE_RESPONSE",
|
||||
"AE_NO_GLOBAL_LOCK"
|
||||
"AE_NO_GLOBAL_LOCK",
|
||||
"AE_LOGICAL_ADDRESS"
|
||||
};
|
||||
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Pgm[] =
|
||||
@ -289,7 +294,10 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Pgm[] =
|
||||
"AE_BAD_PATHNAME",
|
||||
"AE_BAD_DATA",
|
||||
"AE_BAD_ADDRESS",
|
||||
"AE_ALIGNMENT"
|
||||
"AE_ALIGNMENT",
|
||||
"AE_BAD_HEX_CONSTANT",
|
||||
"AE_BAD_OCTAL_CONSTANT",
|
||||
"AE_BAD_DECIMAL_CONSTANT"
|
||||
};
|
||||
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Tbl[] =
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acglobal.h - Declarations for global variables
|
||||
* $Revision: 120 $
|
||||
* $Revision: 121 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -162,6 +162,7 @@ extern UINT32 AcpiGbl_NestingLevel;
|
||||
* of each in the system. Each global points to the actual table.
|
||||
*
|
||||
*/
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TableFlags;
|
||||
ACPI_EXTERN RSDP_DESCRIPTOR *AcpiGbl_RSDP;
|
||||
ACPI_EXTERN XSDT_DESCRIPTOR *AcpiGbl_XSDT;
|
||||
ACPI_EXTERN FADT_DESCRIPTOR *AcpiGbl_FADT;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
|
||||
* $Revision: 132 $
|
||||
* $Revision: 133 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -238,6 +238,7 @@ AcpiExSetBufferDatum (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExReadDataFromField (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
ACPI_OPERAND_OBJECT **RetBufferDesc);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: aclocal.h - Internal data types used across the ACPI subsystem
|
||||
* $Revision: 159 $
|
||||
* $Revision: 162 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -147,6 +147,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
|
||||
#define ACPI_DESC_TYPE_NAMED 0xAA
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Mutex typedefs and structs
|
||||
@ -273,12 +274,18 @@ typedef enum
|
||||
* be the first byte in this structure.
|
||||
*/
|
||||
|
||||
typedef union acpi_name_union
|
||||
{
|
||||
UINT32 Integer;
|
||||
char Ascii[4];
|
||||
} ACPI_NAME_UNION;
|
||||
|
||||
typedef struct acpi_node
|
||||
{
|
||||
UINT8 Descriptor; /* Used to differentiate object descriptor types */
|
||||
UINT8 Type; /* Type associated with this name */
|
||||
UINT16 OwnerId;
|
||||
UINT32 Name; /* ACPI Name, always 4 chars per ACPI spec */
|
||||
ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */
|
||||
|
||||
|
||||
union acpi_operand_obj *Object; /* Pointer to attached ACPI object (optional) */
|
||||
@ -405,8 +412,9 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT8 AddressSpaceId;
|
||||
ACPI_GENERIC_ADDRESS *BlockAddress;
|
||||
UINT16 RegisterCount;
|
||||
UINT16 BlockAddress;
|
||||
UINT8 BlockBaseNumber;
|
||||
|
||||
} ACPI_GPE_BLOCK_INFO;
|
||||
@ -415,8 +423,8 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT16 StatusAddr; /* Address of status reg */
|
||||
UINT16 EnableAddr; /* Address of enable reg */
|
||||
ACPI_GENERIC_ADDRESS StatusAddress; /* Address of status reg */
|
||||
ACPI_GENERIC_ADDRESS EnableAddress; /* Address of enable reg */
|
||||
UINT8 Status; /* Current value of status reg */
|
||||
UINT8 Enable; /* Current value of enable reg */
|
||||
UINT8 WakeEnable; /* Mask of bits to keep enabled when sleeping */
|
||||
@ -501,11 +509,11 @@ struct acpi_obj_mutex;
|
||||
|
||||
#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
|
||||
UINT8 DataType; /* To differentiate various internal objs */\
|
||||
UINT8 Flags; \
|
||||
UINT16 Value; \
|
||||
UINT16 State; \
|
||||
UINT16 AcpiEval; \
|
||||
void *Next; \
|
||||
UINT8 Flags; \
|
||||
UINT16 Value; \
|
||||
UINT16 State; \
|
||||
UINT16 Reserved; \
|
||||
void *Next; \
|
||||
|
||||
typedef struct acpi_common_state
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
|
||||
* $Revision: 106 $
|
||||
* $Revision: 110 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -123,23 +123,14 @@
|
||||
* The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher
|
||||
* to the interpreter, and to keep track of the various handlers such as
|
||||
* address space handlers and notify handlers. The object is a constant
|
||||
* size in order to allow them to be cached and reused.
|
||||
*
|
||||
* All variants of the ACPI_OPERAND_OBJECT are defined with the same
|
||||
* sequence of field types, with fields that are not used in a particular
|
||||
* variant being named "Reserved". This is not strictly necessary, but
|
||||
* may in some circumstances simplify understanding if these structures
|
||||
* need to be displayed in a debugger having limited (or no) support for
|
||||
* union types. It also simplifies some debug code in DumpTable() which
|
||||
* dumps multi-level values: fetching Buffer.Pointer suffices to pick up
|
||||
* the value or next level for any of several types.
|
||||
* size in order to allow it to be cached and reused.
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Common Descriptors
|
||||
*
|
||||
*****************************************************************************/
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Common area for all objects.
|
||||
@ -147,8 +138,6 @@
|
||||
* DataType is used to differentiate between internal descriptors, and MUST
|
||||
* be the first byte in this structure.
|
||||
*/
|
||||
|
||||
|
||||
#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
|
||||
UINT8 Descriptor; /* To differentiate various internal objs */\
|
||||
UINT8 Type; /* ACPI_OBJECT_TYPE */\
|
||||
@ -156,7 +145,7 @@
|
||||
union acpi_operand_obj *NextObject; /* Objects linked to parent NS node */\
|
||||
UINT8 Flags; \
|
||||
|
||||
/* Defines for flag byte above */
|
||||
/* Values for flag byte above */
|
||||
|
||||
#define AOPOBJ_RESERVED 0x01
|
||||
#define AOPOBJ_STATIC_POINTER 0x02
|
||||
@ -192,29 +181,30 @@
|
||||
UINT32 Length;
|
||||
|
||||
|
||||
/*
|
||||
* Common fields for objects that support ASL notifications
|
||||
*/
|
||||
#define ACPI_COMMON_NOTIFY_INFO \
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */\
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */\
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for Address space */
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Individual Object Descriptors
|
||||
* Basic data types
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
typedef struct /* COMMON */
|
||||
typedef struct AcpiObjectCommon
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
} ACPI_OBJECT_COMMON;
|
||||
|
||||
|
||||
typedef struct /* CACHE_LIST */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
union acpi_operand_obj *Next; /* Link for object cache and internal lists*/
|
||||
|
||||
} ACPI_OBJECT_CACHE_LIST;
|
||||
|
||||
|
||||
typedef struct /* NUMBER - has value */
|
||||
typedef struct AcpiObjectInteger
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
@ -223,48 +213,48 @@ typedef struct /* NUMBER - has value */
|
||||
} ACPI_OBJECT_INTEGER;
|
||||
|
||||
|
||||
typedef struct /* STRING - has length and pointer - Null terminated, ASCII characters only */
|
||||
typedef struct AcpiObjectString /* Null terminated, ASCII characters only */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_BUFFER_INFO
|
||||
NATIVE_CHAR *Pointer; /* String value in AML stream or in allocated space */
|
||||
NATIVE_CHAR *Pointer; /* String in AML stream or allocated string */
|
||||
|
||||
} ACPI_OBJECT_STRING;
|
||||
|
||||
|
||||
typedef struct /* BUFFER - has length and pointer - not null terminated */
|
||||
typedef struct AcpiObjectBuffer
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_BUFFER_INFO
|
||||
UINT8 *Pointer; /* Buffer value in AML stream or in allocated space */
|
||||
UINT8 *Pointer; /* Buffer in AML stream or allocated buffer */
|
||||
ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
|
||||
UINT8 *AmlStart;
|
||||
UINT32 AmlLength;
|
||||
|
||||
} ACPI_OBJECT_BUFFER;
|
||||
|
||||
|
||||
typedef struct /* PACKAGE - has count, elements, next element */
|
||||
typedef struct AcpiObjectPackage
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT32 Count; /* # of elements in package */
|
||||
UINT32 AmlLength;
|
||||
UINT8 *AmlStart;
|
||||
ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
|
||||
union acpi_operand_obj **Elements; /* Array of pointers to AcpiObjects */
|
||||
union acpi_operand_obj **NextElement; /* used only while initializing */
|
||||
|
||||
} ACPI_OBJECT_PACKAGE;
|
||||
|
||||
|
||||
typedef struct /* DEVICE - has handle and notification handler/context */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for Address space */
|
||||
/******************************************************************************
|
||||
*
|
||||
* Complex data types
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
} ACPI_OBJECT_DEVICE;
|
||||
|
||||
|
||||
typedef struct /* EVENT */
|
||||
typedef struct AcpiObjectEvent
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
void *Semaphore;
|
||||
@ -274,7 +264,7 @@ typedef struct /* EVENT */
|
||||
|
||||
#define INFINITE_CONCURRENCY 0xFF
|
||||
|
||||
typedef struct /* METHOD */
|
||||
typedef struct AcpiObjectMethod
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT8 MethodFlags;
|
||||
@ -292,7 +282,7 @@ typedef struct /* METHOD */
|
||||
} ACPI_OBJECT_METHOD;
|
||||
|
||||
|
||||
typedef struct acpi_obj_mutex /* MUTEX */
|
||||
typedef struct AcpiObjectMutex
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT16 SyncLevel;
|
||||
@ -306,65 +296,84 @@ typedef struct acpi_obj_mutex /* MUTEX */
|
||||
} ACPI_OBJECT_MUTEX;
|
||||
|
||||
|
||||
typedef struct /* REGION */
|
||||
typedef struct AcpiObjectRegion
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT8 SpaceId;
|
||||
UINT32 Length;
|
||||
ACPI_PHYSICAL_ADDRESS Address;
|
||||
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for system notifies */
|
||||
ACPI_NAMESPACE_NODE *Node; /* containing object */
|
||||
union acpi_operand_obj *Next;
|
||||
UINT32 Length;
|
||||
ACPI_PHYSICAL_ADDRESS Address;
|
||||
|
||||
} ACPI_OBJECT_REGION;
|
||||
|
||||
|
||||
typedef struct /* POWER RESOURCE - has Handle and notification handler/context*/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Objects that can be notified. All share a common NotifyInfo area.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectNotifyCommon /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
} ACPI_OBJECT_NOTIFY_COMMON;
|
||||
|
||||
|
||||
typedef struct AcpiObjectDevice
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
} ACPI_OBJECT_DEVICE;
|
||||
|
||||
|
||||
typedef struct AcpiObjectPowerResource
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
UINT32 SystemLevel;
|
||||
UINT32 ResourceOrder;
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
|
||||
} ACPI_OBJECT_POWER_RESOURCE;
|
||||
|
||||
|
||||
typedef struct /* PROCESSOR - has Handle and notification handler/context*/
|
||||
typedef struct AcpiObjectProcessor
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
UINT32 ProcId;
|
||||
UINT32 Length;
|
||||
ACPI_IO_ADDRESS Address;
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for Address space */
|
||||
|
||||
} ACPI_OBJECT_PROCESSOR;
|
||||
|
||||
|
||||
typedef struct /* THERMAL ZONE - has Handle and Handler/Context */
|
||||
typedef struct AcpiObjectThermalZone
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
union acpi_operand_obj *SysHandler; /* Handler for system notifies */
|
||||
union acpi_operand_obj *DrvHandler; /* Handler for driver notifies */
|
||||
union acpi_operand_obj *AddrHandler; /* Handler for Address space */
|
||||
|
||||
} ACPI_OBJECT_THERMAL_ZONE;
|
||||
|
||||
|
||||
/*
|
||||
* Fields. All share a common header/info field.
|
||||
*/
|
||||
|
||||
typedef struct /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
|
||||
/******************************************************************************
|
||||
*
|
||||
* Fields. All share a common header/info field.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectFieldCommon /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
@ -373,7 +382,7 @@ typedef struct /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
|
||||
} ACPI_OBJECT_FIELD_COMMON;
|
||||
|
||||
|
||||
typedef struct /* REGION FIELD */
|
||||
typedef struct AcpiObjectRegionField
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
@ -382,7 +391,7 @@ typedef struct /* REGION FIELD */
|
||||
} ACPI_OBJECT_REGION_FIELD;
|
||||
|
||||
|
||||
typedef struct /* BANK FIELD */
|
||||
typedef struct AcpiObjectBankField
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
@ -393,7 +402,7 @@ typedef struct /* BANK FIELD */
|
||||
} ACPI_OBJECT_BANK_FIELD;
|
||||
|
||||
|
||||
typedef struct /* INDEX FIELD */
|
||||
typedef struct AcpiObjectIndexField
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
@ -411,7 +420,7 @@ typedef struct /* INDEX FIELD */
|
||||
|
||||
/* The BufferField is different in that it is part of a Buffer, not an OpRegion */
|
||||
|
||||
typedef struct /* BUFFER FIELD */
|
||||
typedef struct AcpiObjectBufferField
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
@ -421,11 +430,14 @@ typedef struct /* BUFFER FIELD */
|
||||
} ACPI_OBJECT_BUFFER_FIELD;
|
||||
|
||||
|
||||
/*
|
||||
* Handlers
|
||||
*/
|
||||
|
||||
typedef struct /* NOTIFY HANDLER */
|
||||
/******************************************************************************
|
||||
*
|
||||
* Objects for handlers
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectNotifyHandler
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
@ -441,7 +453,7 @@ typedef struct /* NOTIFY HANDLER */
|
||||
#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1
|
||||
|
||||
|
||||
typedef struct /* ADDRESS HANDLER */
|
||||
typedef struct AcpiObjectAddrHandler
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
@ -458,12 +470,18 @@ typedef struct /* ADDRESS HANDLER */
|
||||
} ACPI_OBJECT_ADDR_HANDLER;
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Special internal objects
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* The Reference object type is used for these opcodes:
|
||||
* Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp
|
||||
*/
|
||||
|
||||
typedef struct /* Reference - Local object type */
|
||||
typedef struct AcpiObjectReference
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
@ -485,8 +503,7 @@ typedef struct /* Reference - Local object type */
|
||||
*
|
||||
* Currently: Region and FieldUnit types
|
||||
*/
|
||||
|
||||
typedef struct /* EXTRA */
|
||||
typedef struct AcpiObjectExtra
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT8 ByteFill1;
|
||||
@ -499,7 +516,9 @@ typedef struct /* EXTRA */
|
||||
} ACPI_OBJECT_EXTRA;
|
||||
|
||||
|
||||
typedef struct /* DATA */
|
||||
/* Additional data that can be attached to namespace nodes */
|
||||
|
||||
typedef struct AcpiObjectData
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_OBJECT_HANDLER Handler;
|
||||
@ -508,38 +527,56 @@ typedef struct /* DATA */
|
||||
} ACPI_OBJECT_DATA;
|
||||
|
||||
|
||||
/* Structure used when objects are cached for reuse */
|
||||
|
||||
typedef struct AcpiObjectCacheList
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
union acpi_operand_obj *Next; /* Link for object cache and internal lists*/
|
||||
|
||||
} ACPI_OBJECT_CACHE_LIST;
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above
|
||||
* ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef union acpi_operand_obj
|
||||
typedef union acpi_operand_obj
|
||||
{
|
||||
ACPI_OBJECT_COMMON Common;
|
||||
ACPI_OBJECT_CACHE_LIST Cache;
|
||||
|
||||
ACPI_OBJECT_INTEGER Integer;
|
||||
ACPI_OBJECT_STRING String;
|
||||
ACPI_OBJECT_BUFFER Buffer;
|
||||
ACPI_OBJECT_PACKAGE Package;
|
||||
ACPI_OBJECT_BUFFER_FIELD BufferField;
|
||||
ACPI_OBJECT_DEVICE Device;
|
||||
|
||||
ACPI_OBJECT_EVENT Event;
|
||||
ACPI_OBJECT_METHOD Method;
|
||||
ACPI_OBJECT_MUTEX Mutex;
|
||||
ACPI_OBJECT_REGION Region;
|
||||
|
||||
ACPI_OBJECT_NOTIFY_COMMON CommonNotify;
|
||||
ACPI_OBJECT_DEVICE Device;
|
||||
ACPI_OBJECT_POWER_RESOURCE PowerResource;
|
||||
ACPI_OBJECT_PROCESSOR Processor;
|
||||
ACPI_OBJECT_THERMAL_ZONE ThermalZone;
|
||||
|
||||
ACPI_OBJECT_FIELD_COMMON CommonField;
|
||||
ACPI_OBJECT_REGION_FIELD Field;
|
||||
ACPI_OBJECT_BUFFER_FIELD BufferField;
|
||||
ACPI_OBJECT_BANK_FIELD BankField;
|
||||
ACPI_OBJECT_INDEX_FIELD IndexField;
|
||||
ACPI_OBJECT_REFERENCE Reference;
|
||||
|
||||
ACPI_OBJECT_NOTIFY_HANDLER NotifyHandler;
|
||||
ACPI_OBJECT_ADDR_HANDLER AddrHandler;
|
||||
|
||||
ACPI_OBJECT_REFERENCE Reference;
|
||||
ACPI_OBJECT_EXTRA Extra;
|
||||
ACPI_OBJECT_DATA Data;
|
||||
ACPI_OBJECT_CACHE_LIST Cache;
|
||||
|
||||
} ACPI_OPERAND_OBJECT;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acstruct.h - Internal structs
|
||||
* $Revision: 16 $
|
||||
* $Revision: 17 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -195,8 +195,12 @@ typedef struct acpi_init_walk_info
|
||||
UINT16 MethodCount;
|
||||
UINT16 OpRegionCount;
|
||||
UINT16 FieldCount;
|
||||
UINT16 BufferCount;
|
||||
UINT16 PackageCount;
|
||||
UINT16 OpRegionInit;
|
||||
UINT16 FieldInit;
|
||||
UINT16 BufferInit;
|
||||
UINT16 PackageInit;
|
||||
UINT16 ObjectCount;
|
||||
ACPI_TABLE_DESC *TableDesc;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actables.h - ACPI table management
|
||||
* $Revision: 35 $
|
||||
* $Revision: 36 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -162,22 +162,16 @@ AcpiTbGetTablePtr (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbGetTable (
|
||||
ACPI_PHYSICAL_ADDRESS PhysicalAddress,
|
||||
ACPI_TABLE_HEADER *BufferPtr,
|
||||
ACPI_POINTER *Address,
|
||||
ACPI_TABLE_DESC *TableInfo);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbVerifyRsdp (
|
||||
ACPI_PHYSICAL_ADDRESS RSDP_PhysicalAddress);
|
||||
ACPI_POINTER *Address);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbGetTableFacs (
|
||||
ACPI_TABLE_HEADER *BufferPtr,
|
||||
ACPI_TABLE_DESC *TableInfo);
|
||||
|
||||
ACPI_PHYSICAL_ADDRESS
|
||||
void
|
||||
AcpiTbGetRsdtAddress (
|
||||
void);
|
||||
ACPI_POINTER *OutAddress);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbValidateRsdt (
|
||||
@ -185,7 +179,7 @@ AcpiTbValidateRsdt (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbGetTablePointer (
|
||||
ACPI_PHYSICAL_ADDRESS PhysicalAddress,
|
||||
ACPI_POINTER *Address,
|
||||
UINT32 Flags,
|
||||
UINT32 *Size,
|
||||
ACPI_TABLE_HEADER **TablePtr);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actypes.h - Common data types for the entire ACPI subsystem
|
||||
* $Revision: 224 $
|
||||
* $Revision: 227 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -148,12 +148,13 @@ typedef unsigned char BOOLEAN;
|
||||
typedef unsigned short UINT16;
|
||||
typedef int INT32;
|
||||
typedef unsigned int UINT32;
|
||||
typedef COMPILER_DEPENDENT_INT64 INT64;
|
||||
typedef COMPILER_DEPENDENT_UINT64 UINT64;
|
||||
|
||||
typedef UINT64 NATIVE_UINT;
|
||||
typedef UINT64 NATIVE_INT;
|
||||
|
||||
typedef NATIVE_UINT ACPI_TBLPTR;
|
||||
typedef UINT64 ACPI_TBLPTR;
|
||||
typedef UINT64 ACPI_IO_ADDRESS;
|
||||
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
|
||||
typedef UINT64 ACPI_SIZE;
|
||||
@ -210,12 +211,13 @@ typedef unsigned char BOOLEAN;
|
||||
typedef unsigned short UINT16;
|
||||
typedef int INT32;
|
||||
typedef unsigned int UINT32;
|
||||
typedef COMPILER_DEPENDENT_INT64 INT64;
|
||||
typedef COMPILER_DEPENDENT_UINT64 UINT64;
|
||||
|
||||
typedef UINT32 NATIVE_UINT;
|
||||
typedef INT32 NATIVE_INT;
|
||||
|
||||
typedef NATIVE_UINT ACPI_TBLPTR;
|
||||
typedef UINT64 ACPI_TBLPTR;
|
||||
typedef UINT32 ACPI_IO_ADDRESS;
|
||||
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
|
||||
typedef UINT32 ACPI_SIZE;
|
||||
@ -239,7 +241,6 @@ typedef char NATIVE_CHAR;
|
||||
/*
|
||||
* Data type ranges
|
||||
*/
|
||||
|
||||
#define ACPI_UINT8_MAX (UINT8) 0xFF
|
||||
#define ACPI_UINT16_MAX (UINT16) 0xFFFF
|
||||
#define ACPI_UINT32_MAX (UINT32) 0xFFFFFFFF
|
||||
@ -261,6 +262,31 @@ typedef UINT64 u64;
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
|
||||
/*
|
||||
* Pointer overlays to avoid lots of typecasting for
|
||||
* code that accepts both physical and logical pointers.
|
||||
*/
|
||||
typedef union AcpiPointers
|
||||
{
|
||||
ACPI_PHYSICAL_ADDRESS Physical;
|
||||
void *Logical;
|
||||
ACPI_TBLPTR Value;
|
||||
|
||||
} ACPI_POINTERS;
|
||||
|
||||
typedef struct AcpiPointer
|
||||
{
|
||||
UINT32 PointerType;
|
||||
ACPI_POINTERS Pointer;
|
||||
|
||||
} ACPI_POINTER;
|
||||
|
||||
/* PointerTypes for above */
|
||||
|
||||
#define ACPI_LOGICAL_POINTER 0x01
|
||||
#define ACPI_PHYSICAL_POINTER 0x02
|
||||
|
||||
|
||||
/*
|
||||
* Useful defines
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
|
||||
* Declarations and definitions contained herein are derived
|
||||
* directly from the ACPI specification.
|
||||
* $Revision: 66 $
|
||||
* $Revision: 67 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -276,6 +276,7 @@
|
||||
#define AML_INT_STATICSTRING_OP (UINT16) 0x0034
|
||||
#define AML_INT_METHODCALL_OP (UINT16) 0x0035
|
||||
#define AML_INT_RETURN_VALUE_OP (UINT16) 0x0036
|
||||
#define AML_INT_EVAL_SUBTREE_OP (UINT16) 0x0037
|
||||
|
||||
|
||||
#define ARG_NONE 0x0
|
||||
@ -426,15 +427,16 @@
|
||||
/* Misc */
|
||||
|
||||
#define AML_TYPE_CREATE_FIELD 0x11
|
||||
#define AML_TYPE_CONTROL 0x12
|
||||
#define AML_TYPE_NAMED_NO_OBJ 0x13
|
||||
#define AML_TYPE_NAMED_FIELD 0x14
|
||||
#define AML_TYPE_NAMED_SIMPLE 0x15
|
||||
#define AML_TYPE_NAMED_COMPLEX 0x16
|
||||
#define AML_TYPE_RETURN 0x17
|
||||
#define AML_TYPE_CREATE_OBJECT 0x12
|
||||
#define AML_TYPE_CONTROL 0x13
|
||||
#define AML_TYPE_NAMED_NO_OBJ 0x14
|
||||
#define AML_TYPE_NAMED_FIELD 0x15
|
||||
#define AML_TYPE_NAMED_SIMPLE 0x16
|
||||
#define AML_TYPE_NAMED_COMPLEX 0x17
|
||||
#define AML_TYPE_RETURN 0x18
|
||||
|
||||
#define AML_TYPE_UNDEFINED 0x18
|
||||
#define AML_TYPE_BOGUS 0x19
|
||||
#define AML_TYPE_UNDEFINED 0x19
|
||||
#define AML_TYPE_BOGUS 0x1A
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbdisply - debug display commands
|
||||
* $Revision: 66 $
|
||||
* $Revision: 67 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -409,6 +409,7 @@ AcpiDbDecodeInternalObject (
|
||||
|
||||
if (!ObjDesc)
|
||||
{
|
||||
AcpiOsPrintf (" Uninitialized\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -540,21 +541,21 @@ AcpiDbDisplayInternalObject (
|
||||
break;
|
||||
|
||||
case AML_LOCAL_OP:
|
||||
AcpiOsPrintf ("[Local%d]", ObjDesc->Reference.Offset);
|
||||
AcpiOsPrintf ("[Local%d] ", ObjDesc->Reference.Offset);
|
||||
if (WalkState)
|
||||
{
|
||||
ObjDesc = WalkState->LocalVariables[ObjDesc->Reference.Offset].Object;
|
||||
AcpiOsPrintf (" %p", ObjDesc);
|
||||
AcpiOsPrintf ("%p", ObjDesc);
|
||||
AcpiDbDecodeInternalObject (ObjDesc);
|
||||
}
|
||||
break;
|
||||
|
||||
case AML_ARG_OP:
|
||||
AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
|
||||
AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
|
||||
if (WalkState)
|
||||
{
|
||||
ObjDesc = WalkState->Arguments[ObjDesc->Reference.Offset].Object;
|
||||
AcpiOsPrintf (" %p", ObjDesc);
|
||||
AcpiOsPrintf ("%p", ObjDesc);
|
||||
AcpiDbDecodeInternalObject (ObjDesc);
|
||||
}
|
||||
break;
|
||||
@ -589,7 +590,6 @@ AcpiDbDisplayInternalObject (
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbutils - AML debugger utilities
|
||||
* $Revision: 51 $
|
||||
* $Revision: 52 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -248,7 +248,7 @@ AcpiDbDumpObject (
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
AcpiOsPrintf ("[Buffer] = ");
|
||||
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
|
||||
AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
|
||||
break;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
|
||||
* $Revision: 79 $
|
||||
* $Revision: 81 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -170,7 +170,7 @@ AcpiDsParseMethod (
|
||||
return_ACPI_STATUS (AE_NULL_ENTRY);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Parsing [%4.4s] **** NamedObj=%p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Parsing [%4.4s] **** NamedObj=%p\n",
|
||||
(char *) &((ACPI_NAMESPACE_NODE *) ObjHandle)->Name, ObjHandle));
|
||||
|
||||
/* Extract the method object from the method Node */
|
||||
@ -208,7 +208,7 @@ AcpiDsParseMethod (
|
||||
|
||||
/* Init new op with the method name and pointer back to the Node */
|
||||
|
||||
AcpiPsSetName (Op, Node->Name);
|
||||
AcpiPsSetName (Op, Node->Name.Integer);
|
||||
Op->Node = Node;
|
||||
|
||||
/*
|
||||
@ -252,7 +252,7 @@ AcpiDsParseMethod (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** [%4.4s] Parsed **** NamedObj=%p Op=%p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** [%4.4s] Parsed **** NamedObj=%p Op=%p\n",
|
||||
(char *) &((ACPI_NAMESPACE_NODE *) ObjHandle)->Name, ObjHandle, Op));
|
||||
|
||||
AcpiPsDeleteParseTree (Op);
|
||||
@ -531,7 +531,6 @@ AcpiDsRestartControlMethod (
|
||||
WalkState->MethodCallOp, ReturnDesc, WalkState->ReturnUsed,
|
||||
WalkState->Results, WalkState));
|
||||
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dsmthdat - control method arguments and local variables
|
||||
* $Revision: 58 $
|
||||
* $Revision: 59 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -165,10 +165,10 @@ AcpiDsMethodDataInit (
|
||||
{
|
||||
ACPI_MOVE_UNALIGNED32_TO_32 (&WalkState->Arguments[i].Name,
|
||||
NAMEOF_ARG_NTE);
|
||||
WalkState->Arguments[i].Name |= (i << 24);
|
||||
WalkState->Arguments[i].Descriptor = ACPI_DESC_TYPE_NAMED;
|
||||
WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
|
||||
WalkState->Arguments[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG;
|
||||
WalkState->Arguments[i].Name.Integer |= (i << 24);
|
||||
WalkState->Arguments[i].Descriptor = ACPI_DESC_TYPE_NAMED;
|
||||
WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
|
||||
WalkState->Arguments[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG;
|
||||
}
|
||||
|
||||
/* Init the method locals */
|
||||
@ -178,10 +178,10 @@ AcpiDsMethodDataInit (
|
||||
ACPI_MOVE_UNALIGNED32_TO_32 (&WalkState->LocalVariables[i].Name,
|
||||
NAMEOF_LOCAL_NTE);
|
||||
|
||||
WalkState->LocalVariables[i].Name |= (i << 24);
|
||||
WalkState->LocalVariables[i].Descriptor = ACPI_DESC_TYPE_NAMED;
|
||||
WalkState->LocalVariables[i].Type = ACPI_TYPE_ANY;
|
||||
WalkState->LocalVariables[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL;
|
||||
WalkState->LocalVariables[i].Name.Integer |= (i << 24);
|
||||
WalkState->LocalVariables[i].Descriptor = ACPI_DESC_TYPE_NAMED;
|
||||
WalkState->LocalVariables[i].Type = ACPI_TYPE_ANY;
|
||||
WalkState->LocalVariables[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL;
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsobject - Dispatcher object management routines
|
||||
* $Revision: 90 $
|
||||
* $Revision: 91 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -139,11 +139,11 @@
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Callback from AcpiWalkNamespace. Invoked for every object
|
||||
* within the namespace.
|
||||
* within the namespace.
|
||||
*
|
||||
* Currently, the only objects that require initialization are:
|
||||
* 1) Methods
|
||||
* 2) Op Regions
|
||||
* 2) Operation Regions
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -176,7 +176,6 @@ AcpiDsInitOneObject (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/* And even then, we are only interested in a few object types */
|
||||
|
||||
Type = AcpiNsGetType (ObjHandle);
|
||||
@ -249,12 +248,13 @@ AcpiDsInitOneObject (
|
||||
*
|
||||
* FUNCTION: AcpiDsInitializeObjects
|
||||
*
|
||||
* PARAMETERS: None
|
||||
* PARAMETERS: TableDesc - Descriptor for parent ACPI table
|
||||
* StartNode - Root of subtree to be initialized.
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Walk the entire namespace and perform any necessary
|
||||
* initialization on the objects found therein
|
||||
* DESCRIPTION: Walk the namespace starting at "StartNode" and perform any
|
||||
* necessary initialization on the objects found therein
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -280,7 +280,6 @@ AcpiDsInitializeObjects (
|
||||
Info.ObjectCount = 0;
|
||||
Info.TableDesc = TableDesc;
|
||||
|
||||
|
||||
/* Walk entire namespace from the supplied root */
|
||||
|
||||
Status = AcpiWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX,
|
||||
@ -306,9 +305,10 @@ AcpiDsInitializeObjects (
|
||||
*
|
||||
* FUNCTION: AcpiDsInitObjectFromOp
|
||||
*
|
||||
* PARAMETERS: Op - Parser op used to init the internal object
|
||||
* PARAMETERS: WalkState - Current walk state
|
||||
* Op - Parser op used to init the internal object
|
||||
* Opcode - AML opcode associated with the object
|
||||
* ObjDesc - Namespace object to be initialized
|
||||
* RetObjDesc - Namespace object to be initialized
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
@ -325,10 +325,6 @@ AcpiDsInitObjectFromOp (
|
||||
UINT16 Opcode,
|
||||
ACPI_OPERAND_OBJECT **RetObjDesc)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_PARSE_OBJECT *Arg;
|
||||
ACPI_PARSE2_OBJECT *ByteList;
|
||||
ACPI_OPERAND_OBJECT *ArgDesc;
|
||||
const ACPI_OPCODE_INFO *OpInfo;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
|
||||
@ -345,108 +341,40 @@ AcpiDsInitObjectFromOp (
|
||||
return (AE_TYPE);
|
||||
}
|
||||
|
||||
|
||||
/* Get and prepare the first argument */
|
||||
/* Perform per-object initialization */
|
||||
|
||||
switch (ObjDesc->Common.Type)
|
||||
{
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
ObjDesc->Buffer.Node = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0];
|
||||
|
||||
/* First arg is a number */
|
||||
|
||||
AcpiDsCreateOperand (WalkState, Op->Value.Arg, 0);
|
||||
ArgDesc = WalkState->Operands [WalkState->NumOperands - 1];
|
||||
AcpiDsObjStackPop (1, WalkState);
|
||||
|
||||
/* Resolve the object (could be an arg or local) */
|
||||
|
||||
Status = AcpiExResolveToValue (&ArgDesc, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiUtRemoveReference (ArgDesc);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/* We are expecting a number */
|
||||
|
||||
if (ArgDesc->Common.Type != ACPI_TYPE_INTEGER)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Expecting number, got obj: %p type %X\n",
|
||||
ArgDesc, ArgDesc->Common.Type));
|
||||
AcpiUtRemoveReference (ArgDesc);
|
||||
return (AE_TYPE);
|
||||
}
|
||||
|
||||
/* Get the value, delete the internal object */
|
||||
|
||||
ObjDesc->Buffer.Length = (UINT32) ArgDesc->Integer.Value;
|
||||
AcpiUtRemoveReference (ArgDesc);
|
||||
|
||||
/* Allocate the buffer */
|
||||
|
||||
if (ObjDesc->Buffer.Length == 0)
|
||||
{
|
||||
ObjDesc->Buffer.Pointer = NULL;
|
||||
ACPI_REPORT_WARNING (("Buffer created with zero length in AML\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ObjDesc->Buffer.Pointer = ACPI_MEM_CALLOCATE (
|
||||
ObjDesc->Buffer.Length);
|
||||
|
||||
if (!ObjDesc->Buffer.Pointer)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Second arg is the buffer data (optional) ByteList can be either
|
||||
* individual bytes or a string initializer.
|
||||
* Defer evaluation of Buffer TermArg operand
|
||||
*/
|
||||
Arg = Op->Value.Arg; /* skip first arg */
|
||||
|
||||
ByteList = (ACPI_PARSE2_OBJECT *) Arg->Next;
|
||||
if (ByteList)
|
||||
{
|
||||
if (ByteList->Opcode != AML_INT_BYTELIST_OP)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Expecting bytelist, got: %p\n",
|
||||
ByteList));
|
||||
return (AE_TYPE);
|
||||
}
|
||||
|
||||
ACPI_MEMCPY (ObjDesc->Buffer.Pointer, ByteList->Data,
|
||||
ObjDesc->Buffer.Length);
|
||||
}
|
||||
|
||||
ObjDesc->Buffer.Node = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0];
|
||||
ObjDesc->Buffer.AmlStart = ((ACPI_PARSE2_OBJECT *) Op)->Data;
|
||||
ObjDesc->Buffer.AmlLength = ((ACPI_PARSE2_OBJECT *) Op)->Length;
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
|
||||
/*
|
||||
* When called, an internal package object has already been built and
|
||||
* is pointed to by ObjDesc. AcpiDsBuildInternalObject builds another
|
||||
* internal package object, so remove reference to the original so
|
||||
* that it is deleted. Error checking is done within the remove
|
||||
* reference function.
|
||||
* Defer evaluation of Package TermArg operand
|
||||
*/
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
Status = AcpiDsBuildInternalObject (WalkState, Op, RetObjDesc);
|
||||
ObjDesc->Package.Node = (ACPI_NAMESPACE_NODE *) WalkState->Operands[0];
|
||||
ObjDesc->Package.AmlStart = ((ACPI_PARSE2_OBJECT *) Op)->Data;
|
||||
ObjDesc->Package.AmlLength = ((ACPI_PARSE2_OBJECT *) Op)->Length;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
ObjDesc->Integer.Value = Op->Value.Integer;
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
ObjDesc->String.Pointer = Op->Value.String;
|
||||
ObjDesc->String.Length = ACPI_STRLEN (Op->Value.String);
|
||||
|
||||
@ -496,7 +424,6 @@ AcpiDsInitObjectFromOp (
|
||||
ObjDesc->Reference.Opcode = Opcode;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@ -514,9 +441,10 @@ AcpiDsInitObjectFromOp (
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsBuildInternalSimpleObj
|
||||
* FUNCTION: AcpiDsBuildInternalObject
|
||||
*
|
||||
* PARAMETERS: Op - Parser object to be translated
|
||||
* PARAMETERS: WalkState - Current walk state
|
||||
* Op - Parser object to be translated
|
||||
* ObjDescPtr - Where the ACPI internal object is returned
|
||||
*
|
||||
* RETURN: Status
|
||||
@ -526,8 +454,8 @@ AcpiDsInitObjectFromOp (
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiDsBuildInternalSimpleObj (
|
||||
ACPI_STATUS
|
||||
AcpiDsBuildInternalObject (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_OPERAND_OBJECT **ObjDescPtr)
|
||||
@ -537,7 +465,7 @@ AcpiDsBuildInternalSimpleObj (
|
||||
char *Name;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsBuildInternalSimpleObj");
|
||||
ACPI_FUNCTION_TRACE ("DsBuildInternalObject");
|
||||
|
||||
|
||||
if (Op->Opcode == AML_INT_NAMEPATH_OP)
|
||||
@ -567,7 +495,6 @@ AcpiDsBuildInternalSimpleObj (
|
||||
Name, Op->AmlOffset));
|
||||
ACPI_MEM_FREE (Name);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ACPI_REPORT_WARNING (("Reference %s at AML %X not found\n",
|
||||
@ -576,7 +503,6 @@ AcpiDsBuildInternalSimpleObj (
|
||||
|
||||
*ObjDescPtr = NULL;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -601,7 +527,121 @@ AcpiDsBuildInternalSimpleObj (
|
||||
}
|
||||
|
||||
*ObjDescPtr = ObjDesc;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsBuildInternalBufferObj
|
||||
*
|
||||
* PARAMETERS: Op - Parser object to be translated
|
||||
* ObjDescPtr - Where the ACPI internal object is returned
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Translate a parser Op package object to the equivalent
|
||||
* namespace object
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsBuildInternalBufferObj (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
UINT32 BufferLength,
|
||||
ACPI_OPERAND_OBJECT **ObjDescPtr)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Arg;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_PARSE2_OBJECT *ByteList;
|
||||
UINT32 ByteListLength = 0;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsBuildInternalBufferObj");
|
||||
|
||||
|
||||
ObjDesc = *ObjDescPtr;
|
||||
if (ObjDesc)
|
||||
{
|
||||
/*
|
||||
* We are evaluating a Named buffer object "Name (xxxx, Buffer)".
|
||||
* The buffer object already exists (from the NS node)
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Create a new buffer object */
|
||||
|
||||
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER);
|
||||
*ObjDescPtr = ObjDesc;
|
||||
if (!ObjDesc)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Second arg is the buffer data (optional) ByteList can be either
|
||||
* individual bytes or a string initializer. In either case, a
|
||||
* ByteList appears in the AML.
|
||||
*/
|
||||
Arg = Op->Value.Arg; /* skip first arg */
|
||||
|
||||
ByteList = (ACPI_PARSE2_OBJECT *) Arg->Next;
|
||||
if (ByteList)
|
||||
{
|
||||
if (ByteList->Opcode != AML_INT_BYTELIST_OP)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Expecting bytelist, got AML opcode %X in op %p\n",
|
||||
ByteList->Opcode, ByteList));
|
||||
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
return (AE_TYPE);
|
||||
}
|
||||
|
||||
ByteListLength = ByteList->Value.Integer32;
|
||||
}
|
||||
|
||||
/*
|
||||
* The buffer length (number of bytes) will be the larger of:
|
||||
* 1) The specified buffer length and
|
||||
* 2) The length of the initializer byte list
|
||||
*/
|
||||
ObjDesc->Buffer.Length = BufferLength;
|
||||
if (ByteListLength > BufferLength)
|
||||
{
|
||||
ObjDesc->Buffer.Length = ByteListLength;
|
||||
}
|
||||
|
||||
/* Allocate the buffer */
|
||||
|
||||
if (ObjDesc->Buffer.Length == 0)
|
||||
{
|
||||
ObjDesc->Buffer.Pointer = NULL;
|
||||
ACPI_REPORT_WARNING (("Buffer created with zero length in AML\n"));
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
ObjDesc->Buffer.Pointer = ACPI_MEM_CALLOCATE (
|
||||
ObjDesc->Buffer.Length);
|
||||
if (!ObjDesc->Buffer.Pointer)
|
||||
{
|
||||
AcpiUtDeleteObjectDesc (ObjDesc);
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/* Initialize buffer from the ByteList (if present) */
|
||||
|
||||
if (ByteList)
|
||||
{
|
||||
ACPI_MEMCPY (ObjDesc->Buffer.Pointer, ByteList->Data,
|
||||
ByteListLength);
|
||||
}
|
||||
|
||||
ObjDesc->Buffer.Flags |= AOPOBJ_DATA_VALID;
|
||||
Op->Node = (ACPI_NAMESPACE_NODE *) ObjDesc;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
@ -624,39 +664,75 @@ ACPI_STATUS
|
||||
AcpiDsBuildInternalPackageObj (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
UINT32 PackageLength,
|
||||
ACPI_OPERAND_OBJECT **ObjDescPtr)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Arg;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_PARSE_OBJECT *Parent;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc = NULL;
|
||||
UINT32 PackageListLength;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsBuildInternalPackageObj");
|
||||
|
||||
|
||||
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_PACKAGE);
|
||||
*ObjDescPtr = ObjDesc;
|
||||
if (!ObjDesc)
|
||||
/* Find the parent of a possibly nested package */
|
||||
|
||||
|
||||
Parent = Op->Parent;
|
||||
while ((Parent->Opcode == AML_PACKAGE_OP) ||
|
||||
(Parent->Opcode == AML_VAR_PACKAGE_OP))
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
Parent = Parent->Parent;
|
||||
}
|
||||
|
||||
if (Op->Opcode == AML_VAR_PACKAGE_OP)
|
||||
ObjDesc = *ObjDescPtr;
|
||||
if (ObjDesc)
|
||||
{
|
||||
/*
|
||||
* Variable length package parameters are evaluated JIT
|
||||
* We are evaluating a Named package object "Name (xxxx, Package)".
|
||||
* Get the existing package object from the NS node
|
||||
*/
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_PACKAGE);
|
||||
*ObjDescPtr = ObjDesc;
|
||||
if (!ObjDesc)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
ObjDesc->Package.Node = Parent->Node;
|
||||
}
|
||||
|
||||
/* The first argument must be the package length */
|
||||
ObjDesc->Package.Count = PackageLength;
|
||||
|
||||
/* Count the number of items in the package list */
|
||||
|
||||
PackageListLength = 0;
|
||||
Arg = Op->Value.Arg;
|
||||
ObjDesc->Package.Count = Arg->Value.Integer32;
|
||||
Arg = Arg->Next;
|
||||
while (Arg)
|
||||
{
|
||||
PackageListLength++;
|
||||
Arg = Arg->Next;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the array of pointers (ptrs to the
|
||||
* individual objects) Add an extra pointer slot so
|
||||
* The package length (number of elements) will be the greater
|
||||
* of the specified length and the length of the initializer list
|
||||
*/
|
||||
if (PackageListLength > PackageLength)
|
||||
{
|
||||
ObjDesc->Package.Count = PackageListLength;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the pointer array (array of pointers to the
|
||||
* individual objects). Add an extra pointer slot so
|
||||
* that the list is always null terminated.
|
||||
*/
|
||||
ObjDesc->Package.Elements = ACPI_MEM_CALLOCATE (
|
||||
@ -668,77 +744,36 @@ AcpiDsBuildInternalPackageObj (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
ObjDesc->Package.NextElement = ObjDesc->Package.Elements;
|
||||
|
||||
/*
|
||||
* Now init the elements of the package
|
||||
*/
|
||||
i = 0;
|
||||
Arg = Op->Value.Arg;
|
||||
Arg = Arg->Next;
|
||||
while (Arg)
|
||||
{
|
||||
if (Arg->Opcode == AML_PACKAGE_OP)
|
||||
if (Arg->Opcode == AML_INT_RETURN_VALUE_OP)
|
||||
{
|
||||
Status = AcpiDsBuildInternalPackageObj (WalkState, Arg,
|
||||
ObjDesc->Package.NextElement);
|
||||
}
|
||||
/* Object (package or buffer) is already built */
|
||||
|
||||
ObjDesc->Package.Elements[i] = (ACPI_OPERAND_OBJECT *) Arg->Node;
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = AcpiDsBuildInternalSimpleObj (WalkState, Arg,
|
||||
ObjDesc->Package.NextElement);
|
||||
Status = AcpiDsBuildInternalObject (WalkState, Arg,
|
||||
&ObjDesc->Package.Elements[i]);
|
||||
}
|
||||
|
||||
ObjDesc->Package.NextElement++;
|
||||
i++;
|
||||
Arg = Arg->Next;
|
||||
}
|
||||
|
||||
ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
|
||||
Op->Node = (ACPI_NAMESPACE_NODE *) ObjDesc;
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsBuildInternalObject
|
||||
*
|
||||
* PARAMETERS: Op - Parser object to be translated
|
||||
* ObjDescPtr - Where the ACPI internal object is returned
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Translate a parser Op object to the equivalent namespace
|
||||
* object
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsBuildInternalObject (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_OPERAND_OBJECT **ObjDescPtr)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
switch (Op->Opcode)
|
||||
{
|
||||
case AML_PACKAGE_OP:
|
||||
case AML_VAR_PACKAGE_OP:
|
||||
|
||||
Status = AcpiDsBuildInternalPackageObj (WalkState, Op, ObjDescPtr);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
Status = AcpiDsBuildInternalSimpleObj (WalkState, Op, ObjDescPtr);
|
||||
break;
|
||||
}
|
||||
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsCreateNode
|
||||
@ -794,7 +829,7 @@ AcpiDsCreateNode (
|
||||
|
||||
Node->Type = ObjDesc->Common.Type;
|
||||
|
||||
/* Init obj */
|
||||
/* Attach obj to node */
|
||||
|
||||
Status = AcpiNsAttachObject (Node, ObjDesc, Node->Type);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dsopcode - Dispatcher Op Region support and handling of
|
||||
* "control" opcodes
|
||||
* $Revision: 73 $
|
||||
* $Revision: 74 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -146,7 +146,9 @@
|
||||
ACPI_STATUS
|
||||
AcpiDsExecuteArguments (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
ACPI_OPERAND_OBJECT *ExtraDesc)
|
||||
ACPI_NAMESPACE_NODE *ScopeNode,
|
||||
UINT32 AmlLength,
|
||||
UINT8 *AmlStart)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_PARSE_OBJECT *Op;
|
||||
@ -158,10 +160,9 @@ AcpiDsExecuteArguments (
|
||||
|
||||
|
||||
/*
|
||||
* Allocate a new parser op to be the root of the parsed
|
||||
* BufferField tree
|
||||
* Allocate a new parser op to be the root of the parsed tree
|
||||
*/
|
||||
Op = AcpiPsAllocOp (AML_SCOPE_OP);
|
||||
Op = AcpiPsAllocOp (AML_INT_EVAL_SUBTREE_OP);
|
||||
if (!Op)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
@ -169,7 +170,7 @@ AcpiDsExecuteArguments (
|
||||
|
||||
/* Save the Node for use in AcpiPsParseAml */
|
||||
|
||||
Op->Node = AcpiNsGetParentNode (Node);
|
||||
Op->Node = ScopeNode;
|
||||
|
||||
/* Create and initialize a new parser state */
|
||||
|
||||
@ -179,8 +180,8 @@ AcpiDsExecuteArguments (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, ExtraDesc->Extra.AmlStart,
|
||||
ExtraDesc->Extra.AmlLength, NULL, NULL, 1);
|
||||
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, AmlStart,
|
||||
AmlLength, NULL, NULL, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiDsDeleteWalkState (WalkState);
|
||||
@ -189,7 +190,7 @@ AcpiDsExecuteArguments (
|
||||
|
||||
WalkState->ParseFlags = 0;
|
||||
|
||||
/* Pass1: Parse the entire BufferField declaration */
|
||||
/* Pass1: Parse the entire declaration */
|
||||
|
||||
Status = AcpiPsParseAml (WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -198,7 +199,7 @@ AcpiDsExecuteArguments (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Get and init the actual FieldUnit Op created above */
|
||||
/* Get and init the Op created above */
|
||||
|
||||
Arg = Op->Value.Arg;
|
||||
Op->Node = Node;
|
||||
@ -207,13 +208,13 @@ AcpiDsExecuteArguments (
|
||||
|
||||
/* Evaluate the address and length arguments for the Buffer Field */
|
||||
|
||||
Op = AcpiPsAllocOp (AML_SCOPE_OP);
|
||||
Op = AcpiPsAllocOp (AML_INT_EVAL_SUBTREE_OP);
|
||||
if (!Op)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
Op->Node = AcpiNsGetParentNode (Node);
|
||||
Op->Node = ScopeNode;
|
||||
|
||||
/* Create and initialize a new parser state */
|
||||
|
||||
@ -223,8 +224,8 @@ AcpiDsExecuteArguments (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, ExtraDesc->Extra.AmlStart,
|
||||
ExtraDesc->Extra.AmlLength, NULL, NULL, 3);
|
||||
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, AmlStart,
|
||||
AmlLength, NULL, NULL, 3);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiDsDeleteWalkState (WalkState);
|
||||
@ -278,7 +279,106 @@ AcpiDsGetBufferFieldArguments (
|
||||
|
||||
/* Execute the AML code for the TermArg arguments */
|
||||
|
||||
Status = AcpiDsExecuteArguments (Node, ExtraDesc);
|
||||
Status = AcpiDsExecuteArguments (Node, AcpiNsGetParentNode (Node),
|
||||
ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsGetBufferArguments
|
||||
*
|
||||
* PARAMETERS: ObjDesc - A valid Bufferobject
|
||||
*
|
||||
* RETURN: Status.
|
||||
*
|
||||
* DESCRIPTION: Get Buffer length and initializer byte list. This implements
|
||||
* the late evaluation of these attributes.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsGetBufferArguments (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc)
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR ("DsGetBufferArguments", ObjDesc);
|
||||
|
||||
|
||||
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/* Get the Buffer node */
|
||||
|
||||
Node = ObjDesc->Buffer.Node;
|
||||
if (!Node)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"No pointer back to NS node in buffer %p\n", ObjDesc));
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Buffer JIT Init\n"));
|
||||
|
||||
/* Execute the AML code for the TermArg arguments */
|
||||
|
||||
Status = AcpiDsExecuteArguments (Node, Node,
|
||||
ObjDesc->Buffer.AmlLength, ObjDesc->Buffer.AmlStart);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsGetPackageArguments
|
||||
*
|
||||
* PARAMETERS: ObjDesc - A valid Packageobject
|
||||
*
|
||||
* RETURN: Status.
|
||||
*
|
||||
* DESCRIPTION: Get Package length and initializer byte list. This implements
|
||||
* the late evaluation of these attributes.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsGetPackageArguments (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc)
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR ("DsGetPackageArguments", ObjDesc);
|
||||
|
||||
|
||||
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/* Get the Package node */
|
||||
|
||||
Node = ObjDesc->Package.Node;
|
||||
if (!Node)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"No pointer back to NS node in package %p\n", ObjDesc));
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Package JIT Init\n"));
|
||||
|
||||
/* Execute the AML code for the TermArg arguments */
|
||||
|
||||
Status = AcpiDsExecuteArguments (Node, Node,
|
||||
ObjDesc->Package.AmlLength, ObjDesc->Package.AmlStart);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -302,7 +402,7 @@ AcpiDsGetRegionArguments (
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OPERAND_OBJECT *RegionObj2;
|
||||
ACPI_OPERAND_OBJECT *ExtraDesc;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR ("DsGetRegionArguments", ObjDesc);
|
||||
@ -313,23 +413,24 @@ AcpiDsGetRegionArguments (
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
RegionObj2 = AcpiNsGetSecondaryObject (ObjDesc);
|
||||
if (!RegionObj2)
|
||||
ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
|
||||
if (!ExtraDesc)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NOT_EXIST);
|
||||
}
|
||||
|
||||
/* Get the AML pointer (method object) and region node */
|
||||
/* Get the Region node */
|
||||
|
||||
Node = ObjDesc->Region.Node;
|
||||
|
||||
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Operation Region]"));
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Init at AML %p\n",
|
||||
(char *) &Node->Name, RegionObj2->Extra.AmlStart));
|
||||
(char *) &Node->Name, ExtraDesc->Extra.AmlStart));
|
||||
|
||||
|
||||
Status = AcpiDsExecuteArguments (Node, RegionObj2);
|
||||
Status = AcpiDsExecuteArguments (Node, AcpiNsGetParentNode (Node),
|
||||
ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -408,7 +509,7 @@ AcpiDsEvalBufferFieldOperands (
|
||||
|
||||
NextOp = Op->Value.Arg;
|
||||
|
||||
/* AcpiEvaluate/create the address and length operands */
|
||||
/* Evaluate/create the address and length operands */
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, NextOp);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -674,7 +775,7 @@ AcpiDsEvalRegionOperands (
|
||||
|
||||
NextOp = NextOp->Next;
|
||||
|
||||
/* AcpiEvaluate/create the address and length operands */
|
||||
/* Evaluate/create the address and length operands */
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, NextOp);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -731,6 +832,102 @@ AcpiDsEvalRegionOperands (
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsEvalDataObjectOperands
|
||||
*
|
||||
* PARAMETERS: Op - A valid DataObject Op object
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Get the operands and complete the following data objec types:
|
||||
* Buffer
|
||||
* Package
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsEvalDataObjectOperands (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
ACPI_OPERAND_OBJECT *ObjDesc)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OPERAND_OBJECT *ArgDesc;
|
||||
UINT32 Length;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsEvalDataObjectOperands");
|
||||
|
||||
|
||||
/* The first operand (for all of these data objects) is the length */
|
||||
|
||||
Status = AcpiDsCreateOperand (WalkState, Op->Value.Arg, 1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Status = AcpiExResolveOperands (WalkState->Opcode,
|
||||
&(WalkState->Operands [WalkState->NumOperands -1]),
|
||||
WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Extract length operand */
|
||||
|
||||
ArgDesc = WalkState->Operands [WalkState->NumOperands - 1];
|
||||
Length = (UINT32) ArgDesc->Integer.Value;
|
||||
|
||||
/* Cleanup for length operand */
|
||||
|
||||
AcpiDsObjStackPop (1, WalkState);
|
||||
AcpiUtRemoveReference (ArgDesc);
|
||||
|
||||
/*
|
||||
* Create the actual data object
|
||||
*/
|
||||
switch (Op->Opcode)
|
||||
{
|
||||
case AML_BUFFER_OP:
|
||||
|
||||
Status = AcpiDsBuildInternalBufferObj (WalkState, Op, Length, &ObjDesc);
|
||||
break;
|
||||
|
||||
case AML_PACKAGE_OP:
|
||||
case AML_VAR_PACKAGE_OP:
|
||||
|
||||
Status = AcpiDsBuildInternalPackageObj (WalkState, Op, Length, &ObjDesc);
|
||||
break;
|
||||
|
||||
default:
|
||||
return_ACPI_STATUS (AE_AML_BAD_OPCODE);
|
||||
}
|
||||
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/*
|
||||
* Return the object in the WalkState, unless the parent is a package --
|
||||
* in this case, the return object will be stored in the parse tree
|
||||
* for the package.
|
||||
*/
|
||||
if ((!Op->Parent) ||
|
||||
((Op->Parent->Opcode != AML_PACKAGE_OP) &&
|
||||
(Op->Parent->Opcode != AML_VAR_PACKAGE_OP) &&
|
||||
(Op->Parent->Opcode != AML_NAME_OP)))
|
||||
{
|
||||
WalkState->ResultObj = ObjDesc;
|
||||
}
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsExecBeginControlOp
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dsutils - Dispatcher utilities
|
||||
* $Revision: 88 $
|
||||
* $Revision: 89 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -231,7 +231,11 @@ AcpiDsIsResultUsed (
|
||||
case AML_CLASS_NAMED_OBJECT:
|
||||
|
||||
if ((Op->Parent->Opcode == AML_REGION_OP) ||
|
||||
(Op->Parent->Opcode == AML_DATA_REGION_OP))
|
||||
(Op->Parent->Opcode == AML_DATA_REGION_OP) ||
|
||||
(Op->Parent->Opcode == AML_PACKAGE_OP) ||
|
||||
(Op->Parent->Opcode == AML_VAR_PACKAGE_OP) ||
|
||||
(Op->Parent->Opcode == AML_BUFFER_OP) ||
|
||||
(Op->Parent->Opcode == AML_INT_EVAL_SUBTREE_OP))
|
||||
{
|
||||
/*
|
||||
* These opcodes allow TermArg(s) as operands and therefore
|
||||
@ -243,11 +247,12 @@ AcpiDsIsResultUsed (
|
||||
goto ResultNotUsed;
|
||||
|
||||
|
||||
/*
|
||||
* In all other cases. the parent will actually use the return
|
||||
* object, so keep it.
|
||||
*/
|
||||
default:
|
||||
|
||||
/*
|
||||
* In all other cases. the parent will actually use the return
|
||||
* object, so keep it.
|
||||
*/
|
||||
goto ResultUsed;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dswexec - Dispatcher method execution callbacks;
|
||||
* dispatch to interpreter.
|
||||
* $Revision: 89 $
|
||||
* $Revision: 90 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -412,6 +412,7 @@ AcpiDsExecBeginOp (
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsExecEndOp
|
||||
@ -623,6 +624,53 @@ AcpiDsExecEndOp (
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_CREATE_OBJECT:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Executing CreateObject (Buffer/Package) Op=%p\n", Op));
|
||||
|
||||
switch (Op->Parent->Opcode)
|
||||
{
|
||||
case AML_NAME_OP:
|
||||
|
||||
/*
|
||||
* Put the Node on the object stack (Contains the ACPI Name of
|
||||
* this object)
|
||||
*/
|
||||
WalkState->Operands[0] = (void *) Op->Parent->Node;
|
||||
WalkState->NumOperands = 1;
|
||||
|
||||
Status = AcpiDsCreateNode (WalkState, Op->Parent->Node, Op->Parent);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
/* Fall through */
|
||||
|
||||
case AML_INT_EVAL_SUBTREE_OP:
|
||||
|
||||
Status = AcpiDsEvalDataObjectOperands (WalkState, Op, AcpiNsGetAttachedObject (Op->Parent->Node));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Status = AcpiDsEvalDataObjectOperands (WalkState, Op, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If a result object was returned from above, push it on the
|
||||
* current result stack
|
||||
*/
|
||||
if (ACPI_SUCCESS (Status) &&
|
||||
WalkState->ResultObj)
|
||||
{
|
||||
Status = AcpiDsResultPush (WalkState->ResultObj, WalkState);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case AML_TYPE_NAMED_FIELD:
|
||||
case AML_TYPE_NAMED_COMPLEX:
|
||||
case AML_TYPE_NAMED_SIMPLE:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswload - Dispatcher namespace load callbacks
|
||||
* $Revision: 61 $
|
||||
* $Revision: 62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -267,7 +267,7 @@ AcpiDsLoad1BeginOp (
|
||||
|
||||
/* Initialize */
|
||||
|
||||
((ACPI_PARSE2_OBJECT *)Op)->Name = Node->Name;
|
||||
((ACPI_PARSE2_OBJECT *)Op)->Name = Node->Name.Integer;
|
||||
|
||||
/*
|
||||
* Put the Node in the "op" object that the parser uses, so we
|
||||
@ -503,7 +503,7 @@ AcpiDsLoad2BeginOp (
|
||||
|
||||
/* Initialize the new op */
|
||||
|
||||
((ACPI_PARSE2_OBJECT *)Op)->Name = Node->Name;
|
||||
((ACPI_PARSE2_OBJECT *)Op)->Name = Node->Name.Integer;
|
||||
*OutOp = Op;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evevent - Fixed and General Purpose Even handling and dispatch
|
||||
* $Revision: 71 $
|
||||
* $Revision: 78 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -428,11 +428,14 @@ AcpiEvGpeInitialize (void)
|
||||
* FADT table contain zeros. The GPE0_LEN and GPE1_LEN do not need
|
||||
* to be the same size."
|
||||
*/
|
||||
AcpiGbl_GpeBlockInfo[0].RegisterCount = (UINT16) ACPI_DIV_2 (AcpiGbl_FADT->Gpe0BlkLen);
|
||||
AcpiGbl_GpeBlockInfo[1].RegisterCount = (UINT16) ACPI_DIV_2 (AcpiGbl_FADT->Gpe1BlkLen);
|
||||
AcpiGbl_GpeBlockInfo[0].AddressSpaceId = AcpiGbl_FADT->XGpe0Blk.AddressSpaceId;
|
||||
AcpiGbl_GpeBlockInfo[1].AddressSpaceId = AcpiGbl_FADT->XGpe1Blk.AddressSpaceId;
|
||||
|
||||
AcpiGbl_GpeBlockInfo[0].BlockAddress = (UINT16) ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address);
|
||||
AcpiGbl_GpeBlockInfo[1].BlockAddress = (UINT16) ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address);
|
||||
AcpiGbl_GpeBlockInfo[0].RegisterCount = (UINT16) ACPI_DIV_16 (AcpiGbl_FADT->XGpe0Blk.RegisterBitWidth);
|
||||
AcpiGbl_GpeBlockInfo[1].RegisterCount = (UINT16) ACPI_DIV_16 (AcpiGbl_FADT->XGpe1Blk.RegisterBitWidth);
|
||||
|
||||
AcpiGbl_GpeBlockInfo[0].BlockAddress = &AcpiGbl_FADT->XGpe0Blk;
|
||||
AcpiGbl_GpeBlockInfo[1].BlockAddress = &AcpiGbl_FADT->XGpe1Blk;
|
||||
|
||||
AcpiGbl_GpeBlockInfo[0].BlockBaseNumber = 0;
|
||||
AcpiGbl_GpeBlockInfo[1].BlockBaseNumber = AcpiGbl_FADT->Gpe1Base;
|
||||
@ -531,10 +534,21 @@ AcpiEvGpeInitialize (void)
|
||||
|
||||
/* Init the Register info for this entire GPE register (8 GPEs) */
|
||||
|
||||
GpeRegisterInfo->BaseGpeNumber = (UINT8) (AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber + (ACPI_MUL_8 (i)));
|
||||
GpeRegisterInfo->StatusAddr = (UINT16) (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress + i);
|
||||
GpeRegisterInfo->EnableAddr = (UINT16) (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress + i +
|
||||
AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount);
|
||||
GpeRegisterInfo->BaseGpeNumber = (UINT8) (AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber + (ACPI_MUL_8 (i)));
|
||||
|
||||
ACPI_STORE_ADDRESS (GpeRegisterInfo->StatusAddress.Address,
|
||||
(ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address) + i));
|
||||
|
||||
ACPI_STORE_ADDRESS (GpeRegisterInfo->EnableAddress.Address,
|
||||
(ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address) + i +
|
||||
AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount));
|
||||
|
||||
GpeRegisterInfo->StatusAddress.AddressSpaceId = AcpiGbl_GpeBlockInfo[GpeBlock].AddressSpaceId;
|
||||
GpeRegisterInfo->EnableAddress.AddressSpaceId = AcpiGbl_GpeBlockInfo[GpeBlock].AddressSpaceId;
|
||||
GpeRegisterInfo->StatusAddress.RegisterBitWidth = 8;
|
||||
GpeRegisterInfo->EnableAddress.RegisterBitWidth = 8;
|
||||
GpeRegisterInfo->StatusAddress.RegisterBitOffset = 8;
|
||||
GpeRegisterInfo->EnableAddress.RegisterBitOffset = 8;
|
||||
|
||||
/* Init the Index mapping info for each GPE number within this register */
|
||||
|
||||
@ -552,18 +566,24 @@ AcpiEvGpeInitialize (void)
|
||||
* are cleared by writing a '1', while enable registers are cleared
|
||||
* by writing a '0'.
|
||||
*/
|
||||
AcpiOsWritePort (GpeRegisterInfo->EnableAddr, 0x00, 8);
|
||||
AcpiOsWritePort (GpeRegisterInfo->StatusAddr, 0xFF, 8);
|
||||
|
||||
AcpiHwLowLevelWrite (8, 0x00, &GpeRegisterInfo->EnableAddress, 0);
|
||||
AcpiHwLowLevelWrite (8, 0xFF, &GpeRegisterInfo->StatusAddress, 0);
|
||||
|
||||
GpeRegister++;
|
||||
}
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE registers: %X@%8.8X%8.8X (Blk0) %X@%8.8X%8.8X (Blk1)\n",
|
||||
AcpiGbl_GpeBlockInfo[0].RegisterCount,
|
||||
ACPI_HIDWORD (AcpiGbl_FADT->XGpe0Blk.Address), ACPI_LODWORD (AcpiGbl_FADT->XGpe0Blk.Address),
|
||||
AcpiGbl_GpeBlockInfo[1].RegisterCount,
|
||||
ACPI_HIDWORD (AcpiGbl_FADT->XGpe1Blk.Address), ACPI_LODWORD (AcpiGbl_FADT->XGpe1Blk.Address)));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d: %X registers at %8.8X%8.8X\n",
|
||||
GpeBlock, AcpiGbl_GpeBlockInfo[0].RegisterCount,
|
||||
ACPI_HIDWORD (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address),
|
||||
ACPI_LODWORD (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address)));
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d Range GPE #%2.2X to GPE #%2.2X\n",
|
||||
GpeBlock,
|
||||
AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber,
|
||||
AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber +
|
||||
((AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount * 8) -1)));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
|
||||
@ -762,17 +782,18 @@ AcpiEvGpeDetect (void)
|
||||
{
|
||||
GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[i];
|
||||
|
||||
AcpiOsReadPort (GpeRegisterInfo->StatusAddr,
|
||||
&GpeRegisterInfo->Status, 8);
|
||||
GpeRegisterInfo->Status = (UINT8) AcpiHwLowLevelRead (8,
|
||||
&GpeRegisterInfo->StatusAddress, 0);
|
||||
|
||||
AcpiOsReadPort (GpeRegisterInfo->EnableAddr,
|
||||
&GpeRegisterInfo->Enable, 8);
|
||||
GpeRegisterInfo->Enable = (UINT8) AcpiHwLowLevelRead (8,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
|
||||
"GPE block at %X - Enable %08X Status %08X\n",
|
||||
GpeRegisterInfo->EnableAddr,
|
||||
GpeRegisterInfo->Status,
|
||||
GpeRegisterInfo->Enable));
|
||||
"GPE block at %8.8X%8.8X - Enable %08X Status %08X\n",
|
||||
ACPI_HIDWORD (GpeRegisterInfo->EnableAddress.Address),
|
||||
ACPI_LODWORD (GpeRegisterInfo->EnableAddress.Address),
|
||||
GpeRegisterInfo->Enable,
|
||||
GpeRegisterInfo->Status));
|
||||
|
||||
/* First check if there is anything active at all in this register */
|
||||
|
||||
@ -944,6 +965,12 @@ AcpiEvGpeDispatch (
|
||||
}
|
||||
else if (GpeInfo->MethodHandle)
|
||||
{
|
||||
/*
|
||||
* Disable GPE, so it doesn't keep firing before the method has a
|
||||
* chance to run.
|
||||
*/
|
||||
AcpiHwDisableGpe (GpeNumber);
|
||||
|
||||
/*
|
||||
* Execute the method associated with the GPE.
|
||||
*/
|
||||
@ -951,13 +978,7 @@ AcpiEvGpeDispatch (
|
||||
AcpiEvAsynchExecuteGpeMethod,
|
||||
ACPI_TO_POINTER (GpeNumber))))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to queue handler for GPE[%X], disabling event\n", GpeNumber));
|
||||
|
||||
/*
|
||||
* Disable the GPE on error. The GPE will remain disabled until the ACPI
|
||||
* Core Subsystem is restarted, or the handler is reinstalled.
|
||||
*/
|
||||
AcpiHwDisableGpe (GpeNumber);
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to queue handler for GPE[%X], event is disabled\n", GpeNumber));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1,8 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evmisc - ACPI device notification handler dispatch
|
||||
* and ACPI Global Lock support
|
||||
* $Revision: 47 $
|
||||
* Module Name: evmisc - Miscellaneous event manager support functions
|
||||
* $Revision: 48 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -125,6 +124,41 @@
|
||||
ACPI_MODULE_NAME ("evmisc")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvIsNotifyObject
|
||||
*
|
||||
* PARAMETERS: Node - Node to check
|
||||
*
|
||||
* RETURN: TRUE if notifies allowed on this object
|
||||
*
|
||||
* DESCRIPTION: Check type of node for a object that supports notifies.
|
||||
*
|
||||
* TBD: This could be replaced by a flag bit in the node.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
BOOLEAN
|
||||
AcpiEvIsNotifyObject (
|
||||
ACPI_NAMESPACE_NODE *Node)
|
||||
{
|
||||
switch (Node->Type)
|
||||
{
|
||||
case ACPI_TYPE_DEVICE:
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
case ACPI_TYPE_POWER:
|
||||
case ACPI_TYPE_THERMAL:
|
||||
/*
|
||||
* These are the ONLY objects that can receive ACPI notifications
|
||||
*/
|
||||
return (TRUE);
|
||||
|
||||
default:
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvGetGpeRegisterIndex
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evxface - External interfaces for ACPI events
|
||||
* $Revision: 125 $
|
||||
* $Revision: 126 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -128,6 +128,7 @@
|
||||
ACPI_MODULE_NAME ("evxface")
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInstallFixedEventHandler
|
||||
@ -293,7 +294,7 @@ AcpiInstallNotifyHandler (
|
||||
{
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_OPERAND_OBJECT *NotifyObj;
|
||||
ACPI_NAMESPACE_NODE *DeviceNode;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
@ -302,7 +303,8 @@ AcpiInstallNotifyHandler (
|
||||
|
||||
/* Parameter validation */
|
||||
|
||||
if ((!Handler) ||
|
||||
if ((!Device) ||
|
||||
(!Handler) ||
|
||||
(HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
@ -316,8 +318,8 @@ AcpiInstallNotifyHandler (
|
||||
|
||||
/* Convert and validate the device handle */
|
||||
|
||||
DeviceNode = AcpiNsMapHandleToNode (Device);
|
||||
if (!DeviceNode)
|
||||
Node = AcpiNsMapHandleToNode (Device);
|
||||
if (!Node)
|
||||
{
|
||||
Status = AE_BAD_PARAMETER;
|
||||
goto UnlockAndExit;
|
||||
@ -344,13 +346,13 @@ AcpiInstallNotifyHandler (
|
||||
|
||||
if (HandlerType == ACPI_SYSTEM_NOTIFY)
|
||||
{
|
||||
AcpiGbl_SysNotify.Node = DeviceNode;
|
||||
AcpiGbl_SysNotify.Node = Node;
|
||||
AcpiGbl_SysNotify.Handler = Handler;
|
||||
AcpiGbl_SysNotify.Context = Context;
|
||||
}
|
||||
else /* ACPI_DEVICE_NOTIFY */
|
||||
{
|
||||
AcpiGbl_DrvNotify.Node = DeviceNode;
|
||||
AcpiGbl_DrvNotify.Node = Node;
|
||||
AcpiGbl_DrvNotify.Handler = Handler;
|
||||
AcpiGbl_DrvNotify.Context = Context;
|
||||
}
|
||||
@ -365,30 +367,26 @@ AcpiInstallNotifyHandler (
|
||||
*/
|
||||
else
|
||||
{
|
||||
/*
|
||||
* These are the ONLY objects that can receive ACPI notifications
|
||||
*/
|
||||
if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
|
||||
(DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
|
||||
(DeviceNode->Type != ACPI_TYPE_POWER) &&
|
||||
(DeviceNode->Type != ACPI_TYPE_THERMAL))
|
||||
/* Notifies allowed on this object? */
|
||||
|
||||
if (!AcpiEvIsNotifyObject (Node))
|
||||
{
|
||||
Status = AE_BAD_PARAMETER;
|
||||
Status = AE_TYPE;
|
||||
goto UnlockAndExit;
|
||||
}
|
||||
|
||||
/* Check for an existing internal object */
|
||||
|
||||
ObjDesc = AcpiNsGetAttachedObject (DeviceNode);
|
||||
ObjDesc = AcpiNsGetAttachedObject (Node);
|
||||
if (ObjDesc)
|
||||
{
|
||||
|
||||
/* Object exists - make sure there's no handler */
|
||||
|
||||
if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
|
||||
ObjDesc->Device.SysHandler) ||
|
||||
ObjDesc->CommonNotify.SysHandler) ||
|
||||
((HandlerType == ACPI_DEVICE_NOTIFY) &&
|
||||
ObjDesc->Device.DrvHandler))
|
||||
ObjDesc->CommonNotify.DrvHandler))
|
||||
{
|
||||
Status = AE_ALREADY_EXISTS;
|
||||
goto UnlockAndExit;
|
||||
@ -398,7 +396,7 @@ AcpiInstallNotifyHandler (
|
||||
{
|
||||
/* Create a new object */
|
||||
|
||||
ObjDesc = AcpiUtCreateInternalObject (DeviceNode->Type);
|
||||
ObjDesc = AcpiUtCreateInternalObject (Node->Type);
|
||||
if (!ObjDesc)
|
||||
{
|
||||
Status = AE_NO_MEMORY;
|
||||
@ -407,7 +405,7 @@ AcpiInstallNotifyHandler (
|
||||
|
||||
/* Attach new object to the Node */
|
||||
|
||||
Status = AcpiNsAttachObject (Device, ObjDesc, DeviceNode->Type);
|
||||
Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto UnlockAndExit;
|
||||
@ -423,18 +421,17 @@ AcpiInstallNotifyHandler (
|
||||
goto UnlockAndExit;
|
||||
}
|
||||
|
||||
NotifyObj->NotifyHandler.Node = DeviceNode;
|
||||
NotifyObj->NotifyHandler.Node = Node;
|
||||
NotifyObj->NotifyHandler.Handler = Handler;
|
||||
NotifyObj->NotifyHandler.Context = Context;
|
||||
|
||||
|
||||
if (HandlerType == ACPI_SYSTEM_NOTIFY)
|
||||
{
|
||||
ObjDesc->Device.SysHandler = NotifyObj;
|
||||
ObjDesc->CommonNotify.SysHandler = NotifyObj;
|
||||
}
|
||||
else /* ACPI_DEVICE_NOTIFY */
|
||||
{
|
||||
ObjDesc->Device.DrvHandler = NotifyObj;
|
||||
ObjDesc->CommonNotify.DrvHandler = NotifyObj;
|
||||
}
|
||||
}
|
||||
|
||||
@ -468,7 +465,7 @@ AcpiRemoveNotifyHandler (
|
||||
{
|
||||
ACPI_OPERAND_OBJECT *NotifyObj;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_NAMESPACE_NODE *DeviceNode;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
@ -477,7 +474,8 @@ AcpiRemoveNotifyHandler (
|
||||
|
||||
/* Parameter validation */
|
||||
|
||||
if ((!Handler) ||
|
||||
if ((!Device) ||
|
||||
(!Handler) ||
|
||||
(HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
@ -491,8 +489,8 @@ AcpiRemoveNotifyHandler (
|
||||
|
||||
/* Convert and validate the device handle */
|
||||
|
||||
DeviceNode = AcpiNsMapHandleToNode (Device);
|
||||
if (!DeviceNode)
|
||||
Node = AcpiNsMapHandleToNode (Device);
|
||||
if (!Node)
|
||||
{
|
||||
Status = AE_BAD_PARAMETER;
|
||||
goto UnlockAndExit;
|
||||
@ -533,21 +531,17 @@ AcpiRemoveNotifyHandler (
|
||||
*/
|
||||
else
|
||||
{
|
||||
/*
|
||||
* These are the ONLY objects that can receive ACPI notifications
|
||||
*/
|
||||
if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
|
||||
(DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
|
||||
(DeviceNode->Type != ACPI_TYPE_POWER) &&
|
||||
(DeviceNode->Type != ACPI_TYPE_THERMAL))
|
||||
/* Notifies allowed on this object? */
|
||||
|
||||
if (!AcpiEvIsNotifyObject (Node))
|
||||
{
|
||||
Status = AE_BAD_PARAMETER;
|
||||
Status = AE_TYPE;
|
||||
goto UnlockAndExit;
|
||||
}
|
||||
|
||||
/* Check for an existing internal object */
|
||||
|
||||
ObjDesc = AcpiNsGetAttachedObject (DeviceNode);
|
||||
ObjDesc = AcpiNsGetAttachedObject (Node);
|
||||
if (!ObjDesc)
|
||||
{
|
||||
Status = AE_NOT_EXIST;
|
||||
@ -558,11 +552,11 @@ AcpiRemoveNotifyHandler (
|
||||
|
||||
if (HandlerType == ACPI_SYSTEM_NOTIFY)
|
||||
{
|
||||
NotifyObj = ObjDesc->Device.SysHandler;
|
||||
NotifyObj = ObjDesc->CommonNotify.SysHandler;
|
||||
}
|
||||
else
|
||||
{
|
||||
NotifyObj = ObjDesc->Device.DrvHandler;
|
||||
NotifyObj = ObjDesc->CommonNotify.DrvHandler;
|
||||
}
|
||||
|
||||
if ((!NotifyObj) ||
|
||||
@ -576,11 +570,11 @@ AcpiRemoveNotifyHandler (
|
||||
|
||||
if (HandlerType == ACPI_SYSTEM_NOTIFY)
|
||||
{
|
||||
ObjDesc->Device.SysHandler = NULL;
|
||||
ObjDesc->CommonNotify.SysHandler = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjDesc->Device.DrvHandler = NULL;
|
||||
ObjDesc->CommonNotify.DrvHandler = NULL;
|
||||
}
|
||||
|
||||
AcpiUtRemoveReference (NotifyObj);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
|
||||
* $Revision: 59 $
|
||||
* $Revision: 60 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -443,7 +443,7 @@ AcpiExLoadOp (
|
||||
* Read the entire field and thus the entire table. Buffer is
|
||||
* allocated during the read.
|
||||
*/
|
||||
Status = AcpiExReadDataFromField (ObjDesc, &BufferDesc);
|
||||
Status = AcpiExReadDataFromField (WalkState, ObjDesc, &BufferDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exconvrt - Object conversion routines
|
||||
* $Revision: 30 $
|
||||
* $Revision: 32 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -319,8 +319,7 @@ AcpiExConvertToBuffer (
|
||||
{
|
||||
/*
|
||||
* We are running a method that exists in a 32-bit ACPI table.
|
||||
* Truncate the value to 32 bits by zeroing out the upper
|
||||
* 32-bit field
|
||||
* Use only 32 bits of the Integer for conversion.
|
||||
*/
|
||||
IntegerSize = sizeof (UINT32);
|
||||
}
|
||||
@ -365,6 +364,9 @@ AcpiExConvertToBuffer (
|
||||
return_ACPI_STATUS (AE_TYPE);
|
||||
}
|
||||
|
||||
/* Mark buffer initialized */
|
||||
|
||||
(*ResultDesc)->Common.Flags |= AOPOBJ_DATA_VALID;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
@ -516,8 +518,7 @@ AcpiExConvertToString (
|
||||
{
|
||||
/*
|
||||
* We are running a method that exists in a 32-bit ACPI table.
|
||||
* Truncate the value to 32 bits by zeroing out the upper
|
||||
* 32-bit field
|
||||
* Use only 32 bits of the Integer
|
||||
*/
|
||||
IntegerSize = sizeof (UINT32);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exdump - Interpreter debug output routines
|
||||
* $Revision: 145 $
|
||||
* $Revision: 147 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -251,7 +251,7 @@ AcpiExDumpOperand (
|
||||
ACPI_FUNCTION_NAME ("ExDumpOperand")
|
||||
|
||||
|
||||
if (!((ACPI_LV_INFO & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
|
||||
if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
@ -263,27 +263,27 @@ AcpiExDumpOperand (
|
||||
* since most (if not all)
|
||||
* code that dumps the stack expects something to be there!
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Null stack entry ptr\n"));
|
||||
AcpiOsPrintf ("Null stack entry ptr\n");
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p NS Node: ", ObjDesc));
|
||||
ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_INFO);
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p NS Node: ", ObjDesc));
|
||||
ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_EXEC);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_INTERNAL)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p is not a local object\n", ObjDesc));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is not a local object\n", ObjDesc));
|
||||
ACPI_DUMP_BUFFER (ObjDesc, sizeof (ACPI_OPERAND_OBJECT));
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* ObjDesc is a valid object */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p ", ObjDesc));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", ObjDesc));
|
||||
|
||||
switch (ObjDesc->Common.Type)
|
||||
{
|
||||
@ -545,7 +545,7 @@ AcpiExDumpOperand (
|
||||
|
||||
if (!ObjDesc->BufferField.BufferObj)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "*NULL* \n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL* \n"));
|
||||
}
|
||||
|
||||
else if (ACPI_TYPE_BUFFER !=
|
||||
@ -659,7 +659,7 @@ AcpiExDumpOperands (
|
||||
}
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
|
||||
Ident, NumLevels));
|
||||
|
||||
@ -680,7 +680,7 @@ AcpiExDumpOperands (
|
||||
}
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"************* Stack dump from %s(%d), %s\n",
|
||||
ModuleName, LineNumber, Note));
|
||||
return;
|
||||
@ -852,7 +852,6 @@ AcpiExDumpObjectDescriptor (
|
||||
AcpiExOutInteger ("Flags", ObjDesc->Package.Flags);
|
||||
AcpiExOutInteger ("Count", ObjDesc->Package.Count);
|
||||
AcpiExOutPointer ("Elements", ObjDesc->Package.Elements);
|
||||
AcpiExOutPointer ("NextElement", ObjDesc->Package.NextElement);
|
||||
|
||||
/* Dump the package contents */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
|
||||
* $Revision: 105 $
|
||||
* $Revision: 108 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -134,7 +134,8 @@
|
||||
*
|
||||
* FUNCTION: AcpiExReadDataFromField
|
||||
*
|
||||
* PARAMETERS: ObjDesc - The named field
|
||||
* PARAMETERS: WalkState - Current execution state
|
||||
* ObjDesc - The named field
|
||||
* RetBufferDesc - Where the return data object is stored
|
||||
*
|
||||
* RETURN: Status
|
||||
@ -146,12 +147,14 @@
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExReadDataFromField (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
ACPI_OPERAND_OBJECT **RetBufferDesc)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OPERAND_OBJECT *BufferDesc;
|
||||
UINT32 Length;
|
||||
UINT32 IntegerSize;
|
||||
void *Buffer;
|
||||
BOOLEAN Locked;
|
||||
|
||||
@ -194,7 +197,19 @@ AcpiExReadDataFromField (
|
||||
*/
|
||||
Length = ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->Field.BitLength);
|
||||
|
||||
if (Length > sizeof (ACPI_INTEGER))
|
||||
/* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
|
||||
|
||||
IntegerSize = sizeof (ACPI_INTEGER);
|
||||
if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
|
||||
{
|
||||
/*
|
||||
* We are running a method that exists in a 32-bit ACPI table.
|
||||
* Integer size is 4.
|
||||
*/
|
||||
IntegerSize = sizeof (UINT32);
|
||||
}
|
||||
|
||||
if (Length > IntegerSize)
|
||||
{
|
||||
/* Field is too large for an Integer, create a Buffer instead */
|
||||
|
||||
@ -213,6 +228,7 @@ AcpiExReadDataFromField (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
BufferDesc->Common.Flags = AOPOBJ_DATA_VALID;
|
||||
BufferDesc->Buffer.Length = Length;
|
||||
Buffer = BufferDesc->Buffer.Pointer;
|
||||
}
|
||||
@ -226,14 +242,15 @@ AcpiExReadDataFromField (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
Length = sizeof (BufferDesc->Integer.Value);
|
||||
Length = IntegerSize;
|
||||
BufferDesc->Integer.Value = 0;
|
||||
Buffer = &BufferDesc->Integer.Value;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"Obj=%p Type=%X Buf=%p Len=%X\n",
|
||||
ObjDesc, ObjDesc->Common.Type, Buffer, Length));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"FieldWrite: BitLen=%X BitOff=%X ByteOff=%X\n",
|
||||
ObjDesc->CommonField.BitLength,
|
||||
ObjDesc->CommonField.StartFieldBitOffset,
|
||||
@ -368,10 +385,10 @@ AcpiExWriteDataToField (
|
||||
Length = RequiredLength;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"Obj=%p Type=%X Buf=%p Len=%X\n",
|
||||
ObjDesc, ObjDesc->Common.Type, Buffer, Length));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"FieldRead: BitLen=%X BitOff=%X ByteOff=%X\n",
|
||||
ObjDesc->CommonField.BitLength,
|
||||
ObjDesc->CommonField.StartFieldBitOffset,
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
|
||||
* $Revision: 134 $
|
||||
* $Revision: 135 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -928,10 +928,22 @@ AcpiExOpcode_1A_0T_1R (
|
||||
switch (Operand[0]->Reference.TargetType)
|
||||
{
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
|
||||
/* Ensure that the Buffer arguments are evaluated */
|
||||
|
||||
TempDesc = Operand[0]->Reference.Object;
|
||||
#if 0
|
||||
|
||||
Status = AcpiDsGetBufferArguments (TempDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The target is a buffer, we must create a new object that
|
||||
* contains one element of the buffer, the element pointed
|
||||
* to by the index.
|
||||
* Create a new object that contains one element of the
|
||||
* buffer -- the element pointed to by the index.
|
||||
*
|
||||
* NOTE: index into a buffer is NOT a pointer to a
|
||||
* sub-buffer of the main buffer, it is only a pointer to a
|
||||
@ -949,7 +961,6 @@ AcpiExOpcode_1A_0T_1R (
|
||||
* indexed location, we don't need to add an additional
|
||||
* reference to the buffer itself.
|
||||
*/
|
||||
TempDesc = Operand[0]->Reference.Object;
|
||||
ReturnDesc->Integer.Value =
|
||||
TempDesc->Buffer.Pointer[Operand[0]->Reference.Offset];
|
||||
break;
|
||||
@ -957,10 +968,18 @@ AcpiExOpcode_1A_0T_1R (
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
|
||||
#if 0
|
||||
/* Ensure that the Package arguments are evaluated */
|
||||
|
||||
Status = AcpiDsGetPackageArguments (Operand[0]->Reference.Object);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* The target is a package, we want to return the referenced
|
||||
* element of the package. We must add another reference to
|
||||
* this object, however.
|
||||
* Return the referenced element of the package. We must add
|
||||
* another reference to the referenced object, however.
|
||||
*/
|
||||
ReturnDesc = *(Operand[0]->Reference.Where);
|
||||
if (!ReturnDesc)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
|
||||
* $Revision: 104 $
|
||||
* $Revision: 105 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -177,51 +177,47 @@ AcpiExOpcode_2A_0T_0R (
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_STR ("ExOpcode_2A_0T_0R", AcpiPsGetOpcodeName (WalkState->Opcode));
|
||||
ACPI_FUNCTION_TRACE_STR ("ExOpcode_2A_0T_0R",
|
||||
AcpiPsGetOpcodeName (WalkState->Opcode));
|
||||
|
||||
|
||||
/* Examine the opcode */
|
||||
|
||||
switch (WalkState->Opcode)
|
||||
{
|
||||
|
||||
case AML_NOTIFY_OP: /* Notify (NotifyObject, NotifyValue) */
|
||||
|
||||
/* The first operand is a namespace node */
|
||||
|
||||
Node = (ACPI_NAMESPACE_NODE *) Operand[0];
|
||||
|
||||
/* The node must refer to a device or thermal zone or processor */
|
||||
/* Notifies allowed on this object? */
|
||||
|
||||
switch (Node->Type)
|
||||
if (!AcpiEvIsNotifyObject (Node))
|
||||
{
|
||||
case ACPI_TYPE_DEVICE:
|
||||
case ACPI_TYPE_THERMAL:
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
|
||||
/*
|
||||
* Dispatch the notify to the appropriate handler
|
||||
* NOTE: the request is queued for execution after this method
|
||||
* completes. The notify handlers are NOT invoked synchronously
|
||||
* from this thread -- because handlers may in turn run other
|
||||
* control methods.
|
||||
*/
|
||||
Status = AcpiEvQueueNotifyRequest (Node,
|
||||
(UINT32) Operand[1]->Integer.Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unexpected notify object type %X\n",
|
||||
Node->Type));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unexpected notify object type [%s]\n",
|
||||
AcpiUtGetTypeName (Node->Type)));
|
||||
|
||||
Status = AE_AML_OPERAND_TYPE;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dispatch the notify to the appropriate handler
|
||||
* NOTE: the request is queued for execution after this method
|
||||
* completes. The notify handlers are NOT invoked synchronously
|
||||
* from this thread -- because handlers may in turn run other
|
||||
* control methods.
|
||||
*/
|
||||
Status = AcpiEvQueueNotifyRequest (Node,
|
||||
(UINT32) Operand[1]->Integer.Value);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
ACPI_REPORT_ERROR (("AcpiExOpcode_2A_0T_0R: Unknown opcode %X\n", WalkState->Opcode));
|
||||
ACPI_REPORT_ERROR (("AcpiExOpcode_2A_0T_0R: Unknown opcode %X\n",
|
||||
WalkState->Opcode));
|
||||
Status = AE_AML_BAD_OPCODE;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
|
||||
* $Revision: 114 $
|
||||
* $Revision: 115 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -303,16 +303,18 @@ AcpiExPrepCommonFieldObject (
|
||||
* two pieces of information - the width of each field access and the
|
||||
* necessary ByteAlignment (address granularity) of the access.
|
||||
*
|
||||
* For AnyAcc, the AccessBitWidth is the largest width that is both necessary
|
||||
* and possible in an attempt to access the whole field in one
|
||||
* I/O operation. However, for AnyAcc, the ByteAlignment is always one byte.
|
||||
* For AnyAcc, the AccessBitWidth is the largest width that is both
|
||||
* necessary and possible in an attempt to access the whole field in one
|
||||
* I/O operation. However, for AnyAcc, the ByteAlignment is always one
|
||||
* byte.
|
||||
*
|
||||
* For all Buffer Fields, the ByteAlignment is always one byte.
|
||||
*
|
||||
* For all other access types (Byte, Word, Dword, Qword), the Bitwidth is the
|
||||
* same (equivalent) as the ByteAlignment.
|
||||
* For all other access types (Byte, Word, Dword, Qword), the Bitwidth is
|
||||
* the same (equivalent) as the ByteAlignment.
|
||||
*/
|
||||
AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags, &ByteAlignment);
|
||||
AccessBitWidth = AcpiExDecodeFieldAccess (ObjDesc, FieldFlags,
|
||||
&ByteAlignment);
|
||||
if (!AccessBitWidth)
|
||||
{
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
|
||||
@ -320,45 +322,59 @@ AcpiExPrepCommonFieldObject (
|
||||
|
||||
/* Setup width (access granularity) fields */
|
||||
|
||||
ObjDesc->CommonField.AccessByteWidth = (UINT8) ACPI_DIV_8 (AccessBitWidth); /* 1, 2, 4, 8 */
|
||||
ObjDesc->CommonField.AccessByteWidth = (UINT8)
|
||||
ACPI_DIV_8 (AccessBitWidth); /* 1, 2, 4, 8 */
|
||||
|
||||
/*
|
||||
* BaseByteOffset is the address of the start of the field within the region. It is
|
||||
* the byte address of the first *datum* (field-width data unit) of the field.
|
||||
* (i.e., the first datum that contains at least the first *bit* of the field.)
|
||||
* Note: ByteAlignment is always either equal to the AccessBitWidth or 8 (Byte access),
|
||||
* and it defines the addressing granularity of the parent region or buffer.
|
||||
* BaseByteOffset is the address of the start of the field within the
|
||||
* region. It is the byte address of the first *datum* (field-width data
|
||||
* unit) of the field. (i.e., the first datum that contains at least the
|
||||
* first *bit* of the field.)
|
||||
*
|
||||
* Note: ByteAlignment is always either equal to the AccessBitWidth or 8
|
||||
* (Byte access), and it defines the addressing granularity of the parent
|
||||
* region or buffer.
|
||||
*/
|
||||
NearestByteAddress = ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
|
||||
ObjDesc->CommonField.BaseByteOffset = ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
|
||||
NearestByteAddress =
|
||||
ACPI_ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
|
||||
ObjDesc->CommonField.BaseByteOffset =
|
||||
ACPI_ROUND_DOWN (NearestByteAddress, ByteAlignment);
|
||||
|
||||
/*
|
||||
* StartFieldBitOffset is the offset of the first bit of the field within a field datum.
|
||||
* StartFieldBitOffset is the offset of the first bit of the field within
|
||||
* a field datum.
|
||||
*/
|
||||
ObjDesc->CommonField.StartFieldBitOffset = (UINT8) (FieldBitPosition -
|
||||
ACPI_MUL_8 (ObjDesc->CommonField.BaseByteOffset));
|
||||
ObjDesc->CommonField.StartFieldBitOffset = (UINT8)
|
||||
(FieldBitPosition - ACPI_MUL_8 (ObjDesc->CommonField.BaseByteOffset));
|
||||
|
||||
/*
|
||||
* Valid bits -- the number of bits that compose a partial datum,
|
||||
* 1) At the end of the field within the region (arbitrary starting bit offset)
|
||||
* 2) At the end of a buffer used to contain the field (starting offset always zero)
|
||||
* 1) At the end of the field within the region (arbitrary starting bit
|
||||
* offset)
|
||||
* 2) At the end of a buffer used to contain the field (starting offset
|
||||
* always zero)
|
||||
*/
|
||||
ObjDesc->CommonField.EndFieldValidBits = (UINT8) ((ObjDesc->CommonField.StartFieldBitOffset + FieldBitLength) %
|
||||
ObjDesc->CommonField.EndFieldValidBits = (UINT8)
|
||||
((ObjDesc->CommonField.StartFieldBitOffset + FieldBitLength) %
|
||||
AccessBitWidth);
|
||||
ObjDesc->CommonField.EndBufferValidBits = (UINT8) (FieldBitLength % AccessBitWidth); /* StartBufferBitOffset always = 0 */
|
||||
/* StartBufferBitOffset always = 0 */
|
||||
|
||||
ObjDesc->CommonField.EndBufferValidBits = (UINT8)
|
||||
(FieldBitLength % AccessBitWidth);
|
||||
|
||||
/*
|
||||
* DatumValidBits is the number of valid field bits in the first field datum.
|
||||
* DatumValidBits is the number of valid field bits in the first
|
||||
* field datum.
|
||||
*/
|
||||
ObjDesc->CommonField.DatumValidBits = (UINT8) (AccessBitWidth -
|
||||
ObjDesc->CommonField.StartFieldBitOffset);
|
||||
ObjDesc->CommonField.DatumValidBits = (UINT8)
|
||||
(AccessBitWidth - ObjDesc->CommonField.StartFieldBitOffset);
|
||||
|
||||
/*
|
||||
* Does the entire field fit within a single field access element? (datum)
|
||||
* (i.e., without crossing a datum boundary)
|
||||
*/
|
||||
if ((ObjDesc->CommonField.StartFieldBitOffset + FieldBitLength) <=
|
||||
(UINT16) AccessBitWidth)
|
||||
(UINT16) AccessBitWidth)
|
||||
{
|
||||
ObjDesc->Common.Flags |= AOPOBJ_SINGLE_DATUM;
|
||||
}
|
||||
@ -448,7 +464,7 @@ AcpiExPrepFieldValue (
|
||||
|
||||
AcpiUtAddReference (ObjDesc->Field.RegionObj);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"RegionField: Bitoff=%X Off=%X Gran=%X Region %p\n",
|
||||
ObjDesc->Field.StartFieldBitOffset, ObjDesc->Field.BaseByteOffset,
|
||||
ObjDesc->Field.AccessByteWidth, ObjDesc->Field.RegionObj));
|
||||
@ -466,9 +482,12 @@ AcpiExPrepFieldValue (
|
||||
AcpiUtAddReference (ObjDesc->BankField.RegionObj);
|
||||
AcpiUtAddReference (ObjDesc->BankField.BankObj);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Bank Field: BitOff=%X Off=%X Gran=%X Region %p BankReg %p\n",
|
||||
ObjDesc->BankField.StartFieldBitOffset, ObjDesc->BankField.BaseByteOffset,
|
||||
ObjDesc->Field.AccessByteWidth, ObjDesc->BankField.RegionObj,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"Bank Field: BitOff=%X Off=%X Gran=%X Region %p BankReg %p\n",
|
||||
ObjDesc->BankField.StartFieldBitOffset,
|
||||
ObjDesc->BankField.BaseByteOffset,
|
||||
ObjDesc->Field.AccessByteWidth,
|
||||
ObjDesc->BankField.RegionObj,
|
||||
ObjDesc->BankField.BankObj));
|
||||
break;
|
||||
|
||||
@ -477,8 +496,8 @@ AcpiExPrepFieldValue (
|
||||
|
||||
ObjDesc->IndexField.IndexObj = AcpiNsGetAttachedObject (Info->RegisterNode);
|
||||
ObjDesc->IndexField.DataObj = AcpiNsGetAttachedObject (Info->DataRegisterNode);
|
||||
ObjDesc->IndexField.Value = (UINT32) (Info->FieldBitPosition /
|
||||
ACPI_MUL_8 (ObjDesc->Field.AccessByteWidth));
|
||||
ObjDesc->IndexField.Value = (UINT32)
|
||||
(Info->FieldBitPosition / ACPI_MUL_8 (ObjDesc->Field.AccessByteWidth));
|
||||
|
||||
if (!ObjDesc->IndexField.DataObj || !ObjDesc->IndexField.IndexObj)
|
||||
{
|
||||
@ -491,9 +510,12 @@ AcpiExPrepFieldValue (
|
||||
AcpiUtAddReference (ObjDesc->IndexField.DataObj);
|
||||
AcpiUtAddReference (ObjDesc->IndexField.IndexObj);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "IndexField: bitoff=%X off=%X gran=%X Index %p Data %p\n",
|
||||
ObjDesc->IndexField.StartFieldBitOffset, ObjDesc->IndexField.BaseByteOffset,
|
||||
ObjDesc->Field.AccessByteWidth, ObjDesc->IndexField.IndexObj,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"IndexField: bitoff=%X off=%X gran=%X Index %p Data %p\n",
|
||||
ObjDesc->IndexField.StartFieldBitOffset,
|
||||
ObjDesc->IndexField.BaseByteOffset,
|
||||
ObjDesc->Field.AccessByteWidth,
|
||||
ObjDesc->IndexField.IndexObj,
|
||||
ObjDesc->IndexField.DataObj));
|
||||
break;
|
||||
}
|
||||
@ -505,7 +527,7 @@ AcpiExPrepFieldValue (
|
||||
Status = AcpiNsAttachObject (Info->FieldNode, ObjDesc,
|
||||
AcpiNsGetType (Info->FieldNode));
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "set NamedObj %p (%4.4s) val = %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "set NamedObj %p (%4.4s) val = %p\n",
|
||||
Info->FieldNode, (char *) &(Info->FieldNode->Name), ObjDesc));
|
||||
|
||||
/* Remove local reference to the object */
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exregion - ACPI default OpRegion (address space) handlers
|
||||
* $Revision: 72 $
|
||||
* $Revision: 74 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -162,7 +162,6 @@ AcpiExSystemMemorySpaceHandler (
|
||||
ACPI_MEM_SPACE_CONTEXT *MemInfo = RegionContext;
|
||||
UINT32 Length;
|
||||
UINT32 WindowSize;
|
||||
UINT32 Remaining;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("ExSystemMemorySpaceHandler");
|
||||
@ -219,15 +218,11 @@ AcpiExSystemMemorySpaceHandler (
|
||||
* Don't attempt to map memory beyond the end of the region, and
|
||||
* constrain the maximum mapping size to something reasonable.
|
||||
*/
|
||||
Remaining = (UINT32) ((MemInfo->Address + (ACPI_PHYSICAL_ADDRESS) MemInfo->Length) - Address);
|
||||
if (Remaining > SYSMEM_REGION_WINDOW_SIZE)
|
||||
WindowSize = (UINT32) ((MemInfo->Address + MemInfo->Length) - Address);
|
||||
if (WindowSize > SYSMEM_REGION_WINDOW_SIZE)
|
||||
{
|
||||
WindowSize = SYSMEM_REGION_WINDOW_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowSize = Remaining;
|
||||
}
|
||||
|
||||
/* Create a new mapping starting at the address given */
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresnte - AML Interpreter object resolution
|
||||
* $Revision: 50 $
|
||||
* $Revision: 52 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -218,10 +218,14 @@ AcpiExResolveNodeToValue (
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
/* Return an additional reference to the object */
|
||||
Status = AcpiDsGetPackageArguments (SourceDesc);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* Return an additional reference to the object */
|
||||
|
||||
ObjDesc = SourceDesc;
|
||||
AcpiUtAddReference (ObjDesc);
|
||||
ObjDesc = SourceDesc;
|
||||
AcpiUtAddReference (ObjDesc);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@ -234,10 +238,14 @@ AcpiExResolveNodeToValue (
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
/* Return an additional reference to the object */
|
||||
Status = AcpiDsGetBufferArguments (SourceDesc);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* Return an additional reference to the object */
|
||||
|
||||
ObjDesc = SourceDesc;
|
||||
AcpiUtAddReference (ObjDesc);
|
||||
ObjDesc = SourceDesc;
|
||||
AcpiUtAddReference (ObjDesc);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@ -281,7 +289,7 @@ AcpiExResolveNodeToValue (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "FieldRead Node=%p SourceDesc=%p Type=%X\n",
|
||||
Node, SourceDesc, EntryType));
|
||||
|
||||
Status = AcpiExReadDataFromField (SourceDesc, &ObjDesc);
|
||||
Status = AcpiExReadDataFromField (WalkState, SourceDesc, &ObjDesc);
|
||||
break;
|
||||
|
||||
/*
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresolv - AML Interpreter object resolution
|
||||
* $Revision: 106 $
|
||||
* $Revision: 109 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -191,7 +191,7 @@ AcpiExResolveToValue (
|
||||
}
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Resolved object %p\n", *StackPtr));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Resolved object %p\n", *StackPtr));
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ AcpiExResolveObjectToValue (
|
||||
AcpiUtRemoveReference (StackDesc);
|
||||
*StackPtr = ObjDesc;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "[Arg/Local %d] ValueObj is %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Arg/Local %d] ValueObj is %p\n",
|
||||
StackDesc->Reference.Offset, ObjDesc));
|
||||
break;
|
||||
|
||||
@ -395,6 +395,19 @@ AcpiExResolveObjectToValue (
|
||||
|
||||
break; /* case INTERNAL_TYPE_REFERENCE */
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
Status = AcpiDsGetBufferArguments (StackDesc);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
|
||||
Status = AcpiDsGetPackageArguments (StackDesc);
|
||||
break;
|
||||
|
||||
|
||||
/*
|
||||
* These cases may never happen here, but just in case..
|
||||
*/
|
||||
@ -406,7 +419,7 @@ AcpiExResolveObjectToValue (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "FieldRead SourceDesc=%p Type=%X\n",
|
||||
StackDesc, StackDesc->Common.Type));
|
||||
|
||||
Status = AcpiExReadDataFromField (StackDesc, &ObjDesc);
|
||||
Status = AcpiExReadDataFromField (WalkState, StackDesc, &ObjDesc);
|
||||
*StackPtr = (void *) ObjDesc;
|
||||
break;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresop - AML Interpreter operand/object resolution
|
||||
* $Revision: 47 $
|
||||
* $Revision: 48 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -163,7 +163,7 @@ AcpiExCheckObjectType (
|
||||
|
||||
if (TypeNeeded != ThisType)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [%s], found [%s] %p\n",
|
||||
AcpiUtGetTypeName (TypeNeeded),
|
||||
AcpiUtGetTypeName (ThisType), Object));
|
||||
@ -231,8 +231,8 @@ AcpiExResolveOperands (
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode %X OperandTypes=%X \n",
|
||||
Opcode, ArgTypes));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode %X [%s] OperandTypes=%X \n",
|
||||
Opcode, OpInfo->Name, ArgTypes));
|
||||
|
||||
/*
|
||||
* Normal exit is with (ArgTypes == 0) at end of argument list.
|
||||
@ -306,7 +306,7 @@ AcpiExResolveOperands (
|
||||
case AML_LOCAL_OP:
|
||||
case AML_REVISION_OP:
|
||||
|
||||
ACPI_DEBUG_ONLY_MEMBERS (ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_ONLY_MEMBERS (ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Reference Opcode: %s\n", OpInfo->Name)));
|
||||
break;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exstore - AML Interpreter object store support
|
||||
* $Revision: 162 $
|
||||
* $Revision: 163 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -246,7 +246,7 @@ AcpiExStore (
|
||||
* Storing to the Debug object causes the value stored to be
|
||||
* displayed and otherwise has no effect -- see ACPI Specification
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Write to Debug Object: ****:\n\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "**** Write to Debug Object: ****:\n\n"));
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %s: ",
|
||||
AcpiUtGetTypeName (SourceDesc->Common.Type)));
|
||||
@ -288,7 +288,7 @@ AcpiExStore (
|
||||
break;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n"));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "\n"));
|
||||
break;
|
||||
|
||||
|
||||
@ -506,7 +506,7 @@ AcpiExStoreObjectToNode (
|
||||
TargetType = AcpiNsGetType (Node);
|
||||
TargetDesc = AcpiNsGetAttachedObject (Node);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Storing %p(%s) into node %p(%s)\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Storing %p(%s) into node %p(%s)\n",
|
||||
SourceDesc, AcpiUtGetTypeName (SourceDesc->Common.Type),
|
||||
Node, AcpiUtGetTypeName (TargetType)));
|
||||
|
||||
@ -562,7 +562,7 @@ AcpiExStoreObjectToNode (
|
||||
*/
|
||||
Status = AcpiNsAttachObject (Node, NewDesc, TargetType);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Store %s into %s via Convert/Attach\n",
|
||||
AcpiUtGetTypeName (SourceDesc->Common.Type),
|
||||
AcpiUtGetTypeName (NewDesc->Common.Type)));
|
||||
@ -572,7 +572,7 @@ AcpiExStoreObjectToNode (
|
||||
|
||||
default:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Storing %s (%p) directly into node (%p), no implicit conversion\n",
|
||||
AcpiUtGetTypeName (SourceDesc->Common.Type), SourceDesc, Node));
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Module Name: exstoren - AML Interpreter object store support,
|
||||
* Store to Node (namespace object)
|
||||
* $Revision: 46 $
|
||||
* $Revision: 47 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -241,7 +241,7 @@ AcpiExResolveObject (
|
||||
* FUNCTION: AcpiExStoreObjectToObject
|
||||
*
|
||||
* PARAMETERS: SourceDesc - Object to store
|
||||
* DestDesc - Object to recieve a copy of the source
|
||||
* DestDesc - Object to receive a copy of the source
|
||||
* NewDesc - New object if DestDesc is obsoleted
|
||||
* WalkState - Current walk state
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exstorob - AML Interpreter object store support, store to object
|
||||
* $Revision: 41 $
|
||||
* $Revision: 42 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -200,6 +200,10 @@ AcpiExStoreBufferToBuffer (
|
||||
Length, TargetDesc->Buffer.Length));
|
||||
}
|
||||
|
||||
/* Copy flags */
|
||||
|
||||
TargetDesc->Buffer.Flags = SourceDesc->Buffer.Flags;
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
|
||||
* $Revision: 39 $
|
||||
* $Revision: 40 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -180,10 +180,10 @@ AcpiHwEnableGpe (
|
||||
* Read the current value of the register, set the appropriate bit
|
||||
* to enable the GPE, and write out the new register.
|
||||
*/
|
||||
InByte = 0;
|
||||
AcpiOsReadPort (AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddr, &InByte, 8);
|
||||
AcpiOsWritePort (AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddr,
|
||||
(InByte | BitMask), 8);
|
||||
InByte = AcpiHwLowLevelRead (8,
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
AcpiHwLowLevelWrite (8, (InByte | BitMask),
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -262,10 +262,10 @@ AcpiHwDisableGpe (
|
||||
* Read the current value of the register, clear the appropriate bit,
|
||||
* and write out the new register value to disable the GPE.
|
||||
*/
|
||||
InByte = 0;
|
||||
AcpiOsReadPort (AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddr, &InByte, 8);
|
||||
AcpiOsWritePort (AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddr,
|
||||
(InByte & ~BitMask), 8);
|
||||
InByte = AcpiHwLowLevelRead (8,
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
AcpiHwLowLevelWrite (8, (InByte & ~BitMask),
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
|
||||
AcpiHwDisableGpeForWakeup(GpeNumber);
|
||||
}
|
||||
@ -345,7 +345,8 @@ AcpiHwClearGpe (
|
||||
* Write a one to the appropriate bit in the status register to
|
||||
* clear this GPE.
|
||||
*/
|
||||
AcpiOsWritePort (AcpiGbl_GpeRegisterInfo[RegisterIndex].StatusAddr, BitMask, 8);
|
||||
AcpiHwLowLevelWrite (8, BitMask,
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].StatusAddress, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -393,8 +394,7 @@ AcpiHwGetGpeStatus (
|
||||
|
||||
/* GPE Enabled? */
|
||||
|
||||
InByte = 0;
|
||||
AcpiOsReadPort (GpeRegisterInfo->EnableAddr, &InByte, 8);
|
||||
InByte = AcpiHwLowLevelRead (8, &GpeRegisterInfo->EnableAddress, 0);
|
||||
if (BitMask & InByte)
|
||||
{
|
||||
(*EventStatus) |= ACPI_EVENT_FLAG_ENABLED;
|
||||
@ -409,8 +409,7 @@ AcpiHwGetGpeStatus (
|
||||
|
||||
/* GPE active (set)? */
|
||||
|
||||
InByte = 0;
|
||||
AcpiOsReadPort (GpeRegisterInfo->StatusAddr, &InByte, 8);
|
||||
InByte = AcpiHwLowLevelRead (8, &GpeRegisterInfo->StatusAddress, 0);
|
||||
if (BitMask & InByte)
|
||||
{
|
||||
(*EventStatus) |= ACPI_EVENT_FLAG_SET;
|
||||
@ -453,14 +452,14 @@ AcpiHwDisableNonWakeupGpes (
|
||||
* Read the enabled status of all GPEs. We
|
||||
* will be using it to restore all the GPEs later.
|
||||
*/
|
||||
AcpiOsReadPort (GpeRegisterInfo->EnableAddr,
|
||||
&GpeRegisterInfo->Enable, 8);
|
||||
GpeRegisterInfo->Enable = (UINT8) AcpiHwLowLevelRead (8,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
|
||||
/*
|
||||
* Disable all GPEs except wakeup GPEs.
|
||||
*/
|
||||
AcpiOsWritePort(GpeRegisterInfo->EnableAddr,
|
||||
GpeRegisterInfo->WakeEnable, 8);
|
||||
AcpiHwLowLevelWrite (8, GpeRegisterInfo->WakeEnable,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -496,7 +495,7 @@ AcpiHwEnableNonWakeupGpes (
|
||||
* We previously stored the enabled status of all GPEs.
|
||||
* Blast them back in.
|
||||
*/
|
||||
AcpiOsWritePort(GpeRegisterInfo->EnableAddr,
|
||||
GpeRegisterInfo->Enable, 8);
|
||||
AcpiHwLowLevelWrite (8, GpeRegisterInfo->Enable, &
|
||||
GpeRegisterInfo->EnableAddress, 0);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Module Name: hwregs - Read/write access functions for the various ACPI
|
||||
* control and status registers.
|
||||
* $Revision: 120 $
|
||||
* $Revision: 121 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -167,9 +167,8 @@ AcpiHwClearAcpiStatus (void)
|
||||
|
||||
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1bEvtBlk.Address))
|
||||
{
|
||||
AcpiOsWritePort ((ACPI_IO_ADDRESS)
|
||||
ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm1bEvtBlk.Address),
|
||||
ACPI_BITMASK_ALL_FIXED_STATUS, 16);
|
||||
AcpiHwLowLevelWrite (16, ACPI_BITMASK_ALL_FIXED_STATUS,
|
||||
&AcpiGbl_FADT->XPm1bEvtBlk, 0);
|
||||
}
|
||||
|
||||
/* Clear the GPE Bits */
|
||||
@ -178,9 +177,8 @@ AcpiHwClearAcpiStatus (void)
|
||||
{
|
||||
for (i = 0; i < AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount; i++)
|
||||
{
|
||||
AcpiOsWritePort ((ACPI_IO_ADDRESS)
|
||||
(AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress + i),
|
||||
0xFF, 8);
|
||||
AcpiHwLowLevelWrite (8, 0xFF,
|
||||
AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: hwtimer.c - ACPI Power Management Timer Interface
|
||||
* $Revision: 19 $
|
||||
* $Revision: 20 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -183,8 +183,7 @@ AcpiGetTimer (
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
AcpiOsReadPort ((ACPI_IO_ADDRESS)
|
||||
ACPI_GET_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address), Ticks, 32);
|
||||
*Ticks = AcpiHwLowLevelRead (32, &AcpiGbl_FADT->XPmTmrBlk, 0);
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
|
||||
* $Revision: 152 $
|
||||
* $Revision: 153 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -648,8 +648,9 @@ AcpiNsLookup (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Setting global scope to %p\n", ThisNode));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
|
||||
"Setting current scope to [%4.4s] (%p)\n",
|
||||
ThisNode->Name.Ascii, ThisNode));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nsalloc - Namespace allocation and deletion utilities
|
||||
* $Revision: 70 $
|
||||
* $Revision: 72 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -156,7 +156,7 @@ AcpiNsCreateNode (
|
||||
|
||||
ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalAllocated++);
|
||||
|
||||
Node->Name = Name;
|
||||
Node->Name.Integer = Name;
|
||||
Node->ReferenceCount = 1;
|
||||
ACPI_SET_DESCRIPTOR_TYPE (Node, ACPI_DESC_TYPE_NAMED);
|
||||
|
||||
@ -309,7 +309,7 @@ AcpiNsInstallNode (
|
||||
* We will fill in the actual type when the
|
||||
* real definition is found later.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "[%4.4s] is a forward reference\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] is a forward reference\n",
|
||||
(char *) &Node->Name));
|
||||
}
|
||||
|
||||
@ -412,7 +412,7 @@ AcpiNsDeleteChildren (
|
||||
|
||||
ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalFreed++);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Object %p, Remaining %X\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p, Remaining %X\n",
|
||||
ChildNode, AcpiGbl_CurrentNodeCount));
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsdump - table dumping routines for debug
|
||||
* $Revision: 127 $
|
||||
* $Revision: 129 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -146,7 +146,7 @@ AcpiNsPrintPathname (
|
||||
UINT32 NumSegments,
|
||||
char *Pathname)
|
||||
{
|
||||
ACPI_FUNCTION_NAME ("AcpiNsPrintPathname");
|
||||
ACPI_FUNCTION_NAME ("NsPrintPathname");
|
||||
|
||||
|
||||
if (!(AcpiDbgLevel & ACPI_LV_NAMES) || !(AcpiDbgLayer & ACPI_NAMESPACE))
|
||||
@ -340,7 +340,7 @@ AcpiNsDumpOneObject (
|
||||
Type = INTERNAL_TYPE_DEF_ANY; /* prints as *ERROR* */
|
||||
}
|
||||
|
||||
if (!AcpiUtValidAcpiName (ThisNode->Name))
|
||||
if (!AcpiUtValidAcpiName (ThisNode->Name.Integer))
|
||||
{
|
||||
ACPI_REPORT_WARNING (("Invalid ACPI Name %08X\n", ThisNode->Name));
|
||||
}
|
||||
@ -371,62 +371,95 @@ AcpiNsDumpOneObject (
|
||||
switch (Type)
|
||||
{
|
||||
case ACPI_TYPE_PROCESSOR:
|
||||
|
||||
AcpiOsPrintf (" ID %d Addr %.4X Len %.4X\n",
|
||||
ObjDesc->Processor.ProcId,
|
||||
ObjDesc->Processor.Address,
|
||||
ObjDesc->Processor.Length);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_DEVICE:
|
||||
|
||||
AcpiOsPrintf (" Notification object: %p", ObjDesc);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
||||
AcpiOsPrintf (" Args %d Len %.4X Aml %p \n",
|
||||
ObjDesc->Method.ParamCount,
|
||||
ObjDesc->Method.AmlLength,
|
||||
ObjDesc->Method.AmlStart);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
AcpiOsPrintf (" = %8.8X%8.8X\n",
|
||||
ACPI_HIDWORD (ObjDesc->Integer.Value),
|
||||
ACPI_LODWORD (ObjDesc->Integer.Value));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
AcpiOsPrintf (" Elements %.2X\n",
|
||||
ObjDesc->Package.Count);
|
||||
|
||||
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
AcpiOsPrintf (" Elements %.2X\n",
|
||||
ObjDesc->Package.Count);
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf (" [Length not yet evaluated]\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
AcpiOsPrintf (" Len %.2X",
|
||||
ObjDesc->Buffer.Length);
|
||||
|
||||
/* Dump some of the buffer */
|
||||
|
||||
if (ObjDesc->Buffer.Length > 0)
|
||||
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
AcpiOsPrintf (" =");
|
||||
for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++)
|
||||
AcpiOsPrintf (" Len %.2X",
|
||||
ObjDesc->Buffer.Length);
|
||||
|
||||
/* Dump some of the buffer */
|
||||
|
||||
if (ObjDesc->Buffer.Length > 0)
|
||||
{
|
||||
AcpiOsPrintf (" %.2X", ObjDesc->Buffer.Pointer[i]);
|
||||
AcpiOsPrintf (" =");
|
||||
for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++)
|
||||
{
|
||||
AcpiOsPrintf (" %.2X", ObjDesc->Buffer.Pointer[i]);
|
||||
}
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf (" [Length not yet evaluated]\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
AcpiOsPrintf (" Len %.2X", ObjDesc->String.Length);
|
||||
|
||||
if (ObjDesc->String.Length > 0)
|
||||
{
|
||||
AcpiOsPrintf (" = \"%.32s\"", ObjDesc->String.Pointer);
|
||||
if (ObjDesc->String.Length > 32)
|
||||
{
|
||||
AcpiOsPrintf ("...");
|
||||
}
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
AcpiOsPrintf (" Len %.2X", ObjDesc->String.Length);
|
||||
|
||||
if (ObjDesc->String.Length > 0)
|
||||
{
|
||||
AcpiOsPrintf (" = \"%.32s\"...", ObjDesc->String.Pointer);
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_REGION:
|
||||
|
||||
AcpiOsPrintf (" [%s]", AcpiUtGetRegionName (ObjDesc->Region.SpaceId));
|
||||
if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
@ -437,16 +470,20 @@ AcpiNsDumpOneObject (
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf (" [Address/Length not evaluated]\n");
|
||||
AcpiOsPrintf (" [Address/Length not yet evaluated]\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case INTERNAL_TYPE_REFERENCE:
|
||||
|
||||
AcpiOsPrintf (" [%s]\n",
|
||||
AcpiPsGetOpcodeName (ObjDesc->Reference.Opcode));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
|
||||
if (ObjDesc->BufferField.BufferObj &&
|
||||
ObjDesc->BufferField.BufferObj->Buffer.Node)
|
||||
{
|
||||
@ -455,24 +492,32 @@ AcpiNsDumpOneObject (
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case INTERNAL_TYPE_REGION_FIELD:
|
||||
|
||||
AcpiOsPrintf (" Rgn [%4.4s]",
|
||||
(char *) &ObjDesc->CommonField.RegionObj->Region.Node->Name);
|
||||
break;
|
||||
|
||||
|
||||
case INTERNAL_TYPE_BANK_FIELD:
|
||||
|
||||
AcpiOsPrintf (" Rgn [%4.4s] Bnk [%4.4s]",
|
||||
(char *) &ObjDesc->CommonField.RegionObj->Region.Node->Name,
|
||||
(char *) &ObjDesc->BankField.BankObj->CommonField.Node->Name);
|
||||
break;
|
||||
|
||||
|
||||
case INTERNAL_TYPE_INDEX_FIELD:
|
||||
|
||||
AcpiOsPrintf (" Idx [%4.4s] Dat [%4.4s]",
|
||||
(char *) &ObjDesc->IndexField.IndexObj->CommonField.Node->Name,
|
||||
(char *) &ObjDesc->IndexField.DataObj->CommonField.Node->Name);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
AcpiOsPrintf (" Object %p\n", ObjDesc);
|
||||
break;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nseval - Object evaluation interfaces -- includes control
|
||||
* method lookup and execution.
|
||||
* $Revision: 109 $
|
||||
* $Revision: 112 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -211,7 +211,7 @@ AcpiNsEvaluateRelative (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Object [%s] not found [%s]\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Object [%s] not found [%s]\n",
|
||||
Pathname, AcpiFormatException (Status)));
|
||||
goto Cleanup;
|
||||
}
|
||||
@ -220,12 +220,12 @@ AcpiNsEvaluateRelative (
|
||||
* Now that we have a handle to the object, we can attempt
|
||||
* to evaluate it.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s [%p] Value %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%s [%p] Value %p\n",
|
||||
Pathname, Node, AcpiNsGetAttachedObject (Node)));
|
||||
|
||||
Status = AcpiNsEvaluateByHandle (Node, Params, ReturnObject);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "*** Completed eval of object %s ***\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "*** Completed eval of object %s ***\n",
|
||||
Pathname));
|
||||
|
||||
Cleanup:
|
||||
@ -293,7 +293,7 @@ AcpiNsEvaluateByName (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Object at [%s] was not found, status=%.4X\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Object at [%s] was not found, status=%.4X\n",
|
||||
Pathname, Status));
|
||||
goto Cleanup;
|
||||
}
|
||||
@ -302,12 +302,12 @@ AcpiNsEvaluateByName (
|
||||
* Now that we have a handle to the object, we can attempt
|
||||
* to evaluate it.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s [%p] Value %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%s [%p] Value %p\n",
|
||||
Pathname, Node, AcpiNsGetAttachedObject (Node)));
|
||||
|
||||
Status = AcpiNsEvaluateByHandle (Node, Params, ReturnObject);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "*** Completed eval of object %s ***\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "*** Completed eval of object %s ***\n",
|
||||
Pathname));
|
||||
|
||||
|
||||
@ -503,16 +503,11 @@ AcpiNsExecuteControlMethod (
|
||||
return_ACPI_STATUS (AE_NULL_OBJECT);
|
||||
}
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Control method at Offset %p Length %x]\n",
|
||||
ObjDesc->Method.AmlStart + 1, ObjDesc->Method.AmlLength - 1));
|
||||
|
||||
ACPI_DUMP_PATHNAME (MethodNode, "NsExecuteControlMethod: Executing",
|
||||
ACPI_LV_NAMES, _COMPONENT);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "At offset %p\n",
|
||||
ObjDesc->Method.AmlStart + 1));
|
||||
ACPI_LV_INFO, _COMPONENT);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Method at AML address %p Length %x\n",
|
||||
ObjDesc->Method.AmlStart + 1, ObjDesc->Method.AmlLength - 1));
|
||||
|
||||
/*
|
||||
* Unlock the namespace before execution. This allows namespace access
|
||||
@ -615,7 +610,7 @@ AcpiNsGetObjectValue (
|
||||
{
|
||||
Status = AE_CTRL_RETURN_VALUE;
|
||||
*ReturnObjDesc = ObjDesc;
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Returning obj %p\n", *ReturnObjDesc));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Returning obj %p\n", *ReturnObjDesc));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsinit - namespace initialization
|
||||
* $Revision: 41 $
|
||||
* $Revision: 43 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -152,15 +152,11 @@ AcpiNsInitializeObjects (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"**** Starting initialization of namespace objects ****\n"));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Completing Region and Field initialization:"));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Completing Region/Field/Buffer/Package initialization:"));
|
||||
|
||||
/* Set all init info to zero */
|
||||
|
||||
Info.FieldCount = 0;
|
||||
Info.FieldInit = 0;
|
||||
Info.OpRegionCount = 0;
|
||||
Info.OpRegionInit = 0;
|
||||
Info.ObjectCount = 0;
|
||||
|
||||
ACPI_MEMSET (&Info, 0, sizeof (ACPI_INIT_WALK_INFO));
|
||||
|
||||
/* Walk entire namespace from the supplied root */
|
||||
|
||||
@ -173,9 +169,11 @@ AcpiNsInitializeObjects (
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
|
||||
"\n%d/%d Regions, %d/%d Fields initialized (%d nodes total)\n",
|
||||
Info.OpRegionInit, Info.OpRegionCount, Info.FieldInit,
|
||||
Info.FieldCount, Info.ObjectCount));
|
||||
"\n Initialized %d/%d Regions %d/%d Fields %d/%d Buffers %d/%d Packages (%d nodes)\n",
|
||||
Info.OpRegionInit, Info.OpRegionCount,
|
||||
Info.FieldInit, Info.FieldCount,
|
||||
Info.BufferInit, Info.BufferCount,
|
||||
Info.PackageInit, Info.PackageCount, Info.ObjectCount));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"%d Control Methods found\n", Info.MethodCount));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
@ -212,12 +210,15 @@ AcpiNsInitializeDevices (
|
||||
ACPI_FUNCTION_TRACE ("NsInitializeDevices");
|
||||
|
||||
|
||||
/* Init counters */
|
||||
|
||||
Info.DeviceCount = 0;
|
||||
Info.Num_STA = 0;
|
||||
Info.Num_INI = 0;
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Executing all Device _STA and_INI methods:"));
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Executing device _INI methods:"));
|
||||
/* Walk namespace for all objects of type Device */
|
||||
|
||||
Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX, FALSE, AcpiNsInitOneDevice, &Info, NULL);
|
||||
@ -227,9 +228,8 @@ AcpiNsInitializeDevices (
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "WalkNamespace failed! %x\n", Status));
|
||||
}
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
|
||||
"\n%d Devices found: %d _STA, %d _INI\n",
|
||||
"\n%d Devices found containing: %d _STA, %d _INI methods\n",
|
||||
Info.DeviceCount, Info.Num_STA, Info.Num_INI));
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -275,7 +275,6 @@ AcpiNsInitOneObject (
|
||||
|
||||
Info->ObjectCount++;
|
||||
|
||||
|
||||
/* And even then, we are only interested in a few object types */
|
||||
|
||||
Type = AcpiNsGetType (ObjHandle);
|
||||
@ -285,12 +284,39 @@ AcpiNsInitOneObject (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
if ((Type != ACPI_TYPE_REGION) &&
|
||||
(Type != ACPI_TYPE_BUFFER_FIELD))
|
||||
/* Increment counters for object types we are looking for */
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case ACPI_TYPE_REGION:
|
||||
Info->OpRegionCount++;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
Info->FieldCount++;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
Info->BufferCount++;
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
Info->PackageCount++;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/* No init required, just exit now */
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the object is already initialized, nothing else to do
|
||||
*/
|
||||
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Must lock the interpreter before executing AML code
|
||||
@ -301,68 +327,56 @@ AcpiNsInitOneObject (
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Each of these types can contain executable AML code within
|
||||
* the declaration.
|
||||
*/
|
||||
switch (Type)
|
||||
{
|
||||
|
||||
case ACPI_TYPE_REGION:
|
||||
|
||||
Info->OpRegionCount++;
|
||||
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Info->OpRegionInit++;
|
||||
Status = AcpiDsGetRegionArguments (ObjDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"%s while getting region arguments [%4.4s]\n",
|
||||
AcpiFormatException (Status), (char *) &Node->Name));
|
||||
}
|
||||
|
||||
if (!(AcpiDbgLevel & ACPI_LV_INIT))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
|
||||
Info->FieldCount++;
|
||||
if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Info->FieldInit++;
|
||||
Status = AcpiDsGetBufferFieldArguments (ObjDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"%s while getting buffer field arguments [%4.4s]\n",
|
||||
AcpiFormatException (Status), (char *) &Node->Name));
|
||||
}
|
||||
if (!(AcpiDbgLevel & ACPI_LV_INIT))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
Info->BufferInit++;
|
||||
Status = AcpiDsGetBufferArguments (ObjDesc);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
|
||||
Info->PackageInit++;
|
||||
Status = AcpiDsGetPackageArguments (ObjDesc);
|
||||
break;
|
||||
}
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Could not execute arguments for [%4.4s] (%s), %s\n",
|
||||
(char *) &Node->Name, AcpiUtGetTypeName (Type), AcpiFormatException (Status)));
|
||||
}
|
||||
|
||||
if (!(AcpiDbgLevel & ACPI_LV_INIT))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
|
||||
}
|
||||
|
||||
/*
|
||||
* We ignore errors from above, and always return OK, since
|
||||
* we don't want to abort the walk on a single error.
|
||||
* we don't want to abort the walk on any single error.
|
||||
*/
|
||||
AcpiExExitInterpreter ();
|
||||
return (AE_OK);
|
||||
@ -446,7 +460,6 @@ AcpiNsInitOneDevice (
|
||||
return_ACPI_STATUS(AE_CTRL_DEPTH);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The device is present. Run _INI.
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsobject - Utilities for objects attached to namespace
|
||||
* table entries
|
||||
* $Revision: 78 $
|
||||
* $Revision: 80 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -328,7 +328,7 @@ AcpiNsDetachObject (
|
||||
|
||||
Node->Type = ACPI_TYPE_ANY;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Node %p [%4.4s] Object %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Node %p [%4.4s] Object %p\n",
|
||||
Node, (char *) &Node->Name, ObjDesc));
|
||||
|
||||
/* Remove one reference on the object (and all subobjects) */
|
||||
@ -389,7 +389,7 @@ ACPI_OPERAND_OBJECT *
|
||||
AcpiNsGetSecondaryObject (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc)
|
||||
{
|
||||
ACPI_FUNCTION_TRACE_PTR ("AcpiNsGetSecondaryObject", ObjDesc);
|
||||
ACPI_FUNCTION_TRACE_PTR ("NsGetSecondaryObject", ObjDesc);
|
||||
|
||||
|
||||
if ((!ObjDesc) ||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nssearch - Namespace search
|
||||
* $Revision: 83 $
|
||||
* $Revision: 84 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -190,7 +190,7 @@ AcpiNsSearchNode (
|
||||
{
|
||||
/* Check for match against the name */
|
||||
|
||||
if (NextNode->Name == TargetName)
|
||||
if (NextNode->Name.Integer == TargetName)
|
||||
{
|
||||
/*
|
||||
* Found matching entry. Capture the type if appropriate, before
|
||||
@ -245,8 +245,8 @@ AcpiNsSearchNode (
|
||||
|
||||
/* Searched entire table, not found */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Name %4.4s (type %X) not found at %p\n",
|
||||
(char *) &TargetName, Type, NextNode));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Name %4.4s Type [%s] not found at %p\n",
|
||||
(char *) &TargetName, AcpiUtGetTypeName (Type), NextNode));
|
||||
|
||||
return_ACPI_STATUS (AE_NOT_FOUND);
|
||||
}
|
||||
@ -308,8 +308,8 @@ AcpiNsSearchParentTree (
|
||||
|
||||
if (AcpiNsLocal (Type))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] type %X is local(no search)\n",
|
||||
(char *) &TargetName, Type));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] type [%s] must be local to this scope (no parent search)\n",
|
||||
(char *) &TargetName, AcpiUtGetTypeName (Type)));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_NOT_FOUND);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
|
||||
* parents and siblings and Scope manipulation
|
||||
* $Revision: 104 $
|
||||
* $Revision: 105 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -358,7 +358,6 @@ AcpiNsBuildInternalName (
|
||||
Result = &InternalName[3];
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/*
|
||||
@ -391,7 +390,6 @@ AcpiNsBuildInternalName (
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Build the name (minus path separators) */
|
||||
|
||||
for (; NumSegments; NumSegments--)
|
||||
@ -435,12 +433,12 @@ AcpiNsBuildInternalName (
|
||||
if (Info->FullyQualified)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "returning [%p] (abs) \"\\%s\"\n",
|
||||
InternalName, &InternalName[0]));
|
||||
InternalName, InternalName));
|
||||
}
|
||||
else
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "returning [%p] (rel) \"%s\"\n",
|
||||
InternalName, &InternalName[2]));
|
||||
InternalName, InternalName));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
@ -968,9 +966,9 @@ AcpiNsFindParentName (
|
||||
ChildNode, (char *) &ChildNode->Name,
|
||||
ParentNode, (char *) &ParentNode->Name));
|
||||
|
||||
if (ParentNode->Name)
|
||||
if (ParentNode->Name.Integer)
|
||||
{
|
||||
return_VALUE (ParentNode->Name);
|
||||
return_VALUE (ParentNode->Name.Integer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1010,7 +1008,7 @@ AcpiNsExistDownstreamSibling (
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (Node->Name)
|
||||
if (Node->Name.Integer)
|
||||
{
|
||||
return (TRUE);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
|
||||
* ACPI Namespace oriented interfaces
|
||||
* $Revision: 89 $
|
||||
* $Revision: 90 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -351,8 +351,8 @@ AcpiGetObjectInfo (
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
Info->Type = Node->Type;
|
||||
Info->Name = Node->Name;
|
||||
Info->Type = Node->Type;
|
||||
Info->Name = Node->Name.Integer;
|
||||
|
||||
Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psopcode - Parser/Interpreter opcode information table
|
||||
* $Revision: 64 $
|
||||
* $Revision: 66 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -310,7 +310,7 @@
|
||||
#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_BREAK_OP ARG_NONE
|
||||
#define ARGI_BREAK_POINT_OP ARG_NONE
|
||||
#define ARGI_BUFFER_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_BYTE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
|
||||
@ -375,7 +375,7 @@
|
||||
#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
|
||||
#define ARGI_ONE_OP ARG_NONE
|
||||
#define ARGI_ONES_OP ARG_NONE
|
||||
#define ARGI_PACKAGE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_POWER_RES_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_QWORD_OP ARGI_INVALID_OPCODE
|
||||
@ -406,7 +406,7 @@
|
||||
#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
|
||||
#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
|
||||
#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
|
||||
#define ARGI_VAR_PACKAGE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
|
||||
#define ARGI_WHILE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_WORD_OP ARGI_INVALID_OPCODE
|
||||
@ -513,6 +513,7 @@
|
||||
AML_CREATE_DWORD_FIELD_OP
|
||||
AML_CREATE_QWORD_FIELD_OP
|
||||
AML_REGION_OP
|
||||
AML_BUFFER_OP
|
||||
|
||||
Field opcodes
|
||||
|
||||
@ -552,8 +553,8 @@ static const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[] =
|
||||
/* 06 */ ACPI_OP ("DwordConst", ARGP_DWORD_OP, ARGI_DWORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, 0),
|
||||
/* 07 */ ACPI_OP ("String", ARGP_STRING_OP, ARGI_STRING_OP, ACPI_TYPE_STRING, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, 0),
|
||||
/* 08 */ ACPI_OP ("Scope", ARGP_SCOPE_OP, ARGI_SCOPE_OP, INTERNAL_TYPE_SCOPE, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
|
||||
/* 09 */ ACPI_OP ("Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP, ACPI_TYPE_BUFFER, AML_CLASS_ARGUMENT, AML_TYPE_DATA_TERM, AML_HAS_ARGS),
|
||||
/* 0A */ ACPI_OP ("Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_ARGUMENT, AML_TYPE_DATA_TERM, AML_HAS_ARGS),
|
||||
/* 09 */ ACPI_OP ("Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP, ACPI_TYPE_BUFFER, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER),
|
||||
/* 0A */ ACPI_OP ("Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER),
|
||||
/* 0B */ ACPI_OP ("Method", ARGP_METHOD_OP, ARGI_METHOD_OP, ACPI_TYPE_METHOD, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
|
||||
/* 0C */ ACPI_OP ("Local0", ARGP_LOCAL0, ARGI_LOCAL0, INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0),
|
||||
/* 0D */ ACPI_OP ("Local1", ARGP_LOCAL1, ARGI_LOCAL1, INTERNAL_TYPE_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0),
|
||||
@ -664,7 +665,7 @@ static const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[] =
|
||||
/* ACPI 2.0 opcodes */
|
||||
|
||||
/* 6E */ ACPI_OP ("QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, 0),
|
||||
/* 6F */ ACPI_OP ("Package /*Var*/", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_ARGUMENT, AML_TYPE_DATA_TERM, AML_HAS_ARGS | AML_DEFER),
|
||||
/* 6F */ ACPI_OP ("Package /*Var*/", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER),
|
||||
/* 70 */ ACPI_OP ("ConcatenateResTemplate", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R),
|
||||
/* 71 */ ACPI_OP ("Mod", ARGP_MOD_OP, ARGI_MOD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R),
|
||||
/* 72 */ ACPI_OP ("CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
|
||||
@ -678,6 +679,7 @@ static const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[] =
|
||||
/* 7A */ ACPI_OP ("Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0),
|
||||
/* 7B */ ACPI_OP ("LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R),
|
||||
/* 7C */ ACPI_OP ("DataTableRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
|
||||
/* 7D */ ACPI_OP ("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, INTERNAL_TYPE_SCOPE, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE)
|
||||
|
||||
/*! [End] no source code translation !*/
|
||||
};
|
||||
@ -697,7 +699,7 @@ static const UINT8 AcpiGbl_ShortOpIndex[256] =
|
||||
/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
|
||||
/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
|
||||
/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
|
||||
/* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, _UNK,
|
||||
/* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, 0x7D,
|
||||
/* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
|
||||
/* 0x40 */ _UNK, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC,
|
||||
/* 0x48 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
|
||||
* $Revision: 49 $
|
||||
* $Revision: 50 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -189,26 +189,22 @@ AcpiPsAllocOp (
|
||||
Size = sizeof (ACPI_PARSE2_OBJECT);
|
||||
Flags = ACPI_PARSEOP_DEFERRED;
|
||||
}
|
||||
|
||||
else if (OpInfo->Flags & AML_NAMED)
|
||||
{
|
||||
Size = sizeof (ACPI_PARSE2_OBJECT);
|
||||
Flags = ACPI_PARSEOP_NAMED;
|
||||
}
|
||||
|
||||
else if (Opcode == AML_INT_BYTELIST_OP)
|
||||
{
|
||||
Size = sizeof (ACPI_PARSE2_OBJECT);
|
||||
Flags = ACPI_PARSEOP_BYTELIST;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Size = sizeof (ACPI_PARSE_OBJECT);
|
||||
Flags = ACPI_PARSEOP_GENERIC;
|
||||
}
|
||||
|
||||
|
||||
if (Size == sizeof (ACPI_PARSE_OBJECT))
|
||||
{
|
||||
/*
|
||||
@ -216,7 +212,6 @@ AcpiPsAllocOp (
|
||||
*/
|
||||
Op = AcpiUtAcquireFromCache (ACPI_MEM_LIST_PSNODE);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Op = AcpiUtAcquireFromCache (ACPI_MEM_LIST_PSNODE_EXT);
|
||||
@ -256,14 +251,13 @@ AcpiPsFreeOp (
|
||||
|
||||
if (Op->Opcode == AML_INT_RETURN_VALUE_OP)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Free retval op: %p\n", Op));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Free retval op: %p\n", Op));
|
||||
}
|
||||
|
||||
if (Op->Flags == ACPI_PARSEOP_GENERIC)
|
||||
{
|
||||
AcpiUtReleaseToCache (ACPI_MEM_LIST_PSNODE, Op);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
AcpiUtReleaseToCache (ACPI_MEM_LIST_PSNODE_EXT, Op);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psxface - Parser external interfaces
|
||||
* $Revision: 59 $
|
||||
* $Revision: 61 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -199,7 +199,7 @@ AcpiPsxExecute (
|
||||
* 1) Perform the first pass parse of the method to enter any
|
||||
* named objects that it creates into the namespace
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
"**** Begin Method Parse **** Entry=%p obj=%p\n",
|
||||
MethodNode, ObjDesc));
|
||||
|
||||
@ -244,7 +244,7 @@ AcpiPsxExecute (
|
||||
/*
|
||||
* 2) Execute the method. Performs second pass parse simultaneously
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
"**** Begin Method Execution **** Entry=%p obj=%p\n",
|
||||
MethodNode, ObjDesc));
|
||||
|
||||
@ -258,7 +258,7 @@ AcpiPsxExecute (
|
||||
|
||||
/* Init new op with the method name and pointer back to the NS node */
|
||||
|
||||
AcpiPsSetName (Op, MethodNode->Name);
|
||||
AcpiPsSetName (Op, MethodNode->Name.Integer);
|
||||
Op->Node = MethodNode;
|
||||
|
||||
/* Create and initialize a new walk state */
|
||||
@ -300,7 +300,7 @@ AcpiPsxExecute (
|
||||
*/
|
||||
if (*ReturnObjDesc)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Method returned ObjDesc=%p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Method returned ObjDesc=%p\n",
|
||||
*ReturnObjDesc));
|
||||
ACPI_DUMP_STACK_ENTRY (*ReturnObjDesc);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: tbinstal - ACPI table installation and removal
|
||||
* $Revision: 55 $
|
||||
* $Revision: 57 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -276,31 +276,39 @@ AcpiTbRecognizeTable (
|
||||
* We only "recognize" a limited number of ACPI tables -- namely, the
|
||||
* ones that are used by the subsystem (DSDT, FADT, etc.)
|
||||
*
|
||||
* An AE_NOT_FOUND means that the table was not recognized.
|
||||
* An AE_TABLE_NOT_SUPPORTED means that the table was not recognized.
|
||||
* This can be any one of many valid ACPI tables, it just isn't one of
|
||||
* the tables that is consumed by the core subsystem
|
||||
*/
|
||||
Status = AcpiTbMatchSignature (TableHeader->Signature, TableInfo);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
/* Return the table type and length via the info struct */
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
TableInfo->Length = TableHeader->Length;
|
||||
Status = AcpiTbValidateTableHeader (TableHeader);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate checksum for _most_ tables,
|
||||
* even the ones whose signature we don't recognize
|
||||
*/
|
||||
if (TableInfo->Type != ACPI_TABLE_FACS)
|
||||
/* Return the table type and length via the info struct */
|
||||
|
||||
TableInfo->Length = TableHeader->Length;
|
||||
|
||||
/*
|
||||
* Validate checksum for _most_ tables,
|
||||
* even the ones whose signature we don't recognize
|
||||
*/
|
||||
if (TableInfo->Type != ACPI_TABLE_FACS)
|
||||
{
|
||||
Status = AcpiTbVerifyTableChecksum (TableHeader);
|
||||
if (ACPI_FAILURE (Status) &&
|
||||
(!ACPI_CHECKSUM_ABORT))
|
||||
{
|
||||
Status = AcpiTbVerifyTableChecksum (TableHeader);
|
||||
if (ACPI_FAILURE (Status) &&
|
||||
(!ACPI_CHECKSUM_ABORT))
|
||||
{
|
||||
/* Ignore the error if configuration says so */
|
||||
/* Ignore the error if configuration says so */
|
||||
|
||||
Status = AE_OK;
|
||||
}
|
||||
Status = AE_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@ -484,10 +492,6 @@ AcpiTbDeleteAcpiTable (
|
||||
return;
|
||||
}
|
||||
|
||||
/* Free the table */
|
||||
|
||||
AcpiTbFreeAcpiTablesOfType (&AcpiGbl_AcpiTables[Type]);
|
||||
|
||||
/* Clear the appropriate "typed" global table pointer */
|
||||
|
||||
switch (Type)
|
||||
@ -518,6 +522,10 @@ AcpiTbDeleteAcpiTable (
|
||||
break;
|
||||
}
|
||||
|
||||
/* Free the table */
|
||||
|
||||
AcpiTbFreeAcpiTablesOfType (&AcpiGbl_AcpiTables[Type]);
|
||||
|
||||
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
|
||||
return_VOID;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: tbutils - Table manipulation utilities
|
||||
* $Revision: 49 $
|
||||
* $Revision: 51 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -166,7 +166,6 @@ AcpiTbHandleToObject (
|
||||
} while (ListHead != &AcpiGbl_AcpiTables[i]);
|
||||
}
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "TableId=%X does not exist\n", TableId));
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
@ -211,7 +210,6 @@ AcpiTbValidateTableHeader (
|
||||
return (AE_BAD_ADDRESS);
|
||||
}
|
||||
|
||||
|
||||
/* Ensure that the signature is 4 ASCII characters */
|
||||
|
||||
ACPI_MOVE_UNALIGNED32_TO_32 (&Signature, &TableHeader->Signature);
|
||||
@ -221,12 +219,11 @@ AcpiTbValidateTableHeader (
|
||||
"Table signature at %p [%p] has invalid characters\n",
|
||||
TableHeader, &Signature));
|
||||
|
||||
ACPI_REPORT_WARNING (("Invalid table signature %4.4s found\n", (char *) &Signature));
|
||||
ACPI_REPORT_WARNING (("Invalid table signature found: [%4.4s]\n", (char *) &Signature));
|
||||
ACPI_DUMP_BUFFER (TableHeader, sizeof (ACPI_TABLE_HEADER));
|
||||
return (AE_BAD_SIGNATURE);
|
||||
}
|
||||
|
||||
|
||||
/* Validate the table length */
|
||||
|
||||
if (TableHeader->Length < sizeof (ACPI_TABLE_HEADER))
|
||||
@ -309,10 +306,10 @@ AcpiTbMapAcpiTable (
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Map the physical memory for the correct length */
|
||||
|
||||
Status = AcpiOsMapMemory (PhysicalAddress, TableSize, (void **) &Table);
|
||||
Status = AcpiOsMapMemory (PhysicalAddress, TableSize,
|
||||
(void **) &Table);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
@ -324,7 +321,6 @@ AcpiTbMapAcpiTable (
|
||||
|
||||
*Size = TableSize;
|
||||
*LogicalAddress = Table;
|
||||
|
||||
return (Status);
|
||||
}
|
||||
|
||||
@ -366,8 +362,6 @@ AcpiTbVerifyTableChecksum (
|
||||
|
||||
Status = AE_BAD_CHECKSUM;
|
||||
}
|
||||
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -406,7 +400,6 @@ AcpiTbChecksum (
|
||||
sum = (UINT8) (sum + *rover);
|
||||
}
|
||||
}
|
||||
|
||||
return (sum);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: tbxface - Public interfaces to the ACPI subsystem
|
||||
* ACPI table oriented interfaces
|
||||
* $Revision: 51 $
|
||||
* $Revision: 52 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -143,7 +143,7 @@
|
||||
ACPI_STATUS
|
||||
AcpiLoadTables (void)
|
||||
{
|
||||
ACPI_PHYSICAL_ADDRESS RsdpPhysicalAddress;
|
||||
ACPI_POINTER RsdpAddress;
|
||||
ACPI_STATUS Status;
|
||||
UINT32 NumberOfTables = 0;
|
||||
|
||||
@ -154,7 +154,7 @@ AcpiLoadTables (void)
|
||||
/* Get the RSDP */
|
||||
|
||||
Status = AcpiOsGetRootPointer (ACPI_LOGICAL_ADDRESSING,
|
||||
&RsdpPhysicalAddress);
|
||||
&RsdpAddress);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiLoadTables: Could not get RSDP, %s\n",
|
||||
@ -164,7 +164,9 @@ AcpiLoadTables (void)
|
||||
|
||||
/* Map and validate the RSDP */
|
||||
|
||||
Status = AcpiTbVerifyRsdp (RsdpPhysicalAddress);
|
||||
AcpiGbl_TableFlags = RsdpAddress.PointerType;
|
||||
|
||||
Status = AcpiTbVerifyRsdp (&RsdpAddress);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiLoadTables: RSDP Failed validation: %s\n",
|
||||
@ -238,6 +240,7 @@ AcpiLoadTable (
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_TABLE_DESC TableInfo;
|
||||
ACPI_POINTER Address;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiLoadTable");
|
||||
@ -250,7 +253,10 @@ AcpiLoadTable (
|
||||
|
||||
/* Copy the table to a local buffer */
|
||||
|
||||
Status = AcpiTbGetTable (0, TablePtr, &TableInfo);
|
||||
Address.PointerType = ACPI_LOGICAL_POINTER;
|
||||
Address.Pointer.Logical = TablePtr;
|
||||
|
||||
Status = AcpiTbGetTable (&Address, &TableInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
|
||||
* $Revision: 58 $
|
||||
* $Revision: 61 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -213,7 +213,8 @@ AcpiGetFirmwareTable (
|
||||
UINT32 Flags,
|
||||
ACPI_TABLE_HEADER **TablePointer)
|
||||
{
|
||||
ACPI_PHYSICAL_ADDRESS PhysicalAddress;
|
||||
ACPI_POINTER RsdpAddress;
|
||||
ACPI_POINTER Address;
|
||||
ACPI_TABLE_HEADER *RsdtPtr = NULL;
|
||||
ACPI_TABLE_HEADER *TablePtr;
|
||||
ACPI_STATUS Status;
|
||||
@ -246,7 +247,7 @@ AcpiGetFirmwareTable (
|
||||
{
|
||||
/* Get the RSDP */
|
||||
|
||||
Status = AcpiOsGetRootPointer (Flags, &PhysicalAddress);
|
||||
Status = AcpiOsGetRootPointer (Flags, &RsdpAddress);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "RSDP not found\n"));
|
||||
@ -257,7 +258,7 @@ AcpiGetFirmwareTable (
|
||||
|
||||
if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
|
||||
{
|
||||
Status = AcpiOsMapMemory (PhysicalAddress, sizeof (RSDP_DESCRIPTOR),
|
||||
Status = AcpiOsMapMemory (RsdpAddress.Pointer.Physical, sizeof (RSDP_DESCRIPTOR),
|
||||
(void **) &AcpiGbl_RSDP);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
@ -266,7 +267,7 @@ AcpiGetFirmwareTable (
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiGbl_RSDP = ACPI_PHYSADDR_TO_PTR (PhysicalAddress);
|
||||
AcpiGbl_RSDP = RsdpAddress.Pointer.Logical;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -297,8 +298,9 @@ AcpiGetFirmwareTable (
|
||||
|
||||
/* Get the RSDT and validate it */
|
||||
|
||||
PhysicalAddress = AcpiTbGetRsdtAddress ();
|
||||
Status = AcpiTbGetTablePointer (PhysicalAddress, Flags, &RsdtSize, &RsdtPtr);
|
||||
AcpiTbGetRsdtAddress (&Address);
|
||||
|
||||
Status = AcpiTbGetTablePointer (&Address, Flags, &RsdtSize, &RsdtPtr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -323,20 +325,20 @@ AcpiGetFirmwareTable (
|
||||
{
|
||||
/* Get the next table pointer */
|
||||
|
||||
Address.PointerType = AcpiGbl_TableFlags;
|
||||
if (AcpiGbl_RSDP->Revision < 2)
|
||||
{
|
||||
PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
|
||||
((RSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i];
|
||||
Address.Pointer.Value = ((RSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
|
||||
ACPI_GET_ADDRESS (((XSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i]);
|
||||
Address.Pointer.Value = ACPI_GET_ADDRESS (
|
||||
((XSDT_DESCRIPTOR *) RsdtPtr)->TableOffsetEntry[i]);
|
||||
}
|
||||
|
||||
/* Get addressibility if necessary */
|
||||
|
||||
Status = AcpiTbGetTablePointer (PhysicalAddress, Flags, &TableSize, &TablePtr);
|
||||
Status = AcpiTbGetTablePointer (&Address, Flags, &TableSize, &TablePtr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
@ -389,8 +391,8 @@ AcpiGetFirmwareTable (
|
||||
*
|
||||
* FUNCTION: AcpiFindRootPointer
|
||||
*
|
||||
* PARAMETERS: **RsdpPhysicalAddress - Where to place the RSDP address
|
||||
* Flags - Logical/Physical addressing
|
||||
* PARAMETERS: **RsdpAddress - Where to place the RSDP address
|
||||
* Flags - Logical/Physical addressing
|
||||
*
|
||||
* RETURN: Status, Physical address of the RSDP
|
||||
*
|
||||
@ -401,7 +403,7 @@ AcpiGetFirmwareTable (
|
||||
ACPI_STATUS
|
||||
AcpiFindRootPointer (
|
||||
UINT32 Flags,
|
||||
ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress)
|
||||
ACPI_POINTER *RsdpAddress)
|
||||
{
|
||||
ACPI_TABLE_DESC TableInfo;
|
||||
ACPI_STATUS Status;
|
||||
@ -419,7 +421,8 @@ AcpiFindRootPointer (
|
||||
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
|
||||
}
|
||||
|
||||
*RsdpPhysicalAddress = TableInfo.PhysicalAddress;
|
||||
RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER;
|
||||
RsdpAddress->Pointer.Physical = TableInfo.PhysicalAddress;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utcopy - Internal to external object translation utilities
|
||||
* $Revision: 94 $
|
||||
* $Revision: 95 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -761,6 +761,9 @@ AcpiUtCopySimpleObject (
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
DestDesc->Buffer.Node = NULL;
|
||||
DestDesc->Common.Flags = SourceDesc->Common.Flags;
|
||||
|
||||
/* Fall through to common string/buffer case */
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
@ -857,6 +860,7 @@ AcpiUtCopyIelementToIelement (
|
||||
}
|
||||
|
||||
TargetObject->Package.Count = SourceObject->Package.Count;
|
||||
TargetObject->Common.Flags = SourceObject->Common.Flags;
|
||||
|
||||
/*
|
||||
* Pass the new package object back to the package walk routine
|
||||
@ -905,6 +909,7 @@ AcpiUtCopyIpackageToIpackage (
|
||||
|
||||
|
||||
DestObj->Common.Type = SourceObj->Common.Type;
|
||||
DestObj->Common.Flags = SourceObj->Common.Flags;
|
||||
DestObj->Package.Count = SourceObj->Package.Count;
|
||||
|
||||
|
||||
@ -920,10 +925,6 @@ AcpiUtCopyIpackageToIpackage (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/* Init */
|
||||
|
||||
DestObj->Package.NextElement = DestObj->Package.Elements;
|
||||
|
||||
/*
|
||||
* Copy the package element-by-element by walking the package "tree".
|
||||
* This handles nested packages of arbitrary depth.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utdebug - Debug print routines
|
||||
* $Revision: 96 $
|
||||
* $Revision: 97 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -610,6 +610,12 @@ AcpiUtDumpBuffer (
|
||||
return;
|
||||
}
|
||||
|
||||
if ((Count < 4) || (Count & 0x01))
|
||||
{
|
||||
Display = DB_BYTE_DISPLAY;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("\nOffset Value\n");
|
||||
|
||||
/*
|
||||
* Nasty little dump buffer routine!
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: utdelete - object deletion and reference count utilities
|
||||
* $Revision: 87 $
|
||||
* $Revision: 88 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -162,10 +162,9 @@ AcpiUtDeleteInternalObj (
|
||||
*/
|
||||
switch (Object->Common.Type)
|
||||
{
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** String %p, ptr %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "**** String %p, ptr %p\n",
|
||||
Object, Object->String.Pointer));
|
||||
|
||||
/* Free the actual string buffer */
|
||||
@ -179,7 +178,7 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Buffer %p, ptr %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "**** Buffer %p, ptr %p\n",
|
||||
Object, Object->Buffer.Pointer));
|
||||
|
||||
/* Free the actual buffer */
|
||||
@ -190,7 +189,7 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, " **** Package of count %X\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, " **** Package of count %X\n",
|
||||
Object->Package.Count));
|
||||
|
||||
/*
|
||||
@ -206,7 +205,7 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
case ACPI_TYPE_MUTEX:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "***** Mutex %p, Semaphore %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "***** Mutex %p, Semaphore %p\n",
|
||||
Object, Object->Mutex.Semaphore));
|
||||
|
||||
AcpiExUnlinkMutex (Object);
|
||||
@ -216,7 +215,7 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
case ACPI_TYPE_EVENT:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "***** Event %p, Semaphore %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "***** Event %p, Semaphore %p\n",
|
||||
Object, Object->Event.Semaphore));
|
||||
|
||||
AcpiOsDeleteSemaphore (Object->Event.Semaphore);
|
||||
@ -226,7 +225,7 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "***** Method %p\n", Object));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "***** Method %p\n", Object));
|
||||
|
||||
/* Delete the method semaphore if it exists */
|
||||
|
||||
@ -240,7 +239,7 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
case ACPI_TYPE_REGION:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "***** Region %p\n", Object));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "***** Region %p\n", Object));
|
||||
|
||||
SecondDesc = AcpiNsGetSecondaryObject (Object);
|
||||
if (SecondDesc)
|
||||
@ -266,7 +265,7 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "***** Buffer Field %p\n", Object));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "***** Buffer Field %p\n", Object));
|
||||
|
||||
SecondDesc = AcpiNsGetSecondaryObject (Object);
|
||||
if (SecondDesc)
|
||||
@ -285,14 +284,14 @@ AcpiUtDeleteInternalObj (
|
||||
|
||||
if (ObjPointer)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Deleting Object Subptr %p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Deleting Object Subptr %p\n",
|
||||
ObjPointer));
|
||||
ACPI_MEM_FREE (ObjPointer);
|
||||
}
|
||||
|
||||
/* Now the object can be safely deleted */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Deleting Object %p [%s]\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Deleting Object %p [%s]\n",
|
||||
Object, AcpiUtGetTypeName (Object->Common.Type)));
|
||||
|
||||
AcpiUtDeleteObjectDesc (Object);
|
||||
@ -333,7 +332,6 @@ AcpiUtDeleteInternalObjectList (
|
||||
/* Free the combined parameter pointer list and object array */
|
||||
|
||||
ACPI_MEM_FREE (ObjList);
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
@ -362,12 +360,12 @@ AcpiUtUpdateRefCount (
|
||||
|
||||
ACPI_FUNCTION_NAME ("UtUpdateRefCount");
|
||||
|
||||
|
||||
if (!Object)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Count = Object->Common.ReferenceCount;
|
||||
NewCount = Count;
|
||||
|
||||
@ -382,7 +380,7 @@ AcpiUtUpdateRefCount (
|
||||
NewCount++;
|
||||
Object->Common.ReferenceCount = NewCount;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Obj %p Refs=%X, [Incremented]\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Obj %p Refs=%X, [Incremented]\n",
|
||||
Object, NewCount));
|
||||
break;
|
||||
|
||||
@ -391,23 +389,22 @@ AcpiUtUpdateRefCount (
|
||||
|
||||
if (Count < 1)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Obj %p Refs=%X, can't decrement! (Set to 0)\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Obj %p Refs=%X, can't decrement! (Set to 0)\n",
|
||||
Object, NewCount));
|
||||
|
||||
NewCount = 0;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
NewCount--;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Obj %p Refs=%X, [Decremented]\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Obj %p Refs=%X, [Decremented]\n",
|
||||
Object, NewCount));
|
||||
}
|
||||
|
||||
if (Object->Common.Type == ACPI_TYPE_METHOD)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Method Obj %p Refs=%X, [Decremented]\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Method Obj %p Refs=%X, [Decremented]\n",
|
||||
Object, NewCount));
|
||||
}
|
||||
|
||||
@ -422,7 +419,7 @@ AcpiUtUpdateRefCount (
|
||||
|
||||
case REF_FORCE_DELETE:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Obj %p Refs=%X, Force delete! (Set to 0)\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Obj %p Refs=%X, Force delete! (Set to 0)\n",
|
||||
Object, Count));
|
||||
|
||||
NewCount = 0;
|
||||
@ -437,7 +434,6 @@ AcpiUtUpdateRefCount (
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sanity check the reference count, for debug purposes only.
|
||||
* (A deleted object will have a huge reference count)
|
||||
@ -504,7 +500,7 @@ AcpiUtUpdateObjectReference (
|
||||
*/
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (Object) == ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Object %p is NS handle\n", Object));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p is NS handle\n", Object));
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
@ -689,7 +685,6 @@ AcpiUtAddReference (
|
||||
* We have a valid ACPI internal object, now increment the reference count
|
||||
*/
|
||||
AcpiUtUpdateObjectReference (Object, REF_INCREMENT);
|
||||
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
@ -733,7 +728,7 @@ AcpiUtRemoveReference (
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Obj %p Refs=%X\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Obj %p Refs=%X\n",
|
||||
Object, Object->Common.ReferenceCount));
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: uteval - Object evaluation
|
||||
* $Revision: 37 $
|
||||
* $Revision: 38 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -162,7 +162,7 @@ AcpiUtEvaluateNumericObject (
|
||||
{
|
||||
if (Status == AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s on %4.4s was not found\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s on %4.4s was not found\n",
|
||||
ObjectName, (char *) &DeviceNode->Name));
|
||||
}
|
||||
else
|
||||
@ -247,7 +247,7 @@ AcpiUtExecute_HID (
|
||||
{
|
||||
if (Status == AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "_HID on %4.4s was not found\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "_HID on %4.4s was not found\n",
|
||||
(char *) &DeviceNode->Name));
|
||||
}
|
||||
else
|
||||
@ -338,7 +338,7 @@ AcpiUtExecute_CID (
|
||||
{
|
||||
if (Status == AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "_CID on %4.4s was not found\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "_CID on %4.4s was not found\n",
|
||||
(char *)&DeviceNode->Name));
|
||||
}
|
||||
else
|
||||
@ -437,7 +437,7 @@ AcpiUtExecute_UID (
|
||||
{
|
||||
if (Status == AE_NOT_FOUND)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "_UID on %4.4s was not found\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "_UID on %4.4s was not found\n",
|
||||
(char *) &DeviceNode->Name));
|
||||
}
|
||||
else
|
||||
@ -529,7 +529,7 @@ AcpiUtExecute_STA (
|
||||
METHOD_NAME__STA, NULL, &ObjDesc);
|
||||
if (AE_NOT_FOUND == Status)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"_STA on %4.4s was not found, assuming present.\n",
|
||||
(char *) &DeviceNode->Name));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user