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);
72 /*******************************************************************************
74 * FUNCTION: AcpiDbGetPointer
76 * PARAMETERS: Target - Pointer to string to be converted
78 * RETURN: Converted pointer
80 * DESCRIPTION: Convert an ascii pointer value to a real value
82 ******************************************************************************/
91 ObjPtr = ACPI_TO_POINTER (ACPI_STRTOUL (Target, NULL, 16));
96 /*******************************************************************************
98 * FUNCTION: AcpiDbDumpParserDescriptor
100 * PARAMETERS: Op - A parser Op descriptor
104 * DESCRIPTION: Display a formatted parser object
106 ******************************************************************************/
109 AcpiDbDumpParserDescriptor (
110 ACPI_PARSE_OBJECT *Op)
112 const ACPI_OPCODE_INFO *Info;
115 Info = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
117 AcpiOsPrintf ("Parser Op Descriptor:\n");
118 AcpiOsPrintf ("%20.20s : %4.4X\n", "Opcode", Op->Common.AmlOpcode);
120 ACPI_DEBUG_ONLY_MEMBERS (AcpiOsPrintf ("%20.20s : %s\n", "Opcode Name",
123 AcpiOsPrintf ("%20.20s : %p\n", "Value/ArgList", Op->Common.Value.Arg);
124 AcpiOsPrintf ("%20.20s : %p\n", "Parent", Op->Common.Parent);
125 AcpiOsPrintf ("%20.20s : %p\n", "NextOp", Op->Common.Next);
129 /*******************************************************************************
131 * FUNCTION: AcpiDbDecodeAndDisplayObject
133 * PARAMETERS: Target - String with object to be displayed. Names
134 * and hex pointers are supported.
135 * OutputType - Byte, Word, Dword, or Qword (B|W|D|Q)
139 * DESCRIPTION: Display a formatted ACPI object
141 ******************************************************************************/
144 AcpiDbDecodeAndDisplayObject (
149 ACPI_NAMESPACE_NODE *Node;
150 ACPI_OPERAND_OBJECT *ObjDesc;
151 UINT32 Display = DB_BYTE_DISPLAY;
163 /* Decode the output type */
167 AcpiUtStrupr (OutputType);
168 if (OutputType[0] == 'W')
170 Display = DB_WORD_DISPLAY;
172 else if (OutputType[0] == 'D')
174 Display = DB_DWORD_DISPLAY;
176 else if (OutputType[0] == 'Q')
178 Display = DB_QWORD_DISPLAY;
182 RetBuf.Length = sizeof (Buffer);
183 RetBuf.Pointer = Buffer;
185 /* Differentiate between a number and a name */
187 if ((Target[0] >= 0x30) && (Target[0] <= 0x39))
189 ObjPtr = AcpiDbGetPointer (Target);
190 if (!AcpiOsReadable (ObjPtr, 16))
192 AcpiOsPrintf ("Address %p is invalid in this address space\n",
197 /* Decode the object type */
199 switch (ACPI_GET_DESCRIPTOR_TYPE (ObjPtr))
201 case ACPI_DESC_TYPE_NAMED:
203 /* This is a namespace Node */
205 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_NAMESPACE_NODE)))
208 "Cannot read entire Named object at address %p\n", ObjPtr);
216 case ACPI_DESC_TYPE_OPERAND:
218 /* This is a ACPI OPERAND OBJECT */
220 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_OPERAND_OBJECT)))
222 AcpiOsPrintf ("Cannot read entire ACPI object at address %p\n",
227 AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
229 AcpiExDumpObjectDescriptor (ObjPtr, 1);
233 case ACPI_DESC_TYPE_PARSER:
235 /* This is a Parser Op object */
237 if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_PARSE_OBJECT)))
240 "Cannot read entire Parser object at address %p\n", ObjPtr);
244 AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
246 AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
252 /* Is not a recognizeable object */
255 if (AcpiOsReadable (ObjPtr, 64))
260 /* Just dump some memory */
262 AcpiUtDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
269 /* The parameter is a name string that must be resolved to a Named obj */
271 Node = AcpiDbLocalNsLookup (Target);
279 /* Now dump the NS node */
281 Status = AcpiGetName (Node, ACPI_FULL_PATHNAME, &RetBuf);
282 if (ACPI_FAILURE (Status))
284 AcpiOsPrintf ("Could not convert name to pathname\n");
289 AcpiOsPrintf ("Object (%p) Pathname: %s\n",
290 Node, (char *) RetBuf.Pointer);
293 if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
295 AcpiOsPrintf ("Invalid Named object at address %p\n", Node);
299 AcpiUtDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
300 Display, ACPI_UINT32_MAX);
301 AcpiExDumpNamespaceNode (Node, 1);
303 ObjDesc = AcpiNsGetAttachedObject (Node);
306 AcpiOsPrintf ("\nAttached Object (%p):\n", ObjDesc);
307 if (!AcpiOsReadable (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)))
309 AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n",
314 AcpiUtDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
315 Display, ACPI_UINT32_MAX);
316 AcpiExDumpObjectDescriptor (ObjDesc, 1);
321 /*******************************************************************************
323 * FUNCTION: AcpiDbDisplayMethodInfo
325 * PARAMETERS: StartOp - Root of the control method parse tree
329 * DESCRIPTION: Display information about the current method
331 ******************************************************************************/
334 AcpiDbDisplayMethodInfo (
335 ACPI_PARSE_OBJECT *StartOp)
337 ACPI_WALK_STATE *WalkState;
338 ACPI_OPERAND_OBJECT *ObjDesc;
339 ACPI_NAMESPACE_NODE *Node;
340 ACPI_PARSE_OBJECT *RootOp;
341 ACPI_PARSE_OBJECT *Op;
342 const ACPI_OPCODE_INFO *OpInfo;
344 UINT32 NumOperands = 0;
345 UINT32 NumOperators = 0;
346 UINT32 NumRemainingOps = 0;
347 UINT32 NumRemainingOperands = 0;
348 UINT32 NumRemainingOperators = 0;
349 BOOLEAN CountRemaining = FALSE;
352 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
355 AcpiOsPrintf ("There is no method currently executing\n");
359 ObjDesc = WalkState->MethodDesc;
360 Node = WalkState->MethodNode;
362 AcpiOsPrintf ("Currently executing control method is [%4.4s]\n",
363 AcpiUtGetNodeName (Node));
364 AcpiOsPrintf ("%X Arguments, SyncLevel = %X\n",
365 (UINT32) ObjDesc->Method.ParamCount,
366 (UINT32) ObjDesc->Method.SyncLevel);
370 while (RootOp->Common.Parent)
372 RootOp = RootOp->Common.Parent;
381 CountRemaining = TRUE;
390 /* Decode the opcode */
392 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
393 switch (OpInfo->Class)
395 case AML_CLASS_ARGUMENT:
398 NumRemainingOperands++;
404 case AML_CLASS_UNKNOWN:
405 /* Bad opcode or ASCII character */
412 NumRemainingOperators++;
419 Op = AcpiPsGetDepthNext (StartOp, Op);
423 "Method contains: %X AML Opcodes - %X Operators, %X Operands\n",
424 NumOps, NumOperators, NumOperands);
427 "Remaining to execute: %X AML Opcodes - %X Operators, %X Operands\n",
428 NumRemainingOps, NumRemainingOperators, NumRemainingOperands);
432 /*******************************************************************************
434 * FUNCTION: AcpiDbDisplayLocals
440 * DESCRIPTION: Display all locals for the currently running control method
442 ******************************************************************************/
445 AcpiDbDisplayLocals (
448 ACPI_WALK_STATE *WalkState;
451 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
454 AcpiOsPrintf ("There is no method currently executing\n");
458 AcpiDmDisplayLocals (WalkState);
462 /*******************************************************************************
464 * FUNCTION: AcpiDbDisplayArguments
470 * DESCRIPTION: Display all arguments for the currently running control method
472 ******************************************************************************/
475 AcpiDbDisplayArguments (
478 ACPI_WALK_STATE *WalkState;
481 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
484 AcpiOsPrintf ("There is no method currently executing\n");
488 AcpiDmDisplayArguments (WalkState);
492 /*******************************************************************************
494 * FUNCTION: AcpiDbDisplayResults
500 * DESCRIPTION: Display current contents of a method result stack
502 ******************************************************************************/
505 AcpiDbDisplayResults (
509 ACPI_WALK_STATE *WalkState;
510 ACPI_OPERAND_OBJECT *ObjDesc;
511 UINT32 ResultCount = 0;
512 ACPI_NAMESPACE_NODE *Node;
513 ACPI_GENERIC_STATE *Frame;
514 UINT32 Index; /* Index onto current frame */
517 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
520 AcpiOsPrintf ("There is no method currently executing\n");
524 ObjDesc = WalkState->MethodDesc;
525 Node = WalkState->MethodNode;
527 if (WalkState->Results)
529 ResultCount = WalkState->ResultCount;
532 AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
533 AcpiUtGetNodeName (Node), ResultCount);
535 /* From the top element of result stack */
537 Frame = WalkState->Results;
538 Index = (ResultCount - 1) % ACPI_RESULTS_FRAME_OBJ_NUM;
540 for (i = 0; i < ResultCount; i++)
542 ObjDesc = Frame->Results.ObjDesc[Index];
543 AcpiOsPrintf ("Result%u: ", i);
544 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
547 Frame = Frame->Results.Next;
548 Index = ACPI_RESULTS_FRAME_OBJ_NUM;
555 /*******************************************************************************
557 * FUNCTION: AcpiDbDisplayCallingTree
563 * DESCRIPTION: Display current calling tree of nested control methods
565 ******************************************************************************/
568 AcpiDbDisplayCallingTree (
571 ACPI_WALK_STATE *WalkState;
572 ACPI_NAMESPACE_NODE *Node;
575 WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
578 AcpiOsPrintf ("There is no method currently executing\n");
582 Node = WalkState->MethodNode;
583 AcpiOsPrintf ("Current Control Method Call Tree\n");
587 Node = WalkState->MethodNode;
589 AcpiOsPrintf (" [%4.4s]\n", AcpiUtGetNodeName (Node));
591 WalkState = WalkState->Next;
596 /*******************************************************************************
598 * FUNCTION: AcpiDbDisplayObjectType
600 * PARAMETERS: ObjectArg - User entered NS node handle
604 * DESCRIPTION: Display type of an arbitrary NS node
606 ******************************************************************************/
609 AcpiDbDisplayObjectType (
613 ACPI_DEVICE_INFO *Info;
618 Handle = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16));
620 Status = AcpiGetObjectInfo (Handle, &Info);
621 if (ACPI_FAILURE (Status))
623 AcpiOsPrintf ("Could not get object info, %s\n",
624 AcpiFormatException (Status));
628 AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
629 ACPI_FORMAT_UINT64 (Info->Address),
630 Info->CurrentStatus, Info->Flags);
632 AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
633 Info->HighestDstates[0], Info->HighestDstates[1],
634 Info->HighestDstates[2], Info->HighestDstates[3]);
636 AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
637 Info->LowestDstates[0], Info->LowestDstates[1],
638 Info->LowestDstates[2], Info->LowestDstates[3],
639 Info->LowestDstates[4]);
641 if (Info->Valid & ACPI_VALID_HID)
643 AcpiOsPrintf ("HID: %s\n", Info->HardwareId.String);
645 if (Info->Valid & ACPI_VALID_UID)
647 AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
649 if (Info->Valid & ACPI_VALID_CID)
651 for (i = 0; i < Info->CompatibleIdList.Count; i++)
653 AcpiOsPrintf ("CID %u: %s\n", i,
654 Info->CompatibleIdList.Ids[i].String);
662 /*******************************************************************************
664 * FUNCTION: AcpiDbDisplayResultObject
666 * PARAMETERS: ObjDesc - Object to be displayed
667 * WalkState - Current walk state
671 * DESCRIPTION: Display the result of an AML opcode
673 * Note: Curently only displays the result object if we are single stepping.
674 * However, this output may be useful in other contexts and could be enabled
675 * to do so if needed.
677 ******************************************************************************/
680 AcpiDbDisplayResultObject (
681 ACPI_OPERAND_OBJECT *ObjDesc,
682 ACPI_WALK_STATE *WalkState)
685 /* Only display if single stepping */
687 if (!AcpiGbl_CmSingleStep)
692 AcpiOsPrintf ("ResultObj: ");
693 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
698 /*******************************************************************************
700 * FUNCTION: AcpiDbDisplayArgumentObject
702 * PARAMETERS: ObjDesc - Object to be displayed
703 * WalkState - Current walk state
707 * DESCRIPTION: Display the result of an AML opcode
709 ******************************************************************************/
712 AcpiDbDisplayArgumentObject (
713 ACPI_OPERAND_OBJECT *ObjDesc,
714 ACPI_WALK_STATE *WalkState)
717 if (!AcpiGbl_CmSingleStep)
722 AcpiOsPrintf ("ArgObj: ");
723 AcpiDmDisplayInternalObject (ObjDesc, WalkState);
727 /*******************************************************************************
729 * FUNCTION: AcpiDbDisplayGpes
735 * DESCRIPTION: Display the current GPE structures
737 ******************************************************************************/
743 ACPI_GPE_BLOCK_INFO *GpeBlock;
744 ACPI_GPE_XRUPT_INFO *GpeXruptInfo;
745 ACPI_GPE_EVENT_INFO *GpeEventInfo;
746 ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
757 RetBuf.Length = sizeof (Buffer);
758 RetBuf.Pointer = Buffer;
762 /* Walk the GPE lists */
764 GpeXruptInfo = AcpiGbl_GpeXruptListHead;
767 GpeBlock = GpeXruptInfo->GpeBlockListHead;
770 Status = AcpiGetName (GpeBlock->Node, ACPI_FULL_PATHNAME, &RetBuf);
771 if (ACPI_FAILURE (Status))
773 AcpiOsPrintf ("Could not convert name to pathname\n");
776 if (GpeBlock->Node == AcpiGbl_FadtGpeDevice)
778 GpeType = "FADT-defined GPE block";
782 GpeType = "GPE Block Device";
785 AcpiOsPrintf ("\nBlock %u - Info %p DeviceNode %p [%s] - %s\n",
786 Block, GpeBlock, GpeBlock->Node, Buffer, GpeType);
788 AcpiOsPrintf (" Registers: %u (%u GPEs)\n",
789 GpeBlock->RegisterCount, GpeBlock->GpeCount);
791 AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n",
792 GpeBlock->BlockBaseNumber,
793 GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1),
794 GpeXruptInfo->InterruptNumber);
797 " RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
798 GpeBlock->RegisterInfo,
799 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
800 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
802 AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
804 /* Examine each GPE Register within the block */
806 for (i = 0; i < GpeBlock->RegisterCount; i++)
808 GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
811 " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X"
812 " Status %8.8X%8.8X Enable %8.8X%8.8X\n",
813 i, GpeRegisterInfo->BaseGpeNumber,
814 GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
815 GpeRegisterInfo->EnableForRun,
816 GpeRegisterInfo->EnableForWake,
817 ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
818 ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
820 /* Now look at the individual GPEs in this byte register */
822 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
824 GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j;
825 GpeEventInfo = &GpeBlock->EventInfo[GpeIndex];
827 if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
828 ACPI_GPE_DISPATCH_NONE)
830 /* This GPE is not used (no method or handler), ignore it */
836 " GPE %.2X: %p RunRefs %2.2X Flags %2.2X (",
837 GpeBlock->BlockBaseNumber + GpeIndex, GpeEventInfo,
838 GpeEventInfo->RuntimeCount, GpeEventInfo->Flags);
840 /* Decode the flags byte */
842 if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED)
844 AcpiOsPrintf ("Level, ");
848 AcpiOsPrintf ("Edge, ");
851 if (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE)
853 AcpiOsPrintf ("CanWake, ");
857 AcpiOsPrintf ("RunOnly, ");
860 switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
862 case ACPI_GPE_DISPATCH_NONE:
863 AcpiOsPrintf ("NotUsed");
865 case ACPI_GPE_DISPATCH_METHOD:
866 AcpiOsPrintf ("Method");
868 case ACPI_GPE_DISPATCH_HANDLER:
869 AcpiOsPrintf ("Handler");
871 case ACPI_GPE_DISPATCH_NOTIFY:
872 AcpiOsPrintf ("Notify");
875 AcpiOsPrintf ("UNKNOWN: %X",
876 GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
880 AcpiOsPrintf (")\n");
884 GpeBlock = GpeBlock->Next;
886 GpeXruptInfo = GpeXruptInfo->Next;
890 /*******************************************************************************
892 * FUNCTION: AcpiDbDisplayHandlers
898 * DESCRIPTION: Display the currently installed global handlers
900 ******************************************************************************/
902 #define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
903 #define ACPI_HANDLER_NAME_STRING "%30s : "
904 #define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
905 #define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
907 /* All predefined Space IDs */
909 static ACPI_ADR_SPACE_TYPE SpaceIdList[] =
911 ACPI_ADR_SPACE_SYSTEM_MEMORY,
912 ACPI_ADR_SPACE_SYSTEM_IO,
913 ACPI_ADR_SPACE_PCI_CONFIG,
915 ACPI_ADR_SPACE_SMBUS,
917 ACPI_ADR_SPACE_PCI_BAR_TARGET,
919 ACPI_ADR_SPACE_DATA_TABLE,
920 ACPI_ADR_SPACE_FIXED_HARDWARE
923 /* Global handler information */
925 typedef struct acpi_handler_info
932 ACPI_HANDLER_INFO HandlerList[] =
934 {&AcpiGbl_SystemNotify.Handler, "System Notifications"},
935 {&AcpiGbl_DeviceNotify.Handler, "Device Notifications"},
936 {&AcpiGbl_TableHandler, "ACPI Table Events"},
937 {&AcpiGbl_ExceptionHandler, "Control Method Exceptions"},
938 {&AcpiGbl_InterfaceHandler, "OSI Invocations"}
943 AcpiDbDisplayHandlers (
946 ACPI_OPERAND_OBJECT *ObjDesc;
947 ACPI_OPERAND_OBJECT *HandlerObj;
948 ACPI_ADR_SPACE_TYPE SpaceId;
952 /* Operation region handlers */
954 AcpiOsPrintf ("\nOperation Region Handlers:\n");
956 ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
959 for (i = 0; i < ACPI_ARRAY_LENGTH (SpaceIdList); i++)
961 SpaceId = SpaceIdList[i];
962 HandlerObj = ObjDesc->Device.Handler;
964 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
965 AcpiUtGetRegionName ((UINT8) SpaceId), SpaceId);
969 if (i == HandlerObj->AddressSpace.SpaceId)
971 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
972 (HandlerObj->AddressSpace.HandlerFlags &
973 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
974 HandlerObj->AddressSpace.Handler);
978 HandlerObj = HandlerObj->AddressSpace.Next;
981 /* There is no handler for this SpaceId */
983 AcpiOsPrintf ("None\n");
989 /* Fixed event handlers */
991 AcpiOsPrintf ("\nFixed Event Handlers:\n");
993 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
995 AcpiOsPrintf (ACPI_PREDEFINED_PREFIX, AcpiUtGetEventName (i), i);
996 if (AcpiGbl_FixedEventHandlers[i].Handler)
998 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
999 AcpiGbl_FixedEventHandlers[i].Handler);
1003 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1007 /* Miscellaneous global handlers */
1009 AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
1011 for (i = 0; i < ACPI_ARRAY_LENGTH (HandlerList); i++)
1013 AcpiOsPrintf (ACPI_HANDLER_NAME_STRING, HandlerList[i].Name);
1014 if (HandlerList[i].Handler)
1016 AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
1017 HandlerList[i].Handler);
1021 AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
1026 #endif /* ACPI_DEBUGGER */