From dbd90a99cde8c4a942a41f095faa72f479694173 Mon Sep 17 00:00:00 2001 From: jkim Date: Wed, 11 Jul 2012 16:51:47 +0000 Subject: Import ACPICA 20120711. --- source/components/debugger/dbcmds.c | 101 +++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 35 deletions(-) (limited to 'source/components/debugger/dbcmds.c') diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 459cd91..93d4f29 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -254,12 +254,53 @@ AcpiDbDisplayTableInfo ( ACPI_STATUS Status; + /* Header */ + + AcpiOsPrintf ("Idx ID Status Type Sig Address Len Header\n"); + /* Walk the entire root table list */ for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) { TableDesc = &AcpiGbl_RootTableList.Tables[i]; - AcpiOsPrintf ("%u ", i); + + /* Index and Table ID */ + + AcpiOsPrintf ("%3u %.2u ", i, TableDesc->OwnerId); + + /* Decode the table flags */ + + if (!(TableDesc->Flags & ACPI_TABLE_IS_LOADED)) + { + AcpiOsPrintf ("NotLoaded "); + } + else + { + AcpiOsPrintf (" Loaded "); + } + + switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) + { + case ACPI_TABLE_ORIGIN_UNKNOWN: + AcpiOsPrintf ("Unknown "); + break; + + case ACPI_TABLE_ORIGIN_MAPPED: + AcpiOsPrintf ("Mapped "); + break; + + case ACPI_TABLE_ORIGIN_ALLOCATED: + AcpiOsPrintf ("Allocated "); + break; + + case ACPI_TABLE_ORIGIN_OVERRIDE: + AcpiOsPrintf ("Override "); + break; + + default: + AcpiOsPrintf ("INVALID "); + break; + } /* Make sure that the table is mapped */ @@ -290,55 +331,45 @@ AcpiDbDisplayTableInfo ( * * FUNCTION: AcpiDbUnloadAcpiTable * - * PARAMETERS: TableArg - Name of the table to be unloaded - * InstanceArg - Which instance of the table to unload (if - * there are multiple tables of the same type) + * PARAMETERS: ObjectName - Namespace pathname for an object that + * is owned by the table to be unloaded * - * RETURN: Nonde + * RETURN: None * - * DESCRIPTION: Unload an ACPI table. - * Instance is not implemented + * DESCRIPTION: Unload an ACPI table, via any namespace node that is owned + * by the table. * ******************************************************************************/ void AcpiDbUnloadAcpiTable ( - char *TableArg, - char *InstanceArg) + char *ObjectName) { -/* TBD: Need to reimplement for new data structures */ - -#if 0 - UINT32 i; + ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; - /* Search all tables for the target type */ + /* Translate name to an Named object */ - for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++) + Node = AcpiDbConvertToNode (ObjectName); + if (!Node) { - if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature, - AcpiGbl_TableData[i].SigLength)) - { - /* Found the table, unload it */ - - Status = AcpiUnloadTable (i); - if (ACPI_SUCCESS (Status)) - { - AcpiOsPrintf ("[%s] unloaded and uninstalled\n", TableArg); - } - else - { - AcpiOsPrintf ("%s, while unloading [%s]\n", - AcpiFormatException (Status), TableArg); - } - - return; - } + AcpiOsPrintf ("Could not find [%s] in namespace\n", + ObjectName); + return; } - AcpiOsPrintf ("Unknown table type [%s]\n", TableArg); -#endif + Status = AcpiUnloadParentTable (ACPI_CAST_PTR (ACPI_HANDLE, Node)); + if (ACPI_SUCCESS (Status)) + { + AcpiOsPrintf ("Parent of [%s] (%p) unloaded and uninstalled\n", + ObjectName, Node); + } + else + { + AcpiOsPrintf ("%s, while unloading parent table of [%s]\n", + AcpiFormatException (Status), ObjectName); + } } -- cgit v1.1