1 /*******************************************************************************
3 * Module Name: dbdisply - debug display commands
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2014, 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.
58 #define _COMPONENT ACPI_CA_DEBUGGER
59 ACPI_MODULE_NAME ("dbdisply")
61 /* Local prototypes */
64 AcpiDbDumpParserDescriptor (
65 ACPI_PARSE_OBJECT *Op);
72 AcpiDbDisplayNonRootHandlers (
73 ACPI_HANDLE ObjHandle,
79 * System handler information.
80 * Used for Handlers command, in AcpiDbDisplayHandlers.
82 #define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
83 #define ACPI_HANDLER_NAME_STRING "%30s : "
84 #define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
85 #define ACPI_HANDLER_PRESENT_STRING2 "%-9s (%p)"
86 #define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
88 /* All predefined Address Space IDs */
90 static ACPI_ADR_SPACE_TYPE AcpiGbl_SpaceIdList[] =
92 ACPI_ADR_SPACE_SYSTEM_MEMORY,
93 ACPI_ADR_SPACE_SYSTEM_IO,
94 ACPI_ADR_SPACE_PCI_CONFIG,
98 ACPI_ADR_SPACE_PCI_BAR_TARGET,
101 ACPI_ADR_SPACE_GSBUS,
102 ACPI_ADR_SPACE_DATA_TABLE,
103 ACPI_ADR_SPACE_FIXED_HARDWARE
106 /* Global handler information */
108 typedef struct acpi_handler_info
115 static ACPI_HANDLER_INFO AcpiGbl_HandlerList[] =
117 {&AcpiGbl_GlobalNotify[0].Handler, "System Notifications"},
118 {&AcpiGbl_GlobalNotify[1].Handler, "Device Notifications"},
119 {&AcpiGbl_TableHandler, "ACPI Table Events"},
120 {&AcpiGbl_ExceptionHandler, "Control Method Exceptions"},
121 {&AcpiGbl_InterfaceHandler, "OSI Invocations"}
125 /*******************************************************************************
127 * FUNCTION: AcpiDbGetPointer
129 * PARAMETERS: Target - Pointer to string to be converted
131 * RETURN: Converted pointer
133 * DESCRIPTION: Convert an ascii pointer value to a real value
135 ******************************************************************************/
145 Address = ACPI_STRTOUL (Target, NULL, 16);
146 ObjPtr = ACPI_TO_POINTER (Address);
151 /*******************************************************************************
153 * FUNCTION: AcpiDbDumpParserDescriptor
155 * PARAMETERS: Op - A parser Op descriptor
159 * DESCRIPTION: Display a formatted parser object
161 ******************************************************************************/
164 AcpiDbDumpParserDescriptor (
165 ACPI_PARSE_OBJECT *Op)
167 const ACPI_OPCODE_INFO *Info;
170 Info = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
172 AcpiOsPrintf ("Parser Op Descriptor:\n");
173 AcpiOsPrintf ("%20.20s : %4.4X\n", "Opcode", Op->Common.AmlOpcode);
175 ACPI_DEBUG_ONLY_MEMBERS (AcpiOsPrintf ("%20.20s : %s\n", "Opcode Name",
178 AcpiOsPrintf ("%20.20s : %p\n", "Value/ArgList", Op->Common.Value.Arg);
179 AcpiOsPrintf ("%20.20s : %p\n", "Parent", Op->Common.Parent);
180 AcpiOsPrintf ("%20.20s : %p\n", "NextOp", Op->Common.Next);
184 /*******************************************************************************
186 * FUNCTION: AcpiDbDecodeAndDisplayObject
188 * PARAMETERS: Target - String with object to be displayed. Names
189 * and hex pointers are supported.
190 * OutputType - Byte, Word, Dword, or Qword (B|W|D|Q)
194 * DESCRIPTION: Display a formatted ACPI object
196 ******************************************************************************/
199 AcpiDbDecodeAndDisplayObject (
204 ACPI_NAMESPACE_NODE *Node;
205 ACPI_OPERAND_OBJECT *ObjDesc;
206 UINT32 Display = DB_BYTE_DISPLAY;
218 /* Decode the output type */
222 AcpiUtStrupr (OutputType);
223 if (OutputType[0] == 'W')
225 Display = DB_WORD_DISPLAY;
227 else if (OutputType[0] == 'D')
229 Display = DB_DWORD_DISPLAY;
231 else if (OutputType[0] == 'Q')
233 Display = DB_QWORD_DISPLAY;
237 RetBuf.Length = sizeof (Buffer);
238 RetBuf.Pointer = Buffer;
240 /* Differentiate between a number and a name */
242 if ((Target[0] >= 0x30) && (Target[0] <= 0x39))
244 ObjPtr = AcpiDbGetPointer (Target);
245 if (!AcpiOsReadable (ObjPtr, 16))
247 AcpiOsPrintf ("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", ObjPtr);
270 case ACPI_DESC_TYPE_OPERAND:
272 /* This is a ACPI OPERAND OBJECT */
274 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_OPERAND_OBJECT)))
276 AcpiOsPrintf ("Cannot read entire ACPI object at address %p\n",
281 AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
283 AcpiExDumpObjectDescriptor (ObjPtr, 1);
286 case ACPI_DESC_TYPE_PARSER:
288 /* This is a Parser Op object */
290 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_PARSE_OBJECT)))
293 "Cannot read entire Parser object at address %p\n", ObjPtr);
297 AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
299 AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
304 /* Is not a recognizeable object */
307 "Not a known ACPI internal object, descriptor type %2.2X\n",
308 ACPI_GET_DESCRIPTOR_TYPE (ObjPtr));
311 if (AcpiOsReadable (ObjPtr, 64))
316 /* Just dump some memory */
318 AcpiUtDebugDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
325 /* The parameter is a name string that must be resolved to a Named obj */
327 Node = AcpiDbLocalNsLookup (Target);
335 /* Now dump the NS node */
337 Status = AcpiGetName (Node, ACPI_FULL_PATHNAME, &RetBuf);
338 if (ACPI_FAILURE (Status))
340 AcpiOsPrintf ("Could not convert name to pathname\n");
345 AcpiOsPrintf ("Object (%p) Pathname: %s\n",
346 Node, (char *) RetBuf.Pointer);
349 if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
351 AcpiOsPrintf ("Invalid Named object at address %p\n", Node);
355 AcpiUtDebugDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
356 Display, ACPI_UINT32_MAX);
357 AcpiExDumpNamespaceNode (Node, 1);
359 ObjDesc = AcpiNsGetAttachedObject (Node);
362 AcpiOsPrintf ("\nAttached Object (%p):\n", ObjDesc);
363 if (!AcpiOsReadable (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)))
365 AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n",
370 AcpiUtDebugDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
371 Display, ACPI_UINT32_MAX);
372 AcpiExDumpObjectDescriptor (ObjDesc, 1);
377 /*******************************************************************************
379 * FUNCTION: AcpiDbDisplayMethodInfo
381 * PARAMETERS: StartOp - Root of the control method parse tree
385 * DESCRIPTION: Display information about the current method
387 ******************************************************************************/
390 AcpiDbDisplayMethodInfo (
391 ACPI_PARSE_OBJECT *StartOp)
393 ACPI_WALK_STATE *WalkState;
394 ACPI_OPERAND_OBJECT *ObjDesc;
395 ACPI_NAMESPACE_NODE *Node;
396 ACPI_PARSE_OBJECT *RootOp;
397 ACPI_PARSE_OBJECT *Op;
398 const ACPI_OPCODE_INFO *OpInfo;
400 UINT32 NumOperands = 0;
401 UINT32 NumOperators = 0;
402 UINT32 NumRemainingOps = 0;
403 UINT32 NumRemainingOperands = 0;
404 UINT32 NumRemainingOperators = 0;
405 BOOLEAN CountRemaining = FALSE;
408 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
411 AcpiOsPrintf ("There is no method currently executing\n");
415 ObjDesc = WalkState->MethodDesc;
416 Node = WalkState->MethodNode;
418 AcpiOsPrintf ("Currently executing control method is [%4.4s]\n",
419 AcpiUtGetNodeName (Node));
420 AcpiOsPrintf ("%X Arguments, SyncLevel = %X\n",
421 (UINT32) ObjDesc->Method.ParamCount,
422 (UINT32) ObjDesc->Method.SyncLevel);
426 while (RootOp->Common.Parent)
428 RootOp = RootOp->Common.Parent;
437 CountRemaining = TRUE;
446 /* Decode the opcode */
448 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
449 switch (OpInfo->Class)
451 case AML_CLASS_ARGUMENT:
455 NumRemainingOperands++;
461 case AML_CLASS_UNKNOWN:
463 /* Bad opcode or ASCII character */
471 NumRemainingOperators++;
478 Op = AcpiPsGetDepthNext (StartOp, Op);
482 "Method contains: %X AML Opcodes - %X Operators, %X Operands\n",
483 NumOps, NumOperators, NumOperands);
486 "Remaining to execute: %X AML Opcodes - %X Operators, %X Operands\n",
487 NumRemainingOps, NumRemainingOperators, NumRemainingOperands);
491 /*******************************************************************************
493 * FUNCTION: AcpiDbDisplayLocals
499 * DESCRIPTION: Display all locals for the currently running control method
501 ******************************************************************************/
504 AcpiDbDisplayLocals (
507 ACPI_WALK_STATE *WalkState;
510 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
513 AcpiOsPrintf ("There is no method currently executing\n");
517 AcpiDmDisplayLocals (WalkState);
521 /*******************************************************************************
523 * FUNCTION: AcpiDbDisplayArguments
529 * DESCRIPTION: Display all arguments for the currently running control method
531 ******************************************************************************/
534 AcpiDbDisplayArguments (
537 ACPI_WALK_STATE *WalkState;
540 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
543 AcpiOsPrintf ("There is no method currently executing\n");
547 AcpiDmDisplayArguments (WalkState);
551 /*******************************************************************************
553 * FUNCTION: AcpiDbDisplayResults
559 * DESCRIPTION: Display current contents of a method result stack
561 ******************************************************************************/
564 AcpiDbDisplayResults (
568 ACPI_WALK_STATE *WalkState;
569 ACPI_OPERAND_OBJECT *ObjDesc;
570 UINT32 ResultCount = 0;
571 ACPI_NAMESPACE_NODE *Node;
572 ACPI_GENERIC_STATE *Frame;
573 UINT32 Index; /* Index onto current frame */
576 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
579 AcpiOsPrintf ("There is no method currently executing\n");
583 ObjDesc = WalkState->MethodDesc;
584 Node = WalkState->MethodNode;
586 if (WalkState->Results)
588 ResultCount = WalkState->ResultCount;
591 AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
592 AcpiUtGetNodeName (Node), ResultCount);
594 /* From the top element of result stack */
596 Frame = WalkState->Results;
597 Index = (ResultCount - 1) % ACPI_RESULTS_FRAME_OBJ_NUM;
599 for (i = 0; i < ResultCount; i++)
601 ObjDesc = Frame->Results.ObjDesc[Index];
602 AcpiOsPrintf ("Result%u: ", i);
603 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
606 Frame = Frame->Results.Next;
607 Index = ACPI_RESULTS_FRAME_OBJ_NUM;
614 /*******************************************************************************
616 * FUNCTION: AcpiDbDisplayCallingTree
622 * DESCRIPTION: Display current calling tree of nested control methods
624 ******************************************************************************/
627 AcpiDbDisplayCallingTree (
630 ACPI_WALK_STATE *WalkState;
631 ACPI_NAMESPACE_NODE *Node;
634 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
637 AcpiOsPrintf ("There is no method currently executing\n");
641 Node = WalkState->MethodNode;
642 AcpiOsPrintf ("Current Control Method Call Tree\n");
646 Node = WalkState->MethodNode;
648 AcpiOsPrintf (" [%4.4s]\n", AcpiUtGetNodeName (Node));
650 WalkState = WalkState->Next;
655 /*******************************************************************************
657 * FUNCTION: AcpiDbDisplayObjectType
659 * PARAMETERS: Name - User entered NS node handle or name
663 * DESCRIPTION: Display type of an arbitrary NS node
665 ******************************************************************************/
668 AcpiDbDisplayObjectType (
671 ACPI_NAMESPACE_NODE *Node;
672 ACPI_DEVICE_INFO *Info;
677 Node = AcpiDbConvertToNode (Name);
683 Status = AcpiGetObjectInfo (ACPI_CAST_PTR (ACPI_HANDLE, Node), &Info);
684 if (ACPI_FAILURE (Status))
686 AcpiOsPrintf ("Could not get object info, %s\n",
687 AcpiFormatException (Status));
691 if (Info->Valid & ACPI_VALID_ADR)
693 AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
694 ACPI_FORMAT_UINT64 (Info->Address),
695 Info->CurrentStatus, Info->Flags);
697 if (Info->Valid & ACPI_VALID_SXDS)
699 AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
700 Info->HighestDstates[0], Info->HighestDstates[1],
701 Info->HighestDstates[2], Info->HighestDstates[3]);
703 if (Info->Valid & ACPI_VALID_SXWS)
705 AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
706 Info->LowestDstates[0], Info->LowestDstates[1],
707 Info->LowestDstates[2], Info->LowestDstates[3],
708 Info->LowestDstates[4]);
711 if (Info->Valid & ACPI_VALID_HID)
713 AcpiOsPrintf ("HID: %s\n", Info->HardwareId.String);
715 if (Info->Valid & ACPI_VALID_UID)
717 AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
719 if (Info->Valid & ACPI_VALID_SUB)
721 AcpiOsPrintf ("SUB: %s\n", Info->SubsystemId.String);
723 if (Info->Valid & ACPI_VALID_CID)
725 for (i = 0; i < Info->CompatibleIdList.Count; i++)
727 AcpiOsPrintf ("CID %u: %s\n", i,
728 Info->CompatibleIdList.Ids[i].String);
736 /*******************************************************************************
738 * FUNCTION: AcpiDbDisplayResultObject
740 * PARAMETERS: ObjDesc - Object to be displayed
741 * WalkState - Current walk state
745 * DESCRIPTION: Display the result of an AML opcode
747 * Note: Curently only displays the result object if we are single stepping.
748 * However, this output may be useful in other contexts and could be enabled
749 * to do so if needed.
751 ******************************************************************************/
754 AcpiDbDisplayResultObject (
755 ACPI_OPERAND_OBJECT *ObjDesc,
756 ACPI_WALK_STATE *WalkState)
759 /* Only display if single stepping */
761 if (!AcpiGbl_CmSingleStep)
766 AcpiOsPrintf ("ResultObj: ");
767 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
772 /*******************************************************************************
774 * FUNCTION: AcpiDbDisplayArgumentObject
776 * PARAMETERS: ObjDesc - Object to be displayed
777 * WalkState - Current walk state
781 * DESCRIPTION: Display the result of an AML opcode
783 ******************************************************************************/
786 AcpiDbDisplayArgumentObject (
787 ACPI_OPERAND_OBJECT *ObjDesc,
788 ACPI_WALK_STATE *WalkState)
791 if (!AcpiGbl_CmSingleStep)
796 AcpiOsPrintf ("ArgObj: ");
797 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
801 #if (!ACPI_REDUCED_HARDWARE)
802 /*******************************************************************************
804 * FUNCTION: AcpiDbDisplayGpes
810 * DESCRIPTION: Display the current GPE structures
812 ******************************************************************************/
818 ACPI_GPE_BLOCK_INFO *GpeBlock;
819 ACPI_GPE_XRUPT_INFO *GpeXruptInfo;
820 ACPI_GPE_EVENT_INFO *GpeEventInfo;
821 ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
823 ACPI_GPE_NOTIFY_INFO *Notify;
834 RetBuf.Length = sizeof (Buffer);
835 RetBuf.Pointer = Buffer;
839 /* Walk the GPE lists */
841 GpeXruptInfo = AcpiGbl_GpeXruptListHead;
844 GpeBlock = GpeXruptInfo->GpeBlockListHead;
847 Status = AcpiGetName (GpeBlock->Node, ACPI_FULL_PATHNAME, &RetBuf);
848 if (ACPI_FAILURE (Status))
850 AcpiOsPrintf ("Could not convert name to pathname\n");
853 if (GpeBlock->Node == AcpiGbl_FadtGpeDevice)
855 GpeType = "FADT-defined GPE block";
859 GpeType = "GPE Block Device";
862 AcpiOsPrintf ("\nBlock %u - Info %p DeviceNode %p [%s] - %s\n",
863 Block, GpeBlock, GpeBlock->Node, Buffer, GpeType);
865 AcpiOsPrintf (" Registers: %u (%u GPEs)\n",
866 GpeBlock->RegisterCount, GpeBlock->GpeCount);
868 AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n",
869 GpeBlock->BlockBaseNumber,
870 GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1),
871 GpeXruptInfo->InterruptNumber);
874 " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
875 GpeBlock->RegisterInfo,
876 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
877 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
879 AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
881 /* Examine each GPE Register within the block */
883 for (i = 0; i < GpeBlock->RegisterCount; i++)
885 GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
888 " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X"
889 " Status %8.8X%8.8X Enable %8.8X%8.8X\n",
890 i, GpeRegisterInfo->BaseGpeNumber,
891 GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
892 GpeRegisterInfo->EnableForRun,
893 GpeRegisterInfo->EnableForWake,
894 ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
895 ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
897 /* Now look at the individual GPEs in this byte register */
899 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
901 GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j;
902 GpeEventInfo = &GpeBlock->EventInfo[GpeIndex];
904 if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
905 ACPI_GPE_DISPATCH_NONE)
907 /* This GPE is not used (no method or handler), ignore it */
913 " GPE %.2X: %p RunRefs %2.2X Flags %2.2X (",
914 GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo,
915 GpeEventInfo->RuntimeCount, GpeEventInfo->Flags);
917 /* Decode the flags byte */
919 if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED)
921 AcpiOsPrintf ("Level, ");
925 AcpiOsPrintf ("Edge, ");
928 if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE)
930 AcpiOsPrintf ("CanWake, ");
934 AcpiOsPrintf ("RunOnly, ");
937 switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
939 case ACPI_GPE_DISPATCH_NONE:
941 AcpiOsPrintf ("NotUsed");
944 case ACPI_GPE_DISPATCH_METHOD:
946 AcpiOsPrintf ("Method");
948 case ACPI_GPE_DISPATCH_HANDLER:
950 AcpiOsPrintf ("Handler");
953 case ACPI_GPE_DISPATCH_NOTIFY:
956 Notify = GpeEventInfo->Dispatch.NotifyList;
960 Notify = Notify->Next;
962 AcpiOsPrintf ("Implicit Notify on %u devices", Count);
967 AcpiOsPrintf ("UNKNOWN: %X",
968 GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
972 AcpiOsPrintf (")\n");
976 GpeBlock = GpeBlock->Next;
978 GpeXruptInfo = GpeXruptInfo->Next;
981 #endif /* !ACPI_REDUCED_HARDWARE */
984 /*******************************************************************************
986 * FUNCTION: AcpiDbDisplayHandlers
992 * DESCRIPTION: Display the currently installed global handlers
994 ******************************************************************************/
997 AcpiDbDisplayHandlers (
1000 ACPI_OPERAND_OBJECT *ObjDesc;
1001 ACPI_OPERAND_OBJECT *HandlerObj;
1002 ACPI_ADR_SPACE_TYPE SpaceId;
1006 /* Operation region handlers */
1008 AcpiOsPrintf ("\nOperation Region Handlers at the namespace root:\n");
1010 ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
1013 for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_SpaceIdList); i++)
1015 SpaceId = AcpiGbl_SpaceIdList[i];
1016 HandlerObj = ObjDesc->Device.Handler;
1018 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
1019 AcpiUtGetRegionName ((UINT8) SpaceId), SpaceId);
1023 if (AcpiGbl_SpaceIdList[i] == HandlerObj->AddressSpace.SpaceId)
1025 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
1026 (HandlerObj->AddressSpace.HandlerFlags &
1027 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
1028 HandlerObj->AddressSpace.Handler);
1032 HandlerObj = HandlerObj->AddressSpace.Next;
1035 /* There is no handler for this SpaceId */
1037 AcpiOsPrintf ("None\n");
1042 /* Find all handlers for user-defined SpaceIDs */
1044 HandlerObj = ObjDesc->Device.Handler;
1047 if (HandlerObj->AddressSpace.SpaceId >= ACPI_USER_REGION_BEGIN)
1049 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
1050 "User-defined ID", HandlerObj->AddressSpace.SpaceId);
1051 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
1052 (HandlerObj->AddressSpace.HandlerFlags &
1053 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
1054 HandlerObj->AddressSpace.Handler);
1057 HandlerObj = HandlerObj->AddressSpace.Next;
1061 #if (!ACPI_REDUCED_HARDWARE)
1063 /* Fixed event handlers */
1065 AcpiOsPrintf ("\nFixed Event Handlers:\n");
1067 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
1069 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX, AcpiUtGetEventName (i), i);
1070 if (AcpiGbl_FixedEventHandlers[i].Handler)
1072 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1073 AcpiGbl_FixedEventHandlers[i].Handler);
1077 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1081 #endif /* !ACPI_REDUCED_HARDWARE */
1083 /* Miscellaneous global handlers */
1085 AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
1087 for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_HandlerList); i++)
1089 AcpiOsPrintf (ACPI_HANDLER_NAME_STRING, AcpiGbl_HandlerList[i].Name);
1090 if (AcpiGbl_HandlerList[i].Handler)
1092 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1093 AcpiGbl_HandlerList[i].Handler);
1097 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1102 /* Other handlers that are installed throughout the namespace */
1104 AcpiOsPrintf ("\nOperation Region Handlers for specific devices:\n");
1106 (void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
1107 ACPI_UINT32_MAX, AcpiDbDisplayNonRootHandlers,
1112 /*******************************************************************************
1114 * FUNCTION: AcpiDbDisplayNonRootHandlers
1116 * PARAMETERS: ACPI_WALK_CALLBACK
1120 * DESCRIPTION: Display information about all handlers installed for a
1123 ******************************************************************************/
1126 AcpiDbDisplayNonRootHandlers (
1127 ACPI_HANDLE ObjHandle,
1128 UINT32 NestingLevel,
1132 ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
1133 ACPI_OPERAND_OBJECT *ObjDesc;
1134 ACPI_OPERAND_OBJECT *HandlerObj;
1138 ObjDesc = AcpiNsGetAttachedObject (Node);
1144 Pathname = AcpiNsGetExternalPathname (Node);
1150 /* Display all handlers associated with this device */
1152 HandlerObj = ObjDesc->Device.Handler;
1155 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
1156 AcpiUtGetRegionName ((UINT8) HandlerObj->AddressSpace.SpaceId),
1157 HandlerObj->AddressSpace.SpaceId);
1159 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING2,
1160 (HandlerObj->AddressSpace.HandlerFlags &
1161 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
1162 HandlerObj->AddressSpace.Handler);
1164 AcpiOsPrintf (" Device Name: %s (%p)\n", Pathname, Node);
1166 HandlerObj = HandlerObj->AddressSpace.Next;
1169 ACPI_FREE (Pathname);
1173 #endif /* ACPI_DEBUGGER */