diff options
Diffstat (limited to 'source/components/debugger/dbcmds.c')
| -rw-r--r-- | source/components/debugger/dbcmds.c | 101 | 
1 files changed, 66 insertions, 35 deletions
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 459cd916ee5d..93d4f294dd09 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); +    }  }  | 
