Debugger: Add command to display status of global handlers.

Display op region, fixed event, and misc global handlers.
installation status and for op regions, whether default or
user-installed handler will be used.
This commit is contained in:
Robert Moore 2011-01-25 13:47:58 -08:00
parent cb08192de6
commit fba030e8a8
3 changed files with 94 additions and 1 deletions

View File

@ -959,5 +959,87 @@ AcpiDbDisplayGpes (
}
}
#endif /* ACPI_DEBUGGER */
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayHandlers
*
* PARAMETERS: None
*
* RETURN: None
*
* DESCRIPTION: Display the currently installed global handlers
*
******************************************************************************/
#define ACPI_PREDEFINED_HANDLER_STRING "%27s (%.2u) : %-9s (%p)\n"
#define ACPI_GLOBAL_HANDLER_STRING "%32s : %-9s (%p)\n"
void
AcpiDbDisplayHandlers (
void)
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_OPERAND_OBJECT *HandlerObj;
UINT32 i;
/* Operation region handlers */
AcpiOsPrintf ("\nOperation Region Handlers\n");
ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
if (ObjDesc)
{
for (i = 0; i < ACPI_NUM_PREDEFINED_REGIONS; i++)
{
HandlerObj = ObjDesc->Device.Handler;
while (HandlerObj)
{
if (i == HandlerObj->AddressSpace.SpaceId)
{
AcpiOsPrintf (ACPI_PREDEFINED_HANDLER_STRING,
AcpiUtGetRegionName ((UINT8) i), i,
(HandlerObj->AddressSpace.HandlerFlags &
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "Custom",
HandlerObj->AddressSpace.Handler);
break;
}
HandlerObj = HandlerObj->AddressSpace.Next;
}
}
}
/* Fixed event handlers */
AcpiOsPrintf ("\nFixed Event Handlers\n");
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
{
AcpiOsPrintf (ACPI_PREDEFINED_HANDLER_STRING, AcpiUtGetEventName (i), i,
AcpiGbl_FixedEventHandlers[i].Handler ? "Yes" : "No",
AcpiGbl_FixedEventHandlers[i].Handler);
}
/* Miscellaneous global handlers */
AcpiOsPrintf ("\nMiscellaneous Handlers\n");
AcpiOsPrintf (ACPI_GLOBAL_HANDLER_STRING, "Global Interface Handler",
AcpiGbl_InterfaceHandler ? "Yes" : "No",
AcpiGbl_InterfaceHandler);
AcpiOsPrintf (ACPI_GLOBAL_HANDLER_STRING, "Global Table Handler",
AcpiGbl_TableHandler ? "Yes" : "No",
AcpiGbl_TableHandler);
AcpiOsPrintf (ACPI_GLOBAL_HANDLER_STRING, "Global Exception Handler",
AcpiGbl_ExceptionHandler ? "Yes" : "No",
AcpiGbl_ExceptionHandler);
AcpiOsPrintf (ACPI_GLOBAL_HANDLER_STRING, "Global System Notify Handler",
AcpiGbl_SystemNotify.Handler ? "Yes" : "No",
AcpiGbl_SystemNotify.Handler);
AcpiOsPrintf (ACPI_GLOBAL_HANDLER_STRING, "Global Device Notify Handler",
AcpiGbl_DeviceNotify.Handler ? "Yes" : "No",
AcpiGbl_DeviceNotify.Handler);
}
#endif /* ACPI_DEBUGGER */

View File

@ -176,6 +176,7 @@ enum AcpiExDebuggerCommands
CMD_GO,
CMD_GPE,
CMD_GPES,
CMD_HANDLERS,
CMD_HELP,
CMD_HELP2,
CMD_HISTORY,
@ -243,6 +244,7 @@ static const COMMAND_INFO AcpiGbl_DbCommands[] =
{"GO", 0},
{"GPE", 2},
{"GPES", 0},
{"HANDLERS", 0},
{"HELP", 0},
{"?", 0},
{"HISTORY", 0},
@ -331,6 +333,7 @@ AcpiDbDisplayHelp (
AcpiOsPrintf ("Dump <Address>|<Namepath>\n");
AcpiOsPrintf (" [Byte|Word|Dword|Qword] Display ACPI objects or memory\n");
AcpiOsPrintf ("EnableAcpi Enable ACPI (hardware) mode\n");
AcpiOsPrintf ("Handlers Info about global handlers\n");
AcpiOsPrintf ("Help This help screen\n");
AcpiOsPrintf ("History Display command history buffer\n");
AcpiOsPrintf ("Level [<DebugLevel>] [console] Get/Set debug level for file or console\n");
@ -730,6 +733,10 @@ AcpiDbCommandDispatch (
AcpiDbDisplayGpes ();
break;
case CMD_HANDLERS:
AcpiDbDisplayHandlers ();
break;
case CMD_HELP:
case CMD_HELP2:
AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);

View File

@ -261,6 +261,10 @@ void
AcpiDbDisplayGpes (
void);
void
AcpiDbDisplayHandlers (
void);
void
AcpiDbCheckIntegrity (
void);