summaryrefslogtreecommitdiffstats
path: root/source/components/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/debugger')
-rw-r--r--source/components/debugger/dbcmds.c101
-rw-r--r--source/components/debugger/dbinput.c4
2 files changed, 68 insertions, 37 deletions
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);
+ }
}
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index 0ae3139..42452ac 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -250,7 +250,7 @@ AcpiDbDisplayHelp (
AcpiOsPrintf (" Stack Display CPU stack usage\n");
AcpiOsPrintf (" Tables Info about current ACPI table(s)\n");
AcpiOsPrintf (" Tables Display info about loaded ACPI tables\n");
- AcpiOsPrintf (" Unload <TableSig> [Instance] Unload an ACPI table\n");
+ AcpiOsPrintf (" Unload <Namepath> Unload an ACPI table via namespace object\n");
AcpiOsPrintf (" ! <CommandNumber> Execute command from history buffer\n");
AcpiOsPrintf (" !! Execute last command again\n");
@@ -894,7 +894,7 @@ AcpiDbCommandDispatch (
break;
case CMD_UNLOAD:
- AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+ AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
break;
case CMD_EXIT:
OpenPOWER on IntegriCloud