1 /*******************************************************************************
3 * Module Name: dbdisply - debug display commands
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2011, 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.
45 #include <contrib/dev/acpica/include/acpi.h>
46 #include <contrib/dev/acpica/include/accommon.h>
47 #include <contrib/dev/acpica/include/amlcode.h>
48 #include <contrib/dev/acpica/include/acdispat.h>
49 #include <contrib/dev/acpica/include/acnamesp.h>
50 #include <contrib/dev/acpica/include/acparser.h>
51 #include <contrib/dev/acpica/include/acinterp.h>
52 #include <contrib/dev/acpica/include/acdebug.h>
53 #include <contrib/dev/acpica/include/acdisasm.h>
58 #define _COMPONENT ACPI_CA_DEBUGGER
59 ACPI_MODULE_NAME ("dbdisply")
61 /* Local prototypes */
64 AcpiDbDumpParserDescriptor (
65 ACPI_PARSE_OBJECT *Op);
73 * System handler information.
74 * Used for Handlers command, in AcpiDbDisplayHandlers.
76 #define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
77 #define ACPI_HANDLER_NAME_STRING "%30s : "
78 #define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
79 #define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
81 /* All predefined Address Space IDs */
83 static ACPI_ADR_SPACE_TYPE AcpiGbl_SpaceIdList[] =
85 ACPI_ADR_SPACE_SYSTEM_MEMORY,
86 ACPI_ADR_SPACE_SYSTEM_IO,
87 ACPI_ADR_SPACE_PCI_CONFIG,
91 ACPI_ADR_SPACE_PCI_BAR_TARGET,
93 ACPI_ADR_SPACE_DATA_TABLE,
94 ACPI_ADR_SPACE_FIXED_HARDWARE
97 /* Global handler information */
99 typedef struct acpi_handler_info
106 static ACPI_HANDLER_INFO AcpiGbl_HandlerList[] =
108 {&AcpiGbl_SystemNotify.Handler, "System Notifications"},
109 {&AcpiGbl_DeviceNotify.Handler, "Device Notifications"},
110 {&AcpiGbl_TableHandler, "ACPI Table Events"},
111 {&AcpiGbl_ExceptionHandler, "Control Method Exceptions"},
112 {&AcpiGbl_InterfaceHandler, "OSI Invocations"}
116 /*******************************************************************************
118 * FUNCTION: AcpiDbGetPointer
120 * PARAMETERS: Target - Pointer to string to be converted
122 * RETURN: Converted pointer
124 * DESCRIPTION: Convert an ascii pointer value to a real value
126 ******************************************************************************/
135 ObjPtr = ACPI_TO_POINTER (ACPI_STRTOUL (Target, NULL, 16));
140 /*******************************************************************************
142 * FUNCTION: AcpiDbDumpParserDescriptor
144 * PARAMETERS: Op - A parser Op descriptor
148 * DESCRIPTION: Display a formatted parser object
150 ******************************************************************************/
153 AcpiDbDumpParserDescriptor (
154 ACPI_PARSE_OBJECT *Op)
156 const ACPI_OPCODE_INFO *Info;
159 Info = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
161 AcpiOsPrintf ("Parser Op Descriptor:\n");
162 AcpiOsPrintf ("%20.20s : %4.4X\n", "Opcode", Op->Common.AmlOpcode);
164 ACPI_DEBUG_ONLY_MEMBERS (AcpiOsPrintf ("%20.20s : %s\n", "Opcode Name",
167 AcpiOsPrintf ("%20.20s : %p\n", "Value/ArgList", Op->Common.Value.Arg);
168 AcpiOsPrintf ("%20.20s : %p\n", "Parent", Op->Common.Parent);
169 AcpiOsPrintf ("%20.20s : %p\n", "NextOp", Op->Common.Next);
173 /*******************************************************************************
175 * FUNCTION: AcpiDbDecodeAndDisplayObject
177 * PARAMETERS: Target - String with object to be displayed. Names
178 * and hex pointers are supported.
179 * OutputType - Byte, Word, Dword, or Qword (B|W|D|Q)
183 * DESCRIPTION: Display a formatted ACPI object
185 ******************************************************************************/
188 AcpiDbDecodeAndDisplayObject (
193 ACPI_NAMESPACE_NODE *Node;
194 ACPI_OPERAND_OBJECT *ObjDesc;
195 UINT32 Display = DB_BYTE_DISPLAY;
207 /* Decode the output type */
211 AcpiUtStrupr (OutputType);
212 if (OutputType[0] == 'W')
214 Display = DB_WORD_DISPLAY;
216 else if (OutputType[0] == 'D')
218 Display = DB_DWORD_DISPLAY;
220 else if (OutputType[0] == 'Q')
222 Display = DB_QWORD_DISPLAY;
226 RetBuf.Length = sizeof (Buffer);
227 RetBuf.Pointer = Buffer;
229 /* Differentiate between a number and a name */
231 if ((Target[0] >= 0x30) && (Target[0] <= 0x39))
233 ObjPtr = AcpiDbGetPointer (Target);
234 if (!AcpiOsReadable (ObjPtr, 16))
236 AcpiOsPrintf ("Address %p is invalid in this address space\n",
241 /* Decode the object type */
243 switch (ACPI_GET_DESCRIPTOR_TYPE (ObjPtr))
245 case ACPI_DESC_TYPE_NAMED:
247 /* This is a namespace Node */
249 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_NAMESPACE_NODE)))
252 "Cannot read entire Named object at address %p\n", ObjPtr);
260 case ACPI_DESC_TYPE_OPERAND:
262 /* This is a ACPI OPERAND OBJECT */
264 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_OPERAND_OBJECT)))
266 AcpiOsPrintf ("Cannot read entire ACPI object at address %p\n",
271 AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
273 AcpiExDumpObjectDescriptor (ObjPtr, 1);
277 case ACPI_DESC_TYPE_PARSER:
279 /* This is a Parser Op object */
281 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_PARSE_OBJECT)))
284 "Cannot read entire Parser object at address %p\n", ObjPtr);
288 AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
290 AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
296 /* Is not a recognizeable object */
299 if (AcpiOsReadable (ObjPtr, 64))
304 /* Just dump some memory */
306 AcpiUtDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
313 /* The parameter is a name string that must be resolved to a Named obj */
315 Node = AcpiDbLocalNsLookup (Target);
323 /* Now dump the NS node */
325 Status = AcpiGetName (Node, ACPI_FULL_PATHNAME, &RetBuf);
326 if (ACPI_FAILURE (Status))
328 AcpiOsPrintf ("Could not convert name to pathname\n");
333 AcpiOsPrintf ("Object (%p) Pathname: %s\n",
334 Node, (char *) RetBuf.Pointer);
337 if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
339 AcpiOsPrintf ("Invalid Named object at address %p\n", Node);
343 AcpiUtDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
344 Display, ACPI_UINT32_MAX);
345 AcpiExDumpNamespaceNode (Node, 1);
347 ObjDesc = AcpiNsGetAttachedObject (Node);
350 AcpiOsPrintf ("\nAttached Object (%p):\n", ObjDesc);
351 if (!AcpiOsReadable (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)))
353 AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n",
358 AcpiUtDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
359 Display, ACPI_UINT32_MAX);
360 AcpiExDumpObjectDescriptor (ObjDesc, 1);
365 /*******************************************************************************
367 * FUNCTION: AcpiDbDisplayMethodInfo
369 * PARAMETERS: StartOp - Root of the control method parse tree
373 * DESCRIPTION: Display information about the current method
375 ******************************************************************************/
378 AcpiDbDisplayMethodInfo (
379 ACPI_PARSE_OBJECT *StartOp)
381 ACPI_WALK_STATE *WalkState;
382 ACPI_OPERAND_OBJECT *ObjDesc;
383 ACPI_NAMESPACE_NODE *Node;
384 ACPI_PARSE_OBJECT *RootOp;
385 ACPI_PARSE_OBJECT *Op;
386 const ACPI_OPCODE_INFO *OpInfo;
388 UINT32 NumOperands = 0;
389 UINT32 NumOperators = 0;
390 UINT32 NumRemainingOps = 0;
391 UINT32 NumRemainingOperands = 0;
392 UINT32 NumRemainingOperators = 0;
393 BOOLEAN CountRemaining = FALSE;
396 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
399 AcpiOsPrintf ("There is no method currently executing\n");
403 ObjDesc = WalkState->MethodDesc;
404 Node = WalkState->MethodNode;
406 AcpiOsPrintf ("Currently executing control method is [%4.4s]\n",
407 AcpiUtGetNodeName (Node));
408 AcpiOsPrintf ("%X Arguments, SyncLevel = %X\n",
409 (UINT32) ObjDesc->Method.ParamCount,
410 (UINT32) ObjDesc->Method.SyncLevel);
414 while (RootOp->Common.Parent)
416 RootOp = RootOp->Common.Parent;
425 CountRemaining = TRUE;
434 /* Decode the opcode */
436 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
437 switch (OpInfo->Class)
439 case AML_CLASS_ARGUMENT:
442 NumRemainingOperands++;
448 case AML_CLASS_UNKNOWN:
449 /* Bad opcode or ASCII character */
456 NumRemainingOperators++;
463 Op = AcpiPsGetDepthNext (StartOp, Op);
467 "Method contains: %X AML Opcodes - %X Operators, %X Operands\n",
468 NumOps, NumOperators, NumOperands);
471 "Remaining to execute: %X AML Opcodes - %X Operators, %X Operands\n",
472 NumRemainingOps, NumRemainingOperators, NumRemainingOperands);
476 /*******************************************************************************
478 * FUNCTION: AcpiDbDisplayLocals
484 * DESCRIPTION: Display all locals for the currently running control method
486 ******************************************************************************/
489 AcpiDbDisplayLocals (
492 ACPI_WALK_STATE *WalkState;
495 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
498 AcpiOsPrintf ("There is no method currently executing\n");
502 AcpiDmDisplayLocals (WalkState);
506 /*******************************************************************************
508 * FUNCTION: AcpiDbDisplayArguments
514 * DESCRIPTION: Display all arguments for the currently running control method
516 ******************************************************************************/
519 AcpiDbDisplayArguments (
522 ACPI_WALK_STATE *WalkState;
525 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
528 AcpiOsPrintf ("There is no method currently executing\n");
532 AcpiDmDisplayArguments (WalkState);
536 /*******************************************************************************
538 * FUNCTION: AcpiDbDisplayResults
544 * DESCRIPTION: Display current contents of a method result stack
546 ******************************************************************************/
549 AcpiDbDisplayResults (
553 ACPI_WALK_STATE *WalkState;
554 ACPI_OPERAND_OBJECT *ObjDesc;
555 UINT32 ResultCount = 0;
556 ACPI_NAMESPACE_NODE *Node;
557 ACPI_GENERIC_STATE *Frame;
558 UINT32 Index; /* Index onto current frame */
561 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
564 AcpiOsPrintf ("There is no method currently executing\n");
568 ObjDesc = WalkState->MethodDesc;
569 Node = WalkState->MethodNode;
571 if (WalkState->Results)
573 ResultCount = WalkState->ResultCount;
576 AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
577 AcpiUtGetNodeName (Node), ResultCount);
579 /* From the top element of result stack */
581 Frame = WalkState->Results;
582 Index = (ResultCount - 1) % ACPI_RESULTS_FRAME_OBJ_NUM;
584 for (i = 0; i < ResultCount; i++)
586 ObjDesc = Frame->Results.ObjDesc[Index];
587 AcpiOsPrintf ("Result%u: ", i);
588 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
591 Frame = Frame->Results.Next;
592 Index = ACPI_RESULTS_FRAME_OBJ_NUM;
599 /*******************************************************************************
601 * FUNCTION: AcpiDbDisplayCallingTree
607 * DESCRIPTION: Display current calling tree of nested control methods
609 ******************************************************************************/
612 AcpiDbDisplayCallingTree (
615 ACPI_WALK_STATE *WalkState;
616 ACPI_NAMESPACE_NODE *Node;
619 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
622 AcpiOsPrintf ("There is no method currently executing\n");
626 Node = WalkState->MethodNode;
627 AcpiOsPrintf ("Current Control Method Call Tree\n");
631 Node = WalkState->MethodNode;
633 AcpiOsPrintf (" [%4.4s]\n", AcpiUtGetNodeName (Node));
635 WalkState = WalkState->Next;
640 /*******************************************************************************
642 * FUNCTION: AcpiDbDisplayObjectType
644 * PARAMETERS: ObjectArg - User entered NS node handle
648 * DESCRIPTION: Display type of an arbitrary NS node
650 ******************************************************************************/
653 AcpiDbDisplayObjectType (
657 ACPI_DEVICE_INFO *Info;
662 Handle = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16));
664 Status = AcpiGetObjectInfo (Handle, &Info);
665 if (ACPI_FAILURE (Status))
667 AcpiOsPrintf ("Could not get object info, %s\n",
668 AcpiFormatException (Status));
672 AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
673 ACPI_FORMAT_UINT64 (Info->Address),
674 Info->CurrentStatus, Info->Flags);
676 AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
677 Info->HighestDstates[0], Info->HighestDstates[1],
678 Info->HighestDstates[2], Info->HighestDstates[3]);
680 AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
681 Info->LowestDstates[0], Info->LowestDstates[1],
682 Info->LowestDstates[2], Info->LowestDstates[3],
683 Info->LowestDstates[4]);
685 if (Info->Valid & ACPI_VALID_HID)
687 AcpiOsPrintf ("HID: %s\n", Info->HardwareId.String);
689 if (Info->Valid & ACPI_VALID_UID)
691 AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
693 if (Info->Valid & ACPI_VALID_CID)
695 for (i = 0; i < Info->CompatibleIdList.Count; i++)
697 AcpiOsPrintf ("CID %u: %s\n", i,
698 Info->CompatibleIdList.Ids[i].String);
706 /*******************************************************************************
708 * FUNCTION: AcpiDbDisplayResultObject
710 * PARAMETERS: ObjDesc - Object to be displayed
711 * WalkState - Current walk state
715 * DESCRIPTION: Display the result of an AML opcode
717 * Note: Curently only displays the result object if we are single stepping.
718 * However, this output may be useful in other contexts and could be enabled
719 * to do so if needed.
721 ******************************************************************************/
724 AcpiDbDisplayResultObject (
725 ACPI_OPERAND_OBJECT *ObjDesc,
726 ACPI_WALK_STATE *WalkState)
729 /* Only display if single stepping */
731 if (!AcpiGbl_CmSingleStep)
736 AcpiOsPrintf ("ResultObj: ");
737 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
742 /*******************************************************************************
744 * FUNCTION: AcpiDbDisplayArgumentObject
746 * PARAMETERS: ObjDesc - Object to be displayed
747 * WalkState - Current walk state
751 * DESCRIPTION: Display the result of an AML opcode
753 ******************************************************************************/
756 AcpiDbDisplayArgumentObject (
757 ACPI_OPERAND_OBJECT *ObjDesc,
758 ACPI_WALK_STATE *WalkState)
761 if (!AcpiGbl_CmSingleStep)
766 AcpiOsPrintf ("ArgObj: ");
767 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
771 /*******************************************************************************
773 * FUNCTION: AcpiDbDisplayGpes
779 * DESCRIPTION: Display the current GPE structures
781 ******************************************************************************/
787 ACPI_GPE_BLOCK_INFO *GpeBlock;
788 ACPI_GPE_XRUPT_INFO *GpeXruptInfo;
789 ACPI_GPE_EVENT_INFO *GpeEventInfo;
790 ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
801 RetBuf.Length = sizeof (Buffer);
802 RetBuf.Pointer = Buffer;
806 /* Walk the GPE lists */
808 GpeXruptInfo = AcpiGbl_GpeXruptListHead;
811 GpeBlock = GpeXruptInfo->GpeBlockListHead;
814 Status = AcpiGetName (GpeBlock->Node, ACPI_FULL_PATHNAME, &RetBuf);
815 if (ACPI_FAILURE (Status))
817 AcpiOsPrintf ("Could not convert name to pathname\n");
820 if (GpeBlock->Node == AcpiGbl_FadtGpeDevice)
822 GpeType = "FADT-defined GPE block";
826 GpeType = "GPE Block Device";
829 AcpiOsPrintf ("\nBlock %u - Info %p DeviceNode %p [%s] - %s\n",
830 Block, GpeBlock, GpeBlock->Node, Buffer, GpeType);
832 AcpiOsPrintf (" Registers: %u (%u GPEs)\n",
833 GpeBlock->RegisterCount, GpeBlock->GpeCount);
835 AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n",
836 GpeBlock->BlockBaseNumber,
837 GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1),
838 GpeXruptInfo->InterruptNumber);
841 " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
842 GpeBlock->RegisterInfo,
843 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
844 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
846 AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
848 /* Examine each GPE Register within the block */
850 for (i = 0; i < GpeBlock->RegisterCount; i++)
852 GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
855 " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X"
856 " Status %8.8X%8.8X Enable %8.8X%8.8X\n",
857 i, GpeRegisterInfo->BaseGpeNumber,
858 GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
859 GpeRegisterInfo->EnableForRun,
860 GpeRegisterInfo->EnableForWake,
861 ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
862 ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
864 /* Now look at the individual GPEs in this byte register */
866 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
868 GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j;
869 GpeEventInfo = &GpeBlock->EventInfo[GpeIndex];
871 if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
872 ACPI_GPE_DISPATCH_NONE)
874 /* This GPE is not used (no method or handler), ignore it */
880 " GPE %.2X: %p RunRefs %2.2X Flags %2.2X (",
881 GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo,
882 GpeEventInfo->RuntimeCount, GpeEventInfo->Flags);
884 /* Decode the flags byte */
886 if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED)
888 AcpiOsPrintf ("Level, ");
892 AcpiOsPrintf ("Edge, ");
895 if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE)
897 AcpiOsPrintf ("CanWake, ");
901 AcpiOsPrintf ("RunOnly, ");
904 switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
906 case ACPI_GPE_DISPATCH_NONE:
907 AcpiOsPrintf ("NotUsed");
909 case ACPI_GPE_DISPATCH_METHOD:
910 AcpiOsPrintf ("Method");
912 case ACPI_GPE_DISPATCH_HANDLER:
913 AcpiOsPrintf ("Handler");
915 case ACPI_GPE_DISPATCH_NOTIFY:
916 AcpiOsPrintf ("Notify");
919 AcpiOsPrintf ("UNKNOWN: %X",
920 GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
924 AcpiOsPrintf (")\n");
928 GpeBlock = GpeBlock->Next;
930 GpeXruptInfo = GpeXruptInfo->Next;
935 /*******************************************************************************
937 * FUNCTION: AcpiDbDisplayHandlers
943 * DESCRIPTION: Display the currently installed global handlers
945 ******************************************************************************/
948 AcpiDbDisplayHandlers (
951 ACPI_OPERAND_OBJECT *ObjDesc;
952 ACPI_OPERAND_OBJECT *HandlerObj;
953 ACPI_ADR_SPACE_TYPE SpaceId;
957 /* Operation region handlers */
959 AcpiOsPrintf ("\nOperation Region Handlers:\n");
961 ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
964 for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_SpaceIdList); i++)
966 SpaceId = AcpiGbl_SpaceIdList[i];
967 HandlerObj = ObjDesc->Device.Handler;
969 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
970 AcpiUtGetRegionName ((UINT8) SpaceId), SpaceId);
974 if (i == HandlerObj->AddressSpace.SpaceId)
976 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
977 (HandlerObj->AddressSpace.HandlerFlags &
978 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
979 HandlerObj->AddressSpace.Handler);
983 HandlerObj = HandlerObj->AddressSpace.Next;
986 /* There is no handler for this SpaceId */
988 AcpiOsPrintf ("None\n");
994 /* Fixed event handlers */
996 AcpiOsPrintf ("\nFixed Event Handlers:\n");
998 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
1000 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX, AcpiUtGetEventName (i), i);
1001 if (AcpiGbl_FixedEventHandlers[i].Handler)
1003 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1004 AcpiGbl_FixedEventHandlers[i].Handler);
1008 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1012 /* Miscellaneous global handlers */
1014 AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
1016 for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_HandlerList); i++)
1018 AcpiOsPrintf (ACPI_HANDLER_NAME_STRING, AcpiGbl_HandlerList[i].Name);
1019 if (AcpiGbl_HandlerList[i].Handler)
1021 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1022 AcpiGbl_HandlerList[i].Handler);
1026 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1031 #endif /* ACPI_DEBUGGER */