diff --git a/source/common/adwalk.c b/source/common/adwalk.c index 7d9a91994..932c88f33 100644 --- a/source/common/adwalk.c +++ b/source/common/adwalk.c @@ -890,8 +890,7 @@ AcpiDmXrefDescendingOp ( * The namespace is also used as a lookup table for references to resource * descriptors and the fields within them. */ - -Node = NULL; + Node = NULL; Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, WalkState, &Node); diff --git a/source/compiler/aslopt.c b/source/compiler/aslopt.c index 535d7b01a..0588246ee 100644 --- a/source/compiler/aslopt.c +++ b/source/compiler/aslopt.c @@ -648,7 +648,8 @@ OptOptimizeNamePath ( return_VOID; } - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, "%5d [%12.12s] [%12.12s] ", + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, + "PATH OPTIMIZE: Line %5d ParentOp [%12.12s] ThisOp [%12.12s] ", Op->Asl.LogicalLineNumber, AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), AcpiPsGetOpcodeName (Op->Common.AmlOpcode))); @@ -692,7 +693,7 @@ OptOptimizeNamePath ( { /* This is the declaration of a new name */ - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, "NAME")); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, "NAME\n")); /* * The node of interest is the parent of this node (the containing @@ -718,7 +719,7 @@ OptOptimizeNamePath ( { /* This is a reference to an existing named object */ - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, "REF ")); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, "REFERENCE\n")); } /* @@ -760,9 +761,10 @@ OptOptimizeNamePath ( } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, - "%37s (%2u) ==> %-32s(%2u) %-32s", - (char *) CurrentPath.Pointer, (UINT32) CurrentPath.Length, - (char *) TargetPath.Pointer, (UINT32) TargetPath.Length, ExternalNameString)); + "CURRENT SCOPE: (%2u) %-37s FULL PATH TO NAME: (%2u) %-32s ACTUAL AML:%-32s\n", + (UINT32) CurrentPath.Length, (char *) CurrentPath.Pointer, + (UINT32) TargetPath.Length, (char *) TargetPath.Pointer, + ExternalNameString)); ACPI_FREE (ExternalNameString); @@ -819,7 +821,8 @@ OptOptimizeNamePath ( HowMuchShorter = (AmlNameStringLength - ACPI_STRLEN (NewPath)); OptTotal += HowMuchShorter; - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, " REDUCED %2u (%u)", + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, + " REDUCED BY %2u (TOTAL SAVED %2u)", (UINT32) HowMuchShorter, OptTotal)); if (Flags & AML_NAMED) diff --git a/source/compiler/aslstubs.c b/source/compiler/aslstubs.c index 4cf1d42fd..8d2400e3c 100644 --- a/source/compiler/aslstubs.c +++ b/source/compiler/aslstubs.c @@ -311,7 +311,7 @@ ACPI_THREAD_ID AcpiOsGetThreadId ( void) { - return (0xFFFF); + return (1); } ACPI_STATUS diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c index 51eb31446..78a877597 100644 --- a/source/compiler/aslxref.c +++ b/source/compiler/aslxref.c @@ -388,7 +388,7 @@ XfNamespaceLocateBegin ( */ if (Op->Asl.CompileFlags & NODE_IS_NAME_DECLARATION) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* We are only interested in opcodes that have an associated name */ @@ -401,7 +401,7 @@ XfNamespaceLocateBegin ( (Op->Asl.ParseOpcode != PARSEOP_NAMESEG) && (Op->Asl.ParseOpcode != PARSEOP_METHODCALL)) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* @@ -412,7 +412,7 @@ XfNamespaceLocateBegin ( if ((Op->Asl.Parent) && (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONDREFOF)) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* @@ -531,7 +531,8 @@ XfNamespaceLocateBegin ( Status = AE_OK; } - return (Status); + + return_ACPI_STATUS (Status); } /* Check for a reference vs. name declaration */ @@ -696,7 +697,6 @@ XfNamespaceLocateBegin ( (Op->Asl.ParseOpcode == PARSEOP_METHODCALL)) { - /* * A reference to a method within one of these opcodes is not an * invocation of the method, it is simply a reference to the method. @@ -706,7 +706,7 @@ XfNamespaceLocateBegin ( (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_DEREFOF) || (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE))) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* * There are two types of method invocation: @@ -722,7 +722,7 @@ XfNamespaceLocateBegin ( Op->Asl.ExternalName, AcpiUtGetTypeName (Node->Type)); AslError (ASL_ERROR, ASL_MSG_NOT_METHOD, Op, MsgBuffer); - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* Save the method node in the caller's op */ @@ -730,7 +730,7 @@ XfNamespaceLocateBegin ( Op->Asl.Node = Node; if (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONDREFOF) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* @@ -895,7 +895,7 @@ XfNamespaceLocateBegin ( } Op->Asl.Node = Node; - return (Status); + return_ACPI_STATUS (Status); } @@ -930,7 +930,7 @@ XfNamespaceLocateEnd ( OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode); if (!(OpInfo->Flags & AML_NAMED)) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* Not interested in name references, we did not open a scope for them */ @@ -939,7 +939,7 @@ XfNamespaceLocateEnd ( (Op->Asl.ParseOpcode == PARSEOP_NAMESEG) || (Op->Asl.ParseOpcode == PARSEOP_METHODCALL)) { - return (AE_OK); + return_ACPI_STATUS (AE_OK); } /* Pop the scope stack if necessary */ @@ -954,5 +954,5 @@ XfNamespaceLocateEnd ( (void) AcpiDsScopeStackPop (WalkState); } - return (AE_OK); + return_ACPI_STATUS (AE_OK); } diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c index 9b97f74c8..870c3d246 100644 --- a/source/components/parser/psopinfo.c +++ b/source/components/parser/psopinfo.c @@ -148,6 +148,9 @@ const ACPI_OPCODE_INFO * AcpiPsGetOpcodeInfo ( UINT16 Opcode) { + const char *OpcodeName = "Unknown AML opcode"; + + ACPI_FUNCTION_NAME (PsGetOpcodeInfo); @@ -169,10 +172,56 @@ AcpiPsGetOpcodeInfo ( return (&AcpiGbl_AmlOpInfo [AcpiGbl_LongOpIndex [(UINT8) Opcode]]); } +#ifdef ACPI_ASL_COMPILER +#include "asldefine.h" + + switch (Opcode) + { + case AML_RAW_DATA_BYTE: + OpcodeName = "-Raw Data Byte-"; + break; + + case AML_RAW_DATA_WORD: + OpcodeName = "-Raw Data Word-"; + break; + + case AML_RAW_DATA_DWORD: + OpcodeName = "-Raw Data Dword-"; + break; + + case AML_RAW_DATA_QWORD: + OpcodeName = "-Raw Data Qword-"; + break; + + case AML_RAW_DATA_BUFFER: + OpcodeName = "-Raw Data Buffer-"; + break; + + case AML_RAW_DATA_CHAIN: + OpcodeName = "-Raw Data Buffer Chain-"; + break; + + case AML_PACKAGE_LENGTH: + OpcodeName = "-Package Length-"; + break; + + case AML_UNASSIGNED_OPCODE: + OpcodeName = "-Unassigned Opcode-"; + break; + + case AML_DEFAULT_ARG_OP: + OpcodeName = "-Default Arg-"; + break; + + default: + break; + } +#endif + /* Unknown AML opcode */ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "Unknown AML opcode [%4.4X]\n", Opcode)); + "%s [%4.4X]\n", OpcodeName, Opcode)); return (&AcpiGbl_AmlOpInfo [_UNK]); }