summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/dbcmds.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-03-05 02:15:19 +0000
committermsmith <msmith@FreeBSD.org>2001-03-05 02:15:19 +0000
commitcc64c75258cdd65688e8a27806ad0417bec44bb0 (patch)
tree5cc07fb8c5f739592d70f3af7590f2a0722a9a5a /sys/contrib/dev/acpica/dbcmds.c
parent7948a3a80426e7bdc0728814e72cf46852c46576 (diff)
downloadFreeBSD-src-cc64c75258cdd65688e8a27806ad0417bec44bb0.zip
FreeBSD-src-cc64c75258cdd65688e8a27806ad0417bec44bb0.tar.gz
Belated vendor update to the Intel ACPI CA 20010208 snapshot.
Diffstat (limited to 'sys/contrib/dev/acpica/dbcmds.c')
-rw-r--r--sys/contrib/dev/acpica/dbcmds.c74
1 files changed, 73 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/dbcmds.c b/sys/contrib/dev/acpica/dbcmds.c
index 33f8481..b48e7ea 100644
--- a/sys/contrib/dev/acpica/dbcmds.c
+++ b/sys/contrib/dev/acpica/dbcmds.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
- * $Revision: 45 $
+ * $Revision: 46 $
*
******************************************************************************/
@@ -995,4 +995,76 @@ AcpiDbSetScope (
AcpiOsPrintf ("New scope: %s\n", ScopeBuf);
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbDisplayResources
+ *
+ * PARAMETERS: ObjectArg - String with hex value of the object
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+void
+AcpiDbDisplayResources (
+ NATIVE_CHAR *ObjectArg)
+{
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_STATUS Status;
+ ACPI_BUFFER ReturnObj;
+ PCI_ROUTING_TABLE *Prt;
+ UINT32 i;
+
+
+ AcpiDbSetOutputDestination (DB_REDIRECTABLE_OUTPUT);
+
+ /* Convert string to object pointer */
+
+ ObjDesc = (ACPI_OPERAND_OBJECT *) STRTOUL (ObjectArg, NULL, 16);
+
+ /* Prepare for a return object of arbitrary size */
+
+ ReturnObj.Pointer = Buffer;
+ ReturnObj.Length = BUFFER_SIZE;
+
+ Status = AcpiEvaluateObject (ObjDesc, "_PRT", NULL, &ReturnObj);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("Could not obtain _PRT: %s\n", AcpiCmFormatException (Status));
+ goto Cleanup;
+ }
+
+ ReturnObj.Pointer = Buffer;
+ ReturnObj.Length = BUFFER_SIZE;
+
+ Status = AcpiGetIrqRoutingTable (ObjDesc, &ReturnObj);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("GetIrqRoutingTable failed: %s\n", AcpiCmFormatException (Status));
+ goto Cleanup;
+ }
+
+ Prt = (PCI_ROUTING_TABLE *) Buffer;
+ i = 0;
+ while ((char *) Prt < (Buffer + ReturnObj.Length))
+ {
+ AcpiOsPrintf ("Prt[%d] Src=%s: Addr=%X\n", i, Prt->Source, Prt->Address);
+ i++;
+ Prt = (PCI_ROUTING_TABLE *) (((char *) Prt) + Prt->Length);
+ }
+
+Cleanup:
+
+ AcpiDbSetOutputDestination (DB_CONSOLE_OUTPUT);
+ return;
+
+}
+
+
+
+
+
#endif /* ENABLE_DEBUGGER */
OpenPOWER on IntegriCloud