mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
This commit was generated by cvs2svn to compensate for changes in r114237,
which included commits to RCS files with non-trunk default branches.
This commit is contained in:
commit
77c1b96631
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114238
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -128,12 +128,12 @@ extern UINT32 AmlLength;
|
||||
|
||||
|
||||
extern int AcpiGbl_Optind;
|
||||
extern NATIVE_CHAR *AcpiGbl_Optarg;
|
||||
extern char *AcpiGbl_Optarg;
|
||||
|
||||
int
|
||||
AcpiGetopt(
|
||||
int argc,
|
||||
char **argv,
|
||||
int argc,
|
||||
char **argv,
|
||||
char *opts);
|
||||
|
||||
ACPI_STATUS
|
||||
@ -171,16 +171,18 @@ void
|
||||
AdDumpTables (void);
|
||||
|
||||
ACPI_STATUS
|
||||
AdGetTables (
|
||||
AdGetLocalTables (
|
||||
char *Filename,
|
||||
BOOLEAN GetAllTables);
|
||||
|
||||
ACPI_STATUS
|
||||
AdParseTables (void);
|
||||
AdParseTable (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
ACPI_STATUS
|
||||
AdDisplayTables (
|
||||
char *Filename);
|
||||
char *Filename,
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
ACPI_STATUS
|
||||
AdDisplayStatistics (void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdebug.h - ACPI/AML debugger
|
||||
* $Revision: 64 $
|
||||
* $Revision: 70 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -122,7 +122,7 @@
|
||||
|
||||
typedef struct CommandInfo
|
||||
{
|
||||
NATIVE_CHAR *Name; /* Command Name */
|
||||
char *Name; /* Command Name */
|
||||
UINT8 MinArgs; /* Minimum arguments required */
|
||||
|
||||
} COMMAND_INFO;
|
||||
@ -130,7 +130,7 @@ typedef struct CommandInfo
|
||||
|
||||
typedef struct ArgumentInfo
|
||||
{
|
||||
NATIVE_CHAR *Name; /* Argument Name */
|
||||
char *Name; /* Argument Name */
|
||||
|
||||
} ARGUMENT_INFO;
|
||||
|
||||
@ -142,15 +142,15 @@ typedef struct ArgumentInfo
|
||||
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
|
||||
AcpiOsPrintf PARAM_LIST(fp);}
|
||||
|
||||
#define EX_NO_SINGLE_STEP 1
|
||||
#define EX_SINGLE_STEP 2
|
||||
#define EX_NO_SINGLE_STEP 1
|
||||
#define EX_SINGLE_STEP 2
|
||||
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
|
||||
/*
|
||||
* dbapi - external debugger interfaces
|
||||
* dbxface - external debugger interfaces
|
||||
*/
|
||||
|
||||
ACPI_STATUS
|
||||
@ -167,6 +167,15 @@ AcpiDbSingleStep (
|
||||
ACPI_PARSE_OBJECT *Op,
|
||||
UINT32 OpType);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbStartCommand (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
void
|
||||
AcpiDbMethodEnd (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
|
||||
/*
|
||||
* dbcmds - debug commands and output routines
|
||||
@ -174,16 +183,16 @@ AcpiDbSingleStep (
|
||||
|
||||
void
|
||||
AcpiDbDisplayTableInfo (
|
||||
NATIVE_CHAR *TableArg);
|
||||
char *TableArg);
|
||||
|
||||
void
|
||||
AcpiDbUnloadAcpiTable (
|
||||
NATIVE_CHAR *TableArg,
|
||||
NATIVE_CHAR *InstanceArg);
|
||||
char *TableArg,
|
||||
char *InstanceArg);
|
||||
|
||||
void
|
||||
AcpiDbSetMethodBreakpoint (
|
||||
NATIVE_CHAR *Location,
|
||||
char *Location,
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
@ -193,46 +202,46 @@ AcpiDbSetMethodCallBreakpoint (
|
||||
|
||||
void
|
||||
AcpiDbDisassembleAml (
|
||||
NATIVE_CHAR *Statements,
|
||||
char *Statements,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
void
|
||||
AcpiDbDumpNamespace (
|
||||
NATIVE_CHAR *StartArg,
|
||||
NATIVE_CHAR *DepthArg);
|
||||
char *StartArg,
|
||||
char *DepthArg);
|
||||
|
||||
void
|
||||
AcpiDbDumpNamespaceByOwner (
|
||||
NATIVE_CHAR *OwnerArg,
|
||||
NATIVE_CHAR *DepthArg);
|
||||
char *OwnerArg,
|
||||
char *DepthArg);
|
||||
|
||||
void
|
||||
AcpiDbSendNotify (
|
||||
NATIVE_CHAR *Name,
|
||||
char *Name,
|
||||
UINT32 Value);
|
||||
|
||||
void
|
||||
AcpiDbSetMethodData (
|
||||
NATIVE_CHAR *TypeArg,
|
||||
NATIVE_CHAR *IndexArg,
|
||||
NATIVE_CHAR *ValueArg);
|
||||
char *TypeArg,
|
||||
char *IndexArg,
|
||||
char *ValueArg);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbDisplayObjects (
|
||||
NATIVE_CHAR *ObjTypeArg,
|
||||
NATIVE_CHAR *DisplayCountArg);
|
||||
char *ObjTypeArg,
|
||||
char *DisplayCountArg);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbFindNameInNamespace (
|
||||
NATIVE_CHAR *NameArg);
|
||||
char *NameArg);
|
||||
|
||||
void
|
||||
AcpiDbSetScope (
|
||||
NATIVE_CHAR *Name);
|
||||
char *Name);
|
||||
|
||||
void
|
||||
AcpiDbFindReferences (
|
||||
NATIVE_CHAR *ObjectArg);
|
||||
char *ObjectArg);
|
||||
|
||||
void
|
||||
AcpiDbDisplayLocks (void);
|
||||
@ -240,7 +249,10 @@ AcpiDbDisplayLocks (void);
|
||||
|
||||
void
|
||||
AcpiDbDisplayResources (
|
||||
NATIVE_CHAR *ObjectArg);
|
||||
char *ObjectArg);
|
||||
|
||||
void
|
||||
AcpiDbDisplayGpes (void);
|
||||
|
||||
void
|
||||
AcpiDbCheckIntegrity (
|
||||
@ -274,6 +286,10 @@ AcpiDbWalkForSpecificObjects (
|
||||
void *Context,
|
||||
void **ReturnValue);
|
||||
|
||||
void
|
||||
AcpiDbGenerateGpe (
|
||||
char *GpeArg,
|
||||
char *BlockArg);
|
||||
|
||||
/*
|
||||
* dbdisply - debug display commands
|
||||
@ -285,8 +301,8 @@ AcpiDbDisplayMethodInfo (
|
||||
|
||||
void
|
||||
AcpiDbDecodeAndDisplayObject (
|
||||
NATIVE_CHAR *Target,
|
||||
NATIVE_CHAR *OutputType);
|
||||
char *Target,
|
||||
char *OutputType);
|
||||
|
||||
void
|
||||
AcpiDbDecodeNode (
|
||||
@ -299,7 +315,7 @@ AcpiDbDisplayResultObject (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbDisplayAllMethods (
|
||||
NATIVE_CHAR *DisplayCountArg);
|
||||
char *DisplayCountArg);
|
||||
|
||||
void
|
||||
AcpiDbDisplayInternalObject (
|
||||
@ -346,15 +362,15 @@ AcpiDbDecodeInternalObject (
|
||||
|
||||
void
|
||||
AcpiDbExecute (
|
||||
NATIVE_CHAR *Name,
|
||||
NATIVE_CHAR **Args,
|
||||
char *Name,
|
||||
char **Args,
|
||||
UINT32 Flags);
|
||||
|
||||
void
|
||||
AcpiDbCreateExecutionThreads (
|
||||
NATIVE_CHAR *NumThreadsArg,
|
||||
NATIVE_CHAR *NumLoopsArg,
|
||||
NATIVE_CHAR *MethodNameArg);
|
||||
char *NumThreadsArg,
|
||||
char *NumLoopsArg,
|
||||
char *MethodNameArg);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbExecuteMethod (
|
||||
@ -373,6 +389,13 @@ void ACPI_SYSTEM_XFACE
|
||||
AcpiDbMethodThread (
|
||||
void *Context);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbExecutionWalk (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 NestingLevel,
|
||||
void *Context,
|
||||
void **ReturnValue);
|
||||
|
||||
|
||||
/*
|
||||
* dbfileio - Debugger file I/O commands
|
||||
@ -380,7 +403,7 @@ AcpiDbMethodThread (
|
||||
|
||||
ACPI_OBJECT_TYPE
|
||||
AcpiDbMatchArgument (
|
||||
NATIVE_CHAR *UserArgument,
|
||||
char *UserArgument,
|
||||
ARGUMENT_INFO *Arguments);
|
||||
|
||||
ACPI_STATUS
|
||||
@ -393,15 +416,21 @@ AcpiDbCloseDebugFile (
|
||||
|
||||
void
|
||||
AcpiDbOpenDebugFile (
|
||||
NATIVE_CHAR *Name);
|
||||
char *Name);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbLoadAcpiTable (
|
||||
NATIVE_CHAR *Filename);
|
||||
char *Filename);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbGetAcpiTable (
|
||||
NATIVE_CHAR *Filename);
|
||||
AcpiDbGetTableFromFile (
|
||||
char *Filename,
|
||||
ACPI_TABLE_HEADER **Table);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbReadTableFromFile (
|
||||
char *Filename,
|
||||
ACPI_TABLE_HEADER **Table);
|
||||
|
||||
/*
|
||||
* dbhistry - debugger HISTORY command
|
||||
@ -409,14 +438,14 @@ AcpiDbGetAcpiTable (
|
||||
|
||||
void
|
||||
AcpiDbAddToHistory (
|
||||
NATIVE_CHAR *CommandLine);
|
||||
char *CommandLine);
|
||||
|
||||
void
|
||||
AcpiDbDisplayHistory (void);
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiDbGetFromHistory (
|
||||
NATIVE_CHAR *CommandNumArg);
|
||||
char *CommandNumArg);
|
||||
|
||||
|
||||
/*
|
||||
@ -425,7 +454,7 @@ AcpiDbGetFromHistory (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbCommandDispatch (
|
||||
NATIVE_CHAR *InputBuffer,
|
||||
char *InputBuffer,
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
@ -435,25 +464,25 @@ AcpiDbExecuteThread (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbUserCommands (
|
||||
NATIVE_CHAR Prompt,
|
||||
char Prompt,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
void
|
||||
AcpiDbDisplayHelp (
|
||||
NATIVE_CHAR *HelpType);
|
||||
char *HelpType);
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiDbGetNextToken (
|
||||
NATIVE_CHAR *String,
|
||||
NATIVE_CHAR **Next);
|
||||
char *String,
|
||||
char **Next);
|
||||
|
||||
UINT32
|
||||
AcpiDbGetLine (
|
||||
NATIVE_CHAR *InputBuffer);
|
||||
char *InputBuffer);
|
||||
|
||||
UINT32
|
||||
AcpiDbMatchCommand (
|
||||
NATIVE_CHAR *UserCommand);
|
||||
char *UserCommand);
|
||||
|
||||
void
|
||||
AcpiDbSingleThread (
|
||||
@ -472,7 +501,7 @@ AcpiDbGenerateStatistics (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbDisplayStatistics (
|
||||
NATIVE_CHAR *TypeArg);
|
||||
char *TypeArg);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbClassifyOneObject (
|
||||
@ -509,7 +538,7 @@ AcpiDbDumpObject (
|
||||
|
||||
void
|
||||
AcpiDbPrepNamestring (
|
||||
NATIVE_CHAR *Name);
|
||||
char *Name);
|
||||
|
||||
|
||||
ACPI_STATUS
|
||||
@ -518,7 +547,7 @@ AcpiDbSecondPassParse (
|
||||
|
||||
ACPI_NAMESPACE_NODE *
|
||||
AcpiDbLocalNsLookup (
|
||||
NATIVE_CHAR *Name);
|
||||
char *Name);
|
||||
|
||||
|
||||
#endif /* __ACDEBUG_H__ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdisasm.h - AML disassembler
|
||||
* $Revision: 5 $
|
||||
* $Revision: 8 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -141,10 +141,10 @@ extern const char *AcpiGbl_SHRDecode[2];
|
||||
extern const char *AcpiGbl_TYPDecode[4];
|
||||
extern const char *AcpiGbl_BMDecode[2];
|
||||
extern const char *AcpiGbl_SIZDecode[4];
|
||||
extern const NATIVE_CHAR *AcpiGbl_LockRule[NUM_LOCK_RULES];
|
||||
extern const NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES];
|
||||
extern const NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES];
|
||||
extern const NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS];
|
||||
extern const char *AcpiGbl_LockRule[ACPI_NUM_LOCK_RULES];
|
||||
extern const char *AcpiGbl_AccessTypes[ACPI_NUM_ACCESS_TYPES];
|
||||
extern const char *AcpiGbl_UpdateRules[ACPI_NUM_UPDATE_RULES];
|
||||
extern const char *AcpiGbl_MatchOps[ACPI_NUM_MATCH_OPS];
|
||||
|
||||
|
||||
typedef struct acpi_op_walk_info
|
||||
@ -210,7 +210,7 @@ AcpiDmDisassemble (
|
||||
|
||||
void
|
||||
AcpiDmNamestring (
|
||||
NATIVE_CHAR *Name);
|
||||
char *Name);
|
||||
|
||||
void
|
||||
AcpiDmDisplayPath (
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acdispat.h - dispatcher (parser to interpreter interface)
|
||||
* $Revision: 55 $
|
||||
* $Revision: 56 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acefi.h - OS specific defines, etc.
|
||||
* $Revision: 12 $
|
||||
* $Revision: 13 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acevents.h - Event subcomponent prototypes and defines
|
||||
* $Revision: 80 $
|
||||
* $Revision: 83 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -164,10 +164,6 @@ ACPI_STATUS
|
||||
AcpiEvInitGlobalLockHandler (
|
||||
void);
|
||||
|
||||
UINT32
|
||||
AcpiEvGetGpeRegisterIndex (
|
||||
UINT32 GpeNumber);
|
||||
|
||||
UINT32
|
||||
AcpiEvGetGpeNumberIndex (
|
||||
UINT32 GpeNumber);
|
||||
@ -186,17 +182,17 @@ AcpiEvNotifyDispatch (
|
||||
* Evgpe - GPE handling and dispatch
|
||||
*/
|
||||
|
||||
ACPI_GPE_EVENT_INFO *
|
||||
AcpiEvGetGpeEventInfo (
|
||||
UINT32 GpeNumber);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvGpeInitialize (
|
||||
void);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvInitGpeControlMethods (
|
||||
void);
|
||||
|
||||
UINT32
|
||||
AcpiEvGpeDispatch (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
UINT32
|
||||
AcpiEvGpeDetect (
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
|
||||
* $Revision: 64 $
|
||||
* $Revision: 67 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -166,8 +166,9 @@
|
||||
#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_ABORT_METHOD (ACPI_STATUS) (0x001C | AE_CODE_ENVIRONMENTAL)
|
||||
|
||||
#define AE_CODE_ENV_MAX 0x001B
|
||||
#define AE_CODE_ENV_MAX 0x001C
|
||||
|
||||
/*
|
||||
* Programmer exceptions
|
||||
@ -261,7 +262,7 @@
|
||||
* String versions of the exception codes above
|
||||
* These strings must match the corresponding defines exactly
|
||||
*/
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Env[] =
|
||||
char const *AcpiGbl_ExceptionNames_Env[] =
|
||||
{
|
||||
"AE_OK",
|
||||
"AE_ERROR",
|
||||
@ -290,10 +291,11 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Env[] =
|
||||
"AE_ALREADY_ACQUIRED",
|
||||
"AE_NO_HARDWARE_RESPONSE",
|
||||
"AE_NO_GLOBAL_LOCK",
|
||||
"AE_LOGICAL_ADDRESS"
|
||||
"AE_LOGICAL_ADDRESS",
|
||||
"AE_ABORT_METHOD"
|
||||
};
|
||||
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Pgm[] =
|
||||
char const *AcpiGbl_ExceptionNames_Pgm[] =
|
||||
{
|
||||
"AE_BAD_PARAMETER",
|
||||
"AE_BAD_CHARACTER",
|
||||
@ -306,7 +308,7 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Pgm[] =
|
||||
"AE_BAD_DECIMAL_CONSTANT"
|
||||
};
|
||||
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Tbl[] =
|
||||
char const *AcpiGbl_ExceptionNames_Tbl[] =
|
||||
{
|
||||
"AE_BAD_SIGNATURE",
|
||||
"AE_BAD_HEADER",
|
||||
@ -316,7 +318,7 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Tbl[] =
|
||||
"AE_INVALID_TABLE_LENGTH"
|
||||
};
|
||||
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Aml[] =
|
||||
char const *AcpiGbl_ExceptionNames_Aml[] =
|
||||
{
|
||||
"AE_AML_ERROR",
|
||||
"AE_AML_PARSE",
|
||||
@ -352,7 +354,7 @@ NATIVE_CHAR const *AcpiGbl_ExceptionNames_Aml[] =
|
||||
"AE_AML_CIRCULAR_REFERENCE"
|
||||
};
|
||||
|
||||
NATIVE_CHAR const *AcpiGbl_ExceptionNames_Ctrl[] =
|
||||
char const *AcpiGbl_ExceptionNames_Ctrl[] =
|
||||
{
|
||||
"AE_CTRL_RETURN_VALUE",
|
||||
"AE_CTRL_PENDING",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acglobal.h - Declarations for global variables
|
||||
* $Revision: 132 $
|
||||
* $Revision: 137 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -232,9 +232,9 @@ ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized;
|
||||
extern BOOLEAN AcpiGbl_Shutdown;
|
||||
extern UINT32 AcpiGbl_StartupFlags;
|
||||
extern const UINT8 AcpiGbl_DecodeTo8bit[8];
|
||||
extern const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES];
|
||||
extern const char *AcpiGbl_DbSleepStates[ACPI_S_STATE_COUNT];
|
||||
extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
|
||||
extern const NATIVE_CHAR *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
|
||||
extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@ -307,22 +307,7 @@ ACPI_EXTERN UINT8 AcpiGbl_SleepTypeB;
|
||||
|
||||
extern ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
|
||||
ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
|
||||
|
||||
ACPI_EXTERN ACPI_HANDLE AcpiGbl_GpeObjHandle;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_GpeRegisterCount;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_GpeNumberMax;
|
||||
ACPI_EXTERN ACPI_GPE_REGISTER_INFO *AcpiGbl_GpeRegisterInfo;
|
||||
ACPI_EXTERN ACPI_GPE_NUMBER_INFO *AcpiGbl_GpeNumberInfo;
|
||||
ACPI_EXTERN ACPI_GPE_BLOCK_INFO AcpiGbl_GpeBlockInfo[ACPI_MAX_GPE_BLOCKS];
|
||||
|
||||
/*
|
||||
* GPE translation table
|
||||
* Indexed by the GPE number, returns a valid index into the global GPE tables.
|
||||
*
|
||||
* This table is needed because the GPE numbers supported by block 1 do not
|
||||
* have to be contiguous with the GPE numbers supported by block 0.
|
||||
*/
|
||||
ACPI_EXTERN ACPI_GPE_INDEX_INFO *AcpiGbl_GpeNumberToIndex;
|
||||
ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeBlockListHead;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@ -344,24 +329,25 @@ ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_verbose;
|
||||
#ifdef ACPI_DEBUGGER
|
||||
|
||||
extern BOOLEAN AcpiGbl_MethodExecuting;
|
||||
extern BOOLEAN AcpiGbl_AbortMethod;
|
||||
extern BOOLEAN AcpiGbl_DbTerminateThreads;
|
||||
|
||||
ACPI_EXTERN int optind;
|
||||
ACPI_EXTERN NATIVE_CHAR *optarg;
|
||||
ACPI_EXTERN char *optarg;
|
||||
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_tables;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_stats;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_ini_methods;
|
||||
|
||||
|
||||
ACPI_EXTERN NATIVE_CHAR *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
|
||||
ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbLineBuf[80];
|
||||
ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbParsedBuf[80];
|
||||
ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbScopeBuf[40];
|
||||
ACPI_EXTERN NATIVE_CHAR AcpiGbl_DbDebugFilename[40];
|
||||
ACPI_EXTERN char *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
|
||||
ACPI_EXTERN char AcpiGbl_DbLineBuf[80];
|
||||
ACPI_EXTERN char AcpiGbl_DbParsedBuf[80];
|
||||
ACPI_EXTERN char AcpiGbl_DbScopeBuf[40];
|
||||
ACPI_EXTERN char AcpiGbl_DbDebugFilename[40];
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOutputToFile;
|
||||
ACPI_EXTERN NATIVE_CHAR *AcpiGbl_DbBuffer;
|
||||
ACPI_EXTERN NATIVE_CHAR *AcpiGbl_DbFilename;
|
||||
ACPI_EXTERN char *AcpiGbl_DbBuffer;
|
||||
ACPI_EXTERN char *AcpiGbl_DbFilename;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_DbDebugLevel;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_DbConsoleDebugLevel;
|
||||
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DbTablePtr;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: achware.h -- hardware specific interfaces
|
||||
* $Revision: 60 $
|
||||
* $Revision: 62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -188,29 +188,25 @@ AcpiHwClearAcpiStatus (
|
||||
|
||||
/* GPE support */
|
||||
|
||||
UINT8
|
||||
AcpiHwGetGpeBitMask (
|
||||
UINT32 GpeNumber);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwEnableGpe (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
void
|
||||
AcpiHwEnableGpeForWakeup (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwDisableGpe (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
void
|
||||
AcpiHwDisableGpeForWakeup (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwClearGpe (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwGetGpeStatus (
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
|
||||
* $Revision: 142 $
|
||||
* $Revision: 145 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -183,7 +183,8 @@ UINT32
|
||||
AcpiExConvertToAscii (
|
||||
ACPI_INTEGER Integer,
|
||||
UINT32 Base,
|
||||
UINT8 *String);
|
||||
UINT8 *String,
|
||||
UINT8 MaxLength);
|
||||
|
||||
/*
|
||||
* exfield - ACPI AML (p-code) execution - field manipulation
|
||||
@ -545,10 +546,10 @@ void
|
||||
AcpiExDumpOperands (
|
||||
ACPI_OPERAND_OBJECT **Operands,
|
||||
ACPI_INTERPRETER_MODE InterpreterMode,
|
||||
NATIVE_CHAR *Ident,
|
||||
char *Ident,
|
||||
UINT32 NumLevels,
|
||||
NATIVE_CHAR *Note,
|
||||
NATIVE_CHAR *ModuleName,
|
||||
char *Note,
|
||||
char *ModuleName,
|
||||
UINT32 LineNumber);
|
||||
|
||||
void
|
||||
@ -586,7 +587,7 @@ AcpiExOutAddress (
|
||||
* exnames - interpreter/scanner name load/execute
|
||||
*/
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiExAllocateNameString (
|
||||
UINT32 PrefixCount,
|
||||
UINT32 NumNameSegs);
|
||||
@ -598,13 +599,13 @@ AcpiExGoodChar (
|
||||
ACPI_STATUS
|
||||
AcpiExNameSegment (
|
||||
UINT8 **InAmlAddress,
|
||||
NATIVE_CHAR *NameString);
|
||||
char *NameString);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExGetNameString (
|
||||
ACPI_OBJECT_TYPE DataType,
|
||||
UINT8 *InAmlAddress,
|
||||
NATIVE_CHAR **OutNameString,
|
||||
char **OutNameString,
|
||||
UINT32 *OutNameLength);
|
||||
|
||||
ACPI_STATUS
|
||||
@ -720,12 +721,12 @@ AcpiExDigitsNeeded (
|
||||
void
|
||||
AcpiExEisaIdToString (
|
||||
UINT32 NumericId,
|
||||
NATIVE_CHAR *OutString);
|
||||
char *OutString);
|
||||
|
||||
void
|
||||
AcpiExUnsignedIntegerToString (
|
||||
ACPI_INTEGER Value,
|
||||
NATIVE_CHAR *OutString);
|
||||
char *OutString);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: aclocal.h - Internal data types used across the ACPI subsystem
|
||||
* $Revision: 179 $
|
||||
* $Revision: 189 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -120,7 +120,7 @@
|
||||
|
||||
#define ACPI_WAIT_FOREVER 0xFFFF /* UINT16, as per ACPI spec */
|
||||
|
||||
typedef void* ACPI_MUTEX;
|
||||
typedef void * ACPI_MUTEX;
|
||||
typedef UINT32 ACPI_MUTEX_HANDLE;
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
|
||||
|
||||
/* Names for the mutexes used in the subsystem */
|
||||
|
||||
static NATIVE_CHAR *AcpiGbl_MutexNames[] =
|
||||
static char *AcpiGbl_MutexNames[] =
|
||||
{
|
||||
"ACPI_MTX_Execute",
|
||||
"ACPI_MTX_Interpreter",
|
||||
@ -192,7 +192,7 @@ static NATIVE_CHAR *AcpiGbl_MutexNames[] =
|
||||
|
||||
/* Table for the global mutexes */
|
||||
|
||||
typedef struct AcpiMutexInfo
|
||||
typedef struct acpi_mutex_info
|
||||
{
|
||||
ACPI_MUTEX Mutex;
|
||||
UINT32 UseCount;
|
||||
@ -257,23 +257,24 @@ typedef enum
|
||||
|
||||
typedef union acpi_name_union
|
||||
{
|
||||
UINT32 Integer;
|
||||
char Ascii[4];
|
||||
UINT32 Integer;
|
||||
char Ascii[4];
|
||||
|
||||
} ACPI_NAME_UNION;
|
||||
|
||||
typedef struct acpi_node
|
||||
typedef struct acpi_namespace_node
|
||||
{
|
||||
UINT8 Descriptor; /* Used to differentiate object descriptor types */
|
||||
UINT8 Type; /* Type associated with this name */
|
||||
UINT16 OwnerId;
|
||||
ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */
|
||||
UINT8 Descriptor; /* Used to differentiate object descriptor types */
|
||||
UINT8 Type; /* Type associated with this name */
|
||||
UINT16 OwnerId;
|
||||
ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */
|
||||
|
||||
|
||||
union acpi_operand_obj *Object; /* Pointer to attached ACPI object (optional) */
|
||||
struct acpi_node *Child; /* first child */
|
||||
struct acpi_node *Peer; /* Next peer*/
|
||||
UINT16 ReferenceCount; /* Current count of references and children */
|
||||
UINT8 Flags;
|
||||
union acpi_operand_object *Object; /* Pointer to attached ACPI object (optional) */
|
||||
struct acpi_namespace_node *Child; /* first child */
|
||||
struct acpi_namespace_node *Peer; /* Next peer*/
|
||||
UINT16 ReferenceCount; /* Current count of references and children */
|
||||
UINT8 Flags;
|
||||
|
||||
} ACPI_NAMESPACE_NODE;
|
||||
|
||||
@ -297,11 +298,11 @@ typedef struct acpi_node
|
||||
/*
|
||||
* ACPI Table Descriptor. One per ACPI table
|
||||
*/
|
||||
typedef struct AcpiTableDesc
|
||||
typedef struct acpi_table_desc
|
||||
{
|
||||
struct AcpiTableDesc *Prev;
|
||||
struct AcpiTableDesc *Next;
|
||||
struct AcpiTableDesc *InstalledDesc;
|
||||
struct acpi_table_desc *Prev;
|
||||
struct acpi_table_desc *Next;
|
||||
struct acpi_table_desc *InstalledDesc;
|
||||
ACPI_TABLE_HEADER *Pointer;
|
||||
UINT8 *AmlStart;
|
||||
UINT64 PhysicalAddress;
|
||||
@ -316,29 +317,30 @@ typedef struct AcpiTableDesc
|
||||
} ACPI_TABLE_DESC;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_find_context
|
||||
{
|
||||
NATIVE_CHAR *SearchFor;
|
||||
char *SearchFor;
|
||||
ACPI_HANDLE *List;
|
||||
UINT32 *Count;
|
||||
|
||||
} ACPI_FIND_CONTEXT;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_ns_search_data
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
|
||||
} ACPI_NS_SEARCH_DATA;
|
||||
|
||||
|
||||
/*
|
||||
* Predefined Namespace items
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct acpi_predefined_names
|
||||
{
|
||||
NATIVE_CHAR *Name;
|
||||
char *Name;
|
||||
UINT8 Type;
|
||||
NATIVE_CHAR *Val;
|
||||
char *Val;
|
||||
|
||||
} ACPI_PREDEFINED_NAMES;
|
||||
|
||||
@ -353,9 +355,9 @@ typedef struct
|
||||
|
||||
typedef struct acpi_namestring_info
|
||||
{
|
||||
NATIVE_CHAR *ExternalName;
|
||||
NATIVE_CHAR *NextExternalChar;
|
||||
NATIVE_CHAR *InternalName;
|
||||
char *ExternalName;
|
||||
char *NextExternalChar;
|
||||
char *InternalName;
|
||||
UINT32 Length;
|
||||
UINT32 NumSegments;
|
||||
UINT32 NumCarats;
|
||||
@ -366,7 +368,7 @@ typedef struct acpi_namestring_info
|
||||
|
||||
/* Field creation info */
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_create_field_info
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *RegionNode;
|
||||
ACPI_NAMESPACE_NODE *FieldNode;
|
||||
@ -388,27 +390,29 @@ typedef struct
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Information about each GPE register block */
|
||||
/* Information about each particular GPE level */
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_gpe_event_info
|
||||
{
|
||||
UINT8 AddressSpaceId;
|
||||
ACPI_GENERIC_ADDRESS *BlockAddress;
|
||||
UINT16 RegisterCount;
|
||||
UINT8 BlockBaseNumber;
|
||||
ACPI_NAMESPACE_NODE *MethodNode; /* Method node for this GPE level */
|
||||
ACPI_GPE_HANDLER Handler; /* Address of handler, if any */
|
||||
void *Context; /* Context to be passed to handler */
|
||||
struct acpi_gpe_register_info *RegisterInfo;
|
||||
UINT8 Type; /* Level or Edge */
|
||||
UINT8 BitMask;
|
||||
|
||||
} ACPI_GPE_BLOCK_INFO;
|
||||
} ACPI_GPE_EVENT_INFO;
|
||||
|
||||
/* Information about a particular GPE register pair */
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_gpe_register_info
|
||||
{
|
||||
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 */
|
||||
UINT8 BaseGpeNumber; /* Base GPE number for this register */
|
||||
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 */
|
||||
UINT8 BaseGpeNumber; /* Base GPE number for this register */
|
||||
|
||||
} ACPI_GPE_REGISTER_INFO;
|
||||
|
||||
@ -417,29 +421,25 @@ typedef struct
|
||||
#define ACPI_GPE_EDGE_TRIGGERED 2
|
||||
|
||||
|
||||
/* Information about each particular GPE level */
|
||||
/* Information about each GPE register block */
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_gpe_block_info
|
||||
{
|
||||
ACPI_HANDLE MethodHandle; /* Method handle for direct (fast) execution */
|
||||
ACPI_GPE_HANDLER Handler; /* Address of handler, if any */
|
||||
void *Context; /* Context to be passed to handler */
|
||||
UINT8 Type; /* Level or Edge */
|
||||
UINT8 BitMask;
|
||||
struct acpi_gpe_block_info *Previous;
|
||||
struct acpi_gpe_block_info *Next;
|
||||
struct acpi_gpe_block_info *NextOnInterrupt;
|
||||
ACPI_GPE_REGISTER_INFO *RegisterInfo;
|
||||
ACPI_GPE_EVENT_INFO *EventInfo;
|
||||
ACPI_GENERIC_ADDRESS BlockAddress;
|
||||
UINT32 RegisterCount;
|
||||
UINT8 BlockBaseNumber;
|
||||
|
||||
} ACPI_GPE_BLOCK_INFO;
|
||||
|
||||
} ACPI_GPE_NUMBER_INFO;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT8 NumberIndex;
|
||||
|
||||
} ACPI_GPE_INDEX_INFO;
|
||||
|
||||
/* Information about each particular fixed event */
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_fixed_event_handler
|
||||
{
|
||||
ACPI_EVENT_HANDLER Handler; /* Address of handler. */
|
||||
void *Context; /* Context to be passed to handler */
|
||||
@ -447,7 +447,7 @@ typedef struct
|
||||
} ACPI_FIXED_EVENT_HANDLER;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_fixed_event_info
|
||||
{
|
||||
UINT8 StatusRegisterId;
|
||||
UINT8 EnableRegisterId;
|
||||
@ -458,7 +458,7 @@ typedef struct
|
||||
|
||||
/* Information used during field processing */
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_field_info
|
||||
{
|
||||
UINT8 SkipField;
|
||||
UINT8 FieldFlag;
|
||||
@ -484,16 +484,16 @@ typedef struct
|
||||
/* Forward declarations */
|
||||
struct acpi_walk_state;
|
||||
struct acpi_obj_mutex;
|
||||
union acpi_parse_obj;
|
||||
union acpi_parse_object;
|
||||
|
||||
|
||||
#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 Reserved; \
|
||||
void *Next; \
|
||||
UINT8 DataType; /* To differentiate various internal objs */\
|
||||
UINT8 Flags; \
|
||||
UINT16 Value; \
|
||||
UINT16 State; \
|
||||
UINT16 Reserved; \
|
||||
void *Next; \
|
||||
|
||||
typedef struct acpi_common_state
|
||||
{
|
||||
@ -507,7 +507,7 @@ typedef struct acpi_common_state
|
||||
typedef struct acpi_update_state
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
union acpi_operand_obj *Object;
|
||||
union acpi_operand_object *Object;
|
||||
|
||||
} ACPI_UPDATE_STATE;
|
||||
|
||||
@ -518,12 +518,12 @@ typedef struct acpi_update_state
|
||||
typedef struct acpi_pkg_state
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
union acpi_operand_obj *SourceObject;
|
||||
union acpi_operand_obj *DestObject;
|
||||
struct acpi_walk_state *WalkState;
|
||||
void *ThisTargetObj;
|
||||
UINT32 NumPackages;
|
||||
UINT16 Index;
|
||||
union acpi_operand_object *SourceObject;
|
||||
union acpi_operand_object *DestObject;
|
||||
struct acpi_walk_state *WalkState;
|
||||
void *ThisTargetObj;
|
||||
UINT32 NumPackages;
|
||||
UINT16 Index;
|
||||
|
||||
} ACPI_PKG_STATE;
|
||||
|
||||
@ -535,10 +535,10 @@ typedef struct acpi_pkg_state
|
||||
typedef struct acpi_control_state
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
union acpi_parse_obj *PredicateOp;
|
||||
UINT8 *AmlPredicateStart; /* Start of if/while predicate */
|
||||
UINT8 *PackageEnd; /* End of if/while block */
|
||||
UINT16 Opcode;
|
||||
union acpi_parse_object *PredicateOp;
|
||||
UINT8 *AmlPredicateStart; /* Start of if/while predicate */
|
||||
UINT8 *PackageEnd; /* End of if/while block */
|
||||
UINT16 Opcode;
|
||||
|
||||
} ACPI_CONTROL_STATE;
|
||||
|
||||
@ -549,7 +549,7 @@ typedef struct acpi_control_state
|
||||
typedef struct acpi_scope_state
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
|
||||
} ACPI_SCOPE_STATE;
|
||||
|
||||
@ -557,11 +557,11 @@ typedef struct acpi_scope_state
|
||||
typedef struct acpi_pscope_state
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
union acpi_parse_obj *Op; /* current op being parsed */
|
||||
UINT8 *ArgEnd; /* current argument end */
|
||||
UINT8 *PkgEnd; /* current package end */
|
||||
UINT32 ArgList; /* next argument to parse */
|
||||
UINT32 ArgCount; /* Number of fixed arguments */
|
||||
union acpi_parse_object *Op; /* current op being parsed */
|
||||
UINT8 *ArgEnd; /* current argument end */
|
||||
UINT8 *PkgEnd; /* current package end */
|
||||
UINT32 ArgList; /* next argument to parse */
|
||||
UINT32 ArgCount; /* Number of fixed arguments */
|
||||
|
||||
} ACPI_PSCOPE_STATE;
|
||||
|
||||
@ -573,10 +573,10 @@ typedef struct acpi_pscope_state
|
||||
typedef struct acpi_thread_state
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
struct acpi_walk_state *WalkStateList; /* Head of list of WalkStates for this thread */
|
||||
union acpi_operand_obj *AcquiredMutexList; /* List of all currently acquired mutexes */
|
||||
UINT32 ThreadId; /* Running thread ID */
|
||||
UINT16 CurrentSyncLevel; /* Mutex Sync (nested acquire) level */
|
||||
struct acpi_walk_state *WalkStateList; /* Head of list of WalkStates for this thread */
|
||||
union acpi_operand_object *AcquiredMutexList; /* List of all currently acquired mutexes */
|
||||
UINT32 ThreadId; /* Running thread ID */
|
||||
UINT16 CurrentSyncLevel; /* Mutex Sync (nested acquire) level */
|
||||
|
||||
} ACPI_THREAD_STATE;
|
||||
|
||||
@ -588,21 +588,21 @@ typedef struct acpi_thread_state
|
||||
typedef struct acpi_result_values
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
union acpi_operand_obj *ObjDesc [OBJ_NUM_OPERANDS];
|
||||
UINT8 NumResults;
|
||||
UINT8 LastInsert;
|
||||
union acpi_operand_object *ObjDesc [ACPI_OBJ_NUM_OPERANDS];
|
||||
UINT8 NumResults;
|
||||
UINT8 LastInsert;
|
||||
|
||||
} ACPI_RESULT_VALUES;
|
||||
|
||||
|
||||
typedef
|
||||
ACPI_STATUS (*ACPI_PARSE_DOWNWARDS) (
|
||||
struct acpi_walk_state *WalkState,
|
||||
union acpi_parse_obj **OutOp);
|
||||
struct acpi_walk_state *WalkState,
|
||||
union acpi_parse_object **OutOp);
|
||||
|
||||
typedef
|
||||
ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
|
||||
struct acpi_walk_state *WalkState);
|
||||
struct acpi_walk_state *WalkState);
|
||||
|
||||
|
||||
/*
|
||||
@ -612,25 +612,25 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
|
||||
typedef struct acpi_notify_info
|
||||
{
|
||||
ACPI_STATE_COMMON
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
union acpi_operand_obj *HandlerObj;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
union acpi_operand_object *HandlerObj;
|
||||
|
||||
} ACPI_NOTIFY_INFO;
|
||||
|
||||
|
||||
/* Generic state is union of structs above */
|
||||
|
||||
typedef union acpi_gen_state
|
||||
typedef union acpi_generic_state
|
||||
{
|
||||
ACPI_COMMON_STATE Common;
|
||||
ACPI_CONTROL_STATE Control;
|
||||
ACPI_UPDATE_STATE Update;
|
||||
ACPI_SCOPE_STATE Scope;
|
||||
ACPI_PSCOPE_STATE ParseScope;
|
||||
ACPI_PKG_STATE Pkg;
|
||||
ACPI_THREAD_STATE Thread;
|
||||
ACPI_RESULT_VALUES Results;
|
||||
ACPI_NOTIFY_INFO Notify;
|
||||
ACPI_COMMON_STATE Common;
|
||||
ACPI_CONTROL_STATE Control;
|
||||
ACPI_UPDATE_STATE Update;
|
||||
ACPI_SCOPE_STATE Scope;
|
||||
ACPI_PSCOPE_STATE ParseScope;
|
||||
ACPI_PKG_STATE Pkg;
|
||||
ACPI_THREAD_STATE Thread;
|
||||
ACPI_RESULT_VALUES Results;
|
||||
ACPI_NOTIFY_INFO Notify;
|
||||
|
||||
} ACPI_GENERIC_STATE;
|
||||
|
||||
@ -643,7 +643,7 @@ typedef union acpi_gen_state
|
||||
|
||||
typedef
|
||||
ACPI_STATUS (*ACPI_EXECUTE_OP) (
|
||||
struct acpi_walk_state *WalkState);
|
||||
struct acpi_walk_state *WalkState);
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@ -658,48 +658,49 @@ ACPI_STATUS (*ACPI_EXECUTE_OP) (
|
||||
typedef struct acpi_opcode_info
|
||||
{
|
||||
#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
|
||||
NATIVE_CHAR *Name; /* Opcode name (disassembler/debug only) */
|
||||
char *Name; /* Opcode name (disassembler/debug only) */
|
||||
#endif
|
||||
UINT32 ParseArgs; /* Grammar/Parse time arguments */
|
||||
UINT32 RuntimeArgs; /* Interpret time arguments */
|
||||
UINT32 Flags; /* Misc flags */
|
||||
UINT8 ObjectType; /* Corresponding internal object type */
|
||||
UINT8 Class; /* Opcode class */
|
||||
UINT8 Type; /* Opcode type */
|
||||
UINT32 ParseArgs; /* Grammar/Parse time arguments */
|
||||
UINT32 RuntimeArgs; /* Interpret time arguments */
|
||||
UINT32 Flags; /* Misc flags */
|
||||
UINT8 ObjectType; /* Corresponding internal object type */
|
||||
UINT8 Class; /* Opcode class */
|
||||
UINT8 Type; /* Opcode type */
|
||||
|
||||
} ACPI_OPCODE_INFO;
|
||||
|
||||
|
||||
typedef union acpi_parse_val
|
||||
typedef union acpi_parse_value
|
||||
{
|
||||
ACPI_INTEGER Integer; /* integer constant (Up to 64 bits) */
|
||||
UINT64_STRUCT Integer64; /* Structure overlay for 2 32-bit Dwords */
|
||||
UINT32 Integer32; /* integer constant, 32 bits only */
|
||||
UINT16 Integer16; /* integer constant, 16 bits only */
|
||||
UINT8 Integer8; /* integer constant, 8 bits only */
|
||||
UINT32 Size; /* bytelist or field size */
|
||||
NATIVE_CHAR *String; /* NULL terminated string */
|
||||
UINT8 *Buffer; /* buffer or string */
|
||||
NATIVE_CHAR *Name; /* NULL terminated string */
|
||||
union acpi_parse_obj *Arg; /* arguments and contained ops */
|
||||
ACPI_INTEGER Integer; /* integer constant (Up to 64 bits) */
|
||||
UINT64_STRUCT Integer64; /* Structure overlay for 2 32-bit Dwords */
|
||||
UINT32 Integer32; /* integer constant, 32 bits only */
|
||||
UINT16 Integer16; /* integer constant, 16 bits only */
|
||||
UINT8 Integer8; /* integer constant, 8 bits only */
|
||||
UINT32 Size; /* bytelist or field size */
|
||||
char *String; /* NULL terminated string */
|
||||
UINT8 *Buffer; /* buffer or string */
|
||||
char *Name; /* NULL terminated string */
|
||||
union acpi_parse_object *Arg; /* arguments and contained ops */
|
||||
|
||||
} ACPI_PARSE_VALUE;
|
||||
|
||||
|
||||
#define ACPI_PARSE_COMMON \
|
||||
UINT8 DataType; /* To differentiate various internal objs */\
|
||||
UINT8 Flags; /* Type of Op */\
|
||||
UINT16 AmlOpcode; /* AML opcode */\
|
||||
UINT32 AmlOffset; /* offset of declaration in AML */\
|
||||
union acpi_parse_obj *Parent; /* parent op */\
|
||||
union acpi_parse_obj *Next; /* next op */\
|
||||
UINT8 DataType; /* To differentiate various internal objs */\
|
||||
UINT8 Flags; /* Type of Op */\
|
||||
UINT16 AmlOpcode; /* AML opcode */\
|
||||
UINT32 AmlOffset; /* offset of declaration in AML */\
|
||||
union acpi_parse_object *Parent; /* parent op */\
|
||||
union acpi_parse_object *Next; /* next op */\
|
||||
ACPI_DISASM_ONLY_MEMBERS (\
|
||||
UINT8 DisasmFlags; /* Used during AML disassembly */\
|
||||
UINT8 DisasmOpcode; /* Subtype used for disassembly */\
|
||||
NATIVE_CHAR AmlOpName[16]) /* op name (debug only) */\
|
||||
/* NON-DEBUG members below: */\
|
||||
ACPI_NAMESPACE_NODE *Node; /* for use by interpreter */\
|
||||
ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
|
||||
UINT8 DisasmFlags; /* Used during AML disassembly */\
|
||||
UINT8 DisasmOpcode; /* Subtype used for disassembly */\
|
||||
char AmlOpName[16]) /* op name (debug only) */\
|
||||
/* NON-DEBUG members below: */\
|
||||
ACPI_NAMESPACE_NODE *Node; /* for use by interpreter */\
|
||||
ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
|
||||
|
||||
|
||||
#define ACPI_DASM_BUFFER 0x00
|
||||
#define ACPI_DASM_RESOURCE 0x01
|
||||
@ -711,7 +712,7 @@ typedef union acpi_parse_val
|
||||
/*
|
||||
* generic operation (for example: If, While, Store)
|
||||
*/
|
||||
typedef struct acpi_parseobj_common
|
||||
typedef struct acpi_parse_obj_common
|
||||
{
|
||||
ACPI_PARSE_COMMON
|
||||
} ACPI_PARSE_OBJ_COMMON;
|
||||
@ -721,27 +722,24 @@ typedef struct acpi_parseobj_common
|
||||
* Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and OpRegions),
|
||||
* and bytelists.
|
||||
*/
|
||||
typedef struct acpi_parseobj_named
|
||||
typedef struct acpi_parse_obj_named
|
||||
{
|
||||
ACPI_PARSE_COMMON
|
||||
UINT8 *Path;
|
||||
UINT8 *Data; /* AML body or bytelist data */
|
||||
UINT32 Length; /* AML length */
|
||||
UINT32 Name; /* 4-byte name or zero if no name */
|
||||
UINT8 *Path;
|
||||
UINT8 *Data; /* AML body or bytelist data */
|
||||
UINT32 Length; /* AML length */
|
||||
UINT32 Name; /* 4-byte name or zero if no name */
|
||||
|
||||
} ACPI_PARSE_OBJ_NAMED;
|
||||
|
||||
|
||||
/* The parse node is the fundamental element of the parse tree */
|
||||
|
||||
typedef struct acpi_parseobj_asl
|
||||
typedef struct acpi_parse_obj_asl
|
||||
{
|
||||
ACPI_PARSE_COMMON
|
||||
|
||||
union acpi_parse_obj *Child;
|
||||
|
||||
|
||||
union acpi_parse_obj *ParentMethod;
|
||||
union acpi_parse_object *Child;
|
||||
union acpi_parse_object *ParentMethod;
|
||||
char *Filename;
|
||||
char *ExternalName;
|
||||
char *Namepath;
|
||||
@ -768,7 +766,7 @@ typedef struct acpi_parseobj_asl
|
||||
} ACPI_PARSE_OBJ_ASL;
|
||||
|
||||
|
||||
typedef union acpi_parse_obj
|
||||
typedef union acpi_parse_object
|
||||
{
|
||||
ACPI_PARSE_OBJ_COMMON Common;
|
||||
ACPI_PARSE_OBJ_NAMED Named;
|
||||
@ -783,16 +781,16 @@ typedef union acpi_parse_obj
|
||||
*/
|
||||
typedef struct acpi_parse_state
|
||||
{
|
||||
UINT32 AmlSize;
|
||||
UINT8 *AmlStart; /* first AML byte */
|
||||
UINT8 *Aml; /* next AML byte */
|
||||
UINT8 *AmlEnd; /* (last + 1) AML byte */
|
||||
UINT8 *PkgStart; /* current package begin */
|
||||
UINT8 *PkgEnd; /* current package end */
|
||||
union acpi_parse_obj *StartOp; /* root of parse tree */
|
||||
struct acpi_node *StartNode;
|
||||
union acpi_gen_state *Scope; /* current scope */
|
||||
union acpi_parse_obj *StartScope;
|
||||
UINT32 AmlSize;
|
||||
UINT8 *AmlStart; /* first AML byte */
|
||||
UINT8 *Aml; /* next AML byte */
|
||||
UINT8 *AmlEnd; /* (last + 1) AML byte */
|
||||
UINT8 *PkgStart; /* current package begin */
|
||||
UINT8 *PkgEnd; /* current package end */
|
||||
union acpi_parse_object *StartOp; /* root of parse tree */
|
||||
struct acpi_namespace_node *StartNode;
|
||||
union acpi_generic_state *Scope; /* current scope */
|
||||
union acpi_parse_object *StartScope;
|
||||
|
||||
} ACPI_PARSE_STATE;
|
||||
|
||||
@ -821,11 +819,11 @@ typedef struct acpi_parse_state
|
||||
|
||||
#define PCI_ROOT_HID_STRING "PNP0A03"
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_bit_register_info
|
||||
{
|
||||
UINT8 ParentRegister;
|
||||
UINT8 BitPosition;
|
||||
UINT16 AccessBitMask;
|
||||
UINT8 ParentRegister;
|
||||
UINT8 BitPosition;
|
||||
UINT16 AccessBitMask;
|
||||
|
||||
} ACPI_BIT_REGISTER_INFO;
|
||||
|
||||
@ -957,7 +955,7 @@ typedef struct
|
||||
|
||||
#define ACPI_DEVICE_ID_LENGTH 0x09
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_device_id
|
||||
{
|
||||
char Buffer[ACPI_DEVICE_ID_LENGTH];
|
||||
|
||||
@ -979,17 +977,24 @@ typedef struct
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct dbmethodinfo
|
||||
typedef struct acpi_db_method_info
|
||||
{
|
||||
ACPI_HANDLE ThreadGate;
|
||||
NATIVE_CHAR *Name;
|
||||
NATIVE_CHAR **Args;
|
||||
char *Name;
|
||||
char **Args;
|
||||
UINT32 Flags;
|
||||
UINT32 NumLoops;
|
||||
NATIVE_CHAR Pathname[128];
|
||||
char Pathname[128];
|
||||
|
||||
} ACPI_DB_METHOD_INFO;
|
||||
|
||||
typedef struct acpi_integrity_info
|
||||
{
|
||||
UINT32 Nodes;
|
||||
UINT32 Objects;
|
||||
|
||||
} ACPI_INTEGRITY_INFO;
|
||||
|
||||
|
||||
#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
|
||||
#define ACPI_DB_CONSOLE_OUTPUT 0x02
|
||||
@ -1002,11 +1007,11 @@ typedef struct dbmethodinfo
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_debug_print_info
|
||||
{
|
||||
UINT32 ComponentId;
|
||||
NATIVE_CHAR *ProcName;
|
||||
NATIVE_CHAR *ModuleName;
|
||||
char *ProcName;
|
||||
char *ModuleName;
|
||||
|
||||
} ACPI_DEBUG_PRINT_INFO;
|
||||
|
||||
@ -1018,21 +1023,21 @@ typedef struct
|
||||
#define ACPI_MAX_MODULE_NAME 16
|
||||
|
||||
#define ACPI_COMMON_DEBUG_MEM_HEADER \
|
||||
struct AcpiDebugMemBlock *Previous; \
|
||||
struct AcpiDebugMemBlock *Next; \
|
||||
struct acpi_debug_mem_block *Previous; \
|
||||
struct acpi_debug_mem_block *Next; \
|
||||
UINT32 Size; \
|
||||
UINT32 Component; \
|
||||
UINT32 Line; \
|
||||
NATIVE_CHAR Module[ACPI_MAX_MODULE_NAME]; \
|
||||
char Module[ACPI_MAX_MODULE_NAME]; \
|
||||
UINT8 AllocType;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_debug_mem_header
|
||||
{
|
||||
ACPI_COMMON_DEBUG_MEM_HEADER
|
||||
|
||||
} ACPI_DEBUG_MEM_HEADER;
|
||||
|
||||
typedef struct AcpiDebugMemBlock
|
||||
typedef struct acpi_debug_mem_block
|
||||
{
|
||||
ACPI_COMMON_DEBUG_MEM_HEADER
|
||||
UINT64 UserSpace;
|
||||
@ -1053,7 +1058,7 @@ typedef struct AcpiDebugMemBlock
|
||||
#define ACPI_NUM_MEM_LISTS 7
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_memory_list
|
||||
{
|
||||
void *ListHead;
|
||||
UINT16 LinkOffset;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acmacros.h - C macros for the entire subsystem.
|
||||
* $Revision: 130 $
|
||||
* $Revision: 137 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -175,12 +175,12 @@
|
||||
|
||||
/* Pointer arithmetic */
|
||||
|
||||
#define ACPI_PTR_ADD(t,a,b) (t *) (void *)((char *)(a) + (NATIVE_UINT)(b))
|
||||
#define ACPI_PTR_DIFF(a,b) (NATIVE_UINT) ((char *)(a) - (char *)(b))
|
||||
#define ACPI_PTR_ADD(t,a,b) (t *) (void *)((char *)(a) + (ACPI_NATIVE_UINT)(b))
|
||||
#define ACPI_PTR_DIFF(a,b) (ACPI_NATIVE_UINT) ((char *)(a) - (char *)(b))
|
||||
|
||||
/* Pointer/Integer type conversions */
|
||||
|
||||
#define ACPI_TO_POINTER(i) ACPI_PTR_ADD (void, (void *) NULL,(NATIVE_UINT)i)
|
||||
#define ACPI_TO_POINTER(i) ACPI_PTR_ADD (void, (void *) NULL,(ACPI_NATIVE_UINT)i)
|
||||
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
|
||||
#define ACPI_OFFSET(d,f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
|
||||
#define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f)
|
||||
@ -269,8 +269,8 @@
|
||||
/*
|
||||
* Rounding macros (Power of two boundaries only)
|
||||
*/
|
||||
#define ACPI_ROUND_DOWN(value,boundary) (((NATIVE_UINT)(value)) & (~(((NATIVE_UINT) boundary)-1)))
|
||||
#define ACPI_ROUND_UP(value,boundary) ((((NATIVE_UINT)(value)) + (((NATIVE_UINT) boundary)-1)) & (~(((NATIVE_UINT) boundary)-1)))
|
||||
#define ACPI_ROUND_DOWN(value,boundary) (((ACPI_NATIVE_UINT)(value)) & (~(((ACPI_NATIVE_UINT) boundary)-1)))
|
||||
#define ACPI_ROUND_UP(value,boundary) ((((ACPI_NATIVE_UINT)(value)) + (((ACPI_NATIVE_UINT) boundary)-1)) & (~(((ACPI_NATIVE_UINT) boundary)-1)))
|
||||
|
||||
#define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4)
|
||||
#define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8)
|
||||
@ -359,33 +359,17 @@
|
||||
|
||||
#define ACPI_IS_SINGLE_TABLE(x) (((x) & 0x01) == ACPI_TABLE_SINGLE ? 1 : 0)
|
||||
|
||||
/*
|
||||
* Macro to check if a pointer is within an ACPI table.
|
||||
* Parameter (a) is the pointer to check. Parameter (b) must be defined
|
||||
* as a pointer to an ACPI_TABLE_HEADER. (b+1) then points past the header,
|
||||
* and ((UINT8 *)b+b->Length) points one byte past the end of the table.
|
||||
*/
|
||||
#if ACPI_MACHINE_WIDTH != 16
|
||||
#define ACPI_IS_IN_ACPI_TABLE(a,b) (((UINT8 *)(a) >= (UINT8 *)(b + 1)) &&\
|
||||
((UINT8 *)(a) < ((UINT8 *)b + b->Length)))
|
||||
|
||||
#else
|
||||
#define ACPI_IS_IN_ACPI_TABLE(a,b) (_segment)(a) == (_segment)(b) &&\
|
||||
(((UINT8 *)(a) >= (UINT8 *)(b + 1)) &&\
|
||||
((UINT8 *)(a) < ((UINT8 *)b + b->Length)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macros for the master AML opcode table
|
||||
*/
|
||||
#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
|
||||
#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {Name,PArgs,IArgs,Flags,ObjType,Class,Type}
|
||||
#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {Name,(UINT32)(PArgs),(UINT32)(IArgs),(UINT32)(Flags),ObjType,Class,Type}
|
||||
#else
|
||||
#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {PArgs,IArgs,Flags,ObjType,Class,Type}
|
||||
#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {(UINT32)(PArgs),(UINT32)(IArgs),(UINT32)(Flags),ObjType,Class,Type}
|
||||
#endif
|
||||
|
||||
#ifdef ACPI_DISASSEMBLER
|
||||
#define ACPI_DISASM_ONLY_MEMBERS(a) a;
|
||||
#define ACPI_DISASM_ONLY_MEMBERS(a) a;
|
||||
#else
|
||||
#define ACPI_DISASM_ONLY_MEMBERS(a)
|
||||
#endif
|
||||
@ -425,11 +409,11 @@
|
||||
* 4) Reserved field is zero
|
||||
* 5) Expand address to 64 bits
|
||||
*/
|
||||
#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) {a.AddressSpaceId = (UINT8) d;\
|
||||
a.RegisterBitWidth = (UINT8) ACPI_MUL_8 (b);\
|
||||
a.RegisterBitOffset = 0;\
|
||||
a.Reserved = 0;\
|
||||
ACPI_STORE_ADDRESS (a.Address,(ACPI_PHYSICAL_ADDRESS) c);}
|
||||
#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) do {a.AddressSpaceId = (UINT8) d;\
|
||||
a.RegisterBitWidth = (UINT8) ACPI_MUL_8 (b);\
|
||||
a.RegisterBitOffset = 0;\
|
||||
a.Reserved = 0;\
|
||||
ACPI_STORE_ADDRESS (a.Address,(ACPI_PHYSICAL_ADDRESS) c);} while (0)
|
||||
|
||||
/* ACPI V1.0 entries -- address space is always I/O */
|
||||
|
||||
@ -458,6 +442,8 @@
|
||||
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
|
||||
#define ACPI_REPORT_NSERROR(s,e) AcpiNsReportError(_THIS_MODULE,__LINE__,_COMPONENT, s, e);
|
||||
|
||||
#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) AcpiNsReportMethodError(_THIS_MODULE,__LINE__,_COMPONENT, s, n, p, e);
|
||||
|
||||
#else
|
||||
|
||||
#define ACPI_REPORT_INFO(fp) {AcpiUtReportInfo("ACPI",__LINE__,_COMPONENT); \
|
||||
@ -468,6 +454,8 @@
|
||||
AcpiOsPrintf ACPI_PARAM_LIST(fp);}
|
||||
#define ACPI_REPORT_NSERROR(s,e) AcpiNsReportError("ACPI",__LINE__,_COMPONENT, s, e);
|
||||
|
||||
#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) AcpiNsReportMethodError("ACPI",__LINE__,_COMPONENT, s, n, p, e);
|
||||
|
||||
#endif
|
||||
|
||||
/* Error reporting. These versions pass thru the module and line# */
|
||||
@ -485,7 +473,7 @@
|
||||
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
|
||||
#define ACPI_MODULE_NAME(name) static char *_THIS_MODULE = name;
|
||||
#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_THIS_MODULE = name;
|
||||
|
||||
/*
|
||||
* Function entry tracing.
|
||||
@ -505,7 +493,7 @@
|
||||
#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a)\
|
||||
AcpiUtTraceU32(__LINE__,&_Dbg,(UINT32)b)
|
||||
#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a)\
|
||||
AcpiUtTraceStr(__LINE__,&_Dbg,(NATIVE_CHAR *)b)
|
||||
AcpiUtTraceStr(__LINE__,&_Dbg,(char *)b)
|
||||
|
||||
#define ACPI_FUNCTION_ENTRY() AcpiUtTrackStackPtr()
|
||||
|
||||
@ -545,7 +533,7 @@
|
||||
|
||||
#define ACPI_DUMP_ENTRY(a,b) AcpiNsDumpEntry (a,b)
|
||||
#define ACPI_DUMP_TABLES(a,b) AcpiNsDumpTables(a,b)
|
||||
#define ACPI_DUMP_PATHNAME(a,b,c,d) (void) AcpiNsDumpPathname(a,b,c,d)
|
||||
#define ACPI_DUMP_PATHNAME(a,b,c,d) AcpiNsDumpPathname(a,b,c,d)
|
||||
#define ACPI_DUMP_RESOURCE_LIST(a) AcpiRsDumpResourceList(a)
|
||||
#define ACPI_DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
|
||||
#define ACPI_BREAK_MSG(a) AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT,(a))
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
|
||||
* $Revision: 129 $
|
||||
* $Revision: 133 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -237,7 +237,7 @@ AcpiNsRootInitialize (
|
||||
ACPI_STATUS
|
||||
AcpiNsLookup (
|
||||
ACPI_GENERIC_STATE *ScopeInfo,
|
||||
NATIVE_CHAR *Name,
|
||||
char *Name,
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_INTERPRETER_MODE InterpreterMode,
|
||||
UINT32 Flags,
|
||||
@ -301,10 +301,10 @@ AcpiNsDumpEntry (
|
||||
ACPI_HANDLE Handle,
|
||||
UINT32 DebugLevel);
|
||||
|
||||
ACPI_STATUS
|
||||
void
|
||||
AcpiNsDumpPathname (
|
||||
ACPI_HANDLE Handle,
|
||||
NATIVE_CHAR *Msg,
|
||||
char *Msg,
|
||||
UINT32 Level,
|
||||
UINT32 Component);
|
||||
|
||||
@ -352,14 +352,14 @@ AcpiNsEvaluateByHandle (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsEvaluateByName (
|
||||
NATIVE_CHAR *Pathname,
|
||||
char *Pathname,
|
||||
ACPI_OPERAND_OBJECT **Params,
|
||||
ACPI_OPERAND_OBJECT **ReturnObject);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsEvaluateRelative (
|
||||
ACPI_NAMESPACE_NODE *PrefixNode,
|
||||
NATIVE_CHAR *Pathname,
|
||||
char *Pathname,
|
||||
ACPI_OPERAND_OBJECT **Params,
|
||||
ACPI_OPERAND_OBJECT **ReturnObject);
|
||||
|
||||
@ -396,13 +396,13 @@ void
|
||||
AcpiNsBuildExternalPath (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
ACPI_SIZE Size,
|
||||
NATIVE_CHAR *NameBuffer);
|
||||
char *NameBuffer);
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiNsGetExternalPathname (
|
||||
ACPI_NAMESPACE_NODE *Node);
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiNsNameOfCurrentScope (
|
||||
ACPI_WALK_STATE *WalkState);
|
||||
|
||||
@ -414,11 +414,11 @@ AcpiNsHandleToPathname (
|
||||
BOOLEAN
|
||||
AcpiNsPatternMatch (
|
||||
ACPI_NAMESPACE_NODE *ObjNode,
|
||||
NATIVE_CHAR *SearchFor);
|
||||
char *SearchFor);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsGetNodeByPath (
|
||||
NATIVE_CHAR *ExternalPathname,
|
||||
char *ExternalPathname,
|
||||
ACPI_NAMESPACE_NODE *InPrefixNode,
|
||||
UINT32 Flags,
|
||||
ACPI_NAMESPACE_NODE **OutNode);
|
||||
@ -499,11 +499,11 @@ AcpiNsInstallNode (
|
||||
|
||||
BOOLEAN
|
||||
AcpiNsValidRootPrefix (
|
||||
NATIVE_CHAR Prefix);
|
||||
char Prefix);
|
||||
|
||||
BOOLEAN
|
||||
AcpiNsValidPathSeparator (
|
||||
NATIVE_CHAR Sep);
|
||||
char Sep);
|
||||
|
||||
ACPI_OBJECT_TYPE
|
||||
AcpiNsGetType (
|
||||
@ -515,12 +515,27 @@ AcpiNsLocal (
|
||||
|
||||
void
|
||||
AcpiNsReportError (
|
||||
NATIVE_CHAR *ModuleName,
|
||||
char *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
UINT32 ComponentId,
|
||||
char *InternalName,
|
||||
ACPI_STATUS LookupStatus);
|
||||
|
||||
void
|
||||
AcpiNsReportMethodError (
|
||||
char *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
UINT32 ComponentId,
|
||||
char *Message,
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
char *Path,
|
||||
ACPI_STATUS LookupStatus);
|
||||
|
||||
void
|
||||
AcpiNsPrintNodePathname (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
char *Msg);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsBuildInternalName (
|
||||
ACPI_NAMESTRING_INFO *Info);
|
||||
@ -531,15 +546,15 @@ AcpiNsGetInternalNameLength (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsInternalizeName (
|
||||
NATIVE_CHAR *DottedName,
|
||||
NATIVE_CHAR **ConvertedName);
|
||||
char *DottedName,
|
||||
char **ConvertedName);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsExternalizeName (
|
||||
UINT32 InternalNameLength,
|
||||
NATIVE_CHAR *InternalName,
|
||||
char *InternalName,
|
||||
UINT32 *ConvertedNameLength,
|
||||
NATIVE_CHAR **ConvertedName);
|
||||
char **ConvertedName);
|
||||
|
||||
ACPI_NAMESPACE_NODE *
|
||||
AcpiNsMapHandleToNode (
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
|
||||
* $Revision: 114 $
|
||||
* $Revision: 118 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -138,12 +138,12 @@
|
||||
* 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 */\
|
||||
UINT16 ReferenceCount; /* For object deletion management */\
|
||||
union acpi_operand_obj *NextObject; /* Objects linked to parent NS node */\
|
||||
UINT8 Flags; \
|
||||
#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 */\
|
||||
UINT16 ReferenceCount; /* For object deletion management */\
|
||||
union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\
|
||||
UINT8 Flags; \
|
||||
|
||||
/* Values for flag byte above */
|
||||
|
||||
@ -160,34 +160,34 @@
|
||||
* "Field Datum" -- a datum from the actual field object
|
||||
* "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
|
||||
*/
|
||||
#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
|
||||
UINT8 FieldFlags; /* Access, update, and lock bits */\
|
||||
UINT8 Attribute; /* From AccessAs keyword */\
|
||||
UINT8 AccessByteWidth; /* Read/Write size in bytes */\
|
||||
UINT32 BitLength; /* Length of field in bits */\
|
||||
UINT32 BaseByteOffset; /* Byte offset within containing object */\
|
||||
UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
|
||||
UINT8 DatumValidBits; /* Valid bit in first "Field datum" */\
|
||||
UINT8 EndFieldValidBits; /* Valid bits in the last "field datum" */\
|
||||
UINT8 EndBufferValidBits; /* Valid bits in the last "buffer datum" */\
|
||||
UINT32 Value; /* Value to store into the Bank or Index register */\
|
||||
ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
|
||||
#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
|
||||
UINT8 FieldFlags; /* Access, update, and lock bits */\
|
||||
UINT8 Attribute; /* From AccessAs keyword */\
|
||||
UINT8 AccessByteWidth; /* Read/Write size in bytes */\
|
||||
UINT32 BitLength; /* Length of field in bits */\
|
||||
UINT32 BaseByteOffset; /* Byte offset within containing object */\
|
||||
UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
|
||||
UINT8 DatumValidBits; /* Valid bit in first "Field datum" */\
|
||||
UINT8 EndFieldValidBits; /* Valid bits in the last "field datum" */\
|
||||
UINT8 EndBufferValidBits; /* Valid bits in the last "buffer datum" */\
|
||||
UINT32 Value; /* Value to store into the Bank or Index register */\
|
||||
ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
|
||||
|
||||
|
||||
/*
|
||||
* Fields common to both Strings and Buffers
|
||||
*/
|
||||
#define ACPI_COMMON_BUFFER_INFO \
|
||||
UINT32 Length;
|
||||
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 */
|
||||
union acpi_operand_object *SysHandler; /* Handler for system notifies */\
|
||||
union acpi_operand_object *DrvHandler; /* Handler for driver notifies */\
|
||||
union acpi_operand_object *AddrHandler; /* Handler for Address space */
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
@ -196,52 +196,51 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectCommon
|
||||
typedef struct acpi_object_common
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
} ACPI_OBJECT_COMMON;
|
||||
|
||||
|
||||
typedef struct AcpiObjectInteger
|
||||
typedef struct acpi_object_integer
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_INTEGER Value;
|
||||
ACPI_INTEGER Value;
|
||||
|
||||
} ACPI_OBJECT_INTEGER;
|
||||
|
||||
|
||||
typedef struct AcpiObjectString /* Null terminated, ASCII characters only */
|
||||
typedef struct acpi_object_string /* Null terminated, ASCII characters only */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_BUFFER_INFO
|
||||
NATIVE_CHAR *Pointer; /* String in AML stream or allocated string */
|
||||
char *Pointer; /* String in AML stream or allocated string */
|
||||
|
||||
} ACPI_OBJECT_STRING;
|
||||
|
||||
|
||||
typedef struct AcpiObjectBuffer
|
||||
typedef struct acpi_object_buffer
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_BUFFER_INFO
|
||||
UINT8 *Pointer; /* Buffer in AML stream or allocated buffer */
|
||||
ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
|
||||
UINT8 *AmlStart;
|
||||
UINT32 AmlLength;
|
||||
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 AcpiObjectPackage
|
||||
typedef struct acpi_object_package
|
||||
{
|
||||
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 */
|
||||
UINT32 Count; /* # of elements in package */
|
||||
UINT32 AmlLength;
|
||||
UINT8 *AmlStart;
|
||||
ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */
|
||||
union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */
|
||||
|
||||
} ACPI_OBJECT_PACKAGE;
|
||||
|
||||
@ -252,60 +251,55 @@ typedef struct AcpiObjectPackage
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectEvent
|
||||
typedef struct acpi_object_event
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
void *Semaphore;
|
||||
void *Semaphore;
|
||||
|
||||
} ACPI_OBJECT_EVENT;
|
||||
|
||||
|
||||
#define INFINITE_CONCURRENCY 0xFF
|
||||
|
||||
typedef struct AcpiObjectMethod
|
||||
typedef struct acpi_object_method
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT8 MethodFlags;
|
||||
UINT8 ParamCount;
|
||||
|
||||
UINT32 AmlLength;
|
||||
|
||||
void *Semaphore;
|
||||
UINT8 *AmlStart;
|
||||
|
||||
UINT8 Concurrency;
|
||||
UINT8 ThreadCount;
|
||||
ACPI_OWNER_ID OwningId;
|
||||
UINT8 MethodFlags;
|
||||
UINT8 ParamCount;
|
||||
UINT32 AmlLength;
|
||||
void *Semaphore;
|
||||
UINT8 *AmlStart;
|
||||
UINT8 Concurrency;
|
||||
UINT8 ThreadCount;
|
||||
ACPI_OWNER_ID OwningId;
|
||||
|
||||
} ACPI_OBJECT_METHOD;
|
||||
|
||||
|
||||
typedef struct AcpiObjectMutex
|
||||
typedef struct acpi_object_mutex
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT16 SyncLevel;
|
||||
UINT16 AcquisitionDepth;
|
||||
|
||||
struct acpi_thread_state *OwnerThread;
|
||||
void *Semaphore;
|
||||
union acpi_operand_obj *Prev; /* Link for list of acquired mutexes */
|
||||
union acpi_operand_obj *Next; /* Link for list of acquired mutexes */
|
||||
ACPI_NAMESPACE_NODE *Node; /* containing object */
|
||||
UINT16 SyncLevel;
|
||||
UINT16 AcquisitionDepth;
|
||||
struct acpi_thread_state *OwnerThread;
|
||||
void *Semaphore;
|
||||
union acpi_operand_object *Prev; /* Link for list of acquired mutexes */
|
||||
union acpi_operand_object *Next; /* Link for list of acquired mutexes */
|
||||
ACPI_NAMESPACE_NODE *Node; /* containing object */
|
||||
|
||||
} ACPI_OBJECT_MUTEX;
|
||||
|
||||
|
||||
typedef struct AcpiObjectRegion
|
||||
typedef struct acpi_object_region
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT8 SpaceId;
|
||||
|
||||
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;
|
||||
UINT8 SpaceId;
|
||||
union acpi_operand_object *AddrHandler; /* Handler for system notifies */
|
||||
ACPI_NAMESPACE_NODE *Node; /* containing object */
|
||||
union acpi_operand_object *Next;
|
||||
UINT32 Length;
|
||||
ACPI_PHYSICAL_ADDRESS Address;
|
||||
|
||||
} ACPI_OBJECT_REGION;
|
||||
|
||||
@ -316,7 +310,7 @@ typedef struct AcpiObjectRegion
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectNotifyCommon /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
|
||||
typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
@ -324,7 +318,7 @@ typedef struct AcpiObjectNotifyCommon /* COMMON NOTIFY for POWER,
|
||||
} ACPI_OBJECT_NOTIFY_COMMON;
|
||||
|
||||
|
||||
typedef struct AcpiObjectDevice
|
||||
typedef struct acpi_object_device
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
@ -332,35 +326,32 @@ typedef struct AcpiObjectDevice
|
||||
} ACPI_OBJECT_DEVICE;
|
||||
|
||||
|
||||
typedef struct AcpiObjectPowerResource
|
||||
typedef struct acpi_object_power_resource
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
UINT32 SystemLevel;
|
||||
UINT32 ResourceOrder;
|
||||
UINT32 SystemLevel;
|
||||
UINT32 ResourceOrder;
|
||||
|
||||
} ACPI_OBJECT_POWER_RESOURCE;
|
||||
|
||||
|
||||
typedef struct AcpiObjectProcessor
|
||||
typedef struct acpi_object_processor
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
UINT32 ProcId;
|
||||
UINT32 Length;
|
||||
ACPI_IO_ADDRESS Address;
|
||||
UINT32 ProcId;
|
||||
UINT32 Length;
|
||||
ACPI_IO_ADDRESS Address;
|
||||
|
||||
} ACPI_OBJECT_PROCESSOR;
|
||||
|
||||
|
||||
typedef struct AcpiObjectThermalZone
|
||||
typedef struct acpi_object_thermal_zone
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_NOTIFY_INFO
|
||||
|
||||
|
||||
} ACPI_OBJECT_THERMAL_ZONE;
|
||||
|
||||
|
||||
@ -370,36 +361,35 @@ typedef struct AcpiObjectThermalZone
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectFieldCommon /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
|
||||
typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
union acpi_operand_obj *RegionObj; /* Containing Operation Region object */
|
||||
/* (REGION/BANK fields only) */
|
||||
union acpi_operand_object *RegionObj; /* Containing Operation Region object */
|
||||
/* (REGION/BANK fields only) */
|
||||
} ACPI_OBJECT_FIELD_COMMON;
|
||||
|
||||
|
||||
typedef struct AcpiObjectRegionField
|
||||
typedef struct acpi_object_region_field
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
union acpi_operand_obj *RegionObj; /* Containing OpRegion object */
|
||||
union acpi_operand_object *RegionObj; /* Containing OpRegion object */
|
||||
|
||||
} ACPI_OBJECT_REGION_FIELD;
|
||||
|
||||
|
||||
typedef struct AcpiObjectBankField
|
||||
typedef struct acpi_object_bank_field
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
|
||||
union acpi_operand_obj *RegionObj; /* Containing OpRegion object */
|
||||
union acpi_operand_obj *BankObj; /* BankSelect Register object */
|
||||
union acpi_operand_object *RegionObj; /* Containing OpRegion object */
|
||||
union acpi_operand_object *BankObj; /* BankSelect Register object */
|
||||
|
||||
} ACPI_OBJECT_BANK_FIELD;
|
||||
|
||||
|
||||
typedef struct AcpiObjectIndexField
|
||||
typedef struct acpi_object_index_field
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
@ -408,21 +398,19 @@ typedef struct AcpiObjectIndexField
|
||||
* No "RegionObj" pointer needed since the Index and Data registers
|
||||
* are each field definitions unto themselves.
|
||||
*/
|
||||
union acpi_operand_obj *IndexObj; /* Index register */
|
||||
union acpi_operand_obj *DataObj; /* Data register */
|
||||
|
||||
union acpi_operand_object *IndexObj; /* Index register */
|
||||
union acpi_operand_object *DataObj; /* Data register */
|
||||
|
||||
} ACPI_OBJECT_INDEX_FIELD;
|
||||
|
||||
|
||||
/* The BufferField is different in that it is part of a Buffer, not an OpRegion */
|
||||
|
||||
typedef struct AcpiObjectBufferField
|
||||
typedef struct acpi_object_buffer_field
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_COMMON_FIELD_INFO
|
||||
|
||||
union acpi_operand_obj *BufferObj; /* Containing Buffer object */
|
||||
union acpi_operand_object *BufferObj; /* Containing Buffer object */
|
||||
|
||||
} ACPI_OBJECT_BUFFER_FIELD;
|
||||
|
||||
@ -433,13 +421,12 @@ typedef struct AcpiObjectBufferField
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct AcpiObjectNotifyHandler
|
||||
typedef struct acpi_object_notify_handler
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
ACPI_NAMESPACE_NODE *Node; /* Parent device */
|
||||
ACPI_NOTIFY_HANDLER Handler;
|
||||
void *Context;
|
||||
ACPI_NAMESPACE_NODE *Node; /* Parent device */
|
||||
ACPI_NOTIFY_HANDLER Handler;
|
||||
void *Context;
|
||||
|
||||
} ACPI_OBJECT_NOTIFY_HANDLER;
|
||||
|
||||
@ -449,19 +436,17 @@ typedef struct AcpiObjectNotifyHandler
|
||||
#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1
|
||||
|
||||
|
||||
typedef struct AcpiObjectAddrHandler
|
||||
typedef struct acpi_object_addr_handler
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT8 SpaceId;
|
||||
UINT16 Hflags;
|
||||
ACPI_ADR_SPACE_HANDLER Handler;
|
||||
|
||||
ACPI_NAMESPACE_NODE *Node; /* Parent device */
|
||||
void *Context;
|
||||
ACPI_ADR_SPACE_SETUP Setup;
|
||||
union acpi_operand_obj *RegionList; /* regions using this handler */
|
||||
union acpi_operand_obj *Next;
|
||||
UINT8 SpaceId;
|
||||
UINT16 Hflags;
|
||||
ACPI_ADR_SPACE_HANDLER Handler;
|
||||
ACPI_NAMESPACE_NODE *Node; /* Parent device */
|
||||
void *Context;
|
||||
ACPI_ADR_SPACE_SETUP Setup;
|
||||
union acpi_operand_object *RegionList; /* regions using this handler */
|
||||
union acpi_operand_object *Next;
|
||||
|
||||
} ACPI_OBJECT_ADDR_HANDLER;
|
||||
|
||||
@ -476,17 +461,15 @@ typedef struct AcpiObjectAddrHandler
|
||||
* The Reference object type is used for these opcodes:
|
||||
* Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp
|
||||
*/
|
||||
typedef struct AcpiObjectReference
|
||||
typedef struct acpi_object_reference
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
|
||||
UINT8 TargetType; /* Used for IndexOp */
|
||||
UINT16 Opcode;
|
||||
UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */
|
||||
|
||||
void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
union acpi_operand_obj **Where;
|
||||
UINT8 TargetType; /* Used for IndexOp */
|
||||
UINT16 Opcode;
|
||||
UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */
|
||||
void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
union acpi_operand_object **Where;
|
||||
|
||||
} ACPI_OBJECT_REFERENCE;
|
||||
|
||||
@ -498,36 +481,36 @@ typedef struct AcpiObjectReference
|
||||
*
|
||||
* Currently: Region and FieldUnit types
|
||||
*/
|
||||
typedef struct AcpiObjectExtra
|
||||
typedef struct acpi_object_extra
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
UINT8 ByteFill1;
|
||||
UINT16 WordFill1;
|
||||
UINT32 AmlLength;
|
||||
UINT8 *AmlStart;
|
||||
ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
|
||||
void *RegionContext; /* Region-specific data */
|
||||
UINT8 ByteFill1;
|
||||
UINT16 WordFill1;
|
||||
UINT32 AmlLength;
|
||||
UINT8 *AmlStart;
|
||||
ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
|
||||
void *RegionContext; /* Region-specific data */
|
||||
|
||||
} ACPI_OBJECT_EXTRA;
|
||||
|
||||
|
||||
/* Additional data that can be attached to namespace nodes */
|
||||
|
||||
typedef struct AcpiObjectData
|
||||
typedef struct acpi_object_data
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
ACPI_OBJECT_HANDLER Handler;
|
||||
void *Pointer;
|
||||
ACPI_OBJECT_HANDLER Handler;
|
||||
void *Pointer;
|
||||
|
||||
} ACPI_OBJECT_DATA;
|
||||
|
||||
|
||||
/* Structure used when objects are cached for reuse */
|
||||
|
||||
typedef struct AcpiObjectCacheList
|
||||
typedef struct acpi_object_cache_list
|
||||
{
|
||||
ACPI_OBJECT_COMMON_HEADER
|
||||
union acpi_operand_obj *Next; /* Link for object cache and internal lists*/
|
||||
union acpi_operand_object *Next; /* Link for object cache and internal lists*/
|
||||
|
||||
} ACPI_OBJECT_CACHE_LIST;
|
||||
|
||||
@ -538,39 +521,33 @@ typedef struct AcpiObjectCacheList
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef union acpi_operand_obj
|
||||
typedef union acpi_operand_object
|
||||
{
|
||||
ACPI_OBJECT_COMMON Common;
|
||||
|
||||
ACPI_OBJECT_INTEGER Integer;
|
||||
ACPI_OBJECT_STRING String;
|
||||
ACPI_OBJECT_BUFFER Buffer;
|
||||
ACPI_OBJECT_PACKAGE Package;
|
||||
|
||||
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_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_OBJECT_COMMON Common;
|
||||
ACPI_OBJECT_INTEGER Integer;
|
||||
ACPI_OBJECT_STRING String;
|
||||
ACPI_OBJECT_BUFFER Buffer;
|
||||
ACPI_OBJECT_PACKAGE Package;
|
||||
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_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;
|
||||
|
||||
@ -584,7 +561,7 @@ typedef union acpi_operand_obj
|
||||
|
||||
/* Object descriptor types */
|
||||
|
||||
#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
|
||||
#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
|
||||
#define ACPI_DESC_TYPE_STATE 0x20
|
||||
#define ACPI_DESC_TYPE_STATE_UPDATE 0x21
|
||||
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x22
|
||||
@ -601,12 +578,12 @@ typedef union acpi_operand_obj
|
||||
#define ACPI_DESC_TYPE_NAMED 0xAA
|
||||
|
||||
|
||||
typedef union acpi_desc
|
||||
typedef union acpi_descriptor
|
||||
{
|
||||
UINT8 DescriptorId; /* To differentiate various internal objs */\
|
||||
ACPI_OPERAND_OBJECT Object;
|
||||
ACPI_NAMESPACE_NODE Node;
|
||||
ACPI_PARSE_OBJECT Op;
|
||||
UINT8 DescriptorId; /* To differentiate various internal objs */\
|
||||
ACPI_OPERAND_OBJECT Object;
|
||||
ACPI_NAMESPACE_NODE Node;
|
||||
ACPI_PARSE_OBJECT Op;
|
||||
|
||||
} ACPI_DESCRIPTOR;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acoutput.h -- debug output
|
||||
* $Revision: 90 $
|
||||
* $Revision: 93 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -144,7 +144,6 @@
|
||||
#define ACPI_TOOLS 0x00002000
|
||||
|
||||
#define ACPI_ALL_COMPONENTS 0x00003FFF
|
||||
|
||||
#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS)
|
||||
|
||||
|
||||
@ -152,21 +151,20 @@
|
||||
|
||||
#define ACPI_ALL_DRIVERS 0xFFFF0000
|
||||
|
||||
|
||||
/*
|
||||
* Raw debug output levels, do not use these in the DEBUG_PRINT macros
|
||||
*/
|
||||
|
||||
#define ACPI_LV_OK 0x00000001
|
||||
#define ACPI_LV_INFO 0x00000002
|
||||
#define ACPI_LV_WARN 0x00000004
|
||||
#define ACPI_LV_ERROR 0x00000008
|
||||
#define ACPI_LV_FATAL 0x00000010
|
||||
#define ACPI_LV_DEBUG_OBJECT 0x00000020
|
||||
#define ACPI_LV_ALL_EXCEPTIONS 0x0000003F
|
||||
|
||||
#define ACPI_LV_ERROR 0x00000001
|
||||
#define ACPI_LV_WARN 0x00000002
|
||||
#define ACPI_LV_INIT 0x00000004
|
||||
#define ACPI_LV_DEBUG_OBJECT 0x00000008
|
||||
#define ACPI_LV_INFO 0x00000010
|
||||
#define ACPI_LV_ALL_EXCEPTIONS 0x0000001F
|
||||
|
||||
/* Trace verbosity level 1 [Standard Trace Level] */
|
||||
|
||||
#define ACPI_LV_INIT_NAMES 0x00000020
|
||||
#define ACPI_LV_PARSE 0x00000040
|
||||
#define ACPI_LV_LOAD 0x00000080
|
||||
#define ACPI_LV_DISPATCH 0x00000100
|
||||
@ -180,8 +178,7 @@
|
||||
#define ACPI_LV_RESOURCES 0x00010000
|
||||
#define ACPI_LV_USER_REQUESTS 0x00020000
|
||||
#define ACPI_LV_PACKAGE 0x00040000
|
||||
#define ACPI_LV_INIT 0x00080000
|
||||
#define ACPI_LV_VERBOSITY1 0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS
|
||||
#define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS
|
||||
|
||||
/* Trace verbosity level 2 [Function tracing and memory allocation] */
|
||||
|
||||
@ -212,22 +209,21 @@
|
||||
/*
|
||||
* Debug level macros that are used in the DEBUG_PRINT macros
|
||||
*/
|
||||
|
||||
#define ACPI_DEBUG_LEVEL(dl) dl,__LINE__,&_Dbg
|
||||
#define ACPI_DEBUG_LEVEL(dl) (UINT32) dl,__LINE__,&_Dbg
|
||||
|
||||
/* Exception level -- used in the global "DebugLevel" */
|
||||
|
||||
#define ACPI_DB_OK ACPI_DEBUG_LEVEL (ACPI_LV_OK)
|
||||
#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
|
||||
#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
|
||||
#define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR)
|
||||
#define ACPI_DB_FATAL ACPI_DEBUG_LEVEL (ACPI_LV_FATAL)
|
||||
#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
|
||||
#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
|
||||
#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
|
||||
#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
|
||||
#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
|
||||
|
||||
|
||||
/* Trace level -- also used in the global "DebugLevel" */
|
||||
|
||||
#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
|
||||
#define ACPI_DB_THREADS ACPI_DEBUG_LEVEL (ACPI_LV_THREADS)
|
||||
#define ACPI_DB_PARSE ACPI_DEBUG_LEVEL (ACPI_LV_PARSE)
|
||||
#define ACPI_DB_DISPATCH ACPI_DEBUG_LEVEL (ACPI_LV_DISPATCH)
|
||||
@ -248,23 +244,15 @@
|
||||
#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
|
||||
#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
|
||||
#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
|
||||
#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
|
||||
|
||||
#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL)
|
||||
|
||||
|
||||
/* Defaults for DebugLevel, debug and normal */
|
||||
|
||||
#define DEBUG_DEFAULT (ACPI_LV_OK | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
|
||||
#define NORMAL_DEFAULT (ACPI_LV_OK | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
|
||||
#define DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
|
||||
|
||||
/* Misc defines */
|
||||
|
||||
#define HEX 0x01
|
||||
#define ASCII 0x02
|
||||
#define FULL_ADDRESS 0x04
|
||||
#define CHARS_PER_LINE 16 /* used in DumpBuf function */
|
||||
#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
|
||||
#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
|
||||
#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
|
||||
|
||||
|
||||
#endif /* __ACOUTPUT_H__ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
|
||||
* $Revision: 63 $
|
||||
* $Revision: 65 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -168,7 +168,7 @@ UINT32
|
||||
AcpiPsGetNextPackageLength (
|
||||
ACPI_PARSE_STATE *ParserState);
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiPsGetNextNamestring (
|
||||
ACPI_PARSE_STATE *ParserState);
|
||||
|
||||
@ -216,7 +216,7 @@ const ACPI_OPCODE_INFO *
|
||||
AcpiPsGetOpcodeInfo (
|
||||
UINT16 Opcode);
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiPsGetOpcodeName (
|
||||
UINT16 Opcode);
|
||||
|
||||
@ -313,7 +313,7 @@ AcpiPsAppendArg(
|
||||
ACPI_PARSE_OBJECT*
|
||||
AcpiPsFind (
|
||||
ACPI_PARSE_OBJECT *Scope,
|
||||
NATIVE_CHAR *Path,
|
||||
char *Path,
|
||||
UINT16 Opcode,
|
||||
UINT32 Create);
|
||||
|
||||
@ -402,13 +402,13 @@ AcpiPsSetName(
|
||||
|
||||
UINT32
|
||||
AcpiPsSprintPath (
|
||||
NATIVE_CHAR *BufferStart,
|
||||
char *BufferStart,
|
||||
UINT32 BufferSize,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
UINT32
|
||||
AcpiPsSprintOp (
|
||||
NATIVE_CHAR *BufferStart,
|
||||
char *BufferStart,
|
||||
UINT32 BufferSize,
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acresrc.h - Resource Manager function prototypes
|
||||
* $Revision: 34 $
|
||||
* $Revision: 37 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -139,6 +139,12 @@ AcpiRsGetPrsMethodData (
|
||||
ACPI_HANDLE Handle,
|
||||
ACPI_BUFFER *RetBuffer);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiRsGetMethodData (
|
||||
ACPI_HANDLE Handle,
|
||||
char *Path,
|
||||
ACPI_BUFFER *RetBuffer);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiRsSetSrsMethodData (
|
||||
ACPI_HANDLE Handle,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acstruct.h - Internal structs
|
||||
* $Revision: 20 $
|
||||
* $Revision: 25 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -141,53 +141,51 @@
|
||||
|
||||
typedef struct acpi_walk_state
|
||||
{
|
||||
UINT8 DataType; /* To differentiate various internal objs MUST BE FIRST!*/\
|
||||
ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
|
||||
BOOLEAN LastPredicate; /* Result of last predicate */
|
||||
UINT8 CurrentResult; /* */
|
||||
UINT8 NextOpInfo; /* Info about NextOp */
|
||||
UINT8 NumOperands; /* Stack pointer for Operands[] array */
|
||||
UINT8 ReturnUsed;
|
||||
UINT8 WalkType;
|
||||
UINT16 Opcode; /* Current AML opcode */
|
||||
UINT8 ScopeDepth;
|
||||
UINT8 Reserved1;
|
||||
UINT32 ArgCount; /* push for fixed or var args */
|
||||
UINT32 AmlOffset;
|
||||
UINT32 ArgTypes;
|
||||
UINT32 MethodBreakpoint; /* For single stepping */
|
||||
UINT32 UserBreakpoint; /* User AML breakpoint */
|
||||
UINT32 ParseFlags;
|
||||
UINT32 PrevArgTypes;
|
||||
UINT8 DataType; /* To differentiate various internal objs MUST BE FIRST!*/\
|
||||
ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
|
||||
BOOLEAN LastPredicate; /* Result of last predicate */
|
||||
UINT8 CurrentResult; /* */
|
||||
UINT8 NextOpInfo; /* Info about NextOp */
|
||||
UINT8 NumOperands; /* Stack pointer for Operands[] array */
|
||||
UINT8 ReturnUsed;
|
||||
UINT8 WalkType;
|
||||
UINT16 Opcode; /* Current AML opcode */
|
||||
UINT8 ScopeDepth;
|
||||
UINT8 Reserved1;
|
||||
UINT32 ArgCount; /* push for fixed or var args */
|
||||
UINT32 AmlOffset;
|
||||
UINT32 ArgTypes;
|
||||
UINT32 MethodBreakpoint; /* For single stepping */
|
||||
UINT32 UserBreakpoint; /* User AML breakpoint */
|
||||
UINT32 ParseFlags;
|
||||
UINT32 PrevArgTypes;
|
||||
|
||||
UINT8 *AmlLastWhile;
|
||||
struct acpi_namespace_node Arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
|
||||
union acpi_operand_object **CallerReturnDesc;
|
||||
ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
|
||||
struct acpi_namespace_node LocalVariables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
|
||||
struct acpi_namespace_node *MethodCallNode; /* Called method Node*/
|
||||
ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
|
||||
union acpi_operand_object *MethodDesc; /* Method descriptor if running a method */
|
||||
struct acpi_namespace_node *MethodNode; /* Method Node if running a method */
|
||||
ACPI_PARSE_OBJECT *Op; /* Current parser op */
|
||||
union acpi_operand_object *Operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
|
||||
const ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
|
||||
ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */
|
||||
union acpi_operand_object **Params;
|
||||
ACPI_PARSE_STATE ParserState; /* Current state of parser */
|
||||
union acpi_operand_object *ResultObj;
|
||||
ACPI_GENERIC_STATE *Results; /* Stack of accumulated results */
|
||||
union acpi_operand_object *ReturnDesc; /* Return object, if any */
|
||||
ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
|
||||
|
||||
UINT8 *AmlLastWhile;
|
||||
struct acpi_node Arguments[MTH_NUM_ARGS]; /* Control method arguments */
|
||||
union acpi_operand_obj **CallerReturnDesc;
|
||||
ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
|
||||
struct acpi_node LocalVariables[MTH_NUM_LOCALS]; /* Control method locals */
|
||||
struct acpi_node *MethodCallNode; /* Called method Node*/
|
||||
ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
|
||||
union acpi_operand_obj *MethodDesc; /* Method descriptor if running a method */
|
||||
struct acpi_node *MethodNode; /* Method Node if running a method */
|
||||
ACPI_PARSE_OBJECT *Op; /* Current parser op */
|
||||
union acpi_operand_obj *Operands[OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
|
||||
const ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
|
||||
ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */
|
||||
union acpi_operand_obj **Params;
|
||||
ACPI_PARSE_STATE ParserState; /* Current state of parser */
|
||||
union acpi_operand_obj *ResultObj;
|
||||
ACPI_GENERIC_STATE *Results; /* Stack of accumulated results */
|
||||
union acpi_operand_obj *ReturnDesc; /* Return object, if any */
|
||||
ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
|
||||
|
||||
ACPI_PARSE_OBJECT *PrevOp; /* Last op that was processed */
|
||||
ACPI_PARSE_OBJECT *NextOp; /* next op to be processed */
|
||||
ACPI_PARSE_DOWNWARDS DescendingCallback;
|
||||
ACPI_PARSE_UPWARDS AscendingCallback;
|
||||
ACPI_THREAD_STATE *Thread;
|
||||
struct acpi_walk_state *Next; /* Next WalkState in list */
|
||||
|
||||
ACPI_PARSE_OBJECT *PrevOp; /* Last op that was processed */
|
||||
ACPI_PARSE_OBJECT *NextOp; /* next op to be processed */
|
||||
ACPI_PARSE_DOWNWARDS DescendingCallback;
|
||||
ACPI_PARSE_UPWARDS AscendingCallback;
|
||||
ACPI_THREAD_STATE *Thread;
|
||||
struct acpi_walk_state *Next; /* Next WalkState in list */
|
||||
|
||||
} ACPI_WALK_STATE;
|
||||
|
||||
@ -243,7 +241,7 @@ typedef struct acpi_get_devices_info
|
||||
{
|
||||
ACPI_WALK_CALLBACK UserFunction;
|
||||
void *Context;
|
||||
NATIVE_CHAR *Hid;
|
||||
char *Hid;
|
||||
|
||||
} ACPI_GET_DEVICES_INFO;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actables.h - ACPI table management
|
||||
* $Revision: 42 $
|
||||
* $Revision: 44 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -223,7 +223,7 @@ AcpiTbInstallTable (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbMatchSignature (
|
||||
NATIVE_CHAR *Signature,
|
||||
char *Signature,
|
||||
ACPI_TABLE_DESC *TableInfo,
|
||||
UINT8 SearchType);
|
||||
|
||||
@ -288,9 +288,9 @@ AcpiTbFindRsdp (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbFindTable (
|
||||
NATIVE_CHAR *Signature,
|
||||
NATIVE_CHAR *OemId,
|
||||
NATIVE_CHAR *OemTableId,
|
||||
char *Signature,
|
||||
char *OemId,
|
||||
char *OemTableId,
|
||||
ACPI_TABLE_HEADER **TablePtr);
|
||||
|
||||
ACPI_STATUS
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl.h - Table data structures defined in ACPI specification
|
||||
* $Revision: 53 $
|
||||
* $Revision: 58 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -165,37 +165,37 @@
|
||||
* Architecture-independent tables
|
||||
* The architecture dependent tables are in separate files
|
||||
*/
|
||||
typedef struct /* Root System Descriptor Pointer */
|
||||
typedef struct rsdp_descriptor /* Root System Descriptor Pointer */
|
||||
{
|
||||
NATIVE_CHAR Signature [8]; /* ACPI signature, contains "RSD PTR " */
|
||||
char Signature [8]; /* ACPI signature, contains "RSD PTR " */
|
||||
UINT8 Checksum; /* To make sum of struct == 0 */
|
||||
NATIVE_CHAR OemId [6]; /* OEM identification */
|
||||
char OemId [6]; /* OEM identification */
|
||||
UINT8 Revision; /* Must be 0 for 1.0, 2 for 2.0 */
|
||||
UINT32 RsdtPhysicalAddress; /* 32-bit physical address of RSDT */
|
||||
UINT32 Length; /* XSDT Length in bytes including hdr */
|
||||
UINT64 XsdtPhysicalAddress; /* 64-bit physical address of XSDT */
|
||||
UINT8 ExtendedChecksum; /* Checksum of entire table */
|
||||
NATIVE_CHAR Reserved [3]; /* Reserved field must be 0 */
|
||||
char Reserved [3]; /* Reserved field must be 0 */
|
||||
|
||||
} RSDP_DESCRIPTOR;
|
||||
|
||||
|
||||
typedef struct /* ACPI common table header */
|
||||
typedef struct acpi_table_header /* ACPI common table header */
|
||||
{
|
||||
NATIVE_CHAR Signature [4]; /* ACPI signature (4 ASCII characters) */
|
||||
char Signature [4]; /* ACPI signature (4 ASCII characters) */
|
||||
UINT32 Length; /* Length of table, in bytes, including header */
|
||||
UINT8 Revision; /* ACPI Specification minor version # */
|
||||
UINT8 Checksum; /* To make sum of entire table == 0 */
|
||||
NATIVE_CHAR OemId [6]; /* OEM identification */
|
||||
NATIVE_CHAR OemTableId [8]; /* OEM table identification */
|
||||
char OemId [6]; /* OEM identification */
|
||||
char OemTableId [8]; /* OEM table identification */
|
||||
UINT32 OemRevision; /* OEM revision number */
|
||||
NATIVE_CHAR AslCompilerId [4]; /* ASL compiler vendor ID */
|
||||
char AslCompilerId [4]; /* ASL compiler vendor ID */
|
||||
UINT32 AslCompilerRevision; /* ASL compiler revision number */
|
||||
|
||||
} ACPI_TABLE_HEADER;
|
||||
|
||||
|
||||
typedef struct /* Common FACS for internal use */
|
||||
typedef struct acpi_common_facs /* Common FACS for internal use */
|
||||
{
|
||||
UINT32 *GlobalLock;
|
||||
UINT64 *FirmwareWakingVector;
|
||||
@ -204,7 +204,7 @@ typedef struct /* Common FACS for internal use */
|
||||
} ACPI_COMMON_FACS;
|
||||
|
||||
|
||||
typedef struct /* APIC Table */
|
||||
typedef struct apic_table
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* ACPI table header */
|
||||
UINT32 LocalApicAddress; /* Physical address for accessing local APICs */
|
||||
@ -214,7 +214,7 @@ typedef struct /* APIC Table */
|
||||
} APIC_TABLE;
|
||||
|
||||
|
||||
typedef struct /* APIC Header */
|
||||
typedef struct apic_header
|
||||
{
|
||||
UINT8 Type; /* APIC type. Either APIC_PROC or APIC_IO */
|
||||
UINT8 Length; /* Length of APIC structure */
|
||||
@ -222,7 +222,7 @@ typedef struct /* APIC Header */
|
||||
} APIC_HEADER;
|
||||
|
||||
|
||||
typedef struct /* Processor APIC */
|
||||
typedef struct processor_apic
|
||||
{
|
||||
APIC_HEADER Header;
|
||||
UINT8 ProcessorApicId; /* ACPI processor id */
|
||||
@ -233,7 +233,7 @@ typedef struct /* Processor APIC */
|
||||
} PROCESSOR_APIC;
|
||||
|
||||
|
||||
typedef struct /* IO APIC */
|
||||
typedef struct io_apic
|
||||
{
|
||||
APIC_HEADER Header;
|
||||
UINT8 IoApicId; /* I/O APIC ID */
|
||||
@ -252,7 +252,7 @@ typedef struct /* IO APIC */
|
||||
* IA64 TBD: Modify Smart Battery Description to comply with ACPI IA64
|
||||
* extensions.
|
||||
*/
|
||||
typedef struct /* Smart Battery Description Table */
|
||||
typedef struct smart_battery_description_table
|
||||
{
|
||||
ACPI_TABLE_HEADER Header;
|
||||
UINT32 WarningLevel;
|
||||
@ -283,15 +283,15 @@ typedef struct /* Smart Battery Description Table */
|
||||
#define ACPI_TABLE_ROOT 0x00
|
||||
#define ACPI_TABLE_PRIMARY 0x10
|
||||
#define ACPI_TABLE_SECONDARY 0x20
|
||||
#define ACPI_TABLE_OTHER 0x30
|
||||
#define ACPI_TABLE_ALL 0x30
|
||||
#define ACPI_TABLE_TYPE_MASK 0x30
|
||||
|
||||
/* Data about each known table type */
|
||||
|
||||
typedef struct _AcpiTableSupport
|
||||
typedef struct acpi_table_support
|
||||
{
|
||||
NATIVE_CHAR *Name;
|
||||
NATIVE_CHAR *Signature;
|
||||
char *Name;
|
||||
char *Signature;
|
||||
void **GlobalPtr;
|
||||
UINT8 SigLength;
|
||||
UINT8 Flags;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl1.h - ACPI 1.0 tables
|
||||
* $Revision: 21 $
|
||||
* $Revision: 26 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -122,7 +122,7 @@
|
||||
/*
|
||||
* ACPI 1.0 Root System Description Table (RSDT)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct rsdt_descriptor_rev1
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* ACPI Table header */
|
||||
UINT32 TableOffsetEntry [1]; /* Array of pointers to other */
|
||||
@ -133,9 +133,9 @@ typedef struct
|
||||
/*
|
||||
* ACPI 1.0 Firmware ACPI Control Structure (FACS)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct facs_descriptor_rev1
|
||||
{
|
||||
NATIVE_CHAR Signature[4]; /* ACPI Signature */
|
||||
char Signature[4]; /* ACPI Signature */
|
||||
UINT32 Length; /* Length of structure, in bytes */
|
||||
UINT32 HardwareSignature; /* Hardware configuration signature */
|
||||
UINT32 FirmwareWakingVector; /* ACPI OS waking vector */
|
||||
@ -150,7 +150,7 @@ typedef struct
|
||||
/*
|
||||
* ACPI 1.0 Fixed ACPI Description Table (FADT)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct fadt_descriptor_rev1
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* ACPI Table header */
|
||||
UINT32 FirmwareCtrl; /* Physical address of FACS */
|
||||
@ -202,7 +202,7 @@ typedef struct
|
||||
UINT32_BIT TmrValExt : 1; /* The tmr_val width is 32 bits (0 = 24 bits) */
|
||||
UINT32_BIT Reserved5 : 23; /* Reserved - must be zero */
|
||||
|
||||
} FADT_DESCRIPTOR_REV1;
|
||||
} FADT_DESCRIPTOR_REV1;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
|
||||
* $Revision: 28 $
|
||||
* $Revision: 32 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -142,7 +142,7 @@
|
||||
/*
|
||||
* ACPI 2.0 Root System Description Table (RSDT)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct rsdt_descriptor_rev2
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* ACPI table header */
|
||||
UINT32 TableOffsetEntry [1]; /* Array of pointers to */
|
||||
@ -153,7 +153,7 @@ typedef struct
|
||||
/*
|
||||
* ACPI 2.0 Extended System Description Table (XSDT)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct xsdt_descriptor_rev2
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* ACPI table header */
|
||||
UINT64 TableOffsetEntry [1]; /* Array of pointers to */
|
||||
@ -164,9 +164,9 @@ typedef struct
|
||||
/*
|
||||
* ACPI 2.0 Firmware ACPI Control Structure (FACS)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct facs_descriptor_rev2
|
||||
{
|
||||
NATIVE_CHAR Signature[4]; /* ACPI signature */
|
||||
char Signature[4]; /* ACPI signature */
|
||||
UINT32 Length; /* Length of structure, in bytes */
|
||||
UINT32 HardwareSignature; /* Hardware configuration signature */
|
||||
UINT32 FirmwareWakingVector; /* 32bit physical address of the Firmware Waking Vector. */
|
||||
@ -183,7 +183,7 @@ typedef struct
|
||||
/*
|
||||
* ACPI 2.0 Generic Address Structure (GAS)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct acpi_generic_address
|
||||
{
|
||||
UINT8 AddressSpaceId; /* Address space where struct or register exists. */
|
||||
UINT8 RegisterBitWidth; /* Size in bits of given register */
|
||||
@ -197,7 +197,7 @@ typedef struct
|
||||
/*
|
||||
* ACPI 2.0 Fixed ACPI Description Table (FADT)
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct fadt_descriptor_rev2
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* ACPI table header */
|
||||
UINT32 V1_FirmwareCtrl; /* 32-bit physical address of FACS */
|
||||
@ -268,7 +268,7 @@ typedef struct
|
||||
ACPI_GENERIC_ADDRESS XGpe0Blk; /* Extended General Purpose AcpiEvent 0 Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XGpe1Blk; /* Extended General Purpose AcpiEvent 1 Reg Blk address */
|
||||
|
||||
} FADT_DESCRIPTOR_REV2;
|
||||
} FADT_DESCRIPTOR_REV2;
|
||||
|
||||
|
||||
#pragma pack()
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actypes.h - Common data types for the entire ACPI subsystem
|
||||
* $Revision: 241 $
|
||||
* $Revision: 253 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -131,21 +131,34 @@
|
||||
#define ACPI_ASCII_MAX 0x7F
|
||||
|
||||
|
||||
#ifdef DEFINE_ALTERNATE_TYPES
|
||||
/*
|
||||
* Types used only in translated source, defined here to enable
|
||||
* cross-platform compilation only.
|
||||
*/
|
||||
typedef int s32;
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
typedef COMPILER_DEPENDENT_UINT64 u64;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Data types - Fixed across all compilation models (16/32/64)
|
||||
*
|
||||
* BOOLEAN Logical Boolean.
|
||||
* INT8 8-bit (1 byte) signed value
|
||||
* UINT8 8-bit (1 byte) unsigned value
|
||||
* INT16 16-bit (2 byte) signed value
|
||||
* UINT16 16-bit (2 byte) unsigned value
|
||||
* INT32 32-bit (4 byte) signed value
|
||||
* UINT32 32-bit (4 byte) unsigned value
|
||||
* INT64 64-bit (8 byte) signed value
|
||||
* UINT64 64-bit (8 byte) unsigned value
|
||||
* NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value
|
||||
* NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value
|
||||
* BOOLEAN Logical Boolean.
|
||||
* INT8 8-bit (1 byte) signed value
|
||||
* UINT8 8-bit (1 byte) unsigned value
|
||||
* INT16 16-bit (2 byte) signed value
|
||||
* UINT16 16-bit (2 byte) unsigned value
|
||||
* INT32 32-bit (4 byte) signed value
|
||||
* UINT32 32-bit (4 byte) unsigned value
|
||||
* INT64 64-bit (8 byte) signed value
|
||||
* UINT64 64-bit (8 byte) unsigned value
|
||||
* ACPI_NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value
|
||||
* ACPI_NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value
|
||||
*/
|
||||
|
||||
#ifndef ACPI_MACHINE_WIDTH
|
||||
@ -153,6 +166,9 @@
|
||||
#endif
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
|
||||
/*! [Begin] no source code translation (keep the typedefs) */
|
||||
|
||||
/*
|
||||
* 64-bit type definitions
|
||||
*/
|
||||
@ -164,13 +180,12 @@ typedef unsigned int UINT32;
|
||||
typedef COMPILER_DEPENDENT_INT64 INT64;
|
||||
typedef COMPILER_DEPENDENT_UINT64 UINT64;
|
||||
|
||||
typedef INT64 NATIVE_INT;
|
||||
typedef UINT64 NATIVE_UINT;
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
typedef UINT32 NATIVE_UINT_MAX32;
|
||||
typedef UINT64 NATIVE_UINT_MIN32;
|
||||
typedef INT64 ACPI_NATIVE_INT;
|
||||
typedef UINT64 ACPI_NATIVE_UINT;
|
||||
|
||||
typedef UINT64 ACPI_TBLPTR;
|
||||
typedef UINT64 ACPI_TABLE_PTR;
|
||||
typedef UINT64 ACPI_IO_ADDRESS;
|
||||
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
|
||||
typedef UINT64 ACPI_SIZE;
|
||||
@ -183,6 +198,8 @@ typedef UINT64 ACPI_SIZE;
|
||||
|
||||
#elif ACPI_MACHINE_WIDTH == 16
|
||||
|
||||
/*! [Begin] no source code translation (keep the typedefs) */
|
||||
|
||||
/*
|
||||
* 16-bit type definitions
|
||||
*/
|
||||
@ -200,13 +217,12 @@ typedef struct
|
||||
|
||||
} UINT64;
|
||||
|
||||
typedef UINT16 NATIVE_UINT;
|
||||
typedef INT16 NATIVE_INT;
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
typedef UINT16 NATIVE_UINT_MAX32;
|
||||
typedef UINT32 NATIVE_UINT_MIN32;
|
||||
typedef UINT16 ACPI_NATIVE_UINT;
|
||||
typedef INT16 ACPI_NATIVE_INT;
|
||||
|
||||
typedef UINT32 ACPI_TBLPTR;
|
||||
typedef UINT32 ACPI_TABLE_PTR;
|
||||
typedef UINT32 ACPI_IO_ADDRESS;
|
||||
typedef char *ACPI_PHYSICAL_ADDRESS;
|
||||
typedef UINT16 ACPI_SIZE;
|
||||
@ -226,6 +242,8 @@ typedef UINT16 ACPI_SIZE;
|
||||
|
||||
#elif ACPI_MACHINE_WIDTH == 32
|
||||
|
||||
/*! [Begin] no source code translation (keep the typedefs) */
|
||||
|
||||
/*
|
||||
* 32-bit type definitions (default)
|
||||
*/
|
||||
@ -237,13 +255,12 @@ typedef unsigned int UINT32;
|
||||
typedef COMPILER_DEPENDENT_INT64 INT64;
|
||||
typedef COMPILER_DEPENDENT_UINT64 UINT64;
|
||||
|
||||
typedef INT32 NATIVE_INT;
|
||||
typedef UINT32 NATIVE_UINT;
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
typedef UINT32 NATIVE_UINT_MAX32;
|
||||
typedef UINT32 NATIVE_UINT_MIN32;
|
||||
typedef INT32 ACPI_NATIVE_INT;
|
||||
typedef UINT32 ACPI_NATIVE_UINT;
|
||||
|
||||
typedef UINT64 ACPI_TBLPTR;
|
||||
typedef UINT64 ACPI_TABLE_PTR;
|
||||
typedef UINT32 ACPI_IO_ADDRESS;
|
||||
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
|
||||
typedef UINT32 ACPI_SIZE;
|
||||
@ -262,40 +279,24 @@ typedef UINT32 ACPI_SIZE;
|
||||
* Miscellaneous common types
|
||||
*/
|
||||
typedef UINT32 UINT32_BIT;
|
||||
typedef NATIVE_UINT ACPI_PTRDIFF;
|
||||
typedef char NATIVE_CHAR;
|
||||
|
||||
|
||||
#ifdef DEFINE_ALTERNATE_TYPES
|
||||
/*
|
||||
* Types used only in translated source, defined here to enable
|
||||
* cross-platform compilation only.
|
||||
*/
|
||||
typedef INT32 s32;
|
||||
typedef UINT8 u8;
|
||||
typedef UINT16 u16;
|
||||
typedef UINT32 u32;
|
||||
typedef UINT64 u64;
|
||||
#endif
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
typedef ACPI_NATIVE_UINT ACPI_PTRDIFF;
|
||||
|
||||
/*
|
||||
* Pointer overlays to avoid lots of typecasting for
|
||||
* code that accepts both physical and logical pointers.
|
||||
*/
|
||||
typedef union acpi_ptrs
|
||||
typedef union acpi_pointers
|
||||
{
|
||||
ACPI_PHYSICAL_ADDRESS Physical;
|
||||
void *Logical;
|
||||
ACPI_TBLPTR Value;
|
||||
ACPI_TABLE_PTR Value;
|
||||
|
||||
} ACPI_POINTERS;
|
||||
|
||||
typedef struct AcpiPointer
|
||||
typedef struct acpi_pointer
|
||||
{
|
||||
UINT32 PointerType;
|
||||
union acpi_ptrs Pointer;
|
||||
union acpi_pointers Pointer;
|
||||
|
||||
} ACPI_POINTER;
|
||||
|
||||
@ -338,24 +339,24 @@ typedef struct AcpiPointer
|
||||
*/
|
||||
typedef UINT32 ACPI_STATUS; /* All ACPI Exceptions */
|
||||
typedef UINT32 ACPI_NAME; /* 4-byte ACPI name */
|
||||
typedef char* ACPI_STRING; /* Null terminated ASCII string */
|
||||
typedef void* ACPI_HANDLE; /* Actually a ptr to an Node */
|
||||
typedef char * ACPI_STRING; /* Null terminated ASCII string */
|
||||
typedef void * ACPI_HANDLE; /* Actually a ptr to an Node */
|
||||
|
||||
typedef struct
|
||||
typedef struct uint64_struct
|
||||
{
|
||||
UINT32 Lo;
|
||||
UINT32 Hi;
|
||||
|
||||
} UINT64_STRUCT;
|
||||
|
||||
typedef union
|
||||
typedef union uint64_overlay
|
||||
{
|
||||
UINT64 Full;
|
||||
UINT64_STRUCT Part;
|
||||
|
||||
} UINT64_OVERLAY;
|
||||
|
||||
typedef struct
|
||||
typedef struct uint32_struct
|
||||
{
|
||||
UINT32 Lo;
|
||||
UINT32 Hi;
|
||||
@ -520,9 +521,9 @@ typedef UINT32 ACPI_OBJECT_TYPE;
|
||||
#define ACPI_TYPE_EXTERNAL_MAX 0x10
|
||||
|
||||
/*
|
||||
* These are object types that do not map directly to the ACPI
|
||||
* ObjectType() operator. They are used for various internal purposes only.
|
||||
* If new predefined ACPI_TYPEs are added (via the ACPI specification), these
|
||||
* These are object types that do not map directly to the ACPI
|
||||
* ObjectType() operator. They are used for various internal purposes only.
|
||||
* If new predefined ACPI_TYPEs are added (via the ACPI specification), these
|
||||
* internal types must move upwards. (There is code that depends on these
|
||||
* values being contiguous with the external types above.)
|
||||
*/
|
||||
@ -670,6 +671,7 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
|
||||
#define ACPI_ADR_SPACE_CMOS (ACPI_ADR_SPACE_TYPE) 5
|
||||
#define ACPI_ADR_SPACE_PCI_BAR_TARGET (ACPI_ADR_SPACE_TYPE) 6
|
||||
#define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 7
|
||||
#define ACPI_ADR_SPACE_FIXED_HARDWARE (ACPI_ADR_SPACE_TYPE) 127
|
||||
|
||||
|
||||
/*
|
||||
@ -707,7 +709,7 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
|
||||
/*
|
||||
* External ACPI object definition
|
||||
*/
|
||||
typedef union AcpiObj
|
||||
typedef union acpi_object
|
||||
{
|
||||
ACPI_OBJECT_TYPE Type; /* See definition of AcpiNsType for values */
|
||||
struct
|
||||
@ -720,7 +722,7 @@ typedef union AcpiObj
|
||||
{
|
||||
ACPI_OBJECT_TYPE Type;
|
||||
UINT32 Length; /* # of bytes in string, excluding trailing null */
|
||||
NATIVE_CHAR *Pointer; /* points to the string value */
|
||||
char *Pointer; /* points to the string value */
|
||||
} String;
|
||||
|
||||
struct
|
||||
@ -741,7 +743,7 @@ typedef union AcpiObj
|
||||
{
|
||||
ACPI_OBJECT_TYPE Type;
|
||||
UINT32 Count; /* # of elements in package */
|
||||
union AcpiObj *Elements; /* Pointer to an array of ACPI_OBJECTs */
|
||||
union acpi_object *Elements; /* Pointer to an array of ACPI_OBJECTs */
|
||||
} Package;
|
||||
|
||||
struct
|
||||
@ -765,7 +767,7 @@ typedef union AcpiObj
|
||||
/*
|
||||
* List of objects, used as a parameter list for control method evaluation
|
||||
*/
|
||||
typedef struct AcpiObjList
|
||||
typedef struct acpi_object_list
|
||||
{
|
||||
UINT32 Count;
|
||||
ACPI_OBJECT *Pointer;
|
||||
@ -780,7 +782,7 @@ typedef struct AcpiObjList
|
||||
#define ACPI_ALLOCATE_BUFFER (ACPI_SIZE) (-1)
|
||||
#define ACPI_ALLOCATE_LOCAL_BUFFER (ACPI_SIZE) (-2)
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_buffer
|
||||
{
|
||||
ACPI_SIZE Length; /* Length in bytes of the buffer */
|
||||
void *Pointer; /* pointer to buffer */
|
||||
@ -808,7 +810,7 @@ typedef struct
|
||||
/*
|
||||
* ACPI Table Info. One per ACPI table _type_
|
||||
*/
|
||||
typedef struct AcpiTableInfo
|
||||
typedef struct acpi_table_info
|
||||
{
|
||||
UINT32 Count;
|
||||
|
||||
@ -818,7 +820,7 @@ typedef struct AcpiTableInfo
|
||||
/*
|
||||
* System info returned by AcpiGetSystemInfo()
|
||||
*/
|
||||
typedef struct _AcpiSysInfo
|
||||
typedef struct acpi_system_info
|
||||
{
|
||||
UINT32 AcpiCaVersion;
|
||||
UINT32 Flags;
|
||||
@ -915,50 +917,49 @@ ACPI_STATUS (*ACPI_WALK_CALLBACK) (
|
||||
ACPI_NAME Name /* ACPI object Name */
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_obj_info_header
|
||||
{
|
||||
ACPI_COMMON_OBJ_INFO;
|
||||
|
||||
} ACPI_OBJ_INFO_HEADER;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_device_info
|
||||
{
|
||||
ACPI_COMMON_OBJ_INFO;
|
||||
|
||||
UINT32 Valid; /* Are the next bits legit? */
|
||||
NATIVE_CHAR HardwareId[9]; /* _HID value if any */
|
||||
NATIVE_CHAR UniqueId[9]; /* _UID value if any */
|
||||
char HardwareId[9]; /* _HID value if any */
|
||||
char UniqueId[9]; /* _UID value if any */
|
||||
ACPI_INTEGER Address; /* _ADR value if any */
|
||||
UINT32 CurrentStatus; /* _STA value */
|
||||
|
||||
} ACPI_DEVICE_INFO;
|
||||
|
||||
|
||||
/* Context structs for address space handlers */
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_pci_id
|
||||
{
|
||||
UINT16 Segment;
|
||||
UINT16 Bus;
|
||||
UINT16 Device;
|
||||
UINT16 Function;
|
||||
|
||||
} ACPI_PCI_ID;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_mem_space_context
|
||||
{
|
||||
UINT32 Length;
|
||||
ACPI_PHYSICAL_ADDRESS Address;
|
||||
ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress;
|
||||
UINT8 *MappedLogicalAddress;
|
||||
ACPI_SIZE MappedLength;
|
||||
|
||||
} ACPI_MEM_SPACE_CONTEXT;
|
||||
|
||||
|
||||
/* Sleep states */
|
||||
|
||||
#define ACPI_NUM_SLEEP_STATES 7
|
||||
|
||||
|
||||
/*
|
||||
* Definitions for Resource Attributes
|
||||
*/
|
||||
@ -983,6 +984,8 @@ typedef struct
|
||||
#define ACPI_ISA_ONLY_RANGES (UINT8) 0x02
|
||||
#define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
|
||||
|
||||
#define ACPI_SPARSE_TRANSLATION (UINT8) 0x03
|
||||
|
||||
/*
|
||||
* IO Port Descriptor Decode
|
||||
*/
|
||||
@ -1043,7 +1046,7 @@ typedef struct
|
||||
/*
|
||||
* Structures used to describe device resources
|
||||
*/
|
||||
typedef struct
|
||||
typedef struct acpi_resource_irq
|
||||
{
|
||||
UINT32 EdgeLevel;
|
||||
UINT32 ActiveHighLow;
|
||||
@ -1053,7 +1056,7 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_IRQ;
|
||||
|
||||
typedef struct
|
||||
typedef struct ACPI_RESOURCE_DMA
|
||||
{
|
||||
UINT32 Type;
|
||||
UINT32 BusMaster;
|
||||
@ -1063,7 +1066,7 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_DMA;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_start_dpf
|
||||
{
|
||||
UINT32 CompatibilityPriority;
|
||||
UINT32 PerformanceRobustness;
|
||||
@ -1075,7 +1078,7 @@ typedef struct
|
||||
* needed because it has no fields
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_io
|
||||
{
|
||||
UINT32 IoDecode;
|
||||
UINT32 MinBaseAddress;
|
||||
@ -1085,27 +1088,27 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_IO;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_fixed_io
|
||||
{
|
||||
UINT32 BaseAddress;
|
||||
UINT32 RangeLength;
|
||||
|
||||
} ACPI_RESOURCE_FIXED_IO;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_vendor
|
||||
{
|
||||
UINT32 Length;
|
||||
UINT8 Reserved[1];
|
||||
|
||||
} ACPI_RESOURCE_VENDOR;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_end_tag
|
||||
{
|
||||
UINT8 Checksum;
|
||||
|
||||
} ACPI_RESOURCE_END_TAG;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_mem24
|
||||
{
|
||||
UINT32 ReadWriteAttribute;
|
||||
UINT32 MinBaseAddress;
|
||||
@ -1115,7 +1118,7 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_MEM24;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_mem32
|
||||
{
|
||||
UINT32 ReadWriteAttribute;
|
||||
UINT32 MinBaseAddress;
|
||||
@ -1125,7 +1128,7 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_MEM32;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_fixed_mem32
|
||||
{
|
||||
UINT32 ReadWriteAttribute;
|
||||
UINT32 RangeBaseAddress;
|
||||
@ -1133,28 +1136,28 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_FIXED_MEM32;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_memory_attribute
|
||||
{
|
||||
UINT16 CacheAttribute;
|
||||
UINT16 ReadWriteAttribute;
|
||||
|
||||
} ACPI_MEMORY_ATTRIBUTE;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_io_attribute
|
||||
{
|
||||
UINT16 RangeAttribute;
|
||||
UINT16 Reserved;
|
||||
UINT16 TranslationAttribute;
|
||||
|
||||
} ACPI_IO_ATTRIBUTE;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_bus_attribute
|
||||
{
|
||||
UINT16 Reserved1;
|
||||
UINT16 Reserved2;
|
||||
|
||||
} ACPI_BUS_ATTRIBUTE;
|
||||
|
||||
typedef union
|
||||
typedef union acpi_resource_attribute
|
||||
{
|
||||
ACPI_MEMORY_ATTRIBUTE Memory;
|
||||
ACPI_IO_ATTRIBUTE Io;
|
||||
@ -1162,15 +1165,15 @@ typedef union
|
||||
|
||||
} ACPI_RESOURCE_ATTRIBUTE;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_source
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT32 StringLength;
|
||||
NATIVE_CHAR *StringPtr;
|
||||
char *StringPtr;
|
||||
|
||||
} ACPI_RESOURCE_SOURCE;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_address16
|
||||
{
|
||||
UINT32 ResourceType;
|
||||
UINT32 ProducerConsumer;
|
||||
@ -1187,7 +1190,7 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_ADDRESS16;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_address32
|
||||
{
|
||||
UINT32 ResourceType;
|
||||
UINT32 ProducerConsumer;
|
||||
@ -1204,7 +1207,7 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_ADDRESS32;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_address64
|
||||
{
|
||||
UINT32 ResourceType;
|
||||
UINT32 ProducerConsumer;
|
||||
@ -1221,7 +1224,7 @@ typedef struct
|
||||
|
||||
} ACPI_RESOURCE_ADDRESS64;
|
||||
|
||||
typedef struct
|
||||
typedef struct acpi_resource_ext_irq
|
||||
{
|
||||
UINT32 ProducerConsumer;
|
||||
UINT32 EdgeLevel;
|
||||
@ -1254,7 +1257,7 @@ typedef struct
|
||||
|
||||
typedef UINT32 ACPI_RESOURCE_TYPE;
|
||||
|
||||
typedef union
|
||||
typedef union acpi_resource_data
|
||||
{
|
||||
ACPI_RESOURCE_IRQ Irq;
|
||||
ACPI_RESOURCE_DMA Dma;
|
||||
@ -1273,7 +1276,7 @@ typedef union
|
||||
|
||||
} ACPI_RESOURCE_DATA;
|
||||
|
||||
typedef struct AcpiResource
|
||||
typedef struct acpi_resource
|
||||
{
|
||||
ACPI_RESOURCE_TYPE Id;
|
||||
UINT32 Length;
|
||||
@ -1305,7 +1308,7 @@ typedef struct acpi_pci_routing_table
|
||||
UINT32 Pin;
|
||||
ACPI_INTEGER Address; /* here for 64-bit alignment */
|
||||
UINT32 SourceIndex;
|
||||
NATIVE_CHAR Source[4]; /* pad to 64 bits so sizeof() works in all cases */
|
||||
char Source[4]; /* pad to 64 bits so sizeof() works in all cases */
|
||||
|
||||
} ACPI_PCI_ROUTING_TABLE;
|
||||
|
||||
|
@ -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: 71 $
|
||||
* $Revision: 73 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -284,6 +284,7 @@
|
||||
* Argument types for the AML Parser
|
||||
* Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
|
||||
* There can be up to 31 unique argument types
|
||||
* Zero is reserved as end-of-list indicator
|
||||
*/
|
||||
|
||||
#define ARGP_BYTEDATA 0x01
|
||||
@ -310,38 +311,47 @@
|
||||
* Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
|
||||
* There can be up to 31 unique argument types (0 is end-of-arg-list indicator)
|
||||
*
|
||||
* Note: If and when 5 bits becomes insufficient, it would probably be best
|
||||
* Note1: These values are completely independent from the ACPI_TYPEs
|
||||
* i.e., ARGI_INTEGER != ACPI_TYPE_INTEGER
|
||||
*
|
||||
* Note2: If and when 5 bits becomes insufficient, it would probably be best
|
||||
* to convert to a 6-byte array of argument types, allowing 8 bits per argument.
|
||||
*/
|
||||
|
||||
/* "Standard" ACPI types are 1-15 (0x0F) */
|
||||
/* Single, simple types */
|
||||
|
||||
#define ARGI_INTEGER ACPI_TYPE_INTEGER /* 1 */
|
||||
#define ARGI_STRING ACPI_TYPE_STRING /* 2 */
|
||||
#define ARGI_BUFFER ACPI_TYPE_BUFFER /* 3 */
|
||||
#define ARGI_PACKAGE ACPI_TYPE_PACKAGE /* 4 */
|
||||
#define ARGI_EVENT ACPI_TYPE_EVENT
|
||||
#define ARGI_MUTEX ACPI_TYPE_MUTEX
|
||||
#define ARGI_REGION ACPI_TYPE_REGION
|
||||
#define ARGI_DDBHANDLE ACPI_TYPE_DDB_HANDLE
|
||||
#define ARGI_ANYTYPE 0x01 /* Don't care */
|
||||
#define ARGI_PACKAGE 0x02
|
||||
#define ARGI_EVENT 0x03
|
||||
#define ARGI_MUTEX 0x04
|
||||
#define ARGI_DDBHANDLE 0x05
|
||||
|
||||
/* Custom types are 0x10 through 0x1F */
|
||||
/* Interchangeable types (via implicit conversion) */
|
||||
|
||||
#define ARGI_IF 0x10
|
||||
#define ARGI_ANYOBJECT 0x11
|
||||
#define ARGI_ANYTYPE 0x12
|
||||
#define ARGI_COMPUTEDATA 0x13 /* Buffer, String, or Integer */
|
||||
#define ARGI_DATAOBJECT 0x14 /* Buffer, String, package or reference to a Node - Used only by SizeOf operator*/
|
||||
#define ARGI_COMPLEXOBJ 0x15 /* Buffer, String, or package (Used by INDEX op only) */
|
||||
#define ARGI_INTEGER_REF 0x16
|
||||
#define ARGI_OBJECT_REF 0x17
|
||||
#define ARGI_DEVICE_REF 0x18
|
||||
#define ARGI_REFERENCE 0x19
|
||||
#define ARGI_TARGETREF 0x1A /* Target, subject to implicit conversion */
|
||||
#define ARGI_FIXED_TARGET 0x1B /* Target, no implicit conversion */
|
||||
#define ARGI_SIMPLE_TARGET 0x1C /* Name, Local, Arg -- no implicit conversion */
|
||||
#define ARGI_BUFFERSTRING 0x1D
|
||||
#define ARGI_REF_OR_STRING 0x1E /* Reference or String (Used by DEREFOF op only) */
|
||||
#define ARGI_INTEGER 0x06
|
||||
#define ARGI_STRING 0x07
|
||||
#define ARGI_BUFFER 0x08
|
||||
#define ARGI_BUFFER_OR_STRING 0x09 /* Used by MID op only */
|
||||
#define ARGI_COMPUTEDATA 0x0A /* Buffer, String, or Integer */
|
||||
|
||||
/* Reference objects */
|
||||
|
||||
#define ARGI_INTEGER_REF 0x0B
|
||||
#define ARGI_OBJECT_REF 0x0C
|
||||
#define ARGI_DEVICE_REF 0x0D
|
||||
#define ARGI_REFERENCE 0x0E
|
||||
#define ARGI_TARGETREF 0x0F /* Target, subject to implicit conversion */
|
||||
#define ARGI_FIXED_TARGET 0x10 /* Target, no implicit conversion */
|
||||
#define ARGI_SIMPLE_TARGET 0x11 /* Name, Local, Arg -- no implicit conversion */
|
||||
|
||||
/* Multiple/complex types */
|
||||
|
||||
#define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by SizeOf operator*/
|
||||
#define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */
|
||||
#define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */
|
||||
#define ARGI_REGION_OR_FIELD 0x15 /* Used by LOAD op only */
|
||||
|
||||
/* Note: types above can expand to 0x1F maximum */
|
||||
|
||||
#define ARGI_INVALID_OPCODE 0xFFFFFFFF
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: amlresrc.h - AML resource descriptors
|
||||
* $Revision: 22 $
|
||||
* $Revision: 23 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbdisply - debug display commands
|
||||
* $Revision: 81 $
|
||||
* $Revision: 89 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -220,14 +220,14 @@ AcpiDbDumpParserDescriptor (
|
||||
|
||||
void
|
||||
AcpiDbDecodeAndDisplayObject (
|
||||
NATIVE_CHAR *Target,
|
||||
NATIVE_CHAR *OutputType)
|
||||
char *Target,
|
||||
char *OutputType)
|
||||
{
|
||||
void *ObjPtr;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
UINT32 Display = DB_BYTE_DISPLAY;
|
||||
NATIVE_CHAR Buffer[80];
|
||||
char Buffer[80];
|
||||
ACPI_BUFFER RetBuf;
|
||||
ACPI_STATUS Status;
|
||||
UINT32 Size;
|
||||
@ -793,9 +793,15 @@ AcpiDbDisplayLocals (void)
|
||||
|
||||
ObjDesc = WalkState->MethodDesc;
|
||||
Node = WalkState->MethodNode;
|
||||
if (!Node)
|
||||
{
|
||||
AcpiOsPrintf ("No method node (Executing subtree for buffer or opregion)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("Local Variables for method [%4.4s]:\n", Node->Name.Ascii);
|
||||
|
||||
for (i = 0; i < MTH_NUM_LOCALS; i++)
|
||||
for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
|
||||
{
|
||||
ObjDesc = WalkState->LocalVariables[i].Object;
|
||||
AcpiOsPrintf ("Local%d: ", i);
|
||||
@ -836,6 +842,11 @@ AcpiDbDisplayArguments (void)
|
||||
|
||||
ObjDesc = WalkState->MethodDesc;
|
||||
Node = WalkState->MethodNode;
|
||||
if (!Node)
|
||||
{
|
||||
AcpiOsPrintf ("No method node (Executing subtree for buffer or opregion)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
NumArgs = ObjDesc->Method.ParamCount;
|
||||
Concurrency = ObjDesc->Method.Concurrency;
|
||||
@ -843,7 +854,7 @@ AcpiDbDisplayArguments (void)
|
||||
AcpiOsPrintf ("Method [%4.4s] has %X arguments, max concurrency = %X\n",
|
||||
Node->Name.Ascii, NumArgs, Concurrency);
|
||||
|
||||
for (i = 0; i < NumArgs; i++)
|
||||
for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
|
||||
{
|
||||
ObjDesc = WalkState->Arguments[i].Object;
|
||||
AcpiOsPrintf ("Arg%d: ", i);
|
||||
@ -1005,5 +1016,41 @@ AcpiDbDisplayArgumentObject (
|
||||
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbDisplayGpes
|
||||
*
|
||||
* PARAMETERS:
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Display the GPE structures
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDbDisplayGpes (void)
|
||||
{
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock;
|
||||
UINT32 i = 0;
|
||||
|
||||
|
||||
GpeBlock = AcpiGbl_GpeBlockListHead;
|
||||
while (GpeBlock)
|
||||
{
|
||||
AcpiOsPrintf ("Block %d - %p\n", i, GpeBlock);
|
||||
AcpiOsPrintf (" Registers: %d\n", GpeBlock->RegisterCount);
|
||||
AcpiOsPrintf (" GPE range: %d to %d\n", GpeBlock->BlockBaseNumber,
|
||||
GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8) -1);
|
||||
AcpiOsPrintf (" RegisterInfo: %p\n", GpeBlock->RegisterInfo);
|
||||
AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
|
||||
i++;
|
||||
|
||||
GpeBlock = GpeBlock->Next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* ACPI_DEBUGGER */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbexec - debugger control method execution
|
||||
* $Revision: 46 $
|
||||
* $Revision: 53 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -117,6 +117,7 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acdebug.h"
|
||||
#include "acnamesp.h"
|
||||
|
||||
#ifdef ACPI_DEBUGGER
|
||||
|
||||
@ -147,7 +148,7 @@ AcpiDbExecuteMethod (
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OBJECT_LIST ParamObjects;
|
||||
ACPI_OBJECT Params[MTH_NUM_ARGS];
|
||||
ACPI_OBJECT Params[ACPI_METHOD_NUM_ARGS];
|
||||
UINT32 i;
|
||||
|
||||
|
||||
@ -160,7 +161,7 @@ AcpiDbExecuteMethod (
|
||||
|
||||
if (Info->Args && Info->Args[0])
|
||||
{
|
||||
for (i = 0; Info->Args[i] && i < MTH_NUM_ARGS; i++)
|
||||
for (i = 0; Info->Args[i] && i < ACPI_METHOD_NUM_ARGS; i++)
|
||||
{
|
||||
Params[i].Type = ACPI_TYPE_INTEGER;
|
||||
Params[i].Integer.Value = ACPI_STRTOUL (Info->Args[i], NULL, 16);
|
||||
@ -191,6 +192,7 @@ AcpiDbExecuteMethod (
|
||||
|
||||
/* Do the actual method execution */
|
||||
|
||||
AcpiGbl_MethodExecuting = TRUE;
|
||||
Status = AcpiEvaluateObject (NULL, Info->Pathname, &ParamObjects, ReturnObj);
|
||||
|
||||
AcpiGbl_CmSingleStep = FALSE;
|
||||
@ -283,6 +285,58 @@ AcpiDbGetOutstandingAllocations (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbExecutionWalk
|
||||
*
|
||||
* PARAMETERS: WALK_CALLBACK
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Execute a control method. Name is relative to the current
|
||||
* scope.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbExecutionWalk (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 NestingLevel,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
|
||||
ACPI_BUFFER ReturnObj;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ObjDesc = AcpiNsGetAttachedObject (Node);
|
||||
if (ObjDesc->Method.ParamCount)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
ReturnObj.Pointer = NULL;
|
||||
ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
|
||||
|
||||
AcpiNsPrintNodePathname (Node, "Execute");
|
||||
|
||||
/* Do the actual method execution */
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
AcpiGbl_MethodExecuting = TRUE;
|
||||
|
||||
Status = AcpiEvaluateObject (Node, NULL, NULL, &ReturnObj);
|
||||
|
||||
AcpiOsPrintf ("[%4.4s] returned %s\n", Node->Name.Ascii,
|
||||
AcpiFormatException (Status));
|
||||
AcpiGbl_MethodExecuting = FALSE;
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbExecute
|
||||
@ -300,8 +354,8 @@ AcpiDbGetOutstandingAllocations (
|
||||
|
||||
void
|
||||
AcpiDbExecute (
|
||||
NATIVE_CHAR *Name,
|
||||
NATIVE_CHAR **Args,
|
||||
char *Name,
|
||||
char **Args,
|
||||
UINT32 Flags)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
@ -318,15 +372,24 @@ AcpiDbExecute (
|
||||
PreviousAllocations = AcpiDbGetOutstandingAllocations ();
|
||||
#endif
|
||||
|
||||
AcpiGbl_DbMethodInfo.Name = Name;
|
||||
AcpiGbl_DbMethodInfo.Args = Args;
|
||||
AcpiGbl_DbMethodInfo.Flags = Flags;
|
||||
if (*Name == '*')
|
||||
{
|
||||
(void) AcpiWalkNamespace (ACPI_TYPE_METHOD, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
|
||||
AcpiDbExecutionWalk, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiGbl_DbMethodInfo.Name = Name;
|
||||
AcpiGbl_DbMethodInfo.Args = Args;
|
||||
AcpiGbl_DbMethodInfo.Flags = Flags;
|
||||
|
||||
ReturnObj.Pointer = NULL;
|
||||
ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
|
||||
ReturnObj.Pointer = NULL;
|
||||
ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
|
||||
|
||||
AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
|
||||
Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
|
||||
AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
|
||||
Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow any handlers in separate threads to complete.
|
||||
@ -363,7 +426,7 @@ AcpiDbExecute (
|
||||
if (ReturnObj.Length)
|
||||
{
|
||||
AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
|
||||
AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
|
||||
AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
|
||||
(UINT32) ReturnObj.Length);
|
||||
AcpiDbDumpObject (ReturnObj.Pointer, 1);
|
||||
}
|
||||
@ -441,9 +504,9 @@ AcpiDbMethodThread (
|
||||
|
||||
void
|
||||
AcpiDbCreateExecutionThreads (
|
||||
NATIVE_CHAR *NumThreadsArg,
|
||||
NATIVE_CHAR *NumLoopsArg,
|
||||
NATIVE_CHAR *MethodNameArg)
|
||||
char *NumThreadsArg,
|
||||
char *NumLoopsArg,
|
||||
char *MethodNameArg)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 NumThreads;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dbhistry - debugger HISTORY command
|
||||
* $Revision: 25 $
|
||||
* $Revision: 28 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -131,7 +131,7 @@
|
||||
|
||||
typedef struct HistoryInfo
|
||||
{
|
||||
NATIVE_CHAR Command[80];
|
||||
char Command[80];
|
||||
UINT32 CmdNum;
|
||||
|
||||
} HISTORY_INFO;
|
||||
@ -158,7 +158,7 @@ static UINT32 AcpiGbl_NextCmdNum = 1;
|
||||
|
||||
void
|
||||
AcpiDbAddToHistory (
|
||||
NATIVE_CHAR *CommandLine)
|
||||
char *CommandLine)
|
||||
{
|
||||
|
||||
/* Put command into the next available slot */
|
||||
@ -208,7 +208,7 @@ AcpiDbAddToHistory (
|
||||
void
|
||||
AcpiDbDisplayHistory (void)
|
||||
{
|
||||
NATIVE_UINT i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
UINT16 HistoryIndex;
|
||||
|
||||
|
||||
@ -243,11 +243,11 @@ AcpiDbDisplayHistory (void)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiDbGetFromHistory (
|
||||
NATIVE_CHAR *CommandNumArg)
|
||||
char *CommandNumArg)
|
||||
{
|
||||
NATIVE_UINT i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
UINT16 HistoryIndex;
|
||||
UINT32 CmdNum;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbinput - user front-end to the AML debugger
|
||||
* $Revision: 88 $
|
||||
* $Revision: 96 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -148,6 +148,8 @@ enum AcpiExDebuggerCommands
|
||||
CMD_EXIT,
|
||||
CMD_FIND,
|
||||
CMD_GO,
|
||||
CMD_GPE,
|
||||
CMD_GPES,
|
||||
CMD_HELP,
|
||||
CMD_HELP2,
|
||||
CMD_HISTORY,
|
||||
@ -203,6 +205,8 @@ static const COMMAND_INFO AcpiGbl_DbCommands[] =
|
||||
{"EXIT", 0},
|
||||
{"FIND", 1},
|
||||
{"GO", 0},
|
||||
{"GPE", 2},
|
||||
{"GPES", 0},
|
||||
{"HELP", 0},
|
||||
{"?", 0},
|
||||
{"HISTORY", 0},
|
||||
@ -253,7 +257,7 @@ static const COMMAND_INFO AcpiGbl_DbCommands[] =
|
||||
|
||||
void
|
||||
AcpiDbDisplayHelp (
|
||||
NATIVE_CHAR *HelpType)
|
||||
char *HelpType)
|
||||
{
|
||||
|
||||
|
||||
@ -269,7 +273,6 @@ AcpiDbDisplayHelp (
|
||||
AcpiOsPrintf (" [METHOD] Control Method Execution Commands\n");
|
||||
AcpiOsPrintf (" [FILE] File I/O Commands\n");
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -300,9 +303,7 @@ AcpiDbDisplayHelp (
|
||||
|
||||
case 'N':
|
||||
AcpiOsPrintf ("\nNamespace Access Commands\n\n");
|
||||
AcpiOsPrintf ("Debug <Namepath> [Arguments] Single Step a control method\n");
|
||||
AcpiOsPrintf ("Event <F|G> <Value> Generate AcpiEvent (Fixed/GPE)\n");
|
||||
AcpiOsPrintf ("Execute <Namepath> [Arguments] Execute control method\n");
|
||||
AcpiOsPrintf ("Find <Name> (? is wildcard) Find ACPI name(s) with wildcards\n");
|
||||
AcpiOsPrintf ("Method Display list of loaded control methods\n");
|
||||
AcpiOsPrintf ("Namespace [<Addr>|<Path>] [Depth] Display loaded namespace tree/subtree\n");
|
||||
@ -321,6 +322,8 @@ AcpiDbDisplayHelp (
|
||||
AcpiOsPrintf ("Arguments (or Args) Display method arguments\n");
|
||||
AcpiOsPrintf ("Breakpoint <AmlOffset> Set an AML execution breakpoint\n");
|
||||
AcpiOsPrintf ("Call Run to next control method invocation\n");
|
||||
AcpiOsPrintf ("Debug <Namepath> [Arguments] Single Step a control method\n");
|
||||
AcpiOsPrintf ("Execute <Namepath> [Arguments] Execute control method\n");
|
||||
AcpiOsPrintf ("Go Allow method to run to completion\n");
|
||||
AcpiOsPrintf ("Information Display info about the current method\n");
|
||||
AcpiOsPrintf ("Into Step into (not over) a method call\n");
|
||||
@ -360,12 +363,12 @@ AcpiDbDisplayHelp (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiDbGetNextToken (
|
||||
NATIVE_CHAR *String,
|
||||
NATIVE_CHAR **Next)
|
||||
char *String,
|
||||
char **Next)
|
||||
{
|
||||
NATIVE_CHAR *Start;
|
||||
char *Start;
|
||||
|
||||
|
||||
/* At end of buffer? */
|
||||
@ -428,12 +431,12 @@ AcpiDbGetNextToken (
|
||||
|
||||
UINT32
|
||||
AcpiDbGetLine (
|
||||
NATIVE_CHAR *InputBuffer)
|
||||
char *InputBuffer)
|
||||
{
|
||||
UINT32 i;
|
||||
UINT32 Count;
|
||||
NATIVE_CHAR *Next;
|
||||
NATIVE_CHAR *This;
|
||||
char *Next;
|
||||
char *This;
|
||||
|
||||
|
||||
ACPI_STRCPY (AcpiGbl_DbParsedBuf, InputBuffer);
|
||||
@ -482,7 +485,7 @@ AcpiDbGetLine (
|
||||
|
||||
UINT32
|
||||
AcpiDbMatchCommand (
|
||||
NATIVE_CHAR *UserCommand)
|
||||
char *UserCommand)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
@ -523,14 +526,14 @@ AcpiDbMatchCommand (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbCommandDispatch (
|
||||
NATIVE_CHAR *InputBuffer,
|
||||
char *InputBuffer,
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
UINT32 Temp;
|
||||
UINT32 CommandIndex;
|
||||
UINT32 ParamCount;
|
||||
NATIVE_CHAR *CommandLine;
|
||||
char *CommandLine;
|
||||
ACPI_STATUS Status = AE_CTRL_TRUE;
|
||||
|
||||
|
||||
@ -616,13 +619,21 @@ AcpiDbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_FIND:
|
||||
Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
|
||||
AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
|
||||
break;
|
||||
|
||||
case CMD_GO:
|
||||
AcpiGbl_CmSingleStep = FALSE;
|
||||
return (AE_OK);
|
||||
|
||||
case CMD_GPE:
|
||||
AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||
break;
|
||||
|
||||
case CMD_GPES:
|
||||
AcpiDbDisplayGpes ();
|
||||
break;
|
||||
|
||||
case CMD_HELP:
|
||||
case CMD_HELP2:
|
||||
AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);
|
||||
@ -701,7 +712,7 @@ AcpiDbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_LOAD:
|
||||
Status = AcpiDbLoadAcpiTable (AcpiGbl_DbArgs[1]);
|
||||
Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
@ -717,7 +728,7 @@ AcpiDbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_METHODS:
|
||||
Status = AcpiDbDisplayObjects ("METHOD", AcpiGbl_DbArgs[1]);
|
||||
AcpiDbDisplayObjects ("METHOD", AcpiGbl_DbArgs[1]);
|
||||
break;
|
||||
|
||||
case CMD_NAMESPACE:
|
||||
@ -731,7 +742,7 @@ AcpiDbCommandDispatch (
|
||||
|
||||
case CMD_OBJECT:
|
||||
ACPI_STRUPR (AcpiGbl_DbArgs[1]);
|
||||
Status = AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||
AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
|
||||
break;
|
||||
|
||||
case CMD_OPEN:
|
||||
@ -763,7 +774,7 @@ AcpiDbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_STATS:
|
||||
Status = AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
|
||||
AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
|
||||
break;
|
||||
|
||||
case CMD_STOP:
|
||||
@ -804,7 +815,7 @@ AcpiDbCommandDispatch (
|
||||
|
||||
if (!AcpiGbl_DbOutputToFile)
|
||||
{
|
||||
AcpiDbgLevel = DEBUG_DEFAULT;
|
||||
AcpiDbgLevel = ACPI_DEBUG_DEFAULT;
|
||||
}
|
||||
|
||||
/* Shutdown */
|
||||
@ -914,7 +925,7 @@ AcpiDbSingleThread (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbUserCommands (
|
||||
NATIVE_CHAR Prompt,
|
||||
char Prompt,
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbstats - Generation and display of ACPI table statistics
|
||||
* $Revision: 64 $
|
||||
* $Revision: 66 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -366,7 +366,7 @@ AcpiDbCountNamespaceObjects (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbDisplayStatistics (
|
||||
NATIVE_CHAR *TypeArg)
|
||||
char *TypeArg)
|
||||
{
|
||||
UINT32 i;
|
||||
UINT32 Type;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dbutils - AML debugger utilities
|
||||
* $Revision: 57 $
|
||||
* $Revision: 61 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -129,6 +129,46 @@
|
||||
ACPI_MODULE_NAME ("dbutils")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbMatchArgument
|
||||
*
|
||||
* PARAMETERS: UserArgument - User command line
|
||||
* Arguments - Array of commands to match against
|
||||
*
|
||||
* RETURN: Index into command array or ACPI_TYPE_NOT_FOUND if not found
|
||||
*
|
||||
* DESCRIPTION: Search command array for a command match
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_OBJECT_TYPE
|
||||
AcpiDbMatchArgument (
|
||||
char *UserArgument,
|
||||
ARGUMENT_INFO *Arguments)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
||||
if (!UserArgument || UserArgument[0] == 0)
|
||||
{
|
||||
return (ACPI_TYPE_NOT_FOUND);
|
||||
}
|
||||
|
||||
for (i = 0; Arguments[i].Name; i++)
|
||||
{
|
||||
if (ACPI_STRSTR (Arguments[i].Name, UserArgument) == Arguments[i].Name)
|
||||
{
|
||||
return (i);
|
||||
}
|
||||
}
|
||||
|
||||
/* Argument not recognized */
|
||||
|
||||
return (ACPI_TYPE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbSetOutputDestination
|
||||
@ -246,7 +286,14 @@ AcpiDbDumpObject (
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
|
||||
AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
|
||||
if (ObjDesc->Buffer.Length)
|
||||
{
|
||||
AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@ -301,7 +348,7 @@ AcpiDbDumpObject (
|
||||
|
||||
void
|
||||
AcpiDbPrepNamestring (
|
||||
NATIVE_CHAR *Name)
|
||||
char *Name)
|
||||
{
|
||||
|
||||
|
||||
@ -452,9 +499,9 @@ AcpiDbSecondPassParse (
|
||||
|
||||
ACPI_NAMESPACE_NODE *
|
||||
AcpiDbLocalNsLookup (
|
||||
NATIVE_CHAR *Name)
|
||||
char *Name)
|
||||
{
|
||||
NATIVE_CHAR *InternalPath;
|
||||
char *InternalPath;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_NAMESPACE_NODE *Node = NULL;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmbuffer - AML disassembler, buffer and string support
|
||||
* $Revision: 8 $
|
||||
* $Revision: 10 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -264,7 +264,7 @@ AcpiDmIsUnicodeBuffer (
|
||||
UINT32 WordCount;
|
||||
ACPI_PARSE_OBJECT *SizeOp;
|
||||
ACPI_PARSE_OBJECT *NextOp;
|
||||
NATIVE_UINT i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
|
||||
|
||||
/* Buffer size is the buffer argument */
|
||||
@ -440,7 +440,7 @@ AcpiIsEisaId (
|
||||
UINT32 Name;
|
||||
UINT32 BigEndianId;
|
||||
ACPI_PARSE_OBJECT *NextOp;
|
||||
NATIVE_UINT i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
UINT32 Prefix[3];
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmnames - AML disassembler, names, namestrings, pathnames
|
||||
* $Revision: 4 $
|
||||
* $Revision: 6 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -316,7 +316,7 @@ AcpiPsDisplayObjectPathname (
|
||||
|
||||
void
|
||||
AcpiDmNamestring (
|
||||
NATIVE_CHAR *Name)
|
||||
char *Name)
|
||||
{
|
||||
UINT32 SegCount;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmopcode - AML disassembler, specific AML opcodes
|
||||
* $Revision: 79 $
|
||||
* $Revision: 81 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -335,7 +335,7 @@ AcpiDmMatchKeyword (
|
||||
{
|
||||
|
||||
|
||||
if (Op->Common.Value.Integer32 >= NUM_MATCH_OPS)
|
||||
if (Op->Common.Value.Integer32 >= ACPI_NUM_MATCH_OPS)
|
||||
{
|
||||
AcpiOsPrintf ("/* Unknown Match Keyword encoding */");
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrc.c - Resource Descriptor disassembly
|
||||
* $Revision: 5 $
|
||||
* $Revision: 7 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -195,7 +195,7 @@ AcpiDmResourceDescriptor (
|
||||
UINT8 *ByteData,
|
||||
UINT32 ByteCount)
|
||||
{
|
||||
NATIVE_UINT CurrentByteOffset;
|
||||
ACPI_NATIVE_UINT CurrentByteOffset;
|
||||
UINT8 CurrentByte;
|
||||
UINT8 DescriptorId;
|
||||
UINT32 Length;
|
||||
@ -224,7 +224,7 @@ AcpiDmResourceDescriptor (
|
||||
CurrentByteOffset += 1;
|
||||
}
|
||||
|
||||
CurrentByteOffset += (NATIVE_UINT) Length;
|
||||
CurrentByteOffset += (ACPI_NATIVE_UINT) Length;
|
||||
|
||||
/* Determine type of resource */
|
||||
|
||||
@ -406,7 +406,7 @@ AcpiDmIsResourceDescriptor (
|
||||
UINT8 *ByteData;
|
||||
UINT32 ByteCount;
|
||||
ACPI_PARSE_OBJECT *NextOp;
|
||||
NATIVE_UINT CurrentByteOffset;
|
||||
ACPI_NATIVE_UINT CurrentByteOffset;
|
||||
UINT8 CurrentByte;
|
||||
UINT8 DescriptorId;
|
||||
UINT32 Length;
|
||||
@ -463,7 +463,7 @@ AcpiDmIsResourceDescriptor (
|
||||
CurrentByteOffset += 1;
|
||||
}
|
||||
|
||||
CurrentByteOffset += (NATIVE_UINT) Length;
|
||||
CurrentByteOffset += (ACPI_NATIVE_UINT) Length;
|
||||
|
||||
/* Determine type of resource */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
|
||||
* $Revision: 7 $
|
||||
* $Revision: 10 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -544,17 +544,31 @@ AcpiDmInterruptDescriptor (
|
||||
UINT32 Level)
|
||||
{
|
||||
UINT32 i;
|
||||
UINT8 *Rover;
|
||||
|
||||
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("Interrupt (%s, %s, %s, %s)\n",
|
||||
AcpiOsPrintf ("Interrupt (%s, %s, %s, %s",
|
||||
AcpiGbl_ConsumeDecode [(Resource->Flags & 1)],
|
||||
AcpiGbl_HEDecode [(Resource->Flags >> 1) & 1],
|
||||
AcpiGbl_LLDecode [(Resource->Flags >> 2) & 1],
|
||||
AcpiGbl_SHRDecode [(Resource->Flags >> 3) & 1]);
|
||||
|
||||
/* TBD "Resource Source, optional */
|
||||
/* Resource Index/Source, optional -- at end of descriptor */
|
||||
|
||||
if (Resource->Length > (UINT16) (4 * Resource->TableLength) + 2)
|
||||
{
|
||||
/* Get a pointer past the interrupt values */
|
||||
|
||||
Rover = ((UINT8 *) Resource) + ((4 * Resource->TableLength) + 5);
|
||||
|
||||
/* Resource Index */
|
||||
/* Resource Source */
|
||||
|
||||
AcpiOsPrintf (", 0x%X, \"%s\"", (UINT32) Rover[0], (char *) &Rover[1]);
|
||||
}
|
||||
|
||||
AcpiOsPrintf (")\n");
|
||||
AcpiDmIndent (Level);
|
||||
AcpiOsPrintf ("{\n");
|
||||
for (i = 0; i < Resource->TableLength; i++)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmresrcs.c - "Small" Resource Descriptor disassembly
|
||||
* $Revision: 3 $
|
||||
* $Revision: 4 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmutils - AML disassembler utilities
|
||||
* $Revision: 5 $
|
||||
* $Revision: 8 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -128,7 +128,7 @@
|
||||
|
||||
/* Data used in keeping track of fields */
|
||||
#if 0
|
||||
const NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
|
||||
const char *AcpiGbl_FENames[ACPI_NUM_FIELD_NAMES] =
|
||||
{
|
||||
"skip",
|
||||
"?access?"
|
||||
@ -136,7 +136,7 @@ const NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
|
||||
#endif
|
||||
|
||||
|
||||
const NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
|
||||
const char *AcpiGbl_MatchOps[ACPI_NUM_MATCH_OPS] =
|
||||
{
|
||||
"MTR",
|
||||
"MEQ",
|
||||
@ -149,7 +149,7 @@ const NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
|
||||
|
||||
/* Access type decoding */
|
||||
|
||||
const NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
|
||||
const char *AcpiGbl_AccessTypes[ACPI_NUM_ACCESS_TYPES] =
|
||||
{
|
||||
"AnyAcc",
|
||||
"ByteAcc",
|
||||
@ -162,7 +162,7 @@ const NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
|
||||
|
||||
/* Lock rule decoding */
|
||||
|
||||
const NATIVE_CHAR *AcpiGbl_LockRule[NUM_LOCK_RULES] =
|
||||
const char *AcpiGbl_LockRule[ACPI_NUM_LOCK_RULES] =
|
||||
{
|
||||
"NoLock",
|
||||
"Lock"
|
||||
@ -170,7 +170,7 @@ const NATIVE_CHAR *AcpiGbl_LockRule[NUM_LOCK_RULES] =
|
||||
|
||||
/* Update rule decoding */
|
||||
|
||||
const NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
|
||||
const char *AcpiGbl_UpdateRules[ACPI_NUM_UPDATE_RULES] =
|
||||
{
|
||||
"Preserve",
|
||||
"WriteAsOnes",
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dmwalk - AML disassembly tree walk
|
||||
* $Revision: 8 $
|
||||
* $Revision: 9 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsfield - Dispatcher field routines
|
||||
* $Revision: 69 $
|
||||
* $Revision: 71 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -346,7 +346,7 @@ AcpiDsGetFieldNames (
|
||||
/* Lookup the name */
|
||||
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo,
|
||||
(NATIVE_CHAR *) &Arg->Named.Name,
|
||||
(char *) &Arg->Named.Name,
|
||||
Info->FieldType, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
|
||||
WalkState, &Info->FieldNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -523,7 +523,7 @@ AcpiDsInitFieldObjects (
|
||||
if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
|
||||
{
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo,
|
||||
(NATIVE_CHAR *) &Arg->Named.Name,
|
||||
(char *) &Arg->Named.Name,
|
||||
Type, ACPI_IMODE_LOAD_PASS1,
|
||||
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND,
|
||||
WalkState, &Node);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
|
||||
* $Revision: 89 $
|
||||
* $Revision: 90 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dsmthdat - control method arguments and local variables
|
||||
* $Revision: 64 $
|
||||
* $Revision: 69 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -120,6 +120,7 @@
|
||||
#include "acdispat.h"
|
||||
#include "amlcode.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_DISPATCHER
|
||||
@ -159,7 +160,7 @@ AcpiDsMethodDataInit (
|
||||
|
||||
/* Init the method arguments */
|
||||
|
||||
for (i = 0; i < MTH_NUM_ARGS; i++)
|
||||
for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
|
||||
{
|
||||
ACPI_MOVE_UNALIGNED32_TO_32 (&WalkState->Arguments[i].Name,
|
||||
NAMEOF_ARG_NTE);
|
||||
@ -171,7 +172,7 @@ AcpiDsMethodDataInit (
|
||||
|
||||
/* Init the method locals */
|
||||
|
||||
for (i = 0; i < MTH_NUM_LOCALS; i++)
|
||||
for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
|
||||
{
|
||||
ACPI_MOVE_UNALIGNED32_TO_32 (&WalkState->LocalVariables[i].Name,
|
||||
NAMEOF_LOCAL_NTE);
|
||||
@ -211,7 +212,7 @@ AcpiDsMethodDataDeleteAll (
|
||||
|
||||
/* Detach the locals */
|
||||
|
||||
for (Index = 0; Index < MTH_NUM_LOCALS; Index++)
|
||||
for (Index = 0; Index < ACPI_METHOD_NUM_LOCALS; Index++)
|
||||
{
|
||||
if (WalkState->LocalVariables[Index].Object)
|
||||
{
|
||||
@ -226,7 +227,7 @@ AcpiDsMethodDataDeleteAll (
|
||||
|
||||
/* Detach the arguments */
|
||||
|
||||
for (Index = 0; Index < MTH_NUM_ARGS; Index++)
|
||||
for (Index = 0; Index < ACPI_METHOD_NUM_ARGS; Index++)
|
||||
{
|
||||
if (WalkState->Arguments[Index].Object)
|
||||
{
|
||||
@ -280,7 +281,7 @@ AcpiDsMethodDataInitArgs (
|
||||
|
||||
/* Copy passed parameters into the new method stack frame */
|
||||
|
||||
while ((Index < MTH_NUM_ARGS) && (Index < MaxParamCount) && Params[Index])
|
||||
while ((Index < ACPI_METHOD_NUM_ARGS) && (Index < MaxParamCount) && Params[Index])
|
||||
{
|
||||
/*
|
||||
* A valid parameter.
|
||||
@ -331,10 +332,10 @@ AcpiDsMethodDataGetNode (
|
||||
{
|
||||
case AML_LOCAL_OP:
|
||||
|
||||
if (Index > MTH_MAX_LOCAL)
|
||||
if (Index > ACPI_METHOD_MAX_LOCAL)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Local index %d is invalid (max %d)\n",
|
||||
Index, MTH_MAX_LOCAL));
|
||||
Index, ACPI_METHOD_MAX_LOCAL));
|
||||
return_ACPI_STATUS (AE_AML_INVALID_INDEX);
|
||||
}
|
||||
|
||||
@ -345,10 +346,10 @@ AcpiDsMethodDataGetNode (
|
||||
|
||||
case AML_ARG_OP:
|
||||
|
||||
if (Index > MTH_MAX_ARG)
|
||||
if (Index > ACPI_METHOD_MAX_ARG)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Arg index %d is invalid (max %d)\n",
|
||||
Index, MTH_MAX_ARG));
|
||||
Index, ACPI_METHOD_MAX_ARG));
|
||||
return_ACPI_STATUS (AE_AML_INVALID_INDEX);
|
||||
}
|
||||
|
||||
@ -378,6 +379,7 @@ AcpiDsMethodDataGetNode (
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Insert an object onto the method stack at entry Opcode:Index.
|
||||
* Note: There is no "implicit conversion" for locals.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -390,11 +392,17 @@ AcpiDsMethodDataSetValue (
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_OPERAND_OBJECT *NewDesc = Object;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsMethodDataSetValue");
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"obj %p op %X, ref count = %d [%s]\n", Object,
|
||||
Opcode, Object->Common.ReferenceCount,
|
||||
AcpiUtGetTypeName (Object->Common.Type)));
|
||||
|
||||
/* Get the namespace node for the arg/local */
|
||||
|
||||
Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
|
||||
@ -403,14 +411,33 @@ AcpiDsMethodDataSetValue (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Increment ref count so object can't be deleted while installed */
|
||||
/*
|
||||
* If the object has just been created and is not attached to anything,
|
||||
* (the reference count is 1), then we can just store it directly into
|
||||
* the arg/local. Otherwise, we must copy it.
|
||||
*/
|
||||
if (Object->Common.ReferenceCount > 1)
|
||||
{
|
||||
Status = AcpiUtCopyIobjectToIobject (Object, &NewDesc, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
AcpiUtAddReference (Object);
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object Copied %p, new %p\n",
|
||||
Object, NewDesc));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Increment ref count so object can't be deleted while installed */
|
||||
|
||||
/* Install the object into the stack entry */
|
||||
AcpiUtAddReference (NewDesc);
|
||||
}
|
||||
|
||||
Node->Object = Object;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
/* Install the object */
|
||||
|
||||
Node->Object = NewDesc;
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
@ -676,7 +703,8 @@ AcpiDsStoreObjectToLocal (
|
||||
CurrentObjDesc = AcpiNsGetAttachedObject (Node);
|
||||
if (CurrentObjDesc == ObjDesc)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n", ObjDesc));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p already installed!\n",
|
||||
ObjDesc));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -706,19 +734,19 @@ AcpiDsStoreObjectToLocal (
|
||||
*/
|
||||
if (Opcode == AML_ARG_OP)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Make sure that the object is the correct type. This may be overkill, but
|
||||
* it is here because references were NS nodes in the past. Now they are
|
||||
* operand objects of type Reference.
|
||||
*/
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) != ACPI_DESC_TYPE_OPERAND)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: %X\n",
|
||||
ACPI_REPORT_ERROR (("Invalid descriptor type while storing to method arg: %X\n",
|
||||
CurrentObjDesc->Common.Type));
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* If we have a valid reference object that came from RefOf(), do the
|
||||
* indirect store
|
||||
*/
|
||||
@ -729,16 +757,12 @@ AcpiDsStoreObjectToLocal (
|
||||
"Arg (%p) is an ObjRef(Node), storing in node %p\n",
|
||||
ObjDesc, CurrentObjDesc));
|
||||
|
||||
/* Detach an existing object from the referenced Node */
|
||||
|
||||
AcpiNsDetachObject (CurrentObjDesc->Reference.Object);
|
||||
|
||||
/*
|
||||
* Store this object into the Node
|
||||
* Store this object to the Node
|
||||
* (perform the indirect store)
|
||||
*/
|
||||
Status = AcpiNsAttachObject (CurrentObjDesc->Reference.Object,
|
||||
ObjDesc, ACPI_GET_OBJECT_TYPE (ObjDesc));
|
||||
Status = AcpiExStoreObjectToNode (ObjDesc,
|
||||
CurrentObjDesc->Reference.Object, WalkState);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsobject - Dispatcher object management routines
|
||||
* $Revision: 110 $
|
||||
* $Revision: 114 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -128,194 +128,6 @@
|
||||
|
||||
|
||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsInitOneObject
|
||||
*
|
||||
* PARAMETERS: ObjHandle - Node
|
||||
* Level - Current nesting level
|
||||
* Context - Points to a init info struct
|
||||
* ReturnValue - Not used
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Callback from AcpiWalkNamespace. Invoked for every object
|
||||
* within the namespace.
|
||||
*
|
||||
* Currently, the only objects that require initialization are:
|
||||
* 1) Methods
|
||||
* 2) Operation Regions
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsInitOneObject (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
ACPI_OBJECT_TYPE Type;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME ("DsInitOneObject");
|
||||
|
||||
|
||||
/*
|
||||
* We are only interested in objects owned by the table that
|
||||
* was just loaded
|
||||
*/
|
||||
if (((ACPI_NAMESPACE_NODE *) ObjHandle)->OwnerId !=
|
||||
Info->TableDesc->TableId)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
Info->ObjectCount++;
|
||||
|
||||
/* And even then, we are only interested in a few object types */
|
||||
|
||||
Type = AcpiNsGetType (ObjHandle);
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case ACPI_TYPE_REGION:
|
||||
|
||||
Status = AcpiDsInitializeRegion (ObjHandle);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n",
|
||||
ObjHandle, ((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Ascii,
|
||||
AcpiFormatException (Status)));
|
||||
}
|
||||
|
||||
Info->OpRegionCount++;
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_METHOD:
|
||||
|
||||
Info->MethodCount++;
|
||||
|
||||
if (!(AcpiDbgLevel & ACPI_LV_INIT))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the execution data width (32 or 64) based upon the
|
||||
* revision number of the parent ACPI table.
|
||||
* TBD: This is really for possible future support of integer width
|
||||
* on a per-table basis. Currently, we just use a global for the width.
|
||||
*/
|
||||
if (Info->TableDesc->Pointer->Revision == 1)
|
||||
{
|
||||
((ACPI_NAMESPACE_NODE *) ObjHandle)->Flags |= ANOBJ_DATA_WIDTH_32;
|
||||
}
|
||||
|
||||
/*
|
||||
* Always parse methods to detect errors, we may delete
|
||||
* the parse tree below
|
||||
*/
|
||||
Status = AcpiDsParseMethod (ObjHandle);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
|
||||
ObjHandle, ((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Ascii,
|
||||
AcpiFormatException (Status)));
|
||||
|
||||
/* This parse failed, but we will continue parsing more methods */
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Delete the parse tree. We simple re-parse the method
|
||||
* for every execution since there isn't much overhead
|
||||
*/
|
||||
AcpiNsDeleteNamespaceSubtree (ObjHandle);
|
||||
AcpiNsDeleteNamespaceByOwner (((ACPI_NAMESPACE_NODE *) ObjHandle)->Object->Method.OwningId);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_DEVICE:
|
||||
|
||||
Info->DeviceCount++;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* We ignore errors from above, and always return OK, since
|
||||
* we don't want to abort the walk on a single error.
|
||||
*/
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsInitializeObjects
|
||||
*
|
||||
* PARAMETERS: TableDesc - Descriptor for parent ACPI table
|
||||
* StartNode - Root of subtree to be initialized.
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Walk the namespace starting at "StartNode" and perform any
|
||||
* necessary initialization on the objects found therein
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsInitializeObjects (
|
||||
ACPI_TABLE_DESC *TableDesc,
|
||||
ACPI_NAMESPACE_NODE *StartNode)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_INIT_WALK_INFO Info;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsInitializeObjects");
|
||||
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"**** Starting initialization of namespace objects ****\n"));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Parsing Methods:"));
|
||||
|
||||
Info.MethodCount = 0;
|
||||
Info.OpRegionCount = 0;
|
||||
Info.ObjectCount = 0;
|
||||
Info.DeviceCount = 0;
|
||||
Info.TableDesc = TableDesc;
|
||||
|
||||
/* Walk entire namespace from the supplied root */
|
||||
|
||||
Status = AcpiWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX,
|
||||
AcpiDsInitOneObject, &Info, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "WalkNamespace failed, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
|
||||
"\nTable [%4.4s] - %hd Objects with %hd Devices %hd Methods %hd Regions\n",
|
||||
TableDesc->Pointer->Signature, Info.ObjectCount,
|
||||
Info.DeviceCount, Info.MethodCount, Info.OpRegionCount));
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"%hd Methods, %hd Regions\n", Info.MethodCount, Info.OpRegionCount));
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDsBuildInternalObject
|
||||
@ -479,23 +291,24 @@ AcpiDsBuildInternalBufferObj (
|
||||
{
|
||||
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)
|
||||
else
|
||||
{
|
||||
AcpiUtDeleteObjectDesc (ObjDesc);
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
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) */
|
||||
/* Initialize buffer from the ByteList (if present) */
|
||||
|
||||
if (ByteList)
|
||||
{
|
||||
ACPI_MEMCPY (ObjDesc->Buffer.Pointer, ByteList->Named.Data,
|
||||
ByteListLength);
|
||||
if (ByteList)
|
||||
{
|
||||
ACPI_MEMCPY (ObjDesc->Buffer.Pointer, ByteList->Named.Data,
|
||||
ByteListLength);
|
||||
}
|
||||
}
|
||||
|
||||
ObjDesc->Buffer.Flags |= AOPOBJ_DATA_VALID;
|
||||
@ -685,7 +498,7 @@ AcpiDsCreateNode (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Re-type the object according to it's argument */
|
||||
/* Re-type the object according to its argument */
|
||||
|
||||
Node->Type = ACPI_GET_OBJECT_TYPE (ObjDesc);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dsopcode - Dispatcher Op Region support and handling of
|
||||
* "control" opcodes
|
||||
* $Revision: 83 $
|
||||
* $Revision: 85 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -273,7 +273,7 @@ AcpiDsGetBufferFieldArguments (
|
||||
ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
|
||||
Node = ObjDesc->BufferField.Node;
|
||||
|
||||
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Field]"));
|
||||
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (ACPI_TYPE_BUFFER_FIELD, Node, NULL));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] BufferField JIT Init\n",
|
||||
Node->Name.Ascii));
|
||||
|
||||
@ -423,7 +423,7 @@ AcpiDsGetRegionArguments (
|
||||
|
||||
Node = ObjDesc->Region.Node;
|
||||
|
||||
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Operation Region]"));
|
||||
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (ACPI_TYPE_REGION, Node, NULL));
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Init at AML %p\n",
|
||||
Node->Name.Ascii, ExtraDesc->Extra.AmlStart));
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: dsutils - Dispatcher utilities
|
||||
* $Revision: 97 $
|
||||
* $Revision: 99 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -445,7 +445,7 @@ AcpiDsCreateOperand (
|
||||
UINT32 ArgIndex)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
NATIVE_CHAR *NameString;
|
||||
char *NameString;
|
||||
UINT32 NameLength;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_PARSE_OBJECT *ParentOp;
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: dswexec - Dispatcher method execution callbacks;
|
||||
* dispatch to interpreter.
|
||||
* $Revision: 96 $
|
||||
* $Revision: 98 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -763,6 +763,14 @@ AcpiDsExecEndOp (
|
||||
AcpiDsDeleteResultIfNotUsed (Op, WalkState->ResultObj, WalkState);
|
||||
}
|
||||
|
||||
#if _UNDER_DEVELOPMENT
|
||||
|
||||
if (WalkState->ParserState.Aml == WalkState->ParserState.AmlEnd)
|
||||
{
|
||||
AcpiDbMethodEnd (WalkState);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Always clear the object stack */
|
||||
|
||||
WalkState->NumOperands = 0;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswload - Dispatcher namespace load callbacks
|
||||
* $Revision: 78 $
|
||||
* $Revision: 83 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -201,7 +201,7 @@ AcpiDsLoad1BeginOp (
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OBJECT_TYPE ObjectType;
|
||||
NATIVE_CHAR *Path;
|
||||
char *Path;
|
||||
UINT32 Flags;
|
||||
|
||||
|
||||
@ -284,7 +284,7 @@ AcpiDsLoad1BeginOp (
|
||||
case ACPI_TYPE_STRING:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
/*
|
||||
/*
|
||||
* These types we will allow, but we will change the type. This
|
||||
* enables some existing code of the form:
|
||||
*
|
||||
@ -294,7 +294,7 @@ AcpiDsLoad1BeginOp (
|
||||
* Note: silently change the type here. On the second pass, we will report a warning
|
||||
*/
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
|
||||
Path, AcpiUtGetTypeName (Node->Type)));
|
||||
|
||||
Node->Type = ACPI_TYPE_ANY;
|
||||
@ -305,7 +305,7 @@ AcpiDsLoad1BeginOp (
|
||||
|
||||
/* All other types are an error */
|
||||
|
||||
ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)\n",
|
||||
ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)\n",
|
||||
AcpiUtGetTypeName (Node->Type), Path));
|
||||
|
||||
return (AE_AML_OPERAND_TYPE);
|
||||
@ -319,15 +319,15 @@ AcpiDsLoad1BeginOp (
|
||||
* For all other named opcodes, we will enter the name into the namespace.
|
||||
*
|
||||
* Setup the search flags.
|
||||
* Since we are entering a name into the namespace, we do not want to
|
||||
* Since we are entering a name into the namespace, we do not want to
|
||||
* enable the search-to-root upsearch.
|
||||
*
|
||||
* There are only two conditions where it is acceptable that the name
|
||||
* already exists:
|
||||
* 1) the Scope() operator can reopen a scoping object that was
|
||||
* 1) the Scope() operator can reopen a scoping object that was
|
||||
* previously defined (Scope, Method, Device, etc.)
|
||||
* 2) Whenever we are parsing a deferred opcode (OpRegion, Buffer,
|
||||
* BufferField, or Package), the name of the object is already
|
||||
* 2) Whenever we are parsing a deferred opcode (OpRegion, Buffer,
|
||||
* BufferField, or Package), the name of the object is already
|
||||
* in the namespace.
|
||||
*/
|
||||
Flags = ACPI_NS_NO_UPSEARCH;
|
||||
@ -468,6 +468,41 @@ AcpiDsLoad1EndOp (
|
||||
}
|
||||
}
|
||||
|
||||
if (Op->Common.AmlOpcode == AML_METHOD_OP)
|
||||
{
|
||||
/*
|
||||
* MethodOp PkgLength NameString MethodFlags TermList
|
||||
*
|
||||
* Note: We must create the method node/object pair as soon as we
|
||||
* see the method declaration. This allows later pass1 parsing
|
||||
* of invocations of the method (need to know the number of
|
||||
* arguments.)
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Method: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Op->Named.Node));
|
||||
|
||||
if (!AcpiNsGetAttachedObject (Op->Named.Node))
|
||||
{
|
||||
WalkState->Operands[0] = (void *) Op->Named.Node;
|
||||
WalkState->NumOperands = 1;
|
||||
|
||||
Status = AcpiDsCreateOperands (WalkState, Op->Common.Value.Arg);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
Status = AcpiExCreateMethod (Op->Named.Data,
|
||||
Op->Named.Length, WalkState);
|
||||
}
|
||||
WalkState->Operands[0] = NULL;
|
||||
WalkState->NumOperands = 0;
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Pop the scope stack */
|
||||
|
||||
if (AcpiNsOpensScope (ObjectType))
|
||||
@ -505,7 +540,7 @@ AcpiDsLoad2BeginOp (
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OBJECT_TYPE ObjectType;
|
||||
NATIVE_CHAR *BufferPtr;
|
||||
char *BufferPtr;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("DsLoad2BeginOp");
|
||||
@ -543,7 +578,7 @@ AcpiDsLoad2BeginOp (
|
||||
{
|
||||
/* Get name from the op */
|
||||
|
||||
BufferPtr = (NATIVE_CHAR *) &Op->Named.Name;
|
||||
BufferPtr = (char *) &Op->Named.Name;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -613,7 +648,7 @@ AcpiDsLoad2BeginOp (
|
||||
case ACPI_TYPE_STRING:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
/*
|
||||
/*
|
||||
* These types we will allow, but we will change the type. This
|
||||
* enables some existing code of the form:
|
||||
*
|
||||
@ -621,7 +656,7 @@ AcpiDsLoad2BeginOp (
|
||||
* Scope (DEB) { ... }
|
||||
*/
|
||||
|
||||
ACPI_REPORT_WARNING (("Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
|
||||
ACPI_REPORT_WARNING (("Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
|
||||
BufferPtr, AcpiUtGetTypeName (Node->Type)));
|
||||
|
||||
Node->Type = ACPI_TYPE_ANY;
|
||||
@ -632,7 +667,7 @@ AcpiDsLoad2BeginOp (
|
||||
|
||||
/* All other types are an error */
|
||||
|
||||
ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s]\n",
|
||||
ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s]\n",
|
||||
AcpiUtGetTypeName (Node->Type), BufferPtr));
|
||||
|
||||
return (AE_AML_OPERAND_TYPE);
|
||||
@ -785,11 +820,10 @@ AcpiDsLoad2EndOp (
|
||||
Status = AcpiDsScopeStackPop (WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
goto Cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Named operations are as follows:
|
||||
*
|
||||
@ -929,28 +963,6 @@ AcpiDsLoad2EndOp (
|
||||
|
||||
switch (Op->Common.AmlOpcode)
|
||||
{
|
||||
case AML_METHOD_OP:
|
||||
/*
|
||||
* MethodOp PkgLength NameString MethodFlags TermList
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"LOADING-Method: State=%p Op=%p NamedObj=%p\n",
|
||||
WalkState, Op, Node));
|
||||
|
||||
if (!AcpiNsGetAttachedObject (Node))
|
||||
{
|
||||
Status = AcpiDsCreateOperands (WalkState, Arg);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiExCreateMethod (Op->Named.Data,
|
||||
Op->Named.Length, WalkState);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
||||
case AML_REGION_OP:
|
||||
/*
|
||||
@ -986,6 +998,7 @@ AcpiDsLoad2EndOp (
|
||||
|
||||
default:
|
||||
/* All NAMED_COMPLEX opcodes must be handled above */
|
||||
/* Note: Method objects were already created in Pass 1 */
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1038,7 +1051,6 @@ AcpiDsLoad2EndOp (
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Cleanup:
|
||||
|
||||
/* Remove the Node pushed at the very beginning */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswscope - Scope stack manipulation
|
||||
* $Revision: 56 $
|
||||
* $Revision: 57 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dswstate - Dispatcher parse tree walk management routines
|
||||
* $Revision: 70 $
|
||||
* $Revision: 75 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -159,7 +159,7 @@ AcpiDsResultInsert (
|
||||
return (AE_NOT_EXIST);
|
||||
}
|
||||
|
||||
if (Index >= OBJ_NUM_OPERANDS)
|
||||
if (Index >= ACPI_OBJ_NUM_OPERANDS)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Index out of range: %X Obj=%p State=%p Num=%X\n",
|
||||
@ -221,7 +221,7 @@ AcpiDsResultRemove (
|
||||
return (AE_NOT_EXIST);
|
||||
}
|
||||
|
||||
if (Index >= OBJ_MAX_OPERAND)
|
||||
if (Index >= ACPI_OBJ_MAX_OPERAND)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Index out of range: %X State=%p Num=%X\n",
|
||||
@ -273,7 +273,7 @@ AcpiDsResultPop (
|
||||
ACPI_OPERAND_OBJECT **Object,
|
||||
ACPI_WALK_STATE *WalkState)
|
||||
{
|
||||
NATIVE_UINT Index;
|
||||
ACPI_NATIVE_UINT Index;
|
||||
ACPI_GENERIC_STATE *State;
|
||||
|
||||
|
||||
@ -297,7 +297,7 @@ AcpiDsResultPop (
|
||||
|
||||
State->Results.NumResults--;
|
||||
|
||||
for (Index = OBJ_NUM_OPERANDS; Index; Index--)
|
||||
for (Index = ACPI_OBJ_NUM_OPERANDS; Index; Index--)
|
||||
{
|
||||
/* Check for a valid result object */
|
||||
|
||||
@ -337,7 +337,7 @@ AcpiDsResultPopFromBottom (
|
||||
ACPI_OPERAND_OBJECT **Object,
|
||||
ACPI_WALK_STATE *WalkState)
|
||||
{
|
||||
NATIVE_UINT Index;
|
||||
ACPI_NATIVE_UINT Index;
|
||||
ACPI_GENERIC_STATE *State;
|
||||
|
||||
|
||||
@ -420,7 +420,7 @@ AcpiDsResultPush (
|
||||
return (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
if (State->Results.NumResults == OBJ_NUM_OPERANDS)
|
||||
if (State->Results.NumResults == ACPI_OBJ_NUM_OPERANDS)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Result stack overflow: Obj=%p State=%p Num=%X\n",
|
||||
@ -552,7 +552,7 @@ AcpiDsObjStackDeleteAll (
|
||||
|
||||
/* The stack size is configurable, but fixed */
|
||||
|
||||
for (i = 0; i < OBJ_NUM_OPERANDS; i++)
|
||||
for (i = 0; i < ACPI_OBJ_NUM_OPERANDS; i++)
|
||||
{
|
||||
if (WalkState->Operands[i])
|
||||
{
|
||||
@ -588,7 +588,7 @@ AcpiDsObjStackPush (
|
||||
|
||||
/* Check for stack overflow */
|
||||
|
||||
if (WalkState->NumOperands >= OBJ_NUM_OPERANDS)
|
||||
if (WalkState->NumOperands >= ACPI_OBJ_NUM_OPERANDS)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"overflow! Obj=%p State=%p #Ops=%X\n",
|
||||
@ -813,7 +813,7 @@ AcpiDsObjStackGetValue (
|
||||
return_PTR (NULL);
|
||||
}
|
||||
|
||||
return_PTR (WalkState->Operands[(NATIVE_UINT)(WalkState->NumOperands - 1) -
|
||||
return_PTR (WalkState->Operands[(ACPI_NATIVE_UINT)(WalkState->NumOperands - 1) -
|
||||
Index]);
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ AcpiDsGetCurrentWalkState (
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "DsGetCurrentWalkState, =%p\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Current WalkState %p\n",
|
||||
Thread->WalkStateList));
|
||||
|
||||
return (Thread->WalkStateList);
|
||||
@ -1054,7 +1054,7 @@ AcpiDsInitAmlWalk (
|
||||
|
||||
/* Init the method arguments */
|
||||
|
||||
Status = AcpiDsMethodDataInitArgs (Params, MTH_NUM_ARGS, WalkState);
|
||||
Status = AcpiDsMethodDataInitArgs (Params, ACPI_METHOD_NUM_ARGS, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -1062,7 +1062,7 @@ AcpiDsInitAmlWalk (
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Setup the current scope.
|
||||
* Find a Named Op that has a namespace node associated with it.
|
||||
* search upwards from this Op. Current scope is the first
|
||||
@ -1081,7 +1081,7 @@ AcpiDsInitAmlWalk (
|
||||
{
|
||||
ParserState->StartNode = ExtraOp->Common.Node;
|
||||
}
|
||||
|
||||
|
||||
if (ParserState->StartNode)
|
||||
{
|
||||
/* Push start scope on scope stack and make it current */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evevent - Fixed and General Purpose Even handling and dispatch
|
||||
* $Revision: 96 $
|
||||
* Module Name: evevent - Fixed Event handling and dispatch
|
||||
* $Revision: 108 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -116,7 +116,6 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acevents.h"
|
||||
#include "acnamesp.h"
|
||||
|
||||
#define _COMPONENT ACPI_EVENTS
|
||||
ACPI_MODULE_NAME ("evevent")
|
||||
@ -154,13 +153,13 @@ AcpiEvInitialize (
|
||||
|
||||
/*
|
||||
* Initialize the Fixed and General Purpose AcpiEvents prior. This is
|
||||
* done prior to enabling SCIs to prevent interrupts from occuring
|
||||
* done prior to enabling SCIs to prevent interrupts from occurring
|
||||
* before handers are installed.
|
||||
*/
|
||||
Status = AcpiEvFixedEventInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
|
||||
ACPI_REPORT_ERROR ((
|
||||
"Unable to initialize fixed events, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -169,7 +168,7 @@ AcpiEvInitialize (
|
||||
Status = AcpiEvGpeInitialize ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
|
||||
ACPI_REPORT_ERROR ((
|
||||
"Unable to initialize general purpose events, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -187,7 +186,7 @@ AcpiEvInitialize (
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Install handlers for the SCI, Global Lock, and GPEs.
|
||||
* DESCRIPTION: Install interrupt handlers for the SCI and Global Lock
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -206,29 +205,18 @@ AcpiEvHandlerInitialize (
|
||||
Status = AcpiEvInstallSciHandler ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
|
||||
ACPI_REPORT_ERROR ((
|
||||
"Unable to install System Control Interrupt Handler, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Install handlers for control method GPE handlers (_Lxx, _Exx) */
|
||||
|
||||
Status = AcpiEvInitGpeControlMethods ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
|
||||
"Unable to initialize GPE control methods, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Install the handler for the Global Lock */
|
||||
|
||||
Status = AcpiEvInitGlobalLockHandler ();
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_FATAL,
|
||||
ACPI_REPORT_ERROR ((
|
||||
"Unable to initialize Global Lock handler, %s\n",
|
||||
AcpiFormatException (Status)));
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -255,7 +243,7 @@ ACPI_STATUS
|
||||
AcpiEvFixedEventInitialize (
|
||||
void)
|
||||
{
|
||||
NATIVE_UINT i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
@ -304,7 +292,7 @@ AcpiEvFixedEventDetect (
|
||||
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
|
||||
UINT32 FixedStatus;
|
||||
UINT32 FixedEnable;
|
||||
NATIVE_UINT_MAX32 i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME ("EvFixedEventDetect");
|
||||
@ -333,7 +321,7 @@ AcpiEvFixedEventDetect (
|
||||
{
|
||||
/* Found an active (signalled) event */
|
||||
|
||||
IntStatus |= AcpiEvFixedEventDispatch (i);
|
||||
IntStatus |= AcpiEvFixedEventDispatch ((UINT32) i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -391,705 +379,3 @@ AcpiEvFixedEventDispatch (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvGpeInitialize
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Initialize the GPE data structures
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvGpeInitialize (void)
|
||||
{
|
||||
NATIVE_UINT_MAX32 i;
|
||||
NATIVE_UINT_MAX32 j;
|
||||
UINT32 GpeBlock;
|
||||
UINT32 GpeRegister;
|
||||
UINT32 GpeNumberIndex;
|
||||
UINT32 GpeNumber;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("EvGpeInitialize");
|
||||
|
||||
|
||||
/*
|
||||
* Initialize the GPE Block globals
|
||||
*
|
||||
* Why the GPE register block lengths divided by 2: From the ACPI Spec,
|
||||
* section "General-Purpose Event Registers", we have:
|
||||
*
|
||||
* "Each register block contains two registers of equal length
|
||||
* GPEx_STS and GPEx_EN (where x is 0 or 1). The length of the
|
||||
* GPE0_STS and GPE0_EN registers is equal to half the GPE0_LEN
|
||||
* The length of the GPE1_STS and GPE1_EN registers is equal to
|
||||
* half the GPE1_LEN. If a generic register block is not supported
|
||||
* then its respective block pointer and block length values in the
|
||||
* FADT table contain zeros. The GPE0_LEN and GPE1_LEN do not need
|
||||
* to be the same size."
|
||||
*/
|
||||
AcpiGbl_GpeBlockInfo[0].AddressSpaceId = AcpiGbl_FADT->XGpe0Blk.AddressSpaceId;
|
||||
AcpiGbl_GpeBlockInfo[1].AddressSpaceId = AcpiGbl_FADT->XGpe1Blk.AddressSpaceId;
|
||||
|
||||
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;
|
||||
|
||||
/* Warn and exit if there are no GPE registers */
|
||||
|
||||
AcpiGbl_GpeRegisterCount = AcpiGbl_GpeBlockInfo[0].RegisterCount +
|
||||
AcpiGbl_GpeBlockInfo[1].RegisterCount;
|
||||
if (!AcpiGbl_GpeRegisterCount)
|
||||
{
|
||||
ACPI_REPORT_WARNING (("There are no GPE blocks defined in the FADT\n"));
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine the maximum GPE number for this machine.
|
||||
* Note: both GPE0 and GPE1 are optional, and either can exist without
|
||||
* the other
|
||||
*/
|
||||
if (AcpiGbl_GpeBlockInfo[0].RegisterCount)
|
||||
{
|
||||
/* GPE block 0 exists */
|
||||
|
||||
AcpiGbl_GpeNumberMax = ACPI_MUL_8 (AcpiGbl_GpeBlockInfo[0].RegisterCount) - 1;
|
||||
}
|
||||
|
||||
if (AcpiGbl_GpeBlockInfo[1].RegisterCount)
|
||||
{
|
||||
/* GPE block 1 exists */
|
||||
|
||||
/* Check for GPE0/GPE1 overlap (if both banks exist) */
|
||||
|
||||
if ((AcpiGbl_GpeBlockInfo[0].RegisterCount) &&
|
||||
(AcpiGbl_GpeNumberMax >= AcpiGbl_FADT->Gpe1Base))
|
||||
{
|
||||
ACPI_REPORT_ERROR ((
|
||||
"GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d)\n",
|
||||
AcpiGbl_GpeNumberMax, AcpiGbl_FADT->Gpe1Base,
|
||||
AcpiGbl_FADT->Gpe1Base + (ACPI_MUL_8 (AcpiGbl_GpeBlockInfo[1].RegisterCount) - 1)));
|
||||
return_ACPI_STATUS (AE_BAD_VALUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* GPE0 and GPE1 do not have to be contiguous in the GPE number space,
|
||||
* But, GPE0 always starts at zero.
|
||||
*/
|
||||
AcpiGbl_GpeNumberMax = AcpiGbl_FADT->Gpe1Base +
|
||||
(ACPI_MUL_8 (AcpiGbl_GpeBlockInfo[1].RegisterCount) - 1);
|
||||
}
|
||||
|
||||
/* Check for Max GPE number out-of-range */
|
||||
|
||||
if (AcpiGbl_GpeNumberMax > ACPI_GPE_MAX)
|
||||
{
|
||||
ACPI_REPORT_ERROR (("Maximum GPE number from FADT is too large: 0x%X\n",
|
||||
AcpiGbl_GpeNumberMax));
|
||||
return_ACPI_STATUS (AE_BAD_VALUE);
|
||||
}
|
||||
|
||||
/* Allocate the GPE number-to-index translation table */
|
||||
|
||||
AcpiGbl_GpeNumberToIndex = ACPI_MEM_CALLOCATE (
|
||||
sizeof (ACPI_GPE_INDEX_INFO) *
|
||||
((ACPI_SIZE) AcpiGbl_GpeNumberMax + 1));
|
||||
if (!AcpiGbl_GpeNumberToIndex)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Could not allocate the GpeNumberToIndex table\n"));
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/* Set the Gpe index table to GPE_INVALID */
|
||||
|
||||
ACPI_MEMSET (AcpiGbl_GpeNumberToIndex, (int) ACPI_GPE_INVALID,
|
||||
sizeof (ACPI_GPE_INDEX_INFO) * ((ACPI_SIZE) AcpiGbl_GpeNumberMax + 1));
|
||||
|
||||
/* Allocate the GPE register information block */
|
||||
|
||||
AcpiGbl_GpeRegisterInfo = ACPI_MEM_CALLOCATE (
|
||||
(ACPI_SIZE) AcpiGbl_GpeRegisterCount *
|
||||
sizeof (ACPI_GPE_REGISTER_INFO));
|
||||
if (!AcpiGbl_GpeRegisterInfo)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Could not allocate the GpeRegisterInfo table\n"));
|
||||
goto ErrorExit1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the GPE dispatch handler block. There are eight distinct GPEs
|
||||
* per register. Initialization to zeros is sufficient.
|
||||
*/
|
||||
AcpiGbl_GpeNumberInfo = ACPI_MEM_CALLOCATE (
|
||||
(ACPI_SIZE) ACPI_MUL_8 (AcpiGbl_GpeRegisterCount) *
|
||||
sizeof (ACPI_GPE_NUMBER_INFO));
|
||||
if (!AcpiGbl_GpeNumberInfo)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not allocate the GpeNumberInfo table\n"));
|
||||
goto ErrorExit2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the GPE information and validation tables. A goal of these
|
||||
* tables is to hide the fact that there are two separate GPE register sets
|
||||
* in a given gpe hardware block, the status registers occupy the first half,
|
||||
* and the enable registers occupy the second half. Another goal is to hide
|
||||
* the fact that there may be multiple GPE hardware blocks.
|
||||
*/
|
||||
GpeRegister = 0;
|
||||
GpeNumberIndex = 0;
|
||||
|
||||
for (GpeBlock = 0; GpeBlock < ACPI_MAX_GPE_BLOCKS; GpeBlock++)
|
||||
{
|
||||
for (i = 0; i < AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount; i++)
|
||||
{
|
||||
GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[GpeRegister];
|
||||
|
||||
/* Init the Register info for this entire GPE register (8 GPEs) */
|
||||
|
||||
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 */
|
||||
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
GpeNumber = GpeRegisterInfo->BaseGpeNumber + j;
|
||||
AcpiGbl_GpeNumberToIndex[GpeNumber].NumberIndex = (UINT8) GpeNumberIndex;
|
||||
|
||||
AcpiGbl_GpeNumberInfo[GpeNumberIndex].BitMask = AcpiGbl_DecodeTo8bit[j];
|
||||
GpeNumberIndex++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the status/enable registers. Note that status registers
|
||||
* are cleared by writing a '1', while enable registers are cleared
|
||||
* by writing a '0'.
|
||||
*/
|
||||
Status = AcpiHwLowLevelWrite (8, 0x00, &GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Status = AcpiHwLowLevelWrite (8, 0xFF, &GpeRegisterInfo->StatusAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
GpeRegister++;
|
||||
}
|
||||
|
||||
if (i)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d: %X registers at %8.8X%8.8X\n",
|
||||
(INT32) GpeBlock, AcpiGbl_GpeBlockInfo[0].RegisterCount,
|
||||
ACPI_HIDWORD (ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address)),
|
||||
ACPI_LODWORD (ACPI_GET_ADDRESS (AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress->Address))));
|
||||
|
||||
ACPI_REPORT_INFO (("GPE Block%d defined as GPE%d to GPE%d\n",
|
||||
(INT32) GpeBlock,
|
||||
(UINT32) AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber,
|
||||
(UINT32) (AcpiGbl_GpeBlockInfo[GpeBlock].BlockBaseNumber +
|
||||
((AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount * 8) -1))));
|
||||
}
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
|
||||
|
||||
/* Error cleanup */
|
||||
|
||||
ErrorExit2:
|
||||
ACPI_MEM_FREE (AcpiGbl_GpeRegisterInfo);
|
||||
|
||||
ErrorExit1:
|
||||
ACPI_MEM_FREE (AcpiGbl_GpeNumberToIndex);
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvSaveMethodInfo
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Called from AcpiWalkNamespace. Expects each object to be a
|
||||
* control method under the _GPE portion of the namespace.
|
||||
* Extract the name and GPE type from the object, saving this
|
||||
* information for quick lookup during GPE dispatch
|
||||
*
|
||||
* The name of each GPE control method is of the form:
|
||||
* "_Lnn" or "_Enn"
|
||||
* Where:
|
||||
* L - means that the GPE is level triggered
|
||||
* E - means that the GPE is edge triggered
|
||||
* nn - is the GPE number [in HEX]
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiEvSaveMethodInfo (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 Level,
|
||||
void *ObjDesc,
|
||||
void **ReturnValue)
|
||||
{
|
||||
UINT32 GpeNumber;
|
||||
UINT32 GpeNumberIndex;
|
||||
NATIVE_CHAR Name[ACPI_NAME_SIZE + 1];
|
||||
UINT8 Type;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME ("EvSaveMethodInfo");
|
||||
|
||||
|
||||
/* Extract the name from the object and convert to a string */
|
||||
|
||||
ACPI_MOVE_UNALIGNED32_TO_32 (Name,
|
||||
&((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Integer);
|
||||
Name[ACPI_NAME_SIZE] = 0;
|
||||
|
||||
/*
|
||||
* Edge/Level determination is based on the 2nd character of the method name
|
||||
*/
|
||||
switch (Name[1])
|
||||
{
|
||||
case 'L':
|
||||
Type = ACPI_EVENT_LEVEL_TRIGGERED;
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
Type = ACPI_EVENT_EDGE_TRIGGERED;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Unknown method type, just ignore it! */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Unknown GPE method type: %s (name not of form _Lnn or _Enn)\n",
|
||||
Name));
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Convert the last two characters of the name to the GPE Number */
|
||||
|
||||
GpeNumber = ACPI_STRTOUL (&Name[2], NULL, 16);
|
||||
if (GpeNumber == ACPI_UINT32_MAX)
|
||||
{
|
||||
/* Conversion failed; invalid method, just ignore it */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Could not extract GPE number from name: %s (name not of form _Lnn or _Enn)\n",
|
||||
Name));
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Get GPE index and ensure that we have a valid GPE number */
|
||||
|
||||
GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
|
||||
if (GpeNumberIndex == ACPI_GPE_INVALID)
|
||||
{
|
||||
/* Not valid, all we can do here is ignore it */
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we can add this information to the GpeInfo block
|
||||
* for use during dispatch of this GPE.
|
||||
*/
|
||||
AcpiGbl_GpeNumberInfo [GpeNumberIndex].Type = Type;
|
||||
AcpiGbl_GpeNumberInfo [GpeNumberIndex].MethodHandle = ObjHandle;
|
||||
|
||||
/*
|
||||
* Enable the GPE (SCIs should be disabled at this point)
|
||||
*/
|
||||
Status = AcpiHwEnableGpe (GpeNumber);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Registered GPE method %s as GPE number %X\n",
|
||||
Name, GpeNumber));
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvInitGpeControlMethods
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Obtain the control methods associated with the GPEs.
|
||||
* NOTE: Must be called AFTER namespace initialization!
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvInitGpeControlMethods (void)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("EvInitGpeControlMethods");
|
||||
|
||||
|
||||
/* Get a permanent handle to the _GPE object */
|
||||
|
||||
Status = AcpiGetHandle (NULL, "\\_GPE", &AcpiGbl_GpeObjHandle);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Traverse the namespace under \_GPE to find all methods there */
|
||||
|
||||
Status = AcpiWalkNamespace (ACPI_TYPE_METHOD, AcpiGbl_GpeObjHandle,
|
||||
ACPI_UINT32_MAX, AcpiEvSaveMethodInfo,
|
||||
NULL, NULL);
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvGpeDetect
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
|
||||
*
|
||||
* DESCRIPTION: Detect if any GP events have occurred. This function is
|
||||
* executed at interrupt level.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT32
|
||||
AcpiEvGpeDetect (void)
|
||||
{
|
||||
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
|
||||
UINT32 i;
|
||||
UINT32 j;
|
||||
UINT8 EnabledStatusByte;
|
||||
UINT8 BitMask;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
UINT32 InValue;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME ("EvGpeDetect");
|
||||
|
||||
|
||||
/*
|
||||
* Read all of the 8-bit GPE status and enable registers
|
||||
* in both of the register blocks, saving all of it.
|
||||
* Find all currently active GP events.
|
||||
*/
|
||||
for (i = 0; i < AcpiGbl_GpeRegisterCount; i++)
|
||||
{
|
||||
GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[i];
|
||||
|
||||
Status = AcpiHwLowLevelRead (8, &InValue, &GpeRegisterInfo->StatusAddress, 0);
|
||||
GpeRegisterInfo->Status = (UINT8) InValue;
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
|
||||
Status = AcpiHwLowLevelRead (8, &InValue, &GpeRegisterInfo->EnableAddress, 0);
|
||||
GpeRegisterInfo->Enable = (UINT8) InValue;
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
|
||||
"GPE block at %8.8X%8.8X - Values: Enable %02X Status %02X\n",
|
||||
ACPI_HIDWORD (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)),
|
||||
ACPI_LODWORD (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)),
|
||||
GpeRegisterInfo->Enable,
|
||||
GpeRegisterInfo->Status));
|
||||
|
||||
/* First check if there is anything active at all in this register */
|
||||
|
||||
EnabledStatusByte = (UINT8) (GpeRegisterInfo->Status &
|
||||
GpeRegisterInfo->Enable);
|
||||
if (!EnabledStatusByte)
|
||||
{
|
||||
/* No active GPEs in this register, move on */
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Now look at the individual GPEs in this byte register */
|
||||
|
||||
for (j = 0, BitMask = 1; j < 8; j++, BitMask <<= 1)
|
||||
{
|
||||
/* Examine one GPE bit */
|
||||
|
||||
if (EnabledStatusByte & BitMask)
|
||||
{
|
||||
/*
|
||||
* Found an active GPE. Dispatch the event to a handler
|
||||
* or method.
|
||||
*/
|
||||
IntStatus |= AcpiEvGpeDispatch (
|
||||
GpeRegisterInfo->BaseGpeNumber + j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (IntStatus);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvAsynchExecuteGpeMethod
|
||||
*
|
||||
* PARAMETERS: GpeNumber - The 0-based GPE number
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Perform the actual execution of a GPE control method. This
|
||||
* function is called from an invocation of AcpiOsQueueForExecution
|
||||
* (and therefore does NOT execute at interrupt level) so that
|
||||
* the control method itself is not executed in the context of
|
||||
* the SCI interrupt handler.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void ACPI_SYSTEM_XFACE
|
||||
AcpiEvAsynchExecuteGpeMethod (
|
||||
void *Context)
|
||||
{
|
||||
UINT32 GpeNumber = (UINT32) ACPI_TO_INTEGER (Context);
|
||||
UINT32 GpeNumberIndex;
|
||||
ACPI_GPE_NUMBER_INFO GpeInfo;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("EvAsynchExecuteGpeMethod");
|
||||
|
||||
|
||||
GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
|
||||
if (GpeNumberIndex == ACPI_GPE_INVALID)
|
||||
{
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/*
|
||||
* Take a snapshot of the GPE info for this level - we copy the
|
||||
* info to prevent a race condition with RemoveHandler.
|
||||
*/
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
GpeInfo = AcpiGbl_GpeNumberInfo [GpeNumberIndex];
|
||||
Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
if (GpeInfo.MethodHandle)
|
||||
{
|
||||
/*
|
||||
* Invoke the GPE Method (_Lxx, _Exx):
|
||||
* (Evaluate the _Lxx/_Exx control method that corresponds to this GPE.)
|
||||
*/
|
||||
Status = AcpiNsEvaluateByHandle (GpeInfo.MethodHandle, NULL, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("%s while evaluating GPE%X method\n",
|
||||
AcpiFormatException (Status), GpeNumber));
|
||||
}
|
||||
}
|
||||
|
||||
if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
|
||||
{
|
||||
/*
|
||||
* GPE is level-triggered, we clear the GPE status bit after handling
|
||||
* the event.
|
||||
*/
|
||||
Status = AcpiHwClearGpe (GpeNumber);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_VOID;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable the GPE.
|
||||
*/
|
||||
(void) AcpiHwEnableGpe (GpeNumber);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvGpeDispatch
|
||||
*
|
||||
* PARAMETERS: GpeNumber - The 0-based GPE number
|
||||
*
|
||||
* RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
|
||||
*
|
||||
* DESCRIPTION: Dispatch a General Purpose Event to either a function (e.g. EC)
|
||||
* or method (e.g. _Lxx/_Exx) handler. This function executes
|
||||
* at interrupt level.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT32
|
||||
AcpiEvGpeDispatch (
|
||||
UINT32 GpeNumber)
|
||||
{
|
||||
UINT32 GpeNumberIndex;
|
||||
ACPI_GPE_NUMBER_INFO *GpeInfo;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("EvGpeDispatch");
|
||||
|
||||
|
||||
GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
|
||||
if (GpeNumberIndex == ACPI_GPE_INVALID)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "GPE[%X] is not a valid event\n", GpeNumber));
|
||||
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't have to worry about mutex on GpeInfo because we are
|
||||
* executing at interrupt level.
|
||||
*/
|
||||
GpeInfo = &AcpiGbl_GpeNumberInfo [GpeNumberIndex];
|
||||
|
||||
/*
|
||||
* If edge-triggered, clear the GPE status bit now. Note that
|
||||
* level-triggered events are cleared after the GPE is serviced.
|
||||
*/
|
||||
if (GpeInfo->Type & ACPI_EVENT_EDGE_TRIGGERED)
|
||||
{
|
||||
Status = AcpiHwClearGpe (GpeNumber);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to clear GPE[%X]\n", GpeNumber));
|
||||
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Dispatch the GPE to either an installed handler, or the control
|
||||
* method associated with this GPE (_Lxx or _Exx).
|
||||
* If a handler exists, we invoke it and do not attempt to run the method.
|
||||
* If there is neither a handler nor a method, we disable the level to
|
||||
* prevent further events from coming in here.
|
||||
*/
|
||||
if (GpeInfo->Handler)
|
||||
{
|
||||
/* Invoke the installed handler (at interrupt level) */
|
||||
|
||||
GpeInfo->Handler (GpeInfo->Context);
|
||||
}
|
||||
else if (GpeInfo->MethodHandle)
|
||||
{
|
||||
/*
|
||||
* Disable GPE, so it doesn't keep firing before the method has a
|
||||
* chance to run.
|
||||
*/
|
||||
Status = AcpiHwDisableGpe (GpeNumber);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to disable GPE[%X]\n", GpeNumber));
|
||||
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute the method associated with the GPE.
|
||||
*/
|
||||
if (ACPI_FAILURE (AcpiOsQueueForExecution (OSD_PRIORITY_GPE,
|
||||
AcpiEvAsynchExecuteGpeMethod,
|
||||
ACPI_TO_POINTER (GpeNumber))))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to queue handler for GPE[%X], event is disabled\n", GpeNumber));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No handler or method to run! */
|
||||
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: No handler or method for GPE[%X], disabling event\n", GpeNumber));
|
||||
|
||||
/*
|
||||
* Disable the GPE. The GPE will remain disabled until the ACPI
|
||||
* Core Subsystem is restarted, or the handler is reinstalled.
|
||||
*/
|
||||
Status = AcpiHwDisableGpe (GpeNumber);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to disable GPE[%X]\n", GpeNumber));
|
||||
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* It is now safe to clear level-triggered evnets.
|
||||
*/
|
||||
if (GpeInfo->Type & ACPI_EVENT_LEVEL_TRIGGERED)
|
||||
{
|
||||
Status = AcpiHwClearGpe (GpeNumber);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("AcpiEvGpeDispatch: Unable to clear GPE[%X]\n", GpeNumber));
|
||||
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
}
|
||||
|
||||
return_VALUE (ACPI_INTERRUPT_HANDLED);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evmisc - Miscellaneous event manager support functions
|
||||
* $Revision: 59 $
|
||||
* $Revision: 64 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -158,60 +158,6 @@ AcpiEvIsNotifyObject (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvGetGpeRegisterIndex
|
||||
*
|
||||
* PARAMETERS: GpeNumber - Raw GPE number
|
||||
*
|
||||
* RETURN: None.
|
||||
*
|
||||
* DESCRIPTION: Returns the register index (index into the GPE register info
|
||||
* table) associated with this GPE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT32
|
||||
AcpiEvGetGpeRegisterIndex (
|
||||
UINT32 GpeNumber)
|
||||
{
|
||||
|
||||
if (GpeNumber > AcpiGbl_GpeNumberMax)
|
||||
{
|
||||
return (ACPI_GPE_INVALID);
|
||||
}
|
||||
|
||||
return (ACPI_DIV_8 (AcpiGbl_GpeNumberToIndex[GpeNumber].NumberIndex));
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvGetGpeNumberIndex
|
||||
*
|
||||
* PARAMETERS: GpeNumber - Raw GPE number
|
||||
*
|
||||
* RETURN: None.
|
||||
*
|
||||
* DESCRIPTION: Returns the number index (index into the GPE number info table)
|
||||
* associated with this GPE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT32
|
||||
AcpiEvGetGpeNumberIndex (
|
||||
UINT32 GpeNumber)
|
||||
{
|
||||
|
||||
if (GpeNumber > AcpiGbl_GpeNumberMax)
|
||||
{
|
||||
return (ACPI_GPE_INVALID);
|
||||
}
|
||||
|
||||
return (AcpiGbl_GpeNumberToIndex[GpeNumber].NumberIndex);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvQueueNotifyRequest
|
||||
@ -331,7 +277,7 @@ AcpiEvQueueNotifyRequest (
|
||||
{
|
||||
/* There is no per-device notify handler for this device */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"No notify handler for [%4.4s] node %p\n", Node->Name.Ascii, Node));
|
||||
}
|
||||
|
||||
@ -675,8 +621,11 @@ AcpiEvReleaseGlobalLock (void)
|
||||
void
|
||||
AcpiEvTerminate (void)
|
||||
{
|
||||
NATIVE_UINT_MAX32 i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock;
|
||||
ACPI_GPE_BLOCK_INFO *NextGpeBlock;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("EvTerminate");
|
||||
@ -694,32 +643,38 @@ AcpiEvTerminate (void)
|
||||
*/
|
||||
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
|
||||
{
|
||||
Status = AcpiDisableEvent(i, ACPI_EVENT_FIXED, 0);
|
||||
Status = AcpiDisableEvent ((UINT32) i, ACPI_EVENT_FIXED, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable fixed event %d\n", i));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable fixed event %d\n", (UINT32) i));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Disable all GPEs
|
||||
*/
|
||||
for (i = 0; i < AcpiGbl_GpeNumberMax; i++)
|
||||
GpeBlock = AcpiGbl_GpeBlockListHead;
|
||||
while (GpeBlock)
|
||||
{
|
||||
if (AcpiEvGetGpeNumberIndex(i) != ACPI_GPE_INVALID)
|
||||
GpeEventInfo = GpeBlock->EventInfo;
|
||||
for (i = 0; i < (GpeBlock->RegisterCount * 8); i++)
|
||||
{
|
||||
Status = AcpiHwDisableGpe(i);
|
||||
Status = AcpiHwDisableGpe (GpeEventInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable GPE %d\n", i));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not disable GPE %d\n", (UINT32) i));
|
||||
}
|
||||
|
||||
GpeEventInfo++;
|
||||
}
|
||||
|
||||
GpeBlock = GpeBlock->Next;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove SCI handler
|
||||
*/
|
||||
Status = AcpiEvRemoveSciHandler();
|
||||
Status = AcpiEvRemoveSciHandler ();
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not remove SCI handler\n"));
|
||||
@ -739,24 +694,17 @@ AcpiEvTerminate (void)
|
||||
}
|
||||
|
||||
/*
|
||||
* Free global tables, etc.
|
||||
* Free global GPE blocks and related info structures
|
||||
*/
|
||||
if (AcpiGbl_GpeRegisterInfo)
|
||||
GpeBlock = AcpiGbl_GpeBlockListHead;
|
||||
while (GpeBlock)
|
||||
{
|
||||
ACPI_MEM_FREE (AcpiGbl_GpeRegisterInfo);
|
||||
AcpiGbl_GpeRegisterInfo = NULL;
|
||||
}
|
||||
NextGpeBlock = GpeBlock->Next;
|
||||
ACPI_MEM_FREE (GpeBlock->EventInfo);
|
||||
ACPI_MEM_FREE (GpeBlock->RegisterInfo);
|
||||
ACPI_MEM_FREE (GpeBlock);
|
||||
|
||||
if (AcpiGbl_GpeNumberInfo)
|
||||
{
|
||||
ACPI_MEM_FREE (AcpiGbl_GpeNumberInfo);
|
||||
AcpiGbl_GpeNumberInfo = NULL;
|
||||
}
|
||||
|
||||
if (AcpiGbl_GpeNumberToIndex)
|
||||
{
|
||||
ACPI_MEM_FREE (AcpiGbl_GpeNumberToIndex);
|
||||
AcpiGbl_GpeNumberToIndex = NULL;
|
||||
GpeBlock = NextGpeBlock;
|
||||
}
|
||||
|
||||
return_VOID;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
|
||||
* $Revision: 135 $
|
||||
* $Revision: 137 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -273,7 +273,7 @@ AcpiEvExecuteRegMethod (
|
||||
/*
|
||||
* Execute the method, no return value
|
||||
*/
|
||||
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (RegionObj2->Extra.Method_REG, " [Method]"));
|
||||
ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (ACPI_TYPE_METHOD, RegionObj2->Extra.Method_REG, NULL));
|
||||
Status = AcpiNsEvaluateByHandle (RegionObj2->Extra.Method_REG, Params, NULL);
|
||||
|
||||
AcpiUtRemoveReference (Params[1]);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
|
||||
* $Revision: 63 $
|
||||
* $Revision: 66 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -380,6 +380,11 @@ AcpiEvPciConfigRegionSetup (
|
||||
PciId->Bus = ACPI_LOWORD (Temp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Complete this device's PciId
|
||||
*/
|
||||
AcpiOsDerivePciId (Node, RegionObj->Region.Node, &PciId);
|
||||
|
||||
*RegionContext = PciId;
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
@ -500,7 +505,7 @@ AcpiEvDefaultRegionSetup (
|
||||
* Get the appropriate address space handler for a newly
|
||||
* created region.
|
||||
*
|
||||
* This also performs address space specific intialization. For
|
||||
* This also performs address space specific initialization. For
|
||||
* example, PCI regions must have an _ADR object that contains
|
||||
* a PCI address in the scope of the definition. This address is
|
||||
* required to perform an access to PCI config space.
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: evsci - System Control Interrupt configuration and
|
||||
* legacy to ACPI mode state transition functions
|
||||
* $Revision: 86 $
|
||||
* $Revision: 88 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -143,40 +143,24 @@ AcpiEvSciHandler (
|
||||
void *Context)
|
||||
{
|
||||
UINT32 InterruptHandled = ACPI_INTERRUPT_NOT_HANDLED;
|
||||
UINT32 Value;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE("EvSciHandler");
|
||||
|
||||
|
||||
/*
|
||||
* Make sure that ACPI is enabled by checking SCI_EN. Note that we are
|
||||
* required to treat the SCI interrupt as sharable, level, active low.
|
||||
* We are guaranteed by the ACPI CA initialization/shutdown code that
|
||||
* if this interrupt handler is installed, ACPI is enabled.
|
||||
*/
|
||||
Status = AcpiGetRegister (ACPI_BITREG_SCI_ENABLE, &Value, ACPI_MTX_DO_NOT_LOCK);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
|
||||
if (!Value)
|
||||
{
|
||||
/* ACPI is not enabled; this interrupt cannot be for us */
|
||||
|
||||
return_VALUE (ACPI_INTERRUPT_NOT_HANDLED);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fixed AcpiEvents:
|
||||
* -------------
|
||||
* Check for and dispatch any Fixed AcpiEvents that have occurred
|
||||
*/
|
||||
InterruptHandled |= AcpiEvFixedEventDetect ();
|
||||
|
||||
/*
|
||||
* GPEs:
|
||||
* -----
|
||||
* Check for and dispatch any GPEs that have occurred
|
||||
*/
|
||||
InterruptHandled |= AcpiEvGpeDetect ();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evxface - External interfaces for ACPI events
|
||||
* $Revision: 132 $
|
||||
* $Revision: 135 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -608,7 +608,7 @@ AcpiInstallGpeHandler (
|
||||
void *Context)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 GpeNumberIndex;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiInstallGpeHandler");
|
||||
@ -623,8 +623,8 @@ AcpiInstallGpeHandler (
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
|
||||
if (GpeNumberIndex == ACPI_GPE_INVALID)
|
||||
GpeEventInfo = AcpiEvGetGpeEventInfo (GpeNumber);
|
||||
if (!GpeEventInfo)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
@ -637,7 +637,7 @@ AcpiInstallGpeHandler (
|
||||
|
||||
/* Make sure that there isn't a handler there already */
|
||||
|
||||
if (AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler)
|
||||
if (GpeEventInfo->Handler)
|
||||
{
|
||||
Status = AE_ALREADY_EXISTS;
|
||||
goto Cleanup;
|
||||
@ -645,19 +645,19 @@ AcpiInstallGpeHandler (
|
||||
|
||||
/* Install the handler */
|
||||
|
||||
AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler = Handler;
|
||||
AcpiGbl_GpeNumberInfo[GpeNumberIndex].Context = Context;
|
||||
AcpiGbl_GpeNumberInfo[GpeNumberIndex].Type = (UINT8) Type;
|
||||
GpeEventInfo->Handler = Handler;
|
||||
GpeEventInfo->Context = Context;
|
||||
GpeEventInfo->Type = (UINT8) Type;
|
||||
|
||||
/* Clear the GPE (of stale events), the enable it */
|
||||
|
||||
Status = AcpiHwClearGpe (GpeNumber);
|
||||
Status = AcpiHwClearGpe (GpeEventInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
Status = AcpiHwEnableGpe (GpeNumber);
|
||||
Status = AcpiHwEnableGpe (GpeEventInfo);
|
||||
|
||||
|
||||
Cleanup:
|
||||
@ -685,7 +685,7 @@ AcpiRemoveGpeHandler (
|
||||
ACPI_GPE_HANDLER Handler)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 GpeNumberIndex;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiRemoveGpeHandler");
|
||||
@ -700,15 +700,15 @@ AcpiRemoveGpeHandler (
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
GpeNumberIndex = AcpiEvGetGpeNumberIndex (GpeNumber);
|
||||
if (GpeNumberIndex == ACPI_GPE_INVALID)
|
||||
GpeEventInfo = AcpiEvGetGpeEventInfo (GpeNumber);
|
||||
if (!GpeEventInfo)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* Disable the GPE before removing the handler */
|
||||
|
||||
Status = AcpiHwDisableGpe (GpeNumber);
|
||||
Status = AcpiHwDisableGpe (GpeEventInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -722,17 +722,17 @@ AcpiRemoveGpeHandler (
|
||||
|
||||
/* Make sure that the installed handler is the same */
|
||||
|
||||
if (AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler != Handler)
|
||||
if (GpeEventInfo->Handler != Handler)
|
||||
{
|
||||
(void) AcpiHwEnableGpe (GpeNumber);
|
||||
(void) AcpiHwEnableGpe (GpeEventInfo);
|
||||
Status = AE_BAD_PARAMETER;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
/* Remove the handler */
|
||||
|
||||
AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler = NULL;
|
||||
AcpiGbl_GpeNumberInfo[GpeNumberIndex].Context = NULL;
|
||||
GpeEventInfo->Handler = NULL;
|
||||
GpeEventInfo->Context = NULL;
|
||||
|
||||
|
||||
Cleanup:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
|
||||
* $Revision: 57 $
|
||||
* $Revision: 62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -155,7 +155,7 @@ AcpiEnable (void)
|
||||
|
||||
if (AcpiHwGetMode() == ACPI_SYS_MODE_ACPI)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Already in ACPI mode.\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in ACPI mode\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -164,11 +164,11 @@ AcpiEnable (void)
|
||||
Status = AcpiHwSetMode (ACPI_SYS_MODE_ACPI);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_FATAL, "Could not transition to ACPI mode.\n"));
|
||||
ACPI_REPORT_ERROR (("Could not transition to ACPI mode.\n"));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Transition to ACPI mode successful\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "Transition to ACPI mode successful\n"));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -203,20 +203,21 @@ AcpiDisable (void)
|
||||
|
||||
if (AcpiHwGetMode() == ACPI_SYS_MODE_LEGACY)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Already in LEGACY mode.\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in legacy (non-ACPI) mode\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Transition to LEGACY mode */
|
||||
|
||||
Status = AcpiHwSetMode (ACPI_SYS_MODE_LEGACY);
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not transition to LEGACY mode."));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not exit ACPI mode to legacy mode"));
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Transition to LEGACY mode successful\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI mode disabled\n"));
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -245,6 +246,7 @@ AcpiEnableEvent (
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
UINT32 Value;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiEnableEvent");
|
||||
@ -296,14 +298,15 @@ AcpiEnableEvent (
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
|
||||
GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
|
||||
if (!GpeEventInfo)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* Enable the requested GPE number */
|
||||
|
||||
Status = AcpiHwEnableGpe (Event);
|
||||
Status = AcpiHwEnableGpe (GpeEventInfo);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
@ -311,7 +314,7 @@ AcpiEnableEvent (
|
||||
|
||||
if (Flags & ACPI_EVENT_WAKE_ENABLE)
|
||||
{
|
||||
AcpiHwEnableGpeForWakeup (Event);
|
||||
AcpiHwEnableGpeForWakeup (GpeEventInfo);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -347,6 +350,7 @@ AcpiDisableEvent (
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
UINT32 Value;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiDisableEvent");
|
||||
@ -396,7 +400,8 @@ AcpiDisableEvent (
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
|
||||
GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
|
||||
if (!GpeEventInfo)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
@ -408,11 +413,11 @@ AcpiDisableEvent (
|
||||
|
||||
if (Flags & ACPI_EVENT_WAKE_DISABLE)
|
||||
{
|
||||
AcpiHwDisableGpeForWakeup (Event);
|
||||
AcpiHwDisableGpeForWakeup (GpeEventInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = AcpiHwDisableGpe (Event);
|
||||
Status = AcpiHwDisableGpe (GpeEventInfo);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -444,6 +449,7 @@ AcpiClearEvent (
|
||||
UINT32 Type)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiClearEvent");
|
||||
@ -475,12 +481,13 @@ AcpiClearEvent (
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
|
||||
GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
|
||||
if (!GpeEventInfo)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
Status = AcpiHwClearGpe (Event);
|
||||
Status = AcpiHwClearGpe (GpeEventInfo);
|
||||
break;
|
||||
|
||||
|
||||
@ -516,6 +523,7 @@ AcpiGetEventStatus (
|
||||
ACPI_EVENT_STATUS *EventStatus)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("AcpiGetEventStatus");
|
||||
@ -551,7 +559,8 @@ AcpiGetEventStatus (
|
||||
|
||||
/* Ensure that we have a valid GPE number */
|
||||
|
||||
if (AcpiEvGetGpeNumberIndex (Event) == ACPI_GPE_INVALID)
|
||||
GpeEventInfo = AcpiEvGetGpeEventInfo (Event);
|
||||
if (!GpeEventInfo)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
@ -569,3 +578,4 @@ AcpiGetEventStatus (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
|
||||
* Address Spaces.
|
||||
* $Revision: 52 $
|
||||
* $Revision: 53 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
|
||||
* $Revision: 69 $
|
||||
* $Revision: 71 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -428,7 +428,6 @@ AcpiExLoadOp (
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER_FIELD:
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exconvrt - Object conversion routines
|
||||
* $Revision: 44 $
|
||||
* $Revision: 49 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -310,7 +310,7 @@ AcpiExConvertToBuffer (
|
||||
|
||||
/*
|
||||
* Create a new Buffer object.
|
||||
* Need enough space for one integer
|
||||
* Need enough space for one integer
|
||||
*/
|
||||
RetDesc = AcpiUtCreateBufferObject (AcpiGbl_IntegerByteWidth);
|
||||
if (!RetDesc)
|
||||
@ -334,7 +334,7 @@ AcpiExConvertToBuffer (
|
||||
* Create a new Buffer object
|
||||
* Size will be the string length
|
||||
*/
|
||||
RetDesc = AcpiUtCreateBufferObject (ObjDesc->String.Length);
|
||||
RetDesc = AcpiUtCreateBufferObject ((ACPI_SIZE) ObjDesc->String.Length);
|
||||
if (!RetDesc)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
@ -343,7 +343,7 @@ AcpiExConvertToBuffer (
|
||||
/* Copy the string to the buffer */
|
||||
|
||||
NewBuf = RetDesc->Buffer.Pointer;
|
||||
ACPI_STRNCPY ((char *) NewBuf, (char *) ObjDesc->String.Pointer,
|
||||
ACPI_STRNCPY ((char *) NewBuf, (char *) ObjDesc->String.Pointer,
|
||||
ObjDesc->String.Length);
|
||||
break;
|
||||
|
||||
@ -381,6 +381,7 @@ AcpiExConvertToBuffer (
|
||||
* PARAMETERS: Integer - Value to be converted
|
||||
* Base - 10 or 16
|
||||
* String - Where the string is returned
|
||||
* DataWidth - Size of data item to be converted
|
||||
*
|
||||
* RETURN: Actual string length
|
||||
*
|
||||
@ -392,7 +393,8 @@ UINT32
|
||||
AcpiExConvertToAscii (
|
||||
ACPI_INTEGER Integer,
|
||||
UINT32 Base,
|
||||
UINT8 *String)
|
||||
UINT8 *String,
|
||||
UINT8 DataWidth)
|
||||
{
|
||||
UINT32 i;
|
||||
UINT32 j;
|
||||
@ -400,12 +402,23 @@ AcpiExConvertToAscii (
|
||||
char HexDigit;
|
||||
ACPI_INTEGER Digit;
|
||||
UINT32 Remainder;
|
||||
UINT32 Length = sizeof (ACPI_INTEGER);
|
||||
BOOLEAN LeadingZero = TRUE;
|
||||
UINT32 Length;
|
||||
BOOLEAN LeadingZero;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
if (DataWidth < sizeof (ACPI_INTEGER))
|
||||
{
|
||||
LeadingZero = FALSE;
|
||||
Length = DataWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
LeadingZero = TRUE;
|
||||
Length = sizeof (ACPI_INTEGER);
|
||||
}
|
||||
|
||||
|
||||
switch (Base)
|
||||
{
|
||||
@ -473,8 +486,8 @@ AcpiExConvertToAscii (
|
||||
String [0] = ACPI_ASCII_ZERO;
|
||||
k = 1;
|
||||
}
|
||||
String [k] = 0;
|
||||
|
||||
String [k] = 0;
|
||||
return (k);
|
||||
}
|
||||
|
||||
@ -503,7 +516,6 @@ AcpiExConvertToString (
|
||||
{
|
||||
ACPI_OPERAND_OBJECT *RetDesc;
|
||||
UINT32 i;
|
||||
UINT32 Index;
|
||||
UINT32 StringLength;
|
||||
UINT8 *NewBuf;
|
||||
UINT8 *Pointer;
|
||||
@ -559,7 +571,7 @@ AcpiExConvertToString (
|
||||
|
||||
/* Convert */
|
||||
|
||||
i = AcpiExConvertToAscii (ObjDesc->Integer.Value, Base, NewBuf);
|
||||
i = AcpiExConvertToAscii (ObjDesc->Integer.Value, Base, NewBuf, sizeof (ACPI_INTEGER));
|
||||
|
||||
/* Null terminate at the correct place */
|
||||
|
||||
@ -580,10 +592,17 @@ AcpiExConvertToString (
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
StringLength = ObjDesc->Buffer.Length * 3;
|
||||
if (Base == 10)
|
||||
/* Find the string length */
|
||||
|
||||
Pointer = ObjDesc->Buffer.Pointer;
|
||||
for (StringLength = 0; StringLength < ObjDesc->Buffer.Length; StringLength++)
|
||||
{
|
||||
StringLength = ObjDesc->Buffer.Length * 4;
|
||||
/* Exit on null terminator */
|
||||
|
||||
if (!Pointer[StringLength])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (MaxLength > ACPI_MAX_STRING_CONVERSION)
|
||||
@ -619,24 +638,15 @@ AcpiExConvertToString (
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert each byte of the buffer to two ASCII characters plus a space.
|
||||
*/
|
||||
Pointer = ObjDesc->Buffer.Pointer;
|
||||
Index = 0;
|
||||
for (i = 0, Index = 0; i < ObjDesc->Buffer.Length; i++)
|
||||
{
|
||||
Index = AcpiExConvertToAscii ((ACPI_INTEGER) Pointer[i], Base, &NewBuf[Index]);
|
||||
/* Copy the appropriate number of buffer characters */
|
||||
|
||||
NewBuf[Index] = ' ';
|
||||
Index++;
|
||||
}
|
||||
ACPI_MEMCPY (NewBuf, Pointer, StringLength);
|
||||
|
||||
/* Null terminate */
|
||||
|
||||
NewBuf [Index-1] = 0;
|
||||
NewBuf [StringLength] = 0;
|
||||
RetDesc->Buffer.Pointer = NewBuf;
|
||||
RetDesc->String.Length = (UINT32) ACPI_STRLEN ((char *) NewBuf);
|
||||
RetDesc->String.Length = StringLength;
|
||||
break;
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: excreate - Named object creation
|
||||
* $Revision: 97 $
|
||||
* $Revision: 99 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -161,10 +161,10 @@ AcpiExCreateAlias (
|
||||
|
||||
if (TargetNode->Type == ACPI_TYPE_LOCAL_ALIAS)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Dereference an existing alias so that we don't create a chain
|
||||
* of aliases. With this code, we guarantee that an alias is
|
||||
* always exactly one level of indirection away from the
|
||||
* always exactly one level of indirection away from the
|
||||
* actual aliased name.
|
||||
*/
|
||||
TargetNode = (ACPI_NAMESPACE_NODE *) TargetNode->Object;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exdump - Interpreter debug output routines
|
||||
* $Revision: 163 $
|
||||
* $Revision: 166 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -496,13 +496,13 @@ void
|
||||
AcpiExDumpOperands (
|
||||
ACPI_OPERAND_OBJECT **Operands,
|
||||
ACPI_INTERPRETER_MODE InterpreterMode,
|
||||
NATIVE_CHAR *Ident,
|
||||
char *Ident,
|
||||
UINT32 NumLevels,
|
||||
NATIVE_CHAR *Note,
|
||||
NATIVE_CHAR *ModuleName,
|
||||
char *Note,
|
||||
char *ModuleName,
|
||||
UINT32 LineNumber)
|
||||
{
|
||||
NATIVE_UINT i;
|
||||
ACPI_NATIVE_UINT i;
|
||||
ACPI_OPERAND_OBJECT **ObjDesc;
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
|
||||
* $Revision: 115 $
|
||||
* $Revision: 118 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -149,7 +149,7 @@ AcpiExReadDataFromField (
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OPERAND_OBJECT *BufferDesc;
|
||||
UINT32 Length;
|
||||
ACPI_SIZE Length;
|
||||
void *Buffer;
|
||||
BOOLEAN Locked;
|
||||
|
||||
@ -200,7 +200,7 @@ AcpiExReadDataFromField (
|
||||
* Perform the read.
|
||||
* Note: Smbus protocol value is passed in upper 16-bits of Function
|
||||
*/
|
||||
Status = AcpiExAccessRegion (ObjDesc, 0,
|
||||
Status = AcpiExAccessRegion (ObjDesc, 0,
|
||||
ACPI_CAST_PTR (ACPI_INTEGER, BufferDesc->Buffer.Pointer),
|
||||
ACPI_READ | (ObjDesc->Field.Attribute << 16));
|
||||
AcpiExReleaseGlobalLock (Locked);
|
||||
@ -217,7 +217,7 @@ AcpiExReadDataFromField (
|
||||
*
|
||||
* Note: Field.length is in bits.
|
||||
*/
|
||||
Length = ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->Field.BitLength);
|
||||
Length = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->Field.BitLength);
|
||||
if (Length > AcpiGbl_IntegerByteWidth)
|
||||
{
|
||||
/* Field is too large for an Integer, create a Buffer instead */
|
||||
@ -246,7 +246,7 @@ AcpiExReadDataFromField (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"Obj=%p Type=%X Buf=%p Len=%X\n",
|
||||
ObjDesc, ACPI_GET_OBJECT_TYPE (ObjDesc), Buffer, Length));
|
||||
ObjDesc, ACPI_GET_OBJECT_TYPE (ObjDesc), Buffer, (UINT32) Length));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
|
||||
"FieldWrite: BitLen=%X BitOff=%X ByteOff=%X\n",
|
||||
ObjDesc->CommonField.BitLength,
|
||||
@ -259,7 +259,7 @@ AcpiExReadDataFromField (
|
||||
|
||||
/* Read from the field */
|
||||
|
||||
Status = AcpiExExtractFromField (ObjDesc, Buffer, Length);
|
||||
Status = AcpiExExtractFromField (ObjDesc, Buffer, (UINT32) Length);
|
||||
AcpiExReleaseGlobalLock (Locked);
|
||||
|
||||
|
||||
@ -366,11 +366,11 @@ AcpiExWriteDataToField (
|
||||
|
||||
Locked = AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
|
||||
|
||||
/*
|
||||
/*
|
||||
* Perform the write (returns status and perhaps data in the same buffer)
|
||||
* Note: SMBus protocol type is passed in upper 16-bits of Function.
|
||||
*/
|
||||
Status = AcpiExAccessRegion (ObjDesc, 0,
|
||||
Status = AcpiExAccessRegion (ObjDesc, 0,
|
||||
(ACPI_INTEGER *) Buffer,
|
||||
ACPI_WRITE | (ObjDesc->Field.Attribute << 16));
|
||||
AcpiExReleaseGlobalLock (Locked);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
|
||||
* $Revision: 112 $
|
||||
* $Revision: 115 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -324,7 +324,7 @@ AcpiExDoConcatenate (
|
||||
UINT32 i;
|
||||
ACPI_INTEGER ThisInteger;
|
||||
ACPI_OPERAND_OBJECT *ReturnDesc;
|
||||
NATIVE_CHAR *NewBuf;
|
||||
char *NewBuf;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
@ -350,14 +350,14 @@ AcpiExDoConcatenate (
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
NewBuf = (NATIVE_CHAR *) ReturnDesc->Buffer.Pointer;
|
||||
NewBuf = (char *) ReturnDesc->Buffer.Pointer;
|
||||
|
||||
/* Convert the first integer */
|
||||
|
||||
ThisInteger = ObjDesc1->Integer.Value;
|
||||
for (i = 0; i < AcpiGbl_IntegerByteWidth; i++)
|
||||
{
|
||||
NewBuf[i] = (NATIVE_CHAR) ThisInteger;
|
||||
NewBuf[i] = (char) ThisInteger;
|
||||
ThisInteger >>= 8;
|
||||
}
|
||||
|
||||
@ -366,7 +366,7 @@ AcpiExDoConcatenate (
|
||||
ThisInteger = ObjDesc2->Integer.Value;
|
||||
for (; i < (ACPI_MUL_2 (AcpiGbl_IntegerByteWidth)); i++)
|
||||
{
|
||||
NewBuf[i] = (NATIVE_CHAR) ThisInteger;
|
||||
NewBuf[i] = (char) ThisInteger;
|
||||
ThisInteger >>= 8;
|
||||
}
|
||||
|
||||
@ -385,8 +385,8 @@ AcpiExDoConcatenate (
|
||||
|
||||
/* Operand0 is string */
|
||||
|
||||
NewBuf = ACPI_MEM_ALLOCATE ((ACPI_SIZE) ObjDesc1->String.Length +
|
||||
(ACPI_SIZE) ObjDesc2->String.Length + 1);
|
||||
NewBuf = ACPI_MEM_CALLOCATE ((ACPI_SIZE) ObjDesc1->String.Length +
|
||||
(ACPI_SIZE) ObjDesc2->String.Length + 1);
|
||||
if (!NewBuf)
|
||||
{
|
||||
ACPI_REPORT_ERROR
|
||||
@ -421,7 +421,7 @@ AcpiExDoConcatenate (
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
NewBuf = (NATIVE_CHAR *) ReturnDesc->Buffer.Pointer;
|
||||
NewBuf = (char *) ReturnDesc->Buffer.Pointer;
|
||||
|
||||
/* Concatenate the buffers */
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exmutex - ASL Mutex Acquire/Release functions
|
||||
* $Revision: 16 $
|
||||
* $Revision: 18 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -348,7 +348,7 @@ AcpiExReleaseMutex (
|
||||
ACPI_REPORT_ERROR ((
|
||||
"Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",
|
||||
WalkState->Thread->ThreadId,
|
||||
ObjDesc->Mutex.Node->Name.Ascii,
|
||||
ObjDesc->Mutex.Node->Name.Ascii,
|
||||
ObjDesc->Mutex.OwnerThread->ThreadId));
|
||||
return_ACPI_STATUS (AE_AML_NOT_OWNER);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exnames - interpreter/scanner name load/execute
|
||||
* $Revision: 92 $
|
||||
* $Revision: 94 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -149,13 +149,13 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiExAllocateNameString (
|
||||
UINT32 PrefixCount,
|
||||
UINT32 NumNameSegs)
|
||||
{
|
||||
NATIVE_CHAR *TempPtr;
|
||||
NATIVE_CHAR *NameString;
|
||||
char *TempPtr;
|
||||
char *NameString;
|
||||
UINT32 SizeNeeded;
|
||||
|
||||
ACPI_FUNCTION_TRACE ("ExAllocateNameString");
|
||||
@ -245,7 +245,7 @@ AcpiExAllocateNameString (
|
||||
ACPI_STATUS
|
||||
AcpiExNameSegment (
|
||||
UINT8 **InAmlAddress,
|
||||
NATIVE_CHAR *NameString)
|
||||
char *NameString)
|
||||
{
|
||||
char *AmlAddress = (void *) *InAmlAddress;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
@ -340,12 +340,12 @@ ACPI_STATUS
|
||||
AcpiExGetNameString (
|
||||
ACPI_OBJECT_TYPE DataType,
|
||||
UINT8 *InAmlAddress,
|
||||
NATIVE_CHAR **OutNameString,
|
||||
char **OutNameString,
|
||||
UINT32 *OutNameLength)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
UINT8 *AmlAddress = InAmlAddress;
|
||||
NATIVE_CHAR *NameString = NULL;
|
||||
char *NameString = NULL;
|
||||
UINT32 NumSegments;
|
||||
UINT32 PrefixCount = 0;
|
||||
BOOLEAN HasPrefix = FALSE;
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
|
||||
* $Revision: 146 $
|
||||
* $Revision: 147 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
|
||||
* $Revision: 115 $
|
||||
* $Revision: 117 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -477,7 +477,7 @@ AcpiExOpcode_2A_1T_1R (
|
||||
Status = AE_NO_MEMORY;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
||||
/* Allocate a new string buffer (Length + 1 for null terminator) */
|
||||
|
||||
ReturnDesc->String.Pointer = ACPI_MEM_CALLOCATE (Length + 1);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg3 - AML execution - opcodes with 3 arguments
|
||||
* $Revision: 15 $
|
||||
* $Revision: 17 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -240,7 +240,7 @@ AcpiExOpcode_3A_1T_1R (
|
||||
ACPI_OPERAND_OBJECT *ReturnDesc = NULL;
|
||||
char *Buffer;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
NATIVE_UINT Index;
|
||||
ACPI_NATIVE_UINT Index;
|
||||
ACPI_SIZE Length;
|
||||
|
||||
|
||||
@ -264,7 +264,7 @@ AcpiExOpcode_3A_1T_1R (
|
||||
|
||||
/* Get the Integer values from the objects */
|
||||
|
||||
Index = (NATIVE_UINT) Operand[1]->Integer.Value;
|
||||
Index = (ACPI_NATIVE_UINT) Operand[1]->Integer.Value;
|
||||
Length = (ACPI_SIZE) Operand[2]->Integer.Value;
|
||||
|
||||
/*
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exoparg6 - AML execution - opcodes with 6 arguments
|
||||
* $Revision: 11 $
|
||||
* $Revision: 12 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
|
||||
* $Revision: 121 $
|
||||
* $Revision: 122 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exregion - ACPI default OpRegion (address space) handlers
|
||||
* $Revision: 80 $
|
||||
* $Revision: 82 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -230,9 +230,9 @@ AcpiExSystemMemorySpaceHandler (
|
||||
* constrain the maximum mapping size to something reasonable.
|
||||
*/
|
||||
WindowSize = (ACPI_SIZE) ((MemInfo->Address + MemInfo->Length) - Address);
|
||||
if (WindowSize > SYSMEM_REGION_WINDOW_SIZE)
|
||||
if (WindowSize > ACPI_SYSMEM_REGION_WINDOW_SIZE)
|
||||
{
|
||||
WindowSize = SYSMEM_REGION_WINDOW_SIZE;
|
||||
WindowSize = ACPI_SYSMEM_REGION_WINDOW_SIZE;
|
||||
}
|
||||
|
||||
/* Create a new mapping starting at the address given */
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresnte - AML Interpreter object resolution
|
||||
* $Revision: 61 $
|
||||
* $Revision: 62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresolv - AML Interpreter object resolution
|
||||
* $Revision: 117 $
|
||||
* $Revision: 119 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -417,8 +417,8 @@ AcpiExResolveMultiple (
|
||||
|
||||
/*
|
||||
* For reference objects created via the RefOf or Index operators,
|
||||
* we need to get to the base object (as per the ACPI specification
|
||||
* of the ObjectType and SizeOf operators). This means traversing
|
||||
* we need to get to the base object (as per the ACPI specification
|
||||
* of the ObjectType and SizeOf operators). This means traversing
|
||||
* the list of possibly many nested references.
|
||||
*/
|
||||
while (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_LOCAL_REFERENCE)
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exresop - AML Interpreter operand/object resolution
|
||||
* $Revision: 60 $
|
||||
* $Revision: 62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -459,13 +459,6 @@ AcpiExResolveOperands (
|
||||
TypeNeeded = ACPI_TYPE_EVENT;
|
||||
break;
|
||||
|
||||
case ARGI_REGION:
|
||||
|
||||
/* Need an operand of type ACPI_TYPE_REGION */
|
||||
|
||||
TypeNeeded = ACPI_TYPE_REGION;
|
||||
break;
|
||||
|
||||
case ARGI_PACKAGE: /* Package */
|
||||
|
||||
/* Need an operand of type ACPI_TYPE_PACKAGE */
|
||||
@ -579,6 +572,39 @@ AcpiExResolveOperands (
|
||||
goto NextOperand;
|
||||
|
||||
|
||||
case ARGI_BUFFER_OR_STRING:
|
||||
|
||||
/* Need an operand of type STRING or BUFFER */
|
||||
|
||||
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
|
||||
{
|
||||
case ACPI_TYPE_STRING:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
/* Valid operand */
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
/* Highest priority conversion is to type Buffer */
|
||||
|
||||
Status = AcpiExConvertToBuffer (ObjDesc, StackPtr, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Integer/String/Buffer], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
goto NextOperand;
|
||||
|
||||
|
||||
case ARGI_DATAOBJECT:
|
||||
/*
|
||||
* ARGI_DATAOBJECT is only used by the SizeOf operator.
|
||||
@ -599,7 +625,7 @@ AcpiExResolveOperands (
|
||||
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Buf/Str/Pkg], found [%s] %p\n",
|
||||
"Needed [Buffer/String/Package/Reference], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
@ -622,7 +648,31 @@ AcpiExResolveOperands (
|
||||
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Buf/Str/Pkg], found [%s] %p\n",
|
||||
"Needed [Buffer/String/Package], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
goto NextOperand;
|
||||
|
||||
|
||||
case ARGI_REGION_OR_FIELD:
|
||||
|
||||
/* Need an operand of type ACPI_TYPE_REGION or a FIELD in a region */
|
||||
|
||||
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
|
||||
{
|
||||
case ACPI_TYPE_REGION:
|
||||
case ACPI_TYPE_LOCAL_REGION_FIELD:
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
|
||||
/* Valid operand */
|
||||
break;
|
||||
|
||||
default:
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
|
||||
"Needed [Region/RegionField], found [%s] %p\n",
|
||||
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
|
||||
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exstore - AML Interpreter object store support
|
||||
* $Revision: 174 $
|
||||
* $Revision: 175 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Module Name: exstoren - AML Interpreter object store support,
|
||||
* Store to Node (namespace object)
|
||||
* $Revision: 52 $
|
||||
* $Revision: 55 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -277,7 +277,7 @@ AcpiExStoreObjectToObject (
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR ("AcpiExStoreObjectToObject", SourceDesc);
|
||||
ACPI_FUNCTION_TRACE_PTR ("ExStoreObjectToObject", SourceDesc);
|
||||
|
||||
|
||||
ActualSrcDesc = SourceDesc;
|
||||
@ -312,7 +312,7 @@ AcpiExStoreObjectToObject (
|
||||
|
||||
if (SourceDesc == ActualSrcDesc)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* No conversion was performed. Return the SourceDesc as the
|
||||
* new object.
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exstorob - AML Interpreter object store support, store to object
|
||||
* $Revision: 46 $
|
||||
* $Revision: 50 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -147,7 +147,7 @@ AcpiExStoreBufferToBuffer (
|
||||
UINT8 *Buffer;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME ("ExStoreBufferToBuffer");
|
||||
ACPI_FUNCTION_TRACE_PTR ("ExStoreBufferToBuffer", SourceDesc);
|
||||
|
||||
|
||||
/*
|
||||
@ -157,17 +157,19 @@ AcpiExStoreBufferToBuffer (
|
||||
Length = SourceDesc->Buffer.Length;
|
||||
|
||||
/*
|
||||
* If target is a buffer of length zero, allocate a new
|
||||
* buffer of the proper length
|
||||
* If target is a buffer of length zero or is a static buffer,
|
||||
* allocate a new buffer of the proper length
|
||||
*/
|
||||
if (TargetDesc->Buffer.Length == 0)
|
||||
if ((TargetDesc->Buffer.Length == 0) ||
|
||||
(TargetDesc->Common.Flags & AOPOBJ_STATIC_POINTER))
|
||||
{
|
||||
TargetDesc->Buffer.Pointer = ACPI_MEM_ALLOCATE (Length);
|
||||
if (!TargetDesc->Buffer.Pointer)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
TargetDesc->Common.Flags &= ~AOPOBJ_STATIC_POINTER;
|
||||
TargetDesc->Buffer.Length = Length;
|
||||
}
|
||||
|
||||
@ -197,7 +199,7 @@ AcpiExStoreBufferToBuffer (
|
||||
/* Copy flags */
|
||||
|
||||
TargetDesc->Buffer.Flags = SourceDesc->Buffer.Flags;
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -223,7 +225,7 @@ AcpiExStoreStringToString (
|
||||
UINT8 *Buffer;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
ACPI_FUNCTION_TRACE_PTR ("ExStoreStringToString", SourceDesc);
|
||||
|
||||
|
||||
/*
|
||||
@ -233,13 +235,15 @@ AcpiExStoreStringToString (
|
||||
Length = SourceDesc->String.Length;
|
||||
|
||||
/*
|
||||
* Setting a string value replaces the old string
|
||||
* Replace existing string value if it will fit and the string
|
||||
* pointer is not a static pointer (part of an ACPI table)
|
||||
*/
|
||||
if (Length < TargetDesc->String.Length)
|
||||
if ((Length < TargetDesc->String.Length) &&
|
||||
(!(TargetDesc->Common.Flags & AOPOBJ_STATIC_POINTER)))
|
||||
{
|
||||
/*
|
||||
* String will fit in existing buffer.
|
||||
* Clear old string and copy in the new one
|
||||
/*
|
||||
* String will fit in existing non-static buffer.
|
||||
* Clear old string and copy in the new one
|
||||
*/
|
||||
ACPI_MEMSET (TargetDesc->String.Pointer, 0, (ACPI_SIZE) TargetDesc->String.Length + 1);
|
||||
ACPI_MEMCPY (TargetDesc->String.Pointer, Buffer, Length);
|
||||
@ -262,16 +266,17 @@ AcpiExStoreStringToString (
|
||||
TargetDesc->String.Pointer = ACPI_MEM_CALLOCATE ((ACPI_SIZE) Length + 1);
|
||||
if (!TargetDesc->String.Pointer)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
TargetDesc->Common.Flags &= ~AOPOBJ_STATIC_POINTER;
|
||||
ACPI_MEMCPY (TargetDesc->String.Pointer, Buffer, Length);
|
||||
}
|
||||
|
||||
/* Set the new target length */
|
||||
|
||||
TargetDesc->String.Length = Length;
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exutils - interpreter/scanner utilities
|
||||
* $Revision: 106 $
|
||||
* $Revision: 108 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -400,7 +400,7 @@ AcpiExDigitsNeeded (
|
||||
void
|
||||
AcpiExEisaIdToString (
|
||||
UINT32 NumericId,
|
||||
NATIVE_CHAR *OutString)
|
||||
char *OutString)
|
||||
{
|
||||
UINT32 EisaId;
|
||||
|
||||
@ -437,7 +437,7 @@ AcpiExEisaIdToString (
|
||||
void
|
||||
AcpiExUnsignedIntegerToString (
|
||||
ACPI_INTEGER Value,
|
||||
NATIVE_CHAR *OutString)
|
||||
char *OutString)
|
||||
{
|
||||
UINT32 Count;
|
||||
UINT32 DigitsNeeded;
|
||||
@ -454,7 +454,7 @@ AcpiExUnsignedIntegerToString (
|
||||
for (Count = DigitsNeeded; Count > 0; Count--)
|
||||
{
|
||||
(void) AcpiUtShortDivide (&Value, 10, &Quotient, &Remainder);
|
||||
OutString[Count-1] = (NATIVE_CHAR) ('0' + Remainder);\
|
||||
OutString[Count-1] = (char) ('0' + Remainder);\
|
||||
Value = Quotient;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
|
||||
* $Revision: 60 $
|
||||
* $Revision: 62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -196,7 +196,7 @@ AcpiHwSetMode (
|
||||
*/
|
||||
if (!AcpiGbl_FADT->SmiCmd)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No SMI_CMD in FADT, mode transition failed.\n"));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No SMI_CMD in FADT, mode transition failed.\n"));
|
||||
return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
|
||||
* $Revision: 42 $
|
||||
* $Revision: 47 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -122,26 +122,6 @@
|
||||
ACPI_MODULE_NAME ("hwgpe")
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwGetGpeBitMask
|
||||
*
|
||||
* PARAMETERS: GpeNumber - The GPE
|
||||
*
|
||||
* RETURN: Gpe register bitmask for this gpe level
|
||||
*
|
||||
* DESCRIPTION: Get the bitmask for this GPE
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT8
|
||||
AcpiHwGetGpeBitMask (
|
||||
UINT32 GpeNumber)
|
||||
{
|
||||
return (AcpiGbl_GpeNumberInfo [AcpiEvGetGpeNumberIndex (GpeNumber)].BitMask);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwEnableGpe
|
||||
@ -156,38 +136,30 @@ AcpiHwGetGpeBitMask (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwEnableGpe (
|
||||
UINT32 GpeNumber)
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo)
|
||||
{
|
||||
UINT32 InByte;
|
||||
UINT32 RegisterIndex;
|
||||
UINT8 BitMask;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Translate GPE number to index into global registers array. */
|
||||
|
||||
RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
|
||||
|
||||
/* Get the register bitmask for this GPE */
|
||||
|
||||
BitMask = AcpiHwGetGpeBitMask (GpeNumber);
|
||||
|
||||
/*
|
||||
* Read the current value of the register, set the appropriate bit
|
||||
* to enable the GPE, and write out the new register.
|
||||
*/
|
||||
Status = AcpiHwLowLevelRead (8, &InByte,
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
&GpeEventInfo->RegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
Status = AcpiHwLowLevelWrite (8, (InByte | BitMask),
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
/* Write with the new GPE bit enabled */
|
||||
|
||||
Status = AcpiHwLowLevelWrite (8, (InByte | GpeEventInfo->BitMask),
|
||||
&GpeEventInfo->RegisterInfo->EnableAddress, 0);
|
||||
|
||||
return (Status);
|
||||
}
|
||||
@ -208,27 +180,26 @@ AcpiHwEnableGpe (
|
||||
|
||||
void
|
||||
AcpiHwEnableGpeForWakeup (
|
||||
UINT32 GpeNumber)
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo)
|
||||
{
|
||||
UINT32 RegisterIndex;
|
||||
UINT8 BitMask;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Translate GPE number to index into global registers array. */
|
||||
/* Get the info block for the entire GPE register */
|
||||
|
||||
RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
|
||||
|
||||
/* Get the register bitmask for this GPE */
|
||||
|
||||
BitMask = AcpiHwGetGpeBitMask (GpeNumber);
|
||||
GpeRegisterInfo = GpeEventInfo->RegisterInfo;
|
||||
if (!GpeRegisterInfo)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the bit so we will not disable this when sleeping
|
||||
*/
|
||||
AcpiGbl_GpeRegisterInfo[RegisterIndex].WakeEnable |= BitMask;
|
||||
GpeRegisterInfo->WakeEnable |= GpeEventInfo->BitMask;
|
||||
}
|
||||
|
||||
|
||||
@ -246,44 +217,45 @@ AcpiHwEnableGpeForWakeup (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwDisableGpe (
|
||||
UINT32 GpeNumber)
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo)
|
||||
{
|
||||
UINT32 InByte;
|
||||
UINT32 RegisterIndex;
|
||||
UINT8 BitMask;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Translate GPE number to index into global registers array. */
|
||||
/* Get the info block for the entire GPE register */
|
||||
|
||||
RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
|
||||
|
||||
/* Get the register bitmask for this GPE */
|
||||
|
||||
BitMask = AcpiHwGetGpeBitMask (GpeNumber);
|
||||
GpeRegisterInfo = GpeEventInfo->RegisterInfo;
|
||||
if (!GpeRegisterInfo)
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the current value of the register, clear the appropriate bit,
|
||||
* and write out the new register value to disable the GPE.
|
||||
*/
|
||||
Status = AcpiHwLowLevelRead (8, &InByte,
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
Status = AcpiHwLowLevelWrite (8, (InByte & ~BitMask),
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].EnableAddress, 0);
|
||||
/* Write the byte with this GPE bit cleared */
|
||||
|
||||
Status = AcpiHwLowLevelWrite (8, (InByte & ~(GpeEventInfo->BitMask)),
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
AcpiHwDisableGpeForWakeup(GpeNumber);
|
||||
AcpiHwDisableGpeForWakeup (GpeEventInfo);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@ -303,27 +275,26 @@ AcpiHwDisableGpe (
|
||||
|
||||
void
|
||||
AcpiHwDisableGpeForWakeup (
|
||||
UINT32 GpeNumber)
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo)
|
||||
{
|
||||
UINT32 RegisterIndex;
|
||||
UINT8 BitMask;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Translate GPE number to index into global registers array. */
|
||||
/* Get the info block for the entire GPE register */
|
||||
|
||||
RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
|
||||
|
||||
/* Get the register bitmask for this GPE */
|
||||
|
||||
BitMask = AcpiHwGetGpeBitMask (GpeNumber);
|
||||
GpeRegisterInfo = GpeEventInfo->RegisterInfo;
|
||||
if (!GpeRegisterInfo)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the bit so we will disable this when sleeping
|
||||
*/
|
||||
AcpiGbl_GpeRegisterInfo[RegisterIndex].WakeEnable &= ~BitMask;
|
||||
GpeRegisterInfo->WakeEnable &= ~(GpeEventInfo->BitMask);
|
||||
}
|
||||
|
||||
|
||||
@ -341,30 +312,20 @@ AcpiHwDisableGpeForWakeup (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwClearGpe (
|
||||
UINT32 GpeNumber)
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo)
|
||||
{
|
||||
UINT32 RegisterIndex;
|
||||
UINT8 BitMask;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
/* Translate GPE number to index into global registers array. */
|
||||
|
||||
RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
|
||||
|
||||
/* Get the register bitmask for this GPE */
|
||||
|
||||
BitMask = AcpiHwGetGpeBitMask (GpeNumber);
|
||||
|
||||
/*
|
||||
* Write a one to the appropriate bit in the status register to
|
||||
* clear this GPE.
|
||||
*/
|
||||
Status = AcpiHwLowLevelWrite (8, BitMask,
|
||||
&AcpiGbl_GpeRegisterInfo[RegisterIndex].StatusAddress, 0);
|
||||
Status = AcpiHwLowLevelWrite (8, GpeEventInfo->BitMask,
|
||||
&GpeEventInfo->RegisterInfo->StatusAddress, 0);
|
||||
|
||||
return (Status);
|
||||
}
|
||||
@ -387,11 +348,12 @@ AcpiHwGetGpeStatus (
|
||||
UINT32 GpeNumber,
|
||||
ACPI_EVENT_STATUS *EventStatus)
|
||||
{
|
||||
UINT32 InByte = 0;
|
||||
UINT32 RegisterIndex = 0;
|
||||
UINT8 BitMask = 0;
|
||||
UINT32 InByte;
|
||||
UINT8 BitMask;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_EVENT_STATUS LocalEventStatus = 0;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
@ -402,16 +364,19 @@ AcpiHwGetGpeStatus (
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
(*EventStatus) = 0;
|
||||
GpeEventInfo = AcpiEvGetGpeEventInfo (GpeNumber);
|
||||
if (!GpeEventInfo)
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
/* Translate GPE number to index into global registers array. */
|
||||
/* Get the info block for the entire GPE register */
|
||||
|
||||
RegisterIndex = AcpiEvGetGpeRegisterIndex (GpeNumber);
|
||||
GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[RegisterIndex];
|
||||
GpeRegisterInfo = GpeEventInfo->RegisterInfo;
|
||||
|
||||
/* Get the register bitmask for this GPE */
|
||||
|
||||
BitMask = AcpiHwGetGpeBitMask (GpeNumber);
|
||||
BitMask = GpeEventInfo->BitMask;
|
||||
|
||||
/* GPE Enabled? */
|
||||
|
||||
@ -423,14 +388,14 @@ AcpiHwGetGpeStatus (
|
||||
|
||||
if (BitMask & InByte)
|
||||
{
|
||||
(*EventStatus) |= ACPI_EVENT_FLAG_ENABLED;
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
|
||||
}
|
||||
|
||||
/* GPE Enabled for wake? */
|
||||
|
||||
if (BitMask & GpeRegisterInfo->WakeEnable)
|
||||
{
|
||||
(*EventStatus) |= ACPI_EVENT_FLAG_WAKE_ENABLED;
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED;
|
||||
}
|
||||
|
||||
/* GPE active (set)? */
|
||||
@ -443,8 +408,12 @@ AcpiHwGetGpeStatus (
|
||||
|
||||
if (BitMask & InByte)
|
||||
{
|
||||
(*EventStatus) |= ACPI_EVENT_FLAG_SET;
|
||||
LocalEventStatus |= ACPI_EVENT_FLAG_SET;
|
||||
}
|
||||
|
||||
/* Set return value */
|
||||
|
||||
(*EventStatus) = LocalEventStatus;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@ -459,7 +428,7 @@ AcpiHwGetGpeStatus (
|
||||
*
|
||||
* DESCRIPTION: Disable all non-wakeup GPEs
|
||||
* Call with interrupts disabled. The interrupt handler also
|
||||
* modifies AcpiGbl_GpeRegisterInfo[i].Enable, so it should not be
|
||||
* modifies GpeRegisterInfo->Enable, so it should not be
|
||||
* given the chance to run until after non-wake GPEs are
|
||||
* re-enabled.
|
||||
*
|
||||
@ -473,38 +442,54 @@ AcpiHwDisableNonWakeupGpes (
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
UINT32 InValue;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
for (i = 0; i < AcpiGbl_GpeRegisterCount; i++)
|
||||
GpeBlock = AcpiGbl_GpeBlockListHead;
|
||||
while (GpeBlock)
|
||||
{
|
||||
GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[i];
|
||||
/* Get the register info for the entire GPE block */
|
||||
|
||||
/*
|
||||
* Read the enabled status of all GPEs. We
|
||||
* will be using it to restore all the GPEs later.
|
||||
*/
|
||||
Status = AcpiHwLowLevelRead (8, &InValue,
|
||||
GpeRegisterInfo = GpeBlock->RegisterInfo;
|
||||
if (!GpeRegisterInfo)
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
for (i = 0; i < GpeBlock->RegisterCount; i++)
|
||||
{
|
||||
/*
|
||||
* Read the enabled status of all GPEs. We
|
||||
* will be using it to restore all the GPEs later.
|
||||
*/
|
||||
Status = AcpiHwLowLevelRead (8, &InValue,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
GpeRegisterInfo->Enable = (UINT8) InValue;
|
||||
|
||||
/*
|
||||
* Disable all GPEs except wakeup GPEs.
|
||||
*/
|
||||
Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->WakeEnable,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
GpeRegisterInfo++;
|
||||
}
|
||||
|
||||
GpeRegisterInfo->Enable = (UINT8) InValue;
|
||||
|
||||
/*
|
||||
* Disable all GPEs except wakeup GPEs.
|
||||
*/
|
||||
Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->WakeEnable,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
GpeBlock = GpeBlock->Next;
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@ -528,25 +513,41 @@ AcpiHwEnableNonWakeupGpes (
|
||||
UINT32 i;
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock;
|
||||
|
||||
|
||||
ACPI_FUNCTION_ENTRY ();
|
||||
|
||||
|
||||
for (i = 0; i < AcpiGbl_GpeRegisterCount; i++)
|
||||
GpeBlock = AcpiGbl_GpeBlockListHead;
|
||||
while (GpeBlock)
|
||||
{
|
||||
GpeRegisterInfo = &AcpiGbl_GpeRegisterInfo[i];
|
||||
/* Get the register info for the entire GPE block */
|
||||
|
||||
/*
|
||||
* We previously stored the enabled status of all GPEs.
|
||||
* Blast them back in.
|
||||
*/
|
||||
Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->Enable,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
GpeRegisterInfo = GpeBlock->RegisterInfo;
|
||||
if (!GpeRegisterInfo)
|
||||
{
|
||||
return (Status);
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
for (i = 0; i < GpeBlock->RegisterCount; i++)
|
||||
{
|
||||
/*
|
||||
* We previously stored the enabled status of all GPEs.
|
||||
* Blast them back in.
|
||||
*/
|
||||
Status = AcpiHwLowLevelWrite (8, GpeRegisterInfo->Enable,
|
||||
&GpeRegisterInfo->EnableAddress, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
GpeRegisterInfo++;
|
||||
}
|
||||
|
||||
GpeBlock = GpeBlock->Next;
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Module Name: hwregs - Read/write access functions for the various ACPI
|
||||
* control and status registers.
|
||||
* $Revision: 134 $
|
||||
* $Revision: 142 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -140,9 +140,9 @@
|
||||
ACPI_STATUS
|
||||
AcpiHwClearAcpiStatus (void)
|
||||
{
|
||||
NATIVE_UINT_MAX32 i;
|
||||
NATIVE_UINT GpeBlock;
|
||||
ACPI_NATIVE_UINT i;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("HwClearAcpiStatus");
|
||||
@ -178,19 +178,22 @@ AcpiHwClearAcpiStatus (void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear the GPE Bits */
|
||||
/* Clear the GPE Bits in all GPE registers in all GPE blocks */
|
||||
|
||||
for (GpeBlock = 0; GpeBlock < ACPI_MAX_GPE_BLOCKS; GpeBlock++)
|
||||
GpeBlock = AcpiGbl_GpeBlockListHead;
|
||||
while (GpeBlock)
|
||||
{
|
||||
for (i = 0; i < AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount; i++)
|
||||
for (i = 0; i < GpeBlock->RegisterCount; i++)
|
||||
{
|
||||
Status = AcpiHwLowLevelWrite (8, 0xFF,
|
||||
AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress, i);
|
||||
&GpeBlock->RegisterInfo[i].StatusAddress, (UINT32) i);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto UnlockAndExit;
|
||||
}
|
||||
}
|
||||
|
||||
GpeBlock = GpeBlock->Next;
|
||||
}
|
||||
|
||||
UnlockAndExit:
|
||||
@ -239,10 +242,13 @@ AcpiGetSleepTypeData (
|
||||
/*
|
||||
* Evaluate the namespace object containing the values for this state
|
||||
*/
|
||||
Status = AcpiNsEvaluateByName ((NATIVE_CHAR *) AcpiGbl_DbSleepStates[SleepState],
|
||||
Status = AcpiNsEvaluateByName ((char *) AcpiGbl_DbSleepStates[SleepState],
|
||||
NULL, &ObjDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s while evaluating SleepState [%s]\n",
|
||||
AcpiFormatException (Status), AcpiGbl_DbSleepStates[SleepState]));
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
@ -291,8 +297,8 @@ AcpiGetSleepTypeData (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Bad Sleep object %p type %s\n",
|
||||
ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "While evaluating SleepState [%s], bad Sleep object %p type %s\n",
|
||||
AcpiGbl_DbSleepStates[SleepState], ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
|
||||
}
|
||||
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
@ -467,7 +473,7 @@ AcpiSetRegister (
|
||||
|
||||
/*
|
||||
* Status Registers are different from the rest. Clear by
|
||||
* writing 1, writing 0 has no effect. So, the only relevent
|
||||
* writing 1, writing 0 has no effect. So, the only relevant
|
||||
* information is the single bit we're interested in, all others should
|
||||
* be written as 0 so they will be left unchanged
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: hwtimer.c - ACPI Power Management Timer Interface
|
||||
* $Revision: 21 $
|
||||
* $Revision: 24 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -210,10 +210,13 @@ AcpiGetTimer (
|
||||
* transitions (unlike many CPU timestamp counters) -- making it
|
||||
* a versatile and accurate timer.
|
||||
*
|
||||
* Note that this function accomodates only a single timer
|
||||
* Note that this function accommodates only a single timer
|
||||
* rollover. Thus for 24-bit timers, this function should only
|
||||
* be used for calculating durations less than ~4.6 seconds
|
||||
* (~20 hours for 32-bit timers).
|
||||
* (~20 minutes for 32-bit timers) -- calculations below
|
||||
*
|
||||
* 2**24 Ticks / 3,600,000 Ticks/Sec = 4.66 sec
|
||||
* 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
|
||||
* $Revision: 165 $
|
||||
* $Revision: 171 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -198,6 +198,20 @@ AcpiNsRootInitialize (void)
|
||||
*/
|
||||
if (InitVal->Val)
|
||||
{
|
||||
ACPI_STRING Val;
|
||||
|
||||
Status = AcpiOsPredefinedOverride(InitVal, &Val);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not override predefined %s\n",
|
||||
InitVal->Name));
|
||||
}
|
||||
|
||||
if (!Val)
|
||||
{
|
||||
Val = InitVal->Val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Entry requests an initial value, allocate a
|
||||
* descriptor for it.
|
||||
@ -218,7 +232,7 @@ AcpiNsRootInitialize (void)
|
||||
{
|
||||
case ACPI_TYPE_METHOD:
|
||||
ObjDesc->Method.ParamCount =
|
||||
(UINT8) ACPI_STRTOUL (InitVal->Val, NULL, 10);
|
||||
(UINT8) ACPI_STRTOUL (Val, NULL, 10);
|
||||
ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID;
|
||||
|
||||
#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
||||
@ -232,7 +246,7 @@ AcpiNsRootInitialize (void)
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
ObjDesc->Integer.Value =
|
||||
(ACPI_INTEGER) ACPI_STRTOUL (InitVal->Val, NULL, 10);
|
||||
(ACPI_INTEGER) ACPI_STRTOUL (Val, NULL, 10);
|
||||
break;
|
||||
|
||||
|
||||
@ -241,8 +255,8 @@ AcpiNsRootInitialize (void)
|
||||
/*
|
||||
* Build an object around the static string
|
||||
*/
|
||||
ObjDesc->String.Length = (UINT32) ACPI_STRLEN (InitVal->Val);
|
||||
ObjDesc->String.Pointer = InitVal->Val;
|
||||
ObjDesc->String.Length = (UINT32) ACPI_STRLEN (Val);
|
||||
ObjDesc->String.Pointer = Val;
|
||||
ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
|
||||
break;
|
||||
|
||||
@ -251,7 +265,7 @@ AcpiNsRootInitialize (void)
|
||||
|
||||
ObjDesc->Mutex.Node = NewNode;
|
||||
ObjDesc->Mutex.SyncLevel =
|
||||
(UINT16) ACPI_STRTOUL (InitVal->Val, NULL, 10);
|
||||
(UINT16) ACPI_STRTOUL (Val, NULL, 10);
|
||||
|
||||
if (ACPI_STRCMP (InitVal->Name, "_GL_") == 0)
|
||||
{
|
||||
@ -337,7 +351,7 @@ AcpiNsRootInitialize (void)
|
||||
ACPI_STATUS
|
||||
AcpiNsLookup (
|
||||
ACPI_GENERIC_STATE *ScopeInfo,
|
||||
NATIVE_CHAR *Pathname,
|
||||
char *Pathname,
|
||||
ACPI_OBJECT_TYPE Type,
|
||||
ACPI_INTERPRETER_MODE InterpreterMode,
|
||||
UINT32 Flags,
|
||||
@ -345,7 +359,7 @@ AcpiNsLookup (
|
||||
ACPI_NAMESPACE_NODE **ReturnNode)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
NATIVE_CHAR *Path = Pathname;
|
||||
char *Path = Pathname;
|
||||
ACPI_NAMESPACE_NODE *PrefixNode;
|
||||
ACPI_NAMESPACE_NODE *CurrentNode = NULL;
|
||||
ACPI_NAMESPACE_NODE *ThisNode = NULL;
|
||||
@ -355,7 +369,7 @@ AcpiNsLookup (
|
||||
ACPI_OBJECT_TYPE TypeToCheckFor;
|
||||
ACPI_OBJECT_TYPE ThisSearchType;
|
||||
UINT32 SearchParentFlag = ACPI_NS_SEARCH_PARENT;
|
||||
UINT32 LocalFlags = Flags & ~(ACPI_NS_ERROR_IF_FOUND |
|
||||
UINT32 LocalFlags = Flags & ~(ACPI_NS_ERROR_IF_FOUND |
|
||||
ACPI_NS_SEARCH_PARENT);
|
||||
|
||||
|
||||
@ -393,17 +407,17 @@ AcpiNsLookup (
|
||||
PrefixNode = ScopeInfo->Scope.Node;
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (PrefixNode) != ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%p] Not a namespace node\n",
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%p] Not a namespace node\n",
|
||||
PrefixNode));
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* This node might not be a actual "scope" node (such as a
|
||||
* Device/Method, etc.) It could be a Package or other object node.
|
||||
* This node might not be a actual "scope" node (such as a
|
||||
* Device/Method, etc.) It could be a Package or other object node.
|
||||
* Backup up the tree to find the containing scope node.
|
||||
*/
|
||||
while (!AcpiNsOpensScope (PrefixNode->Type) &&
|
||||
while (!AcpiNsOpensScope (PrefixNode->Type) &&
|
||||
PrefixNode->Type != ACPI_TYPE_ANY)
|
||||
{
|
||||
PrefixNode = AcpiNsGetParentNode (PrefixNode);
|
||||
@ -454,7 +468,7 @@ AcpiNsLookup (
|
||||
|
||||
Path++;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
|
||||
"Path is absolute from root [%p]\n", ThisNode));
|
||||
}
|
||||
else
|
||||
@ -499,7 +513,7 @@ AcpiNsLookup (
|
||||
if (SearchParentFlag == ACPI_NS_NO_UPSEARCH)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
|
||||
"Search scope is [%4.4s], path has %d carat(s)\n",
|
||||
"Search scope is [%4.4s], path has %d carat(s)\n",
|
||||
ThisNode->Name.Ascii, NumCarats));
|
||||
}
|
||||
}
|
||||
@ -633,7 +647,7 @@ AcpiNsLookup (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
|
||||
"Name [%4.4s] not found in scope [%4.4s] %p\n",
|
||||
(char *) &SimpleName, (char *) &CurrentNode->Name,
|
||||
(char *) &SimpleName, (char *) &CurrentNode->Name,
|
||||
CurrentNode));
|
||||
}
|
||||
|
||||
@ -665,7 +679,7 @@ AcpiNsLookup (
|
||||
|
||||
ACPI_REPORT_WARNING (
|
||||
("NsLookup: Type mismatch on %4.4s (%s), searching for (%s)\n",
|
||||
(char *) &SimpleName, AcpiUtGetTypeName (ThisNode->Type),
|
||||
(char *) &SimpleName, AcpiUtGetTypeName (ThisNode->Type),
|
||||
AcpiUtGetTypeName (TypeToCheckFor)));
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nsalloc - Namespace allocation and deletion utilities
|
||||
* $Revision: 77 $
|
||||
* $Revision: 79 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -226,14 +226,14 @@ AcpiNsDeleteNode (
|
||||
#ifdef ACPI_ALPHABETIC_NAMESPACE
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsCompareNames
|
||||
* FUNCTION: AcpiNsCompareNames
|
||||
*
|
||||
* PARAMETERS: Name1 - First name to compare
|
||||
* Name2 - Second name to compare
|
||||
*
|
||||
* RETURN: value from strncmp
|
||||
*
|
||||
* DESCRIPTION: Compare two ACPI names. Names that are prefixed with an
|
||||
* DESCRIPTION: Compare two ACPI names. Names that are prefixed with an
|
||||
* underscore are forced to be alphabetically first.
|
||||
*
|
||||
******************************************************************************/
|
||||
@ -372,7 +372,7 @@ AcpiNsInstallNode (
|
||||
|
||||
if (!(Node->Flags & ANOBJ_END_OF_PEER_LIST))
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Loop above terminated without reaching the end-of-list.
|
||||
* Insert the new node at the current location
|
||||
*/
|
||||
@ -413,7 +413,7 @@ AcpiNsInstallNode (
|
||||
Node->Type = (UINT8) Type;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s (%s) added to %4.4s (%s) %p at %p\n",
|
||||
Node->Name.Ascii, AcpiUtGetTypeName (Node->Type),
|
||||
Node->Name.Ascii, AcpiUtGetTypeName (Node->Type),
|
||||
ParentNode->Name.Ascii, AcpiUtGetTypeName (ParentNode->Type), ParentNode, Node));
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsdump - table dumping routines for debug
|
||||
* $Revision: 146 $
|
||||
* $Revision: 151 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -186,16 +186,13 @@ AcpiNsPrintPathname (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
void
|
||||
AcpiNsDumpPathname (
|
||||
ACPI_HANDLE Handle,
|
||||
NATIVE_CHAR *Msg,
|
||||
char *Msg,
|
||||
UINT32 Level,
|
||||
UINT32 Component)
|
||||
{
|
||||
ACPI_BUFFER Buffer;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("NsDumpPathname");
|
||||
|
||||
@ -204,21 +201,14 @@ AcpiNsDumpPathname (
|
||||
|
||||
if (!(AcpiDbgLevel & Level) || !(AcpiDbgLayer & Component))
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
/* Convert handle to a full pathname and print it (with supplied message) */
|
||||
|
||||
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
|
||||
|
||||
Status = AcpiNsHandleToPathname (Handle, &Buffer);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
AcpiOsPrintf ("%s %s (Node %p)\n", Msg, (char *) Buffer.Pointer, Handle);
|
||||
ACPI_MEM_FREE (Buffer.Pointer);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
AcpiNsPrintNodePathname (Handle, Msg);
|
||||
AcpiOsPrintf ("\n");
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsdump - table dumping routines for debug
|
||||
* $Revision: 4 $
|
||||
* $Revision: 5 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nseval - Object evaluation interfaces -- includes control
|
||||
* method lookup and execution.
|
||||
* $Revision: 119 $
|
||||
* $Revision: 121 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -153,14 +153,14 @@
|
||||
ACPI_STATUS
|
||||
AcpiNsEvaluateRelative (
|
||||
ACPI_NAMESPACE_NODE *Handle,
|
||||
NATIVE_CHAR *Pathname,
|
||||
char *Pathname,
|
||||
ACPI_OPERAND_OBJECT **Params,
|
||||
ACPI_OPERAND_OBJECT **ReturnObject)
|
||||
{
|
||||
ACPI_NAMESPACE_NODE *PrefixNode;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_NAMESPACE_NODE *Node = NULL;
|
||||
NATIVE_CHAR *InternalPath = NULL;
|
||||
char *InternalPath = NULL;
|
||||
ACPI_GENERIC_STATE ScopeInfo;
|
||||
|
||||
|
||||
@ -256,13 +256,13 @@ AcpiNsEvaluateRelative (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsEvaluateByName (
|
||||
NATIVE_CHAR *Pathname,
|
||||
char *Pathname,
|
||||
ACPI_OPERAND_OBJECT **Params,
|
||||
ACPI_OPERAND_OBJECT **ReturnObject)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_NAMESPACE_NODE *Node = NULL;
|
||||
NATIVE_CHAR *InternalPath = NULL;
|
||||
char *InternalPath = NULL;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("NsEvaluateByName");
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsinit - namespace initialization
|
||||
* $Revision: 50 $
|
||||
* $Revision: 55 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -152,7 +152,7 @@ AcpiNsInitializeObjects (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
"**** Starting initialization of namespace objects ****\n"));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Completing Region/Field/Buffer/Package initialization:"));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Completing Region/Field/Buffer/Package initialization:"));
|
||||
|
||||
/* Set all init info to zero */
|
||||
|
||||
@ -169,12 +169,13 @@ AcpiNsInitializeObjects (
|
||||
AcpiFormatException (Status)));
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
|
||||
"\nInitialized %hd/%hd Regions %hd/%hd Fields %hd/%hd Buffers %hd/%hd Packages (%hd 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,
|
||||
"%hd Control Methods found\n", Info.MethodCount));
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
|
||||
@ -217,7 +218,7 @@ AcpiNsInitializeDevices (
|
||||
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_INIT, "Executing all Device _STA and_INI methods:"));
|
||||
|
||||
/* Walk namespace for all objects of type Device */
|
||||
|
||||
@ -230,7 +231,7 @@ AcpiNsInitializeDevices (
|
||||
AcpiFormatException (Status)));
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
|
||||
"\n%hd Devices found containing: %hd _STA, %hd _INI methods\n",
|
||||
Info.DeviceCount, Info.Num_STA, Info.Num_INI));
|
||||
|
||||
@ -375,9 +376,11 @@ AcpiNsInitOneObject (
|
||||
Node->Name.Ascii, AcpiUtGetTypeName (Type), AcpiFormatException (Status)));
|
||||
}
|
||||
|
||||
if (!(AcpiDbgLevel & ACPI_LV_INIT))
|
||||
/* Print a dot for each object unless we are going to print the entire pathname */
|
||||
|
||||
if (!(AcpiDbgLevel & ACPI_LV_INIT_NAMES))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -421,7 +424,7 @@ AcpiNsInitOneDevice (
|
||||
|
||||
if ((AcpiDbgLevel <= ACPI_LV_ALL_EXCEPTIONS) && (!(AcpiDbgLevel & ACPI_LV_INFO)))
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "."));
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
|
||||
}
|
||||
|
||||
Info->DeviceCount++;
|
||||
@ -448,7 +451,7 @@ AcpiNsInitOneDevice (
|
||||
/*
|
||||
* Run _STA to determine if we can run _INI on the device.
|
||||
*/
|
||||
ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (Node, "_STA [Method]"));
|
||||
ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_METHOD, Node, "_STA"));
|
||||
Status = AcpiUtExecute_STA (Node, &Flags);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
@ -469,7 +472,7 @@ AcpiNsInitOneDevice (
|
||||
/*
|
||||
* The device is present. Run _INI.
|
||||
*/
|
||||
ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ObjHandle, "_INI [Method]"));
|
||||
ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (ACPI_TYPE_METHOD, ObjHandle, "_INI"));
|
||||
Status = AcpiNsEvaluateRelative (ObjHandle, "_INI", NULL, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
@ -480,7 +483,7 @@ AcpiNsInitOneDevice (
|
||||
/* Ignore error and move on to next device */
|
||||
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
NATIVE_CHAR *ScopeName = AcpiNsGetExternalPathname (ObjHandle);
|
||||
char *ScopeName = AcpiNsGetExternalPathname (ObjHandle);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n",
|
||||
ScopeName, AcpiFormatException (Status)));
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsload - namespace loading/expanding/contracting procedures
|
||||
* $Revision: 59 $
|
||||
* $Revision: 64 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -118,7 +118,6 @@
|
||||
|
||||
#include "acpi.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acparser.h"
|
||||
#include "acdispat.h"
|
||||
|
||||
|
||||
@ -126,127 +125,6 @@
|
||||
ACPI_MODULE_NAME ("nsload")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: NsOneCompleteParse
|
||||
*
|
||||
* PARAMETERS: PassNumber - 1 or 2
|
||||
* TableDesc - The table to be parsed.
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Perform one complete parse of an ACPI/AML table.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsOneCompleteParse (
|
||||
UINT32 PassNumber,
|
||||
ACPI_TABLE_DESC *TableDesc)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *ParseRoot;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_WALK_STATE *WalkState;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("NsOneCompleteParse");
|
||||
|
||||
|
||||
/* Create and init a Root Node */
|
||||
|
||||
ParseRoot = AcpiPsCreateScopeOp ();
|
||||
if (!ParseRoot)
|
||||
{
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
|
||||
/* Create and initialize a new walk state */
|
||||
|
||||
WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT,
|
||||
NULL, NULL, NULL);
|
||||
if (!WalkState)
|
||||
{
|
||||
AcpiPsFreeOp (ParseRoot);
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
Status = AcpiDsInitAmlWalk (WalkState, ParseRoot, NULL, TableDesc->AmlStart,
|
||||
TableDesc->AmlLength, NULL, NULL, PassNumber);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiDsDeleteWalkState (WalkState);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Parse the AML */
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "*PARSE* pass %d parse\n", PassNumber));
|
||||
Status = AcpiPsParseAml (WalkState);
|
||||
|
||||
AcpiPsDeleteParseTree (ParseRoot);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsParseTable
|
||||
*
|
||||
* PARAMETERS: TableDesc - An ACPI table descriptor for table to parse
|
||||
* StartNode - Where to enter the table into the namespace
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Parse AML within an ACPI table and return a tree of ops
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsParseTable (
|
||||
ACPI_TABLE_DESC *TableDesc,
|
||||
ACPI_NAMESPACE_NODE *StartNode)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("NsParseTable");
|
||||
|
||||
|
||||
/*
|
||||
* AML Parse, pass 1
|
||||
*
|
||||
* In this pass, we load most of the namespace. Control methods
|
||||
* are not parsed until later. A parse tree is not created. Instead,
|
||||
* each Parser Op subtree is deleted when it is finished. This saves
|
||||
* a great deal of memory, and allows a small cache of parse objects
|
||||
* to service the entire parse. The second pass of the parse then
|
||||
* performs another complete parse of the AML..
|
||||
*/
|
||||
Status = AcpiNsOneCompleteParse (1, TableDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* AML Parse, pass 2
|
||||
*
|
||||
* In this pass, we resolve forward references and other things
|
||||
* that could not be completed during the first pass.
|
||||
* Another complete parse of the AML is performed, but the
|
||||
* overhead of this is compensated for by the fact that the
|
||||
* parse objects are all cached.
|
||||
*/
|
||||
Status = AcpiNsOneCompleteParse (2, TableDesc);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
#ifndef ACPI_NO_METHOD_EXECUTION
|
||||
|
||||
/*******************************************************************************
|
||||
@ -292,10 +170,12 @@ AcpiNsLoadTable (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "AML block at %p\n", TableDesc->AmlStart));
|
||||
|
||||
/* Ignore table if there is no AML contained within */
|
||||
|
||||
if (!TableDesc->AmlLength)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Zero-length AML block\n"));
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
ACPI_REPORT_WARNING (("Zero-length AML block in table [%4.4s]\n", TableDesc->Pointer->Signature));
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -525,7 +405,7 @@ AcpiNsLoadNamespace (
|
||||
(void) AcpiNsLoadTableByType (ACPI_TABLE_SSDT);
|
||||
(void) AcpiNsLoadTableByType (ACPI_TABLE_PSDT);
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK,
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
|
||||
"ACPI Namespace successfully loaded at root %p\n",
|
||||
AcpiGbl_RootNode));
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nsnames - Name manipulation and search
|
||||
* $Revision: 79 $
|
||||
* $Revision: 82 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -144,7 +144,7 @@ void
|
||||
AcpiNsBuildExternalPath (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
ACPI_SIZE Size,
|
||||
NATIVE_CHAR *NameBuffer)
|
||||
char *NameBuffer)
|
||||
{
|
||||
ACPI_SIZE Index;
|
||||
ACPI_NAMESPACE_NODE *ParentNode;
|
||||
@ -180,7 +180,7 @@ AcpiNsBuildExternalPath (
|
||||
/* Prefix name with the path separator */
|
||||
|
||||
Index--;
|
||||
NameBuffer[Index] = PATH_SEPARATOR;
|
||||
NameBuffer[Index] = ACPI_PATH_SEPARATOR;
|
||||
}
|
||||
|
||||
/* Overwrite final separator with the root prefix character */
|
||||
@ -213,11 +213,11 @@ AcpiNsBuildExternalPath (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiNsGetExternalPathname (
|
||||
ACPI_NAMESPACE_NODE *Node)
|
||||
{
|
||||
NATIVE_CHAR *NameBuffer;
|
||||
char *NameBuffer;
|
||||
ACPI_SIZE Size;
|
||||
|
||||
|
||||
@ -277,7 +277,7 @@ AcpiNsGetPathnameLength (
|
||||
|
||||
while (NextNode && (NextNode != AcpiGbl_RootNode))
|
||||
{
|
||||
Size += PATH_SEGMENT_LENGTH;
|
||||
Size += ACPI_PATH_SEGMENT_LENGTH;
|
||||
NextNode = AcpiNsGetParentNode (NextNode);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsobject - Utilities for objects attached to namespace
|
||||
* table entries
|
||||
* $Revision: 85 $
|
||||
* $Revision: 87 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -280,7 +280,7 @@ AcpiNsAttachObject (
|
||||
*
|
||||
* RETURN: None.
|
||||
*
|
||||
* DESCRIPTION: Detach/delete an object associated with a namespace node.
|
||||
* DESCRIPTION: Detach/delete an object associated with a namespace node.
|
||||
* if the object is an allocated object, it is freed.
|
||||
* Otherwise, the field is simply cleared.
|
||||
*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nssearch - Namespace search
|
||||
* $Revision: 92 $
|
||||
* $Revision: 95 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -135,8 +135,8 @@
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Search a single level of the namespace. Performs a
|
||||
* simple search of the specified level, and does not add
|
||||
* DESCRIPTION: Search a single level of the namespace. Performs a
|
||||
* simple search of the specified level, and does not add
|
||||
* entries or search parents.
|
||||
*
|
||||
*
|
||||
@ -167,7 +167,7 @@ AcpiNsSearchNode (
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
if (ACPI_LV_NAMES & AcpiDbgLevel)
|
||||
{
|
||||
NATIVE_CHAR *ScopeName;
|
||||
char *ScopeName;
|
||||
|
||||
ScopeName = AcpiNsGetExternalPathname (Node);
|
||||
if (ScopeName)
|
||||
@ -181,7 +181,7 @@ AcpiNsSearchNode (
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Search for name at this namespace level, which is to say that we
|
||||
* Search for name at this namespace level, which is to say that we
|
||||
* must search for the name among the children of this object
|
||||
*/
|
||||
NextNode = Node->Child;
|
||||
@ -269,7 +269,7 @@ AcpiNsSearchParentTree (
|
||||
ParentNode = AcpiNsGetParentNode (Node);
|
||||
|
||||
/*
|
||||
* If there is no parent (i.e., we are at the root) or
|
||||
* If there is no parent (i.e., we are at the root) or
|
||||
* type is "local", we won't be searching the parent tree.
|
||||
*/
|
||||
if (!ParentNode)
|
||||
@ -379,7 +379,7 @@ AcpiNsSearchAndEnter (
|
||||
|
||||
if (!AcpiUtValidAcpiName (TargetName))
|
||||
{
|
||||
ACPI_REPORT_ERROR (("NsSearchAndEnter: Bad character in ACPI Name: %X\n",
|
||||
ACPI_REPORT_ERROR (("NsSearchAndEnter: Bad character in ACPI Name: %X\n",
|
||||
TargetName));
|
||||
return_ACPI_STATUS (AE_BAD_CHARACTER);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
|
||||
* parents and siblings and Scope manipulation
|
||||
* $Revision: 116 $
|
||||
* $Revision: 122 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -143,7 +143,7 @@
|
||||
|
||||
void
|
||||
AcpiNsReportError (
|
||||
NATIVE_CHAR *ModuleName,
|
||||
char *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
UINT32 ComponentId,
|
||||
char *InternalName,
|
||||
@ -152,12 +152,12 @@ AcpiNsReportError (
|
||||
ACPI_STATUS Status;
|
||||
char *Name;
|
||||
|
||||
|
||||
|
||||
/* Convert path to external format */
|
||||
|
||||
Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, InternalName, NULL, &Name);
|
||||
|
||||
AcpiOsPrintf ("%8s-%04d: *** Error: Looking up ",
|
||||
AcpiOsPrintf ("%8s-%04d: *** Error: Looking up ",
|
||||
ModuleName, LineNumber);
|
||||
|
||||
/* Print target name */
|
||||
@ -171,7 +171,7 @@ AcpiNsReportError (
|
||||
AcpiOsPrintf ("[COULD NOT EXTERNALIZE NAME]");
|
||||
}
|
||||
|
||||
AcpiOsPrintf (" in namespace, %s\n",
|
||||
AcpiOsPrintf (" in namespace, %s\n",
|
||||
AcpiFormatException (LookupStatus));
|
||||
|
||||
if (Name)
|
||||
@ -181,6 +181,85 @@ AcpiNsReportError (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsReportMethodError
|
||||
*
|
||||
* PARAMETERS: ModuleName - Caller's module name (for error output)
|
||||
* LineNumber - Caller's line number (for error output)
|
||||
* ComponentId - Caller's component ID (for error output)
|
||||
* Message - Error message to use on failure
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Print warning message with full pathname
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiNsReportMethodError (
|
||||
char *ModuleName,
|
||||
UINT32 LineNumber,
|
||||
UINT32 ComponentId,
|
||||
char *Message,
|
||||
ACPI_NAMESPACE_NODE *PrefixNode,
|
||||
char *Path,
|
||||
ACPI_STATUS MethodStatus)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_NAMESPACE_NODE *Node = PrefixNode;
|
||||
|
||||
|
||||
if (Path)
|
||||
{
|
||||
Status = AcpiNsGetNodeByPath (Path, PrefixNode, ACPI_NS_NO_UPSEARCH, &Node);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("ReportMethodError: Could not get node\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("%8s-%04d: *** Error: ", ModuleName, LineNumber);
|
||||
AcpiNsPrintNodePathname (Node, Message);
|
||||
AcpiOsPrintf (", %s\n", AcpiFormatException (MethodStatus));
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsPrintNodePathname
|
||||
*
|
||||
* PARAMETERS: Node - Object
|
||||
* Msg - Prefix message
|
||||
*
|
||||
* DESCRIPTION: Print an object's full namespace pathname
|
||||
* Manages allocation/freeing of a pathname buffer
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiNsPrintNodePathname (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
char *Msg)
|
||||
{
|
||||
ACPI_BUFFER Buffer;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
/* Convert handle to a full pathname and print it (with supplied message) */
|
||||
|
||||
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
|
||||
|
||||
Status = AcpiNsHandleToPathname (Node, &Buffer);
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
AcpiOsPrintf ("%s [%s] (Node %p)", Msg, (char *) Buffer.Pointer, Node);
|
||||
ACPI_MEM_FREE (Buffer.Pointer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiNsValidRootPrefix
|
||||
@ -195,7 +274,7 @@ AcpiNsReportError (
|
||||
|
||||
BOOLEAN
|
||||
AcpiNsValidRootPrefix (
|
||||
NATIVE_CHAR Prefix)
|
||||
char Prefix)
|
||||
{
|
||||
|
||||
return ((BOOLEAN) (Prefix == '\\'));
|
||||
@ -216,7 +295,7 @@ AcpiNsValidRootPrefix (
|
||||
|
||||
BOOLEAN
|
||||
AcpiNsValidPathSeparator (
|
||||
NATIVE_CHAR Sep)
|
||||
char Sep)
|
||||
{
|
||||
|
||||
return ((BOOLEAN) (Sep == '.'));
|
||||
@ -298,7 +377,7 @@ void
|
||||
AcpiNsGetInternalNameLength (
|
||||
ACPI_NAMESTRING_INFO *Info)
|
||||
{
|
||||
NATIVE_CHAR *NextExternalChar;
|
||||
char *NextExternalChar;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
@ -379,10 +458,10 @@ AcpiNsBuildInternalName (
|
||||
ACPI_NAMESTRING_INFO *Info)
|
||||
{
|
||||
UINT32 NumSegments = Info->NumSegments;
|
||||
NATIVE_CHAR *InternalName = Info->InternalName;
|
||||
NATIVE_CHAR *ExternalName = Info->NextExternalChar;
|
||||
NATIVE_CHAR *Result = NULL;
|
||||
NATIVE_UINT i;
|
||||
char *InternalName = Info->InternalName;
|
||||
char *ExternalName = Info->NextExternalChar;
|
||||
char *Result = NULL;
|
||||
ACPI_NATIVE_UINT i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("NsBuildInternalName");
|
||||
@ -432,13 +511,13 @@ AcpiNsBuildInternalName (
|
||||
else if (NumSegments == 2)
|
||||
{
|
||||
InternalName[i] = AML_DUAL_NAME_PREFIX;
|
||||
Result = &InternalName[i+1];
|
||||
Result = &InternalName[(ACPI_NATIVE_UINT) (i+1)];
|
||||
}
|
||||
else
|
||||
{
|
||||
InternalName[i] = AML_MULTI_NAME_PREFIX_OP;
|
||||
InternalName[i+1] = (char) NumSegments;
|
||||
Result = &InternalName[i+2];
|
||||
InternalName[(ACPI_NATIVE_UINT) (i+1)] = (char) NumSegments;
|
||||
Result = &InternalName[(ACPI_NATIVE_UINT) (i+2)];
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,10 +593,10 @@ AcpiNsBuildInternalName (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsInternalizeName (
|
||||
NATIVE_CHAR *ExternalName,
|
||||
NATIVE_CHAR **ConvertedName)
|
||||
char *ExternalName,
|
||||
char **ConvertedName)
|
||||
{
|
||||
NATIVE_CHAR *InternalName;
|
||||
char *InternalName;
|
||||
ACPI_NAMESTRING_INFO Info;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
@ -582,12 +661,12 @@ AcpiNsExternalizeName (
|
||||
UINT32 *ConvertedNameLength,
|
||||
char **ConvertedName)
|
||||
{
|
||||
NATIVE_UINT_MIN32 PrefixLength = 0;
|
||||
NATIVE_UINT_MIN32 NamesIndex = 0;
|
||||
NATIVE_UINT_MIN32 NumSegments = 0;
|
||||
NATIVE_UINT_MIN32 i = 0;
|
||||
NATIVE_UINT_MIN32 j = 0;
|
||||
NATIVE_UINT_MIN32 RequiredLength;
|
||||
ACPI_NATIVE_UINT NamesIndex = 0;
|
||||
ACPI_NATIVE_UINT NumSegments = 0;
|
||||
ACPI_NATIVE_UINT RequiredLength;
|
||||
ACPI_NATIVE_UINT PrefixLength = 0;
|
||||
ACPI_NATIVE_UINT i = 0;
|
||||
ACPI_NATIVE_UINT j = 0;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("NsExternalizeName");
|
||||
@ -646,7 +725,7 @@ AcpiNsExternalizeName (
|
||||
/* <count> 4-byte names */
|
||||
|
||||
NamesIndex = PrefixLength + 2;
|
||||
NumSegments = (UINT32) (UINT8) InternalName[PrefixLength + 1];
|
||||
NumSegments = (UINT32) (UINT8) InternalName[(ACPI_NATIVE_UINT) (PrefixLength + 1)];
|
||||
break;
|
||||
|
||||
case AML_DUAL_NAME_PREFIX:
|
||||
@ -932,30 +1011,28 @@ AcpiNsOpensScope (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiNsGetNodeByPath (
|
||||
NATIVE_CHAR *Pathname,
|
||||
char *Pathname,
|
||||
ACPI_NAMESPACE_NODE *StartNode,
|
||||
UINT32 Flags,
|
||||
ACPI_NAMESPACE_NODE **ReturnNode)
|
||||
{
|
||||
ACPI_GENERIC_STATE ScopeInfo;
|
||||
ACPI_STATUS Status;
|
||||
NATIVE_CHAR *InternalPath = NULL;
|
||||
char *InternalPath = NULL;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR ("NsGetNodeByPath", Pathname);
|
||||
|
||||
|
||||
if (!Pathname)
|
||||
if (Pathname)
|
||||
{
|
||||
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||
}
|
||||
/* Convert path to internal representation */
|
||||
|
||||
/* Convert path to internal representation */
|
||||
|
||||
Status = AcpiNsInternalizeName (Pathname, &InternalPath);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
Status = AcpiNsInternalizeName (Pathname, &InternalPath);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
|
||||
/* Must lock namespace during lookup */
|
||||
@ -985,7 +1062,11 @@ AcpiNsGetNodeByPath (
|
||||
/* Cleanup */
|
||||
|
||||
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
|
||||
ACPI_MEM_FREE (InternalPath);
|
||||
|
||||
if (InternalPath)
|
||||
{
|
||||
ACPI_MEM_FREE (InternalPath);
|
||||
}
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nswalk - Functions for walking the ACPI namespace
|
||||
* $Revision: 33 $
|
||||
* $Revision: 34 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsxfeval - Public interfaces to the ACPI subsystem
|
||||
* ACPI Object evaluation interfaces
|
||||
* $Revision: 4 $
|
||||
* $Revision: 7 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -653,7 +653,7 @@ AcpiNsGetDeviceCallback (
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiGetDevices (
|
||||
NATIVE_CHAR *HID,
|
||||
char *HID,
|
||||
ACPI_WALK_CALLBACK UserFunction,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
@ -707,7 +707,7 @@ AcpiGetDevices (
|
||||
*
|
||||
* FUNCTION: AcpiAttachData
|
||||
*
|
||||
* PARAMETERS: ObjHandle - Namespace node
|
||||
* PARAMETERS: ObjHandle - Namespace node
|
||||
* Handler - Handler for this attachment
|
||||
* Data - Pointer to data to be attached
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
|
||||
* ACPI Namespace oriented interfaces
|
||||
* $Revision: 91 $
|
||||
* $Revision: 94 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -277,7 +277,7 @@ AcpiGetName (
|
||||
|
||||
/* Validate/Allocate/Clear caller buffer */
|
||||
|
||||
Status = AcpiUtInitializeBuffer (Buffer, PATH_SEGMENT_LENGTH);
|
||||
Status = AcpiUtInitializeBuffer (Buffer, ACPI_PATH_SEGMENT_LENGTH);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto UnlockAndExit;
|
||||
@ -287,7 +287,7 @@ AcpiGetName (
|
||||
|
||||
ACPI_STRNCPY (Buffer->Pointer, Node->Name.Ascii,
|
||||
ACPI_NAME_SIZE);
|
||||
((NATIVE_CHAR *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0;
|
||||
((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0;
|
||||
Status = AE_OK;
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Module Name: nsxfobj - Public interfaces to the ACPI subsystem
|
||||
* ACPI Object oriented interfaces
|
||||
* $Revision: 114 $
|
||||
* $Revision: 116 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -242,7 +242,7 @@ AcpiGetParent (
|
||||
*RetHandle =
|
||||
AcpiNsConvertEntryToHandle (AcpiNsGetParentNode (Node));
|
||||
|
||||
/* Return exeption if parent is null */
|
||||
/* Return exception if parent is null */
|
||||
|
||||
if (!AcpiNsGetParentNode (Node))
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psargs - Parse AML opcode arguments
|
||||
* $Revision: 65 $
|
||||
* $Revision: 69 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -215,7 +215,7 @@ AcpiPsGetNextPackageEnd (
|
||||
ACPI_PARSE_STATE *ParserState)
|
||||
{
|
||||
UINT8 *Start = ParserState->Aml;
|
||||
NATIVE_UINT Length;
|
||||
ACPI_NATIVE_UINT Length;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE ("PsGetNextPackageEnd");
|
||||
@ -223,7 +223,7 @@ AcpiPsGetNextPackageEnd (
|
||||
|
||||
/* Function below changes ParserState->Aml */
|
||||
|
||||
Length = (NATIVE_UINT) AcpiPsGetNextPackageLength (ParserState);
|
||||
Length = (ACPI_NATIVE_UINT) AcpiPsGetNextPackageLength (ParserState);
|
||||
|
||||
return_PTR (Start + Length); /* end of package */
|
||||
}
|
||||
@ -244,7 +244,7 @@ AcpiPsGetNextPackageEnd (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiPsGetNextNamestring (
|
||||
ACPI_PARSE_STATE *ParserState)
|
||||
{
|
||||
@ -302,7 +302,7 @@ AcpiPsGetNextNamestring (
|
||||
}
|
||||
|
||||
ParserState->Aml = (UINT8*) End;
|
||||
return_PTR ((NATIVE_CHAR *) Start);
|
||||
return_PTR ((char *) Start);
|
||||
}
|
||||
|
||||
|
||||
@ -334,7 +334,7 @@ AcpiPsGetNextNamepath (
|
||||
ACPI_PARSE_OBJECT *Arg,
|
||||
BOOLEAN MethodCall)
|
||||
{
|
||||
NATIVE_CHAR *Path;
|
||||
char *Path;
|
||||
ACPI_PARSE_OBJECT *NameOp;
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_OPERAND_OBJECT *MethodDesc;
|
||||
@ -377,7 +377,7 @@ AcpiPsGetNextNamepath (
|
||||
* This name is actually a control method invocation
|
||||
*/
|
||||
MethodDesc = AcpiNsGetAttachedObject (Node);
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
"Control Method - %p Desc %p Path=%p\n",
|
||||
Node, MethodDesc, Path));
|
||||
|
||||
@ -399,13 +399,13 @@ AcpiPsGetNextNamepath (
|
||||
|
||||
if (!MethodDesc)
|
||||
{
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
"Control Method - %p has no attached object\n",
|
||||
Node));
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
|
||||
"Control Method - %p Args %X\n",
|
||||
Node, MethodDesc->Method.ParamCount));
|
||||
|
||||
@ -424,13 +424,13 @@ AcpiPsGetNextNamepath (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* 1) Any error other than NOT_FOUND is always severe
|
||||
* 2) NOT_FOUND is only important if we are executing a method.
|
||||
* 3) If executing a CondRefOf opcode, NOT_FOUND is ok.
|
||||
*/
|
||||
if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) &&
|
||||
(Status == AE_NOT_FOUND) &&
|
||||
if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) &&
|
||||
(Status == AE_NOT_FOUND) &&
|
||||
(WalkState->Op->Common.AmlOpcode != AML_COND_REF_OF_OP)) ||
|
||||
|
||||
(Status != AE_NOT_FOUND))
|
||||
@ -442,7 +442,7 @@ AcpiPsGetNextNamepath (
|
||||
/*
|
||||
* We got a NOT_FOUND during table load or we encountered
|
||||
* a CondRefOf(x) where the target does not exist.
|
||||
* -- either case is ok
|
||||
* -- either case is ok
|
||||
*/
|
||||
Status = AE_OK;
|
||||
}
|
||||
@ -450,7 +450,7 @@ AcpiPsGetNextNamepath (
|
||||
}
|
||||
|
||||
/*
|
||||
* Regardless of success/failure above,
|
||||
* Regardless of success/failure above,
|
||||
* Just initialize the Op with the pathname.
|
||||
*/
|
||||
AcpiPsInitOp (Arg, AML_INT_NAMEPATH_OP);
|
||||
@ -773,7 +773,7 @@ AcpiPsGetNextArg (
|
||||
|
||||
/* Fill in bytelist data */
|
||||
|
||||
Arg->Common.Value.Size = ACPI_PTR_DIFF (ParserState->PkgEnd,
|
||||
Arg->Common.Value.Size = ACPI_PTR_DIFF (ParserState->PkgEnd,
|
||||
ParserState->Aml);
|
||||
Arg->Named.Data = ParserState->Aml;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: psopcode - Parser/Interpreter opcode information table
|
||||
* $Revision: 73 $
|
||||
* $Revision: 77 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -350,7 +350,7 @@
|
||||
#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION, ARGI_TARGETREF)
|
||||
#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF)
|
||||
#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE)
|
||||
#define ARGI_LOCAL0 ARG_NONE
|
||||
#define ARGI_LOCAL1 ARG_NONE
|
||||
@ -364,7 +364,7 @@
|
||||
#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
|
||||
#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_METHODCALL_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFERSTRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFER_OR_STRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
|
||||
#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE
|
||||
@ -823,11 +823,11 @@ AcpiPsGetOpcodeInfo (
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
NATIVE_CHAR *
|
||||
char *
|
||||
AcpiPsGetOpcodeName (
|
||||
UINT16 Opcode)
|
||||
{
|
||||
#ifdef ACPI_DISASSEMBLER
|
||||
#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
|
||||
|
||||
const ACPI_OPCODE_INFO *Op;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user