diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2002-08-29 01:52:27 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2002-08-29 01:52:27 +0000 |
commit | 4559ce39515218336d303d08e98b6b270e30ae74 (patch) | |
tree | 95fceb56f685c0f3e06b5b639c2d61ec8a4d8ef1 | |
parent | 3bcec26bd51aa2f2e4522f20e03477d32e3cc132 (diff) | |
download | FreeBSD-src-4559ce39515218336d303d08e98b6b270e30ae74.zip FreeBSD-src-4559ce39515218336d303d08e98b6b270e30ae74.tar.gz |
Resolve conflicts arising from the ACPI CA 20020815 import.
-rw-r--r-- | sys/contrib/dev/acpica/acconfig.h | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acenv.h | 14 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acfreebsd.h | 12 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acgcc.h | 2 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acpiosxf.h | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acutils.h | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dbcmds.c | 14 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dbfileio.c | 10 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dbxface.c | 14 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/exfldio.c | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/exsystem.c | 2 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/hwsleep.c | 12 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/psparse.c | 154 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/rscreate.c | 2 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/tbget.c | 32 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/utglobal.c | 13 | ||||
-rw-r--r-- | sys/dev/acpica/Osd/OsdDebug.c | 2 | ||||
-rw-r--r-- | sys/dev/acpica/acpi.c | 45 | ||||
-rw-r--r-- | sys/dev/acpica/acpivar.h | 2 |
19 files changed, 178 insertions, 172 deletions
diff --git a/sys/contrib/dev/acpica/acconfig.h b/sys/contrib/dev/acpica/acconfig.h index 05b6b4f..7968a63 100644 --- a/sys/contrib/dev/acpica/acconfig.h +++ b/sys/contrib/dev/acpica/acconfig.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acconfig.h - Global configuration constants - * $Revision: 94 $ + * $Revision: 109 $ * *****************************************************************************/ @@ -125,7 +125,7 @@ *****************************************************************************/ /* - * ACPI_DEBUG - This switch enables all the debug facilities of the + * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the * ACPI subsystem. This includes the DEBUG_PRINT output * statements. When disabled, all DEBUG_PRINT * statements are compiled out. @@ -145,7 +145,7 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20020725 +#define ACPI_CA_VERSION 0x20020815 /* Version of ACPI supported */ diff --git a/sys/contrib/dev/acpica/acenv.h b/sys/contrib/dev/acpica/acenv.h index fbc9cd2..ea5cf30 100644 --- a/sys/contrib/dev/acpica/acenv.h +++ b/sys/contrib/dev/acpica/acenv.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acenv.h - Generation environment specific items - * $Revision: 95 $ + * $Revision: 101 $ * *****************************************************************************/ @@ -124,7 +124,7 @@ #ifdef _ACPI_DUMP_APP #ifndef MSDOS -#define ACPI_DEBUG +#define ACPI_DEBUG_OUTPUT #endif #define ACPI_APPLICATION #define ACPI_DISASSEMBLER @@ -135,15 +135,15 @@ #ifdef _ACPI_EXEC_APP #undef DEBUGGER_THREADING #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED -#define ACPI_DEBUG +#define ACPI_DEBUG_OUTPUT #define ACPI_APPLICATION -#define ENABLE_DEBUGGER +#define ACPI_DEBUGGER #define ACPI_DISASSEMBLER #define ACPI_USE_SYSTEM_CLIBRARY #endif #ifdef _ACPI_ASL_COMPILER -#define ACPI_DEBUG +#define ACPI_DEBUG_OUTPUT #define ACPI_APPLICATION #define ACPI_DISASSEMBLER #define ACPI_CONSTANT_EVAL_ONLY @@ -240,7 +240,7 @@ * 1) This is the debug version * 2) This is NOT a 16-bit version of the code (not enough real-mode memory) */ -#ifdef ACPI_DEBUG +#ifdef ACPI_DEBUG_OUTPUT #if ACPI_MACHINE_WIDTH != 16 #define ACPI_DBG_TRACK_ALLOCATIONS #endif @@ -401,7 +401,7 @@ typedef char *va_list; * Calling conventions: * * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) - * ACPI_EXTERNAL_XFACE - External ACPI interfaces + * ACPI_EXTERNAL_XFACE - External ACPI interfaces * ACPI_INTERNAL_XFACE - Internal ACPI interfaces * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces */ diff --git a/sys/contrib/dev/acpica/acfreebsd.h b/sys/contrib/dev/acpica/acfreebsd.h index fc26ec9..3889acd 100644 --- a/sys/contrib/dev/acpica/acfreebsd.h +++ b/sys/contrib/dev/acpica/acfreebsd.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acfreebsd.h - OS specific defines, etc. - * $Revision: 7 $ + * $Revision: 10 $ * *****************************************************************************/ @@ -128,6 +128,10 @@ #include "acgcc.h" #include <machine/acpica_machdep.h> +#ifdef ACPI_DEBUG +#define ACPI_DEBUG_OUTPUT /* for backward compatibility */ +#endif + #ifdef _KERNEL #include "opt_acpi.h" @@ -141,12 +145,12 @@ #undef DEBUGGER_THREADING #endif /* DEBUGGER_THREADING */ #define DEBUGGER_THREADING 0 /* integrated with DDB */ -#ifdef ACPI_DEBUG +#ifdef ACPI_DEBUG_OUTPUT #include "opt_ddb.h" #ifdef DDB -#define ENABLE_DEBUGGER +#define ACPI_DEBUGGER #endif /* DDB */ -#endif /* ACPI_DEBUG */ +#endif /* ACPI_DEBUG_OUTPUT */ #else /* _KERNEL */ diff --git a/sys/contrib/dev/acpica/acgcc.h b/sys/contrib/dev/acpica/acgcc.h index 31ff6c9..90ead14 100644 --- a/sys/contrib/dev/acpica/acgcc.h +++ b/sys/contrib/dev/acpica/acgcc.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acgcc.h - GCC specific defines, etc. - * $Revision: 19 $ + * $Revision: 23 $ * *****************************************************************************/ diff --git a/sys/contrib/dev/acpica/acpiosxf.h b/sys/contrib/dev/acpica/acpiosxf.h index a6bece7..f038f72 100644 --- a/sys/contrib/dev/acpica/acpiosxf.h +++ b/sys/contrib/dev/acpica/acpiosxf.h @@ -154,11 +154,11 @@ typedef struct AcpiFatalInfo * Types specific to the OS service interfaces */ -typedef UINT32 +typedef UINT32 (ACPI_SYSTEM_XFACE *OSD_HANDLER) ( void *Context); -typedef void +typedef void (ACPI_SYSTEM_XFACE *OSD_EXECUTION_CALLBACK) ( void *Context); diff --git a/sys/contrib/dev/acpica/acutils.h b/sys/contrib/dev/acpica/acutils.h index 8ad1802..689e864 100644 --- a/sys/contrib/dev/acpica/acutils.h +++ b/sys/contrib/dev/acpica/acutils.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures - * $Revision: 139 $ + * $Revision: 143 $ * *****************************************************************************/ @@ -185,7 +185,7 @@ AcpiUtValidateFadt ( * UtGlobal - Global data structures and procedures */ -#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER) +#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) NATIVE_CHAR * AcpiUtGetMutexName ( @@ -777,7 +777,7 @@ void AcpiUtSetIntegerWidth ( UINT8 Revision); -#ifdef ACPI_DEBUG +#ifdef ACPI_DEBUG_OUTPUT void AcpiUtDisplayInitPathname ( ACPI_HANDLE ObjHandle, diff --git a/sys/contrib/dev/acpica/dbcmds.c b/sys/contrib/dev/acpica/dbcmds.c index 380ed1a..11bad98 100644 --- a/sys/contrib/dev/acpica/dbcmds.c +++ b/sys/contrib/dev/acpica/dbcmds.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbcmds - debug commands and output routines - * $Revision: 85 $ + * $Revision: 87 $ * ******************************************************************************/ @@ -124,9 +124,9 @@ #include "acresrc.h" #include "acdisasm.h" -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER -#define _COMPONENT ACPI_DEBUGGER +#define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbcmds") @@ -861,7 +861,7 @@ AcpiDbDisplayObjects ( } AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT); - AcpiOsPrintf ("Objects of type [%s] defined in the current ACPI Namespace: \n", + AcpiOsPrintf ("Objects of type [%s] defined in the current ACPI Namespace: \n", AcpiUtGetTypeName (Type)); AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT); @@ -1177,9 +1177,7 @@ Cleanup: } - - -typedef struct +typedef struct { UINT32 Nodes; UINT32 Objects; @@ -1269,4 +1267,4 @@ AcpiDbCheckIntegrity (void) } -#endif /* ENABLE_DEBUGGER */ +#endif /* ACPI_DEBUGGER */ diff --git a/sys/contrib/dev/acpica/dbfileio.c b/sys/contrib/dev/acpica/dbfileio.c index 0c95e51..84c6f0a 100644 --- a/sys/contrib/dev/acpica/dbfileio.c +++ b/sys/contrib/dev/acpica/dbfileio.c @@ -2,7 +2,7 @@ * * Module Name: dbfileio - Debugger file I/O commands. These can't usually * be used when running the debugger in Ring 0 (Kernel mode) - * $Revision: 59 $ + * $Revision: 68 $ * ******************************************************************************/ @@ -121,9 +121,9 @@ #include "acnamesp.h" #include "actables.h" -#if (defined ENABLE_DEBUGGER || defined ACPI_DISASSEMBLER) +#if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER) -#define _COMPONENT ACPI_DEBUGGER +#define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbfileio") @@ -177,7 +177,7 @@ AcpiDbMatchArgument ( } -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER /******************************************************************************* * * FUNCTION: AcpiDbCloseDebugFile @@ -506,5 +506,5 @@ AcpiDbLoadAcpiTable ( } -#endif /* ENABLE_DEBUGGER */ +#endif /* ACPI_DEBUGGER */ diff --git a/sys/contrib/dev/acpica/dbxface.c b/sys/contrib/dev/acpica/dbxface.c index df9fb54..c2e3ac8 100644 --- a/sys/contrib/dev/acpica/dbxface.c +++ b/sys/contrib/dev/acpica/dbxface.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbxface - AML Debugger external interfaces - * $Revision: 61 $ + * $Revision: 64 $ * ******************************************************************************/ @@ -121,9 +121,9 @@ #include "acdisasm.h" -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER -#define _COMPONENT ACPI_DEBUGGER +#define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbxface") @@ -158,7 +158,7 @@ AcpiDbSingleStep ( /* Check for single-step breakpoint */ - if (WalkState->MethodBreakpoint && + if (WalkState->MethodBreakpoint && (WalkState->MethodBreakpoint <= Op->Common.AmlOffset)) { /* Check if the breakpoint has been reached or passed */ @@ -172,7 +172,7 @@ AcpiDbSingleStep ( /* Check for user breakpoint (Must be on exact Aml offset) */ - else if (WalkState->UserBreakpoint && + else if (WalkState->UserBreakpoint && (WalkState->UserBreakpoint == Op->Common.AmlOffset)) { AcpiOsPrintf ("***UserBreakpoint*** at AML offset %X\n", Op->Common.AmlOffset); @@ -294,7 +294,7 @@ AcpiDbSingleStep ( /* Restore everything */ Op->Common.Next = Next; - AcpiOsPrintf ("\n"); + AcpiOsPrintf ("\n\n"); AcpiDbgLevel = OriginalDebugLevel; } @@ -518,4 +518,4 @@ AcpiDbTerminate (void) } -#endif /* ENABLE_DEBUGGER */ +#endif /* ACPI_DEBUGGER */ diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c index 1402618..60c3f7b 100644 --- a/sys/contrib/dev/acpica/exfldio.c +++ b/sys/contrib/dev/acpica/exfldio.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: exfldio - Aml Field I/O - * $Revision: 82 $ + * $Revision: 88 $ * *****************************************************************************/ @@ -160,7 +160,7 @@ AcpiExSetupRegion ( if (ACPI_GET_OBJECT_TYPE (RgnDesc) != ACPI_TYPE_REGION) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Needed Region, found type %X (%s)\n", - ACPI_GET_OBJECT_TYPE (RgnDesc), + ACPI_GET_OBJECT_TYPE (RgnDesc), AcpiUtGetObjectTypeName (RgnDesc))); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); diff --git a/sys/contrib/dev/acpica/exsystem.c b/sys/contrib/dev/acpica/exsystem.c index 5b7230a..0ec8d84 100644 --- a/sys/contrib/dev/acpica/exsystem.c +++ b/sys/contrib/dev/acpica/exsystem.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exsystem - Interface to OS services - * $Revision: 71 $ + * $Revision: 73 $ * *****************************************************************************/ diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c index bc8cde1..61fbe72 100644 --- a/sys/contrib/dev/acpica/hwsleep.c +++ b/sys/contrib/dev/acpica/hwsleep.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface - * $Revision: 35 $ + * $Revision: 46 $ * *****************************************************************************/ @@ -146,12 +146,12 @@ AcpiSetFirmwareWakingVector ( if (AcpiGbl_CommonFACS.VectorWidth == 32) { - *(ACPI_CAST_PTR (UINT32, AcpiGbl_CommonFACS.FirmwareWakingVector)) + *(ACPI_CAST_PTR (UINT32, AcpiGbl_CommonFACS.FirmwareWakingVector)) = (UINT32) PhysicalAddress; } else { - *AcpiGbl_CommonFACS.FirmwareWakingVector + *AcpiGbl_CommonFACS.FirmwareWakingVector = PhysicalAddress; } @@ -190,12 +190,12 @@ AcpiGetFirmwareWakingVector ( if (AcpiGbl_CommonFACS.VectorWidth == 32) { - *PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) + *PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) *(ACPI_CAST_PTR (UINT32, AcpiGbl_CommonFACS.FirmwareWakingVector)); } else { - *PhysicalAddress = + *PhysicalAddress = *AcpiGbl_CommonFACS.FirmwareWakingVector; } @@ -412,7 +412,7 @@ AcpiEnterSleepState ( /* Wait until we enter sleep state */ Retry = 1000; - do + do { Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue, ACPI_MTX_LOCK); if (ACPI_FAILURE (Status)) diff --git a/sys/contrib/dev/acpica/psparse.c b/sys/contrib/dev/acpica/psparse.c index d20b6e5..63c7cf1 100644 --- a/sys/contrib/dev/acpica/psparse.c +++ b/sys/contrib/dev/acpica/psparse.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: psparse - Parser top level AML parse routines - * $Revision: 119 $ + * $Revision: 133 $ * *****************************************************************************/ @@ -206,60 +206,6 @@ AcpiPsPeekOpcode ( /******************************************************************************* * - * FUNCTION: AcpiPsFindObject - * - * PARAMETERS: Opcode - Current opcode - * ParserState - Current state - * WalkState - Current state - * *Op - Where found/new op is returned - * - * RETURN: Status - * - * DESCRIPTION: Find a named object. Two versions - one to search the parse - * tree (for parser-only applications such as acpidump), another - * to search the ACPI internal namespace (the parse tree may no - * longer exist) - * - ******************************************************************************/ - -#ifdef PARSER_ONLY - -ACPI_STATUS -AcpiPsFindObject ( - ACPI_WALK_STATE *WalkState, - ACPI_PARSE_OBJECT **OutOp) -{ - NATIVE_CHAR *Path; - - - /* We are only interested in opcodes that have an associated name */ - - if (!(WalkState->OpInfo->Flags & AML_NAMED)) - { - *OutOp = WalkState->Op; - return (AE_OK); - } - - /* Find the name in the parse tree */ - - Path = AcpiPsGetNextNamestring (&WalkState->ParserState); - - *OutOp = AcpiPsFind (AcpiPsGetParentScope (&WalkState->ParserState), - Path, WalkState->Opcode, 1); - - if (!(*OutOp)) - { - return (AE_NOT_FOUND); - } - - return (AE_OK); -} - -#endif - - -/******************************************************************************* - * * FUNCTION: AcpiPsCompleteThisOp * * PARAMETERS: WalkState - Current State @@ -276,7 +222,6 @@ AcpiPsCompleteThisOp ( ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op) { -#ifndef PARSER_ONLY ACPI_PARSE_OBJECT *Prev; ACPI_PARSE_OBJECT *Next; const ACPI_OPCODE_INFO *ParentInfo; @@ -431,10 +376,6 @@ AcpiPsCompleteThisOp ( } return_VOID; - -#else - return; -#endif } @@ -496,6 +437,13 @@ AcpiPsNextParseState ( ParserState->Aml = WalkState->AmlLastWhile; break; +#if 0 + case AE_CTRL_SKIP: + + ParserState->Aml = ParserState->Scope->ParseScope.PkgEnd; + Status = AE_OK; + break; +#endif case AE_CTRL_TRUE: @@ -712,15 +660,28 @@ AcpiPsParseLoop ( * Get and append arguments until we find the node that contains * the name (the type ARGP_NAME). */ - while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) != ARGP_NAME) + while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) && + (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) != ARGP_NAME)) { - Arg = AcpiPsGetNextArg (ParserState, - GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), - &WalkState->ArgCount); + Status = AcpiPsGetNextArg (ParserState, + GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), + &WalkState->ArgCount, &Arg); + if (ACPI_FAILURE (Status)) + { + goto CloseThisOp; + } + AcpiPsAppendArg (&PreOp, Arg); INCREMENT_ARG_LIST (WalkState->ArgTypes); } + /* Make sure that we found a NAME and didn't run out of arguments */ + + if (!GET_CURRENT_ARG_TYPE (WalkState->ArgTypes)) + { + return_ACPI_STATUS (AE_AML_NO_OPERAND); + } + /* We know that this arg is a name, move to next arg */ INCREMENT_ARG_LIST (WalkState->ArgTypes); @@ -828,8 +789,8 @@ AcpiPsParseLoop ( if (WalkState->OpInfo) { ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, - "Opcode %4.4hX [%s] Op %p Aml %p AmlOffset %5.5X\n", - Op->Common.AmlOpcode, WalkState->OpInfo->Name, + "Opcode %4.4X [%s] Op %p Aml %p AmlOffset %5.5X\n", + (UINT32) Op->Common.AmlOpcode, WalkState->OpInfo->Name, Op, ParserState->Aml, Op->Common.AmlOffset)); } } @@ -859,7 +820,19 @@ AcpiPsParseLoop ( case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */ - AcpiPsGetNextNamepath (ParserState, Op, &WalkState->ArgCount, 1); + Status = AcpiPsGetNextNamepath (ParserState, Op, &WalkState->ArgCount, 1); + if (ACPI_FAILURE (Status)) + { + /* NOT_FOUND is an error only if we are actually executing a method */ + + if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) && + (Status == AE_NOT_FOUND)) || + (Status != AE_NOT_FOUND)) + { + goto CloseThisOp; + } + } + WalkState->ArgTypes = 0; break; @@ -870,17 +843,29 @@ AcpiPsParseLoop ( while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) && !WalkState->ArgCount) { - WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml, + WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml, ParserState->AmlStart); - Arg = AcpiPsGetNextArg (ParserState, - GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), - &WalkState->ArgCount); + Status = AcpiPsGetNextArg (ParserState, + GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), + &WalkState->ArgCount, &Arg); + if (ACPI_FAILURE (Status)) + { + /* NOT_FOUND is an error only if we are actually executing a method */ + + if ((((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) && + (Status == AE_NOT_FOUND) && + (Op->Common.AmlOpcode != AML_COND_REF_OF_OP)) || + (Status != AE_NOT_FOUND)) + { + goto CloseThisOp; + } + } + if (Arg) { Arg->Common.AmlOffset = WalkState->AmlOffset; AcpiPsAppendArg (Op, Arg); } - INCREMENT_ARG_LIST (WalkState->ArgTypes); } @@ -915,7 +900,7 @@ AcpiPsParseLoop ( (WalkState->DescendingCallback != AcpiDsExecBeginOp)) { /* - * Skip parsing of + * Skip parsing of * because we don't have enough info in the first pass * to parse them correctly. */ @@ -1043,15 +1028,18 @@ CloseThisOp: AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); - WalkState->Op = Op; - WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - WalkState->Opcode = Op->Common.AmlOpcode; + if (Op) + { + WalkState->Op = Op; + WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); + WalkState->Opcode = Op->Common.AmlOpcode; - Status = WalkState->AscendingCallback (WalkState); - Status = AcpiPsNextParseState (WalkState, Op, Status); + Status = WalkState->AscendingCallback (WalkState); + Status = AcpiPsNextParseState (WalkState, Op, Status); - AcpiPsCompleteThisOp (WalkState, Op); - Op = NULL; + AcpiPsCompleteThisOp (WalkState, Op); + Op = NULL; + } Status = AE_OK; break; @@ -1225,6 +1213,7 @@ AcpiPsParseAml ( ACPI_WALK_STATE *WalkState) { ACPI_STATUS Status; + ACPI_STATUS TerminateStatus; ACPI_THREAD_STATE *Thread; ACPI_THREAD_STATE *PrevWalkList = AcpiGbl_CurrentWalkList; ACPI_WALK_STATE *PreviousWalkState; @@ -1320,11 +1309,10 @@ AcpiPsParseAml ( */ if ((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) { - Status = AcpiDsTerminateControlMethod (WalkState); - if (ACPI_FAILURE (Status)) + TerminateStatus = AcpiDsTerminateControlMethod (WalkState); + if (ACPI_FAILURE (TerminateStatus)) { ACPI_REPORT_ERROR (("Could not terminate control method properly\n")); - Status = AE_OK; /* Ignore error and continue */ } diff --git a/sys/contrib/dev/acpica/rscreate.c b/sys/contrib/dev/acpica/rscreate.c index 1a6fc55..e0831e7 100644 --- a/sys/contrib/dev/acpica/rscreate.c +++ b/sys/contrib/dev/acpica/rscreate.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: rscreate - Create resource lists/tables - * $Revision: 53 $ + * $Revision: 58 $ * ******************************************************************************/ diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c index 6af3368..6e8178c 100644 --- a/sys/contrib/dev/acpica/tbget.c +++ b/sys/contrib/dev/acpica/tbget.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: tbget - ACPI Table get* routines - * $Revision: 63 $ + * $Revision: 79 $ * *****************************************************************************/ @@ -164,7 +164,7 @@ AcpiTbGetTable ( Status = AcpiTbGetTableBody (Address, &Header, TableInfo); if (ACPI_FAILURE (Status)) { - ACPI_REPORT_ERROR (("Could not get ACPI table (size %X), %s\n", + ACPI_REPORT_ERROR (("Could not get ACPI table (size %X), %s\n", Header.Length, AcpiFormatException (Status))); return_ACPI_STATUS (Status); } @@ -185,7 +185,7 @@ AcpiTbGetTable ( * * DESCRIPTION: Get an ACPI table header. Works in both physical or virtual * addressing mode. Works with both physical or logical pointers. - * Table is either copied or mapped, depending on the pointer + * Table is either copied or mapped, depending on the pointer * type and mode of the processor. * ******************************************************************************/ @@ -260,10 +260,10 @@ AcpiTbGetTableHeader ( * RETURN: Status * * DESCRIPTION: Get an entire ACPI table with support to allow the host OS to - * replace the table with a newer version (table override.) + * replace the table with a newer version (table override.) * Works in both physical or virtual * addressing mode. Works with both physical or logical pointers. - * Table is either copied or mapped, depending on the pointer + * Table is either copied or mapped, depending on the pointer * type and mode of the processor. * ******************************************************************************/ @@ -332,7 +332,7 @@ AcpiTbTableOverride ( /* * The OSL will examine the header and decide whether to override this - * table. If it decides to override, a table will be returned in NewTable, + * table. If it decides to override, a table will be returned in NewTable, * which we will then copy. */ Status = AcpiOsTableOverride (Header, &NewTable); @@ -340,7 +340,7 @@ AcpiTbTableOverride ( { /* Some severe error from the OSL, but we basically ignore it */ - ACPI_REPORT_ERROR (("Could not override ACPI table, %s\n", + ACPI_REPORT_ERROR (("Could not override ACPI table, %s\n", AcpiFormatException (Status))); return_ACPI_STATUS (Status); } @@ -352,8 +352,8 @@ AcpiTbTableOverride ( return_ACPI_STATUS (AE_NO_ACPI_TABLES); } - /* - * We have a new table to override the old one. Get a copy of + /* + * We have a new table to override the old one. Get a copy of * the new one. We know that the new table has a logical pointer. */ Address.PointerType = ACPI_LOGICAL_POINTER | ACPI_LOGICAL_ADDRESSING; @@ -369,7 +369,7 @@ AcpiTbTableOverride ( /* Copy the table info */ - ACPI_REPORT_INFO (("Table [%4.4s] replaced by host OS\n", + ACPI_REPORT_INFO (("Table [%4.4s] replaced by host OS\n", TableInfo->Pointer->Signature)); return_ACPI_STATUS (AE_OK); @@ -389,7 +389,7 @@ AcpiTbTableOverride ( * * DESCRIPTION: Get an entire ACPI table. Works in both physical or virtual * addressing mode. Works with both physical or logical pointers. - * Table is either copied or mapped, depending on the pointer + * Table is either copied or mapped, depending on the pointer * type and mode of the processor. * ******************************************************************************/ @@ -404,7 +404,7 @@ AcpiTbGetThisTable ( UINT8 Allocation; ACPI_STATUS Status = AE_OK; - + ACPI_FUNCTION_TRACE ("TbGetThisTable"); @@ -443,7 +443,7 @@ AcpiTbGetThisTable ( * Just map the table's physical memory * into our address space. */ - Status = AcpiOsMapMemory (Address->Pointer.Physical, (ACPI_SIZE) Header->Length, + Status = AcpiOsMapMemory (Address->Pointer.Physical, (ACPI_SIZE) Header->Length, (void **) &FullTable); if (ACPI_FAILURE (Status)) { @@ -490,9 +490,9 @@ AcpiTbGetThisTable ( TableInfo->Allocation = Allocation; TableInfo->BasePointer = FullTable; - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, - "Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n", - FullTable->Signature, + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, + "Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n", + FullTable->Signature, ACPI_HIDWORD (Address->Pointer.Physical), ACPI_LODWORD (Address->Pointer.Physical), FullTable)); diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c index 5b286ca..5a7b5f8 100644 --- a/sys/contrib/dev/acpica/utglobal.c +++ b/sys/contrib/dev/acpica/utglobal.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utglobal - Global variables for the ACPI subsystem - * $Revision: 153 $ + * $Revision: 168 $ * *****************************************************************************/ @@ -125,7 +125,6 @@ ACPI_MODULE_NAME ("utglobal") - /****************************************************************************** * * FUNCTION: AcpiFormatException @@ -225,7 +224,7 @@ Unknown: /* Debug switch - level and trace mask */ -#ifdef ACPI_DEBUG +#ifdef ACPI_DEBUG_OUTPUT UINT32 AcpiDbgLevel = DEBUG_DEFAULT; #else UINT32 AcpiDbgLevel = NORMAL_DEFAULT; @@ -285,6 +284,10 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = {"_REV", ACPI_TYPE_INTEGER, "2"}, {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, {"_GL_", ACPI_TYPE_MUTEX, "0"}, + +#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) + {"_OSI", ACPI_TYPE_METHOD, "1"}, +#endif {NULL, ACPI_TYPE_ANY, NULL} /* Table terminator */ }; @@ -622,7 +625,7 @@ AcpiUtGetObjectTypeName ( } -#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER) +#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) /* * Strings and procedures used for debug only @@ -873,7 +876,7 @@ AcpiUtInitGlobals ( AcpiGbl_RootNodeStruct.Flags = ANOBJ_END_OF_PEER_LIST; -#ifdef ACPI_DEBUG +#ifdef ACPI_DEBUG_OUTPUT AcpiGbl_LowestStackPointer = ACPI_SIZE_MAX; #endif diff --git a/sys/dev/acpica/Osd/OsdDebug.c b/sys/dev/acpica/Osd/OsdDebug.c index cfcf5b6..1651d25 100644 --- a/sys/dev/acpica/Osd/OsdDebug.c +++ b/sys/dev/acpica/Osd/OsdDebug.c @@ -100,7 +100,7 @@ AcpiOsSignal ( return(AE_OK); } -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER void acpi_EnterDebugger(void) { diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index b8b40f3..48e9889 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -208,7 +208,7 @@ acpi_identify(driver_t *driver, device_t parent) { device_t child; int error; -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER char *debugpoint; #endif @@ -238,7 +238,7 @@ acpi_identify(driver_t *driver, device_t parent) /* * Start up the ACPI CA subsystem. */ -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER debugpoint = getenv("debug.acpi.debugger"); if (debugpoint) { if (!strcmp(debugpoint, "init")) @@ -250,7 +250,7 @@ acpi_identify(driver_t *driver, device_t parent) printf("ACPI: initialisation failed: %s\n", AcpiFormatException(error)); return_VOID; } -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER debugpoint = getenv("debug.acpi.debugger"); if (debugpoint) { if (!strcmp(debugpoint, "tables")) @@ -314,7 +314,7 @@ acpi_attach(device_t dev) int error; UINT32 flags; -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER char *debugpoint; #endif @@ -324,7 +324,7 @@ acpi_attach(device_t dev) bzero(sc, sizeof(*sc)); sc->acpi_dev = dev; -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER debugpoint = getenv("debug.acpi.debugger"); if (debugpoint) { if (!strcmp(debugpoint, "spaces")) @@ -371,7 +371,7 @@ acpi_attach(device_t dev) * XXX We should arrange for the object init pass after we have attached all our * child devices, but on many systems it works here. */ -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER debugpoint = getenv("debug.acpi.debugger"); if (debugpoint) { if (!strcmp(debugpoint, "enable")) @@ -445,7 +445,7 @@ acpi_attach(device_t dev) /* * Scan the namespace and attach/initialise children. */ -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER debugpoint = getenv("debug.acpi.debugger"); if (debugpoint) { if (!strcmp(debugpoint, "probe")) @@ -482,7 +482,7 @@ acpi_attach(device_t dev) sc->acpi_dev_t = make_dev(&acpi_cdevsw, 0, 0, 5, 0660, "acpi"); sc->acpi_dev_t->si_drv1 = sc; -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER debugpoint = getenv("debug.acpi.debugger"); if (debugpoint) { if (!strcmp(debugpoint, "running")) @@ -1939,8 +1939,9 @@ static struct debugtag dbg_layer[] = { {"ACPI_DISPATCHER", ACPI_DISPATCHER}, {"ACPI_EXECUTER", ACPI_EXECUTER}, {"ACPI_RESOURCES", ACPI_RESOURCES}, - {"ACPI_DEBUGGER", ACPI_DEBUGGER}, + {"ACPI_CA_DEBUGGER", ACPI_CA_DEBUGGER}, {"ACPI_OS_SERVICES", ACPI_OS_SERVICES}, + {"ACPI_CA_DISASSEMBLER", ACPI_CA_DISASSEMBLER}, {"ACPI_BUS", ACPI_BUS}, {"ACPI_SYSTEM", ACPI_SYSTEM}, @@ -1966,27 +1967,39 @@ static struct debugtag dbg_level[] = { {"ACPI_LV_FATAL", ACPI_LV_FATAL}, {"ACPI_LV_DEBUG_OBJECT", ACPI_LV_DEBUG_OBJECT}, {"ACPI_LV_ALL_EXCEPTIONS", ACPI_LV_ALL_EXCEPTIONS}, - {"ACPI_LV_THREADS", ACPI_LV_THREADS}, + + /* Trace verbosity level 1 [Standard Trace Level] */ {"ACPI_LV_PARSE", ACPI_LV_PARSE}, - {"ACPI_LV_DISPATCH", ACPI_LV_DISPATCH}, {"ACPI_LV_LOAD", ACPI_LV_LOAD}, + {"ACPI_LV_DISPATCH", ACPI_LV_DISPATCH}, {"ACPI_LV_EXEC", ACPI_LV_EXEC}, {"ACPI_LV_NAMES", ACPI_LV_NAMES}, {"ACPI_LV_OPREGION", ACPI_LV_OPREGION}, {"ACPI_LV_BFIELD", ACPI_LV_BFIELD}, {"ACPI_LV_TABLES", ACPI_LV_TABLES}, - {"ACPI_LV_FUNCTIONS", ACPI_LV_FUNCTIONS}, {"ACPI_LV_VALUES", ACPI_LV_VALUES}, {"ACPI_LV_OBJECTS", ACPI_LV_OBJECTS}, - {"ACPI_LV_ALLOCATIONS", ACPI_LV_ALLOCATIONS}, {"ACPI_LV_RESOURCES", ACPI_LV_RESOURCES}, - {"ACPI_LV_IO", ACPI_LV_IO}, - {"ACPI_LV_INTERRUPTS", ACPI_LV_INTERRUPTS}, {"ACPI_LV_USER_REQUESTS", ACPI_LV_USER_REQUESTS}, {"ACPI_LV_PACKAGE", ACPI_LV_PACKAGE}, - {"ACPI_LV_MUTEX", ACPI_LV_MUTEX}, {"ACPI_LV_INIT", ACPI_LV_INIT}, + {"ACPI_LV_VERBOSITY1", ACPI_LV_VERBOSITY1}, + + /* Trace verbosity level 2 [Function tracing and memory allocation] */ + {"ACPI_LV_ALLOCATIONS", ACPI_LV_ALLOCATIONS}, + {"ACPI_LV_FUNCTIONS", ACPI_LV_FUNCTIONS}, + {"ACPI_LV_OPTIMIZATIONS", ACPI_LV_OPTIMIZATIONS}, + {"ACPI_LV_VERBOSITY2", ACPI_LV_VERBOSITY2}, {"ACPI_LV_ALL", ACPI_LV_ALL}, + + /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ + {"ACPI_LV_MUTEX", ACPI_LV_MUTEX}, + {"ACPI_LV_THREADS", ACPI_LV_THREADS}, + {"ACPI_LV_IO", ACPI_LV_IO}, + {"ACPI_LV_INTERRUPTS", ACPI_LV_INTERRUPTS}, + {"ACPI_LV_VERBOSITY3", ACPI_LV_VERBOSITY3}, + + /* Exceptionally verbose output -- also used in the global "DebugLevel" */ {"ACPI_LV_AML_DISASSEMBLE", ACPI_LV_AML_DISASSEMBLE}, {"ACPI_LV_VERBOSE_INFO", ACPI_LV_VERBOSE_INFO}, {"ACPI_LV_FULL_TABLES", ACPI_LV_FULL_TABLES}, diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index ae94b05..8a14208 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -231,7 +231,7 @@ acpi_get_type(device_t dev) return(t); } -#ifdef ENABLE_DEBUGGER +#ifdef ACPI_DEBUGGER extern void acpi_EnterDebugger(void); #endif |