summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/debugger/dbdisply.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-04-19 23:49:34 +0000
committerjkim <jkim@FreeBSD.org>2013-04-19 23:49:34 +0000
commit1d7102aa1b8c84f1186ae05e3678f2cac71c0f5c (patch)
tree5f5a3414edb3b26bbd9583d16c6368e24578edff /sys/contrib/dev/acpica/components/debugger/dbdisply.c
parent91a43667738a5b60b71f7b124b2c9686c2338341 (diff)
parent2827e383d552774c11bb806510c3468678d07994 (diff)
downloadFreeBSD-src-1d7102aa1b8c84f1186ae05e3678f2cac71c0f5c.zip
FreeBSD-src-1d7102aa1b8c84f1186ae05e3678f2cac71c0f5c.tar.gz
Merge ACPICA 20130418.
Diffstat (limited to 'sys/contrib/dev/acpica/components/debugger/dbdisply.c')
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbdisply.c80
1 files changed, 79 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/components/debugger/dbdisply.c b/sys/contrib/dev/acpica/components/debugger/dbdisply.c
index 6e82668..649b328 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbdisply.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbdisply.c
@@ -68,6 +68,12 @@ static void *
AcpiDbGetPointer (
void *Target);
+static ACPI_STATUS
+AcpiDbDisplayNonRootHandlers (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue);
/*
* System handler information.
@@ -76,6 +82,7 @@ AcpiDbGetPointer (
#define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
#define ACPI_HANDLER_NAME_STRING "%30s : "
#define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
+#define ACPI_HANDLER_PRESENT_STRING2 "%-9s (%p)"
#define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
/* All predefined Address Space IDs */
@@ -984,7 +991,7 @@ AcpiDbDisplayHandlers (
/* Operation region handlers */
- AcpiOsPrintf ("\nOperation Region Handlers:\n");
+ AcpiOsPrintf ("\nOperation Region Handlers at the namespace root:\n");
ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
if (ObjDesc)
@@ -1076,6 +1083,77 @@ AcpiDbDisplayHandlers (
AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
}
}
+
+
+ /* Other handlers that are installed throughout the namespace */
+
+ AcpiOsPrintf ("\nOperation Region Handlers for specific devices:\n");
+
+ (void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbDisplayNonRootHandlers,
+ NULL, NULL, NULL);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbDisplayNonRootHandlers
+ *
+ * PARAMETERS: ACPI_WALK_CALLBACK
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Display information about all handlers installed for a
+ * device object.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbDisplayNonRootHandlers (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue)
+{
+ ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_OPERAND_OBJECT *HandlerObj;
+ char *Pathname;
+
+
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (!ObjDesc)
+ {
+ return (AE_OK);
+ }
+
+ Pathname = AcpiNsGetExternalPathname (Node);
+ if (!Pathname)
+ {
+ return (AE_OK);
+ }
+
+ /* Display all handlers associated with this device */
+
+ HandlerObj = ObjDesc->Device.Handler;
+ while (HandlerObj)
+ {
+ AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
+ AcpiUtGetRegionName ((UINT8) HandlerObj->AddressSpace.SpaceId),
+ HandlerObj->AddressSpace.SpaceId);
+
+ AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING2,
+ (HandlerObj->AddressSpace.HandlerFlags &
+ ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
+ HandlerObj->AddressSpace.Handler);
+
+ AcpiOsPrintf (" Device Name: %s (%p)\n", Pathname, Node);
+
+ HandlerObj = HandlerObj->AddressSpace.Next;
+ }
+
+ ACPI_FREE (Pathname);
+ return (AE_OK);
}
#endif /* ACPI_DEBUGGER */
OpenPOWER on IntegriCloud