1 /*******************************************************************************
3 * Module Name: dbdisply - debug display commands
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2016, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
57 #define _COMPONENT ACPI_CA_DEBUGGER
58 ACPI_MODULE_NAME ("dbdisply")
60 /* Local prototypes */
63 AcpiDbDumpParserDescriptor (
64 ACPI_PARSE_OBJECT *Op);
71 AcpiDbDisplayNonRootHandlers (
72 ACPI_HANDLE ObjHandle,
78 * System handler information.
79 * Used for Handlers command, in AcpiDbDisplayHandlers.
81 #define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
82 #define ACPI_HANDLER_NAME_STRING "%30s : "
83 #define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
84 #define ACPI_HANDLER_PRESENT_STRING2 "%-9s (%p)"
85 #define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
87 /* All predefined Address Space IDs */
89 static ACPI_ADR_SPACE_TYPE AcpiGbl_SpaceIdList[] =
91 ACPI_ADR_SPACE_SYSTEM_MEMORY,
92 ACPI_ADR_SPACE_SYSTEM_IO,
93 ACPI_ADR_SPACE_PCI_CONFIG,
97 ACPI_ADR_SPACE_PCI_BAR_TARGET,
100 ACPI_ADR_SPACE_GSBUS,
101 ACPI_ADR_SPACE_DATA_TABLE,
102 ACPI_ADR_SPACE_FIXED_HARDWARE
105 /* Global handler information */
107 typedef struct acpi_handler_info
114 static ACPI_HANDLER_INFO AcpiGbl_HandlerList[] =
116 {&AcpiGbl_GlobalNotify[0].Handler, "System Notifications"},
117 {&AcpiGbl_GlobalNotify[1].Handler, "Device Notifications"},
118 {&AcpiGbl_TableHandler, "ACPI Table Events"},
119 {&AcpiGbl_ExceptionHandler, "Control Method Exceptions"},
120 {&AcpiGbl_InterfaceHandler, "OSI Invocations"}
124 /*******************************************************************************
126 * FUNCTION: AcpiDbGetPointer
128 * PARAMETERS: Target - Pointer to string to be converted
130 * RETURN: Converted pointer
132 * DESCRIPTION: Convert an ascii pointer value to a real value
134 ******************************************************************************/
144 Address = strtoul (Target, NULL, 16);
145 ObjPtr = ACPI_TO_POINTER (Address);
150 /*******************************************************************************
152 * FUNCTION: AcpiDbDumpParserDescriptor
154 * PARAMETERS: Op - A parser Op descriptor
158 * DESCRIPTION: Display a formatted parser object
160 ******************************************************************************/
163 AcpiDbDumpParserDescriptor (
164 ACPI_PARSE_OBJECT *Op)
166 const ACPI_OPCODE_INFO *Info;
169 Info = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
171 AcpiOsPrintf ("Parser Op Descriptor:\n");
172 AcpiOsPrintf ("%20.20s : %4.4X\n", "Opcode", Op->Common.AmlOpcode);
174 ACPI_DEBUG_ONLY_MEMBERS (AcpiOsPrintf ("%20.20s : %s\n", "Opcode Name",
177 AcpiOsPrintf ("%20.20s : %p\n", "Value/ArgList", Op->Common.Value.Arg);
178 AcpiOsPrintf ("%20.20s : %p\n", "Parent", Op->Common.Parent);
179 AcpiOsPrintf ("%20.20s : %p\n", "NextOp", Op->Common.Next);
183 /*******************************************************************************
185 * FUNCTION: AcpiDbDecodeAndDisplayObject
187 * PARAMETERS: Target - String with object to be displayed. Names
188 * and hex pointers are supported.
189 * OutputType - Byte, Word, Dword, or Qword (B|W|D|Q)
193 * DESCRIPTION: Display a formatted ACPI object
195 ******************************************************************************/
198 AcpiDbDecodeAndDisplayObject (
203 ACPI_NAMESPACE_NODE *Node;
204 ACPI_OPERAND_OBJECT *ObjDesc;
205 UINT32 Display = DB_BYTE_DISPLAY;
217 /* Decode the output type */
221 AcpiUtStrupr (OutputType);
222 if (OutputType[0] == 'W')
224 Display = DB_WORD_DISPLAY;
226 else if (OutputType[0] == 'D')
228 Display = DB_DWORD_DISPLAY;
230 else if (OutputType[0] == 'Q')
232 Display = DB_QWORD_DISPLAY;
236 RetBuf.Length = sizeof (Buffer);
237 RetBuf.Pointer = Buffer;
239 /* Differentiate between a number and a name */
241 if ((Target[0] >= 0x30) && (Target[0] <= 0x39))
243 ObjPtr = AcpiDbGetPointer (Target);
244 if (!AcpiOsReadable (ObjPtr, 16))
247 "Address %p is invalid in this address space\n",
252 /* Decode the object type */
254 switch (ACPI_GET_DESCRIPTOR_TYPE (ObjPtr))
256 case ACPI_DESC_TYPE_NAMED:
258 /* This is a namespace Node */
260 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_NAMESPACE_NODE)))
263 "Cannot read entire Named object at address %p\n",
271 case ACPI_DESC_TYPE_OPERAND:
273 /* This is a ACPI OPERAND OBJECT */
275 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_OPERAND_OBJECT)))
278 "Cannot read entire ACPI object at address %p\n",
283 AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT),
284 Display, ACPI_UINT32_MAX);
285 AcpiExDumpObjectDescriptor (ObjPtr, 1);
288 case ACPI_DESC_TYPE_PARSER:
290 /* This is a Parser Op object */
292 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_PARSE_OBJECT)))
295 "Cannot read entire Parser object at address %p\n",
300 AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT),
301 Display, ACPI_UINT32_MAX);
302 AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
307 /* Is not a recognizeable object */
310 "Not a known ACPI internal object, descriptor type %2.2X\n",
311 ACPI_GET_DESCRIPTOR_TYPE (ObjPtr));
314 if (AcpiOsReadable (ObjPtr, 64))
319 /* Just dump some memory */
321 AcpiUtDebugDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
328 /* The parameter is a name string that must be resolved to a Named obj */
330 Node = AcpiDbLocalNsLookup (Target);
338 /* Now dump the NS node */
340 Status = AcpiGetName (Node, ACPI_FULL_PATHNAME_NO_TRAILING, &RetBuf);
341 if (ACPI_FAILURE (Status))
343 AcpiOsPrintf ("Could not convert name to pathname\n");
348 AcpiOsPrintf ("Object (%p) Pathname: %s\n",
349 Node, (char *) RetBuf.Pointer);
352 if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
354 AcpiOsPrintf ("Invalid Named object at address %p\n", Node);
358 AcpiUtDebugDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
359 Display, ACPI_UINT32_MAX);
360 AcpiExDumpNamespaceNode (Node, 1);
362 ObjDesc = AcpiNsGetAttachedObject (Node);
365 AcpiOsPrintf ("\nAttached Object (%p):\n", ObjDesc);
366 if (!AcpiOsReadable (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)))
368 AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n",
373 AcpiUtDebugDumpBuffer ((void *) ObjDesc,
374 sizeof (ACPI_OPERAND_OBJECT), Display, ACPI_UINT32_MAX);
375 AcpiExDumpObjectDescriptor (ObjDesc, 1);
380 /*******************************************************************************
382 * FUNCTION: AcpiDbDisplayMethodInfo
384 * PARAMETERS: StartOp - Root of the control method parse tree
388 * DESCRIPTION: Display information about the current method
390 ******************************************************************************/
393 AcpiDbDisplayMethodInfo (
394 ACPI_PARSE_OBJECT *StartOp)
396 ACPI_WALK_STATE *WalkState;
397 ACPI_OPERAND_OBJECT *ObjDesc;
398 ACPI_NAMESPACE_NODE *Node;
399 ACPI_PARSE_OBJECT *RootOp;
400 ACPI_PARSE_OBJECT *Op;
401 const ACPI_OPCODE_INFO *OpInfo;
403 UINT32 NumOperands = 0;
404 UINT32 NumOperators = 0;
405 UINT32 NumRemainingOps = 0;
406 UINT32 NumRemainingOperands = 0;
407 UINT32 NumRemainingOperators = 0;
408 BOOLEAN CountRemaining = FALSE;
411 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
414 AcpiOsPrintf ("There is no method currently executing\n");
418 ObjDesc = WalkState->MethodDesc;
419 Node = WalkState->MethodNode;
421 AcpiOsPrintf ("Currently executing control method is [%4.4s]\n",
422 AcpiUtGetNodeName (Node));
423 AcpiOsPrintf ("%X Arguments, SyncLevel = %X\n",
424 (UINT32) ObjDesc->Method.ParamCount,
425 (UINT32) ObjDesc->Method.SyncLevel);
428 while (RootOp->Common.Parent)
430 RootOp = RootOp->Common.Parent;
439 CountRemaining = TRUE;
448 /* Decode the opcode */
450 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
451 switch (OpInfo->Class)
453 case AML_CLASS_ARGUMENT:
457 NumRemainingOperands++;
463 case AML_CLASS_UNKNOWN:
465 /* Bad opcode or ASCII character */
473 NumRemainingOperators++;
480 Op = AcpiPsGetDepthNext (StartOp, Op);
484 "Method contains: %X AML Opcodes - %X Operators, %X Operands\n",
485 NumOps, NumOperators, NumOperands);
488 "Remaining to execute: %X AML Opcodes - %X Operators, %X Operands\n",
489 NumRemainingOps, NumRemainingOperators, NumRemainingOperands);
493 /*******************************************************************************
495 * FUNCTION: AcpiDbDisplayLocals
501 * DESCRIPTION: Display all locals for the currently running control method
503 ******************************************************************************/
506 AcpiDbDisplayLocals (
509 ACPI_WALK_STATE *WalkState;
512 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
515 AcpiOsPrintf ("There is no method currently executing\n");
519 AcpiDbDecodeLocals (WalkState);
523 /*******************************************************************************
525 * FUNCTION: AcpiDbDisplayArguments
531 * DESCRIPTION: Display all arguments for the currently running control method
533 ******************************************************************************/
536 AcpiDbDisplayArguments (
539 ACPI_WALK_STATE *WalkState;
542 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
545 AcpiOsPrintf ("There is no method currently executing\n");
549 AcpiDbDecodeArguments (WalkState);
553 /*******************************************************************************
555 * FUNCTION: AcpiDbDisplayResults
561 * DESCRIPTION: Display current contents of a method result stack
563 ******************************************************************************/
566 AcpiDbDisplayResults (
570 ACPI_WALK_STATE *WalkState;
571 ACPI_OPERAND_OBJECT *ObjDesc;
572 UINT32 ResultCount = 0;
573 ACPI_NAMESPACE_NODE *Node;
574 ACPI_GENERIC_STATE *Frame;
575 UINT32 Index; /* Index onto current frame */
578 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
581 AcpiOsPrintf ("There is no method currently executing\n");
585 ObjDesc = WalkState->MethodDesc;
586 Node = WalkState->MethodNode;
588 if (WalkState->Results)
590 ResultCount = WalkState->ResultCount;
593 AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
594 AcpiUtGetNodeName (Node), ResultCount);
596 /* From the top element of result stack */
598 Frame = WalkState->Results;
599 Index = (ResultCount - 1) % ACPI_RESULTS_FRAME_OBJ_NUM;
601 for (i = 0; i < ResultCount; i++)
603 ObjDesc = Frame->Results.ObjDesc[Index];
604 AcpiOsPrintf ("Result%u: ", i);
605 AcpiDbDisplayInternalObject (ObjDesc, WalkState);
609 Frame = Frame->Results.Next;
610 Index = ACPI_RESULTS_FRAME_OBJ_NUM;
618 /*******************************************************************************
620 * FUNCTION: AcpiDbDisplayCallingTree
626 * DESCRIPTION: Display current calling tree of nested control methods
628 ******************************************************************************/
631 AcpiDbDisplayCallingTree (
634 ACPI_WALK_STATE *WalkState;
635 ACPI_NAMESPACE_NODE *Node;
638 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
641 AcpiOsPrintf ("There is no method currently executing\n");
645 Node = WalkState->MethodNode;
646 AcpiOsPrintf ("Current Control Method Call Tree\n");
650 Node = WalkState->MethodNode;
651 AcpiOsPrintf (" [%4.4s]\n", AcpiUtGetNodeName (Node));
653 WalkState = WalkState->Next;
658 /*******************************************************************************
660 * FUNCTION: AcpiDbDisplayObjectType
662 * PARAMETERS: ObjectArg - User entered NS node handle
666 * DESCRIPTION: Display type of an arbitrary NS node
668 ******************************************************************************/
671 AcpiDbDisplayObjectType (
676 ACPI_DEVICE_INFO *Info;
681 Arg = strtoul (ObjectArg, NULL, 16);
682 Handle = ACPI_TO_POINTER (Arg);
684 Status = AcpiGetObjectInfo (Handle, &Info);
685 if (ACPI_FAILURE (Status))
687 AcpiOsPrintf ("Could not get object info, %s\n",
688 AcpiFormatException (Status));
692 AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
693 ACPI_FORMAT_UINT64 (Info->Address),
694 Info->CurrentStatus, Info->Flags);
696 AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
697 Info->HighestDstates[0], Info->HighestDstates[1],
698 Info->HighestDstates[2], Info->HighestDstates[3]);
700 AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
701 Info->LowestDstates[0], Info->LowestDstates[1],
702 Info->LowestDstates[2], Info->LowestDstates[3],
703 Info->LowestDstates[4]);
705 if (Info->Valid & ACPI_VALID_HID)
707 AcpiOsPrintf ("HID: %s\n", Info->HardwareId.String);
710 if (Info->Valid & ACPI_VALID_UID)
712 AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
715 if (Info->Valid & ACPI_VALID_CID)
717 for (i = 0; i < Info->CompatibleIdList.Count; i++)
719 AcpiOsPrintf ("CID %u: %s\n", i,
720 Info->CompatibleIdList.Ids[i].String);
728 /*******************************************************************************
730 * FUNCTION: AcpiDbDisplayResultObject
732 * PARAMETERS: ObjDesc - Object to be displayed
733 * WalkState - Current walk state
737 * DESCRIPTION: Display the result of an AML opcode
739 * Note: Curently only displays the result object if we are single stepping.
740 * However, this output may be useful in other contexts and could be enabled
741 * to do so if needed.
743 ******************************************************************************/
746 AcpiDbDisplayResultObject (
747 ACPI_OPERAND_OBJECT *ObjDesc,
748 ACPI_WALK_STATE *WalkState)
751 #ifndef ACPI_APPLICATION
752 if (AcpiGbl_DbThreadId != AcpiOsGetThreadId())
758 /* Only display if single stepping */
760 if (!AcpiGbl_CmSingleStep)
765 AcpiOsPrintf ("ResultObj: ");
766 AcpiDbDisplayInternalObject (ObjDesc, WalkState);
771 /*******************************************************************************
773 * FUNCTION: AcpiDbDisplayArgumentObject
775 * PARAMETERS: ObjDesc - Object to be displayed
776 * WalkState - Current walk state
780 * DESCRIPTION: Display the result of an AML opcode
782 ******************************************************************************/
785 AcpiDbDisplayArgumentObject (
786 ACPI_OPERAND_OBJECT *ObjDesc,
787 ACPI_WALK_STATE *WalkState)
790 #ifndef ACPI_APPLICATION
791 if (AcpiGbl_DbThreadId != AcpiOsGetThreadId())
797 if (!AcpiGbl_CmSingleStep)
802 AcpiOsPrintf ("ArgObj: ");
803 AcpiDbDisplayInternalObject (ObjDesc, WalkState);
807 #if (!ACPI_REDUCED_HARDWARE)
808 /*******************************************************************************
810 * FUNCTION: AcpiDbDisplayGpes
816 * DESCRIPTION: Display the current GPE structures
818 ******************************************************************************/
824 ACPI_GPE_BLOCK_INFO *GpeBlock;
825 ACPI_GPE_XRUPT_INFO *GpeXruptInfo;
826 ACPI_GPE_EVENT_INFO *GpeEventInfo;
827 ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
829 ACPI_GPE_NOTIFY_INFO *Notify;
840 RetBuf.Length = sizeof (Buffer);
841 RetBuf.Pointer = Buffer;
845 /* Walk the GPE lists */
847 GpeXruptInfo = AcpiGbl_GpeXruptListHead;
850 GpeBlock = GpeXruptInfo->GpeBlockListHead;
853 Status = AcpiGetName (GpeBlock->Node,
854 ACPI_FULL_PATHNAME_NO_TRAILING, &RetBuf);
855 if (ACPI_FAILURE (Status))
857 AcpiOsPrintf ("Could not convert name to pathname\n");
860 if (GpeBlock->Node == AcpiGbl_FadtGpeDevice)
862 GpeType = "FADT-defined GPE block";
866 GpeType = "GPE Block Device";
870 "\nBlock %u - Info %p DeviceNode %p [%s] - %s\n",
871 Block, GpeBlock, GpeBlock->Node, Buffer, GpeType);
874 " Registers: %u (%u GPEs)\n",
875 GpeBlock->RegisterCount, GpeBlock->GpeCount);
878 " GPE range: 0x%X to 0x%X on interrupt %u\n",
879 GpeBlock->BlockBaseNumber,
880 GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1),
881 GpeXruptInfo->InterruptNumber);
884 " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
885 GpeBlock->RegisterInfo,
887 GpeBlock->RegisterInfo->StatusAddress.Address),
889 GpeBlock->RegisterInfo->EnableAddress.Address));
891 AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
893 /* Examine each GPE Register within the block */
895 for (i = 0; i < GpeBlock->RegisterCount; i++)
897 GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
900 " Reg %u: (GPE %.2X-%.2X) "
901 "RunEnable %2.2X WakeEnable %2.2X"
902 " Status %8.8X%8.8X Enable %8.8X%8.8X\n",
903 i, GpeRegisterInfo->BaseGpeNumber,
904 GpeRegisterInfo->BaseGpeNumber +
905 (ACPI_GPE_REGISTER_WIDTH - 1),
906 GpeRegisterInfo->EnableForRun,
907 GpeRegisterInfo->EnableForWake,
909 GpeRegisterInfo->StatusAddress.Address),
911 GpeRegisterInfo->EnableAddress.Address));
913 /* Now look at the individual GPEs in this byte register */
915 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
917 GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j;
918 GpeEventInfo = &GpeBlock->EventInfo[GpeIndex];
920 if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
921 ACPI_GPE_DISPATCH_NONE)
923 /* This GPE is not used (no method or handler), ignore it */
929 " GPE %.2X: %p RunRefs %2.2X Flags %2.2X (",
930 GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo,
931 GpeEventInfo->RuntimeCount, GpeEventInfo->Flags);
933 /* Decode the flags byte */
935 if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED)
937 AcpiOsPrintf ("Level, ");
941 AcpiOsPrintf ("Edge, ");
944 if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE)
946 AcpiOsPrintf ("CanWake, ");
950 AcpiOsPrintf ("RunOnly, ");
953 switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
955 case ACPI_GPE_DISPATCH_NONE:
957 AcpiOsPrintf ("NotUsed");
960 case ACPI_GPE_DISPATCH_METHOD:
962 AcpiOsPrintf ("Method");
965 case ACPI_GPE_DISPATCH_HANDLER:
967 AcpiOsPrintf ("Handler");
970 case ACPI_GPE_DISPATCH_NOTIFY:
973 Notify = GpeEventInfo->Dispatch.NotifyList;
977 Notify = Notify->Next;
980 AcpiOsPrintf ("Implicit Notify on %u devices",
984 case ACPI_GPE_DISPATCH_RAW_HANDLER:
986 AcpiOsPrintf ("RawHandler");
991 AcpiOsPrintf ("UNKNOWN: %X",
992 ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags));
996 AcpiOsPrintf (")\n");
1001 GpeBlock = GpeBlock->Next;
1004 GpeXruptInfo = GpeXruptInfo->Next;
1007 #endif /* !ACPI_REDUCED_HARDWARE */
1010 /*******************************************************************************
1012 * FUNCTION: AcpiDbDisplayHandlers
1018 * DESCRIPTION: Display the currently installed global handlers
1020 ******************************************************************************/
1023 AcpiDbDisplayHandlers (
1026 ACPI_OPERAND_OBJECT *ObjDesc;
1027 ACPI_OPERAND_OBJECT *HandlerObj;
1028 ACPI_ADR_SPACE_TYPE SpaceId;
1032 /* Operation region handlers */
1034 AcpiOsPrintf ("\nOperation Region Handlers at the namespace root:\n");
1036 ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
1039 for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_SpaceIdList); i++)
1041 SpaceId = AcpiGbl_SpaceIdList[i];
1043 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
1044 AcpiUtGetRegionName ((UINT8) SpaceId), SpaceId);
1046 HandlerObj = AcpiEvFindRegionHandler (
1047 SpaceId, ObjDesc->CommonNotify.Handler);
1050 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
1051 (HandlerObj->AddressSpace.HandlerFlags &
1052 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ?
1054 HandlerObj->AddressSpace.Handler);
1059 /* There is no handler for this SpaceId */
1061 AcpiOsPrintf ("None\n");
1066 /* Find all handlers for user-defined SpaceIDs */
1068 HandlerObj = ObjDesc->CommonNotify.Handler;
1071 if (HandlerObj->AddressSpace.SpaceId >= ACPI_USER_REGION_BEGIN)
1073 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
1074 "User-defined ID", HandlerObj->AddressSpace.SpaceId);
1075 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
1076 (HandlerObj->AddressSpace.HandlerFlags &
1077 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ?
1079 HandlerObj->AddressSpace.Handler);
1082 HandlerObj = HandlerObj->AddressSpace.Next;
1086 #if (!ACPI_REDUCED_HARDWARE)
1088 /* Fixed event handlers */
1090 AcpiOsPrintf ("\nFixed Event Handlers:\n");
1092 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
1094 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX, AcpiUtGetEventName (i), i);
1095 if (AcpiGbl_FixedEventHandlers[i].Handler)
1097 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1098 AcpiGbl_FixedEventHandlers[i].Handler);
1102 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1106 #endif /* !ACPI_REDUCED_HARDWARE */
1108 /* Miscellaneous global handlers */
1110 AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
1112 for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_HandlerList); i++)
1114 AcpiOsPrintf (ACPI_HANDLER_NAME_STRING,
1115 AcpiGbl_HandlerList[i].Name);
1117 if (AcpiGbl_HandlerList[i].Handler)
1119 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1120 AcpiGbl_HandlerList[i].Handler);
1124 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1129 /* Other handlers that are installed throughout the namespace */
1131 AcpiOsPrintf ("\nOperation Region Handlers for specific devices:\n");
1133 (void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
1134 ACPI_UINT32_MAX, AcpiDbDisplayNonRootHandlers,
1139 /*******************************************************************************
1141 * FUNCTION: AcpiDbDisplayNonRootHandlers
1143 * PARAMETERS: ACPI_WALK_CALLBACK
1147 * DESCRIPTION: Display information about all handlers installed for a
1150 ******************************************************************************/
1153 AcpiDbDisplayNonRootHandlers (
1154 ACPI_HANDLE ObjHandle,
1155 UINT32 NestingLevel,
1159 ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
1160 ACPI_OPERAND_OBJECT *ObjDesc;
1161 ACPI_OPERAND_OBJECT *HandlerObj;
1165 ObjDesc = AcpiNsGetAttachedObject (Node);
1171 Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
1177 /* Display all handlers associated with this device */
1179 HandlerObj = ObjDesc->CommonNotify.Handler;
1182 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
1183 AcpiUtGetRegionName ((UINT8) HandlerObj->AddressSpace.SpaceId),
1184 HandlerObj->AddressSpace.SpaceId);
1186 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING2,
1187 (HandlerObj->AddressSpace.HandlerFlags &
1188 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
1189 HandlerObj->AddressSpace.Handler);
1191 AcpiOsPrintf (" Device Name: %s (%p)\n", Pathname, Node);
1193 HandlerObj = HandlerObj->AddressSpace.Next;
1196 ACPI_FREE (Pathname);
1200 #endif /* ACPI_DEBUGGER */