diff options
Diffstat (limited to 'source/components')
-rw-r--r-- | source/components/debugger/dbnames.c | 13 | ||||
-rw-r--r-- | source/components/debugger/dbtest.c | 67 | ||||
-rw-r--r-- | source/components/dispatcher/dswscope.c | 9 | ||||
-rw-r--r-- | source/components/resources/rsdump.c | 2 | ||||
-rw-r--r-- | source/components/tables/tbinstal.c | 2 | ||||
-rw-r--r-- | source/components/utilities/utprint.c | 1 | ||||
-rw-r--r-- | source/components/utilities/utstring.c | 2 |
7 files changed, 81 insertions, 15 deletions
diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index 49c40bcc921b..c151a3efa612 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -372,8 +372,17 @@ AcpiDbDumpNamespace ( } AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT); - AcpiOsPrintf ("ACPI Namespace (from %4.4s (%p) subtree):\n", - ((ACPI_NAMESPACE_NODE *) SubtreeEntry)->Name.Ascii, SubtreeEntry); + + if (((ACPI_NAMESPACE_NODE *) SubtreeEntry)->Parent) + { + AcpiOsPrintf ("ACPI Namespace (from %4.4s (%p) subtree):\n", + ((ACPI_NAMESPACE_NODE *) SubtreeEntry)->Name.Ascii, SubtreeEntry); + } + else + { + AcpiOsPrintf ("ACPI Namespace (from %s):\n", + ACPI_NAMESPACE_ROOT); + } /* Display the subtree */ diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c index 0969f9b0a6d0..04f93892e370 100644 --- a/source/components/debugger/dbtest.c +++ b/source/components/debugger/dbtest.c @@ -189,6 +189,10 @@ AcpiDbTestStringType ( UINT32 ByteLength); static ACPI_STATUS +AcpiDbTestPackageType ( + ACPI_NAMESPACE_NODE *Node); + +static ACPI_STATUS AcpiDbReadFromObject ( ACPI_NAMESPACE_NODE *Node, ACPI_OBJECT_TYPE ExpectedType, @@ -456,6 +460,11 @@ AcpiDbTestOneObject ( BitLength = ByteLength * 8; break; + case ACPI_TYPE_PACKAGE: + + LocalType = ACPI_TYPE_PACKAGE; + break; + case ACPI_TYPE_FIELD_UNIT: case ACPI_TYPE_BUFFER_FIELD: case ACPI_TYPE_LOCAL_REGION_FIELD: @@ -490,6 +499,7 @@ AcpiDbTestOneObject ( AcpiOsPrintf ("%14s: %4.4s", AcpiUtGetTypeName (Node->Type), Node->Name.Ascii); + if (!ObjDesc) { AcpiOsPrintf (" Ignoring, no attached object\n"); @@ -510,13 +520,12 @@ AcpiDbTestOneObject ( case ACPI_ADR_SPACE_SYSTEM_MEMORY: case ACPI_ADR_SPACE_SYSTEM_IO: case ACPI_ADR_SPACE_PCI_CONFIG: - case ACPI_ADR_SPACE_EC: break; default: - AcpiOsPrintf (" %s space is not supported [%4.4s]\n", + AcpiOsPrintf (" %s space is not supported in this command [%4.4s]\n", AcpiUtGetRegionName (RegionObj->Region.SpaceId), RegionObj->Region.Node->Name.Ascii); return (AE_OK); @@ -546,6 +555,11 @@ AcpiDbTestOneObject ( Status = AcpiDbTestBufferType (Node, BitLength); break; + case ACPI_TYPE_PACKAGE: + + Status = AcpiDbTestPackageType (Node); + break; + default: AcpiOsPrintf (" Ignoring, type not implemented (%2.2X)", @@ -553,6 +567,14 @@ AcpiDbTestOneObject ( break; } + /* Exit on error, but don't abort the namespace walk */ + + if (ACPI_FAILURE (Status)) + { + Status = AE_OK; + goto Exit; + } + switch (Node->Type) { case ACPI_TYPE_LOCAL_REGION_FIELD: @@ -560,12 +582,14 @@ AcpiDbTestOneObject ( RegionObj = ObjDesc->Field.RegionObj; AcpiOsPrintf (" (%s)", AcpiUtGetRegionName (RegionObj->Region.SpaceId)); + break; default: break; } +Exit: AcpiOsPrintf ("\n"); return (Status); } @@ -624,7 +648,6 @@ AcpiDbTestIntegerType ( { ValueToWrite = 0; } - /* Write a new value */ WriteValue.Type = ACPI_TYPE_INTEGER; @@ -917,6 +940,40 @@ Exit: /******************************************************************************* * + * FUNCTION: AcpiDbTestPackageType + * + * PARAMETERS: Node - Parent NS node for the object + * + * RETURN: Status + * + * DESCRIPTION: Test read for a Package object. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbTestPackageType ( + ACPI_NAMESPACE_NODE *Node) +{ + ACPI_OBJECT *Temp1 = NULL; + ACPI_STATUS Status; + + + /* Read the original value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_PACKAGE, &Temp1); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + AcpiOsPrintf (" %8.8X Elements", Temp1->Package.Count); + AcpiOsFree (Temp1); + return (Status); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDbReadFromObject * * PARAMETERS: Node - Parent NS node for the object @@ -957,8 +1014,8 @@ AcpiDbReadFromObject ( AcpiGbl_MethodExecuting = TRUE; Status = AcpiEvaluateObject (ReadHandle, NULL, &ParamObjects, &ReturnObj); - AcpiGbl_MethodExecuting = FALSE; + AcpiGbl_MethodExecuting = FALSE; if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could not read from object, %s", @@ -973,6 +1030,7 @@ AcpiDbReadFromObject ( case ACPI_TYPE_INTEGER: case ACPI_TYPE_BUFFER: case ACPI_TYPE_STRING: + case ACPI_TYPE_PACKAGE: /* * Did we receive the type we wanted? Most important for the * Integer/Buffer case (when a field is larger than an Integer, @@ -984,6 +1042,7 @@ AcpiDbReadFromObject ( AcpiUtGetTypeName (ExpectedType), AcpiUtGetTypeName (RetValue->Type)); + AcpiOsFree (ReturnObj.Pointer); return (AE_TYPE); } diff --git a/source/components/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c index 3aa5e192cb5c..36ff82054d7a 100644 --- a/source/components/dispatcher/dswscope.c +++ b/source/components/dispatcher/dswscope.c @@ -269,8 +269,7 @@ AcpiDsScopeStackPush ( } else { - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, - "[\\___] (%s)", "ROOT")); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, ACPI_NAMESPACE_ROOT)); } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, @@ -328,15 +327,13 @@ AcpiDsScopeStackPop ( NewScopeInfo = WalkState->ScopeInfo; if (NewScopeInfo) { - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, - "[%4.4s] (%s)\n", + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "[%4.4s] (%s)\n", AcpiUtGetNodeName (NewScopeInfo->Scope.Node), AcpiUtGetTypeName (NewScopeInfo->Common.Value))); } else { - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, - "[\\___] (ROOT)\n")); + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "%s\n", ACPI_NAMESPACE_ROOT)); } AcpiUtDeleteGenericState (ScopeInfo); diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c index b36c38d4bc90..6f3e2c9e54fe 100644 --- a/source/components/resources/rsdump.c +++ b/source/components/resources/rsdump.c @@ -768,7 +768,7 @@ AcpiRsDumpByteList ( UINT16 Length, UINT8 *Data) { - UINT8 i; + UINT16 i; for (i = 0; i < Length; i++) diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c index 639448031083..581737dd0e34 100644 --- a/source/components/tables/tbinstal.c +++ b/source/components/tables/tbinstal.c @@ -236,7 +236,7 @@ AcpiTbInstallTableWithOverride ( * DESCRIPTION: This function is called to verify and install an ACPI table. * When this function is called by "Load" or "LoadTable" opcodes, * or by AcpiLoadTable() API, the "Reload" parameter is set. - * After sucessfully returning from this function, table is + * After successfully returning from this function, table is * "INSTALLED" but not "VALIDATED". * ******************************************************************************/ diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c index 099d49cb677d..a3516a47a2a2 100644 --- a/source/components/utilities/utprint.c +++ b/source/components/utilities/utprint.c @@ -724,6 +724,7 @@ vsnprintf ( case 'X': Type |= ACPI_FORMAT_UPPER; + /* FALLTHROUGH */ case 'x': diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c index 13f75c0b76b5..6e4458af9ed5 100644 --- a/source/components/utilities/utstring.c +++ b/source/components/utilities/utstring.c @@ -303,7 +303,7 @@ AcpiUtRepairName ( * Special case for the root node. This can happen if we get an * error during the execution of module-level code. */ - if (ACPI_COMPARE_NAME (Name, "\\___")) + if (ACPI_COMPARE_NAME (Name, ACPI_ROOT_PATHNAME)) { return; } |