1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /*******************************************************************************
4 * Module Name: dbdisply - debug display commands
6 ******************************************************************************/
18 #define _COMPONENT ACPI_CA_DEBUGGER
19 ACPI_MODULE_NAME("dbdisply")
21 /* Local prototypes */
22 static void acpi_db_dump_parser_descriptor(union acpi_parse_object
*op
);
24 static void *acpi_db_get_pointer(void *target
);
27 acpi_db_display_non_root_handlers(acpi_handle obj_handle
,
29 void *context
, void **return_value
);
32 * System handler information.
33 * Used for Handlers command, in acpi_db_display_handlers.
35 #define ACPI_PREDEFINED_PREFIX "%25s (%.2X) : "
36 #define ACPI_HANDLER_NAME_STRING "%30s : "
37 #define ACPI_HANDLER_PRESENT_STRING "%-9s (%p)\n"
38 #define ACPI_HANDLER_PRESENT_STRING2 "%-9s (%p)"
39 #define ACPI_HANDLER_NOT_PRESENT_STRING "%-9s\n"
41 /* All predefined Address Space IDs */
43 static acpi_adr_space_type acpi_gbl_space_id_list
[] = {
44 ACPI_ADR_SPACE_SYSTEM_MEMORY
,
45 ACPI_ADR_SPACE_SYSTEM_IO
,
46 ACPI_ADR_SPACE_PCI_CONFIG
,
50 ACPI_ADR_SPACE_PCI_BAR_TARGET
,
54 ACPI_ADR_SPACE_DATA_TABLE
,
55 ACPI_ADR_SPACE_FIXED_HARDWARE
58 /* Global handler information */
60 typedef struct acpi_handler_info
{
66 static struct acpi_handler_info acpi_gbl_handler_list
[] = {
67 {&acpi_gbl_global_notify
[0].handler
, "System Notifications"},
68 {&acpi_gbl_global_notify
[1].handler
, "Device Notifications"},
69 {&acpi_gbl_table_handler
, "ACPI Table Events"},
70 {&acpi_gbl_exception_handler
, "Control Method Exceptions"},
71 {&acpi_gbl_interface_handler
, "OSI Invocations"}
74 /*******************************************************************************
76 * FUNCTION: acpi_db_get_pointer
78 * PARAMETERS: target - Pointer to string to be converted
80 * RETURN: Converted pointer
82 * DESCRIPTION: Convert an ascii pointer value to a real value
84 ******************************************************************************/
86 static void *acpi_db_get_pointer(void *target
)
91 address
= strtoul(target
, NULL
, 16);
92 obj_ptr
= ACPI_TO_POINTER(address
);
96 /*******************************************************************************
98 * FUNCTION: acpi_db_dump_parser_descriptor
100 * PARAMETERS: op - A parser Op descriptor
104 * DESCRIPTION: Display a formatted parser object
106 ******************************************************************************/
108 static void acpi_db_dump_parser_descriptor(union acpi_parse_object
*op
)
110 const struct acpi_opcode_info
*info
;
112 info
= acpi_ps_get_opcode_info(op
->common
.aml_opcode
);
114 acpi_os_printf("Parser Op Descriptor:\n");
115 acpi_os_printf("%20.20s : %4.4X\n", "Opcode", op
->common
.aml_opcode
);
117 ACPI_DEBUG_ONLY_MEMBERS(acpi_os_printf("%20.20s : %s\n", "Opcode Name",
120 acpi_os_printf("%20.20s : %p\n", "Value/ArgList", op
->common
.value
.arg
);
121 acpi_os_printf("%20.20s : %p\n", "Parent", op
->common
.parent
);
122 acpi_os_printf("%20.20s : %p\n", "NextOp", op
->common
.next
);
125 /*******************************************************************************
127 * FUNCTION: acpi_db_decode_and_display_object
129 * PARAMETERS: target - String with object to be displayed. Names
130 * and hex pointers are supported.
131 * output_type - Byte, Word, Dword, or Qword (B|W|D|Q)
135 * DESCRIPTION: Display a formatted ACPI object
137 ******************************************************************************/
139 void acpi_db_decode_and_display_object(char *target
, char *output_type
)
142 struct acpi_namespace_node
*node
;
143 union acpi_operand_object
*obj_desc
;
144 u32 display
= DB_BYTE_DISPLAY
;
146 struct acpi_buffer ret_buf
;
154 /* Decode the output type */
157 acpi_ut_strupr(output_type
);
158 if (output_type
[0] == 'W') {
159 display
= DB_WORD_DISPLAY
;
160 } else if (output_type
[0] == 'D') {
161 display
= DB_DWORD_DISPLAY
;
162 } else if (output_type
[0] == 'Q') {
163 display
= DB_QWORD_DISPLAY
;
167 ret_buf
.length
= sizeof(buffer
);
168 ret_buf
.pointer
= buffer
;
170 /* Differentiate between a number and a name */
172 if ((target
[0] >= 0x30) && (target
[0] <= 0x39)) {
173 obj_ptr
= acpi_db_get_pointer(target
);
174 if (!acpi_os_readable(obj_ptr
, 16)) {
176 ("Address %p is invalid in this address space\n",
181 /* Decode the object type */
183 switch (ACPI_GET_DESCRIPTOR_TYPE(obj_ptr
)) {
184 case ACPI_DESC_TYPE_NAMED
:
186 /* This is a namespace Node */
188 if (!acpi_os_readable
189 (obj_ptr
, sizeof(struct acpi_namespace_node
))) {
191 ("Cannot read entire Named object at address %p\n",
199 case ACPI_DESC_TYPE_OPERAND
:
201 /* This is a ACPI OPERAND OBJECT */
203 if (!acpi_os_readable
204 (obj_ptr
, sizeof(union acpi_operand_object
))) {
206 ("Cannot read entire ACPI object at address %p\n",
211 acpi_ut_debug_dump_buffer(obj_ptr
,
213 acpi_operand_object
),
214 display
, ACPI_UINT32_MAX
);
215 acpi_ex_dump_object_descriptor(obj_ptr
, 1);
218 case ACPI_DESC_TYPE_PARSER
:
220 /* This is a Parser Op object */
222 if (!acpi_os_readable
223 (obj_ptr
, sizeof(union acpi_parse_object
))) {
225 ("Cannot read entire Parser object at address %p\n",
230 acpi_ut_debug_dump_buffer(obj_ptr
,
233 display
, ACPI_UINT32_MAX
);
234 acpi_db_dump_parser_descriptor((union acpi_parse_object
240 /* Is not a recognizeable object */
243 ("Not a known ACPI internal object, descriptor type %2.2X\n",
244 ACPI_GET_DESCRIPTOR_TYPE(obj_ptr
));
247 if (acpi_os_readable(obj_ptr
, 64)) {
251 /* Just dump some memory */
253 acpi_ut_debug_dump_buffer(obj_ptr
, size
, display
,
261 /* The parameter is a name string that must be resolved to a Named obj */
263 node
= acpi_db_local_ns_lookup(target
);
269 /* Now dump the NS node */
271 status
= acpi_get_name(node
, ACPI_FULL_PATHNAME_NO_TRAILING
, &ret_buf
);
272 if (ACPI_FAILURE(status
)) {
273 acpi_os_printf("Could not convert name to pathname\n");
277 acpi_os_printf("Object %p: Namespace Node - Pathname: %s\n",
278 node
, (char *)ret_buf
.pointer
);
281 if (!acpi_os_readable(node
, sizeof(struct acpi_namespace_node
))) {
282 acpi_os_printf("Invalid Named object at address %p\n", node
);
286 acpi_ut_debug_dump_buffer((void *)node
,
287 sizeof(struct acpi_namespace_node
), display
,
289 acpi_ex_dump_namespace_node(node
, 1);
291 obj_desc
= acpi_ns_get_attached_object(node
);
293 acpi_os_printf("\nAttached Object %p:", obj_desc
);
294 if (!acpi_os_readable
295 (obj_desc
, sizeof(union acpi_operand_object
))) {
297 ("Invalid internal ACPI Object at address %p\n",
302 if (ACPI_GET_DESCRIPTOR_TYPE(((struct acpi_namespace_node
*)
304 ACPI_DESC_TYPE_NAMED
) {
305 acpi_os_printf(" Namespace Node - ");
307 acpi_get_name((struct acpi_namespace_node
*)
309 ACPI_FULL_PATHNAME_NO_TRAILING
,
311 if (ACPI_FAILURE(status
)) {
313 ("Could not convert name to pathname\n");
315 acpi_os_printf("Pathname: %s",
316 (char *)ret_buf
.pointer
);
319 acpi_os_printf("\n");
320 acpi_ut_debug_dump_buffer((void *)obj_desc
,
322 acpi_namespace_node
),
323 display
, ACPI_UINT32_MAX
);
325 acpi_os_printf("\n");
326 acpi_ut_debug_dump_buffer((void *)obj_desc
,
328 acpi_operand_object
),
329 display
, ACPI_UINT32_MAX
);
332 acpi_ex_dump_object_descriptor(obj_desc
, 1);
336 /*******************************************************************************
338 * FUNCTION: acpi_db_display_method_info
340 * PARAMETERS: start_op - Root of the control method parse tree
344 * DESCRIPTION: Display information about the current method
346 ******************************************************************************/
348 void acpi_db_display_method_info(union acpi_parse_object
*start_op
)
350 struct acpi_walk_state
*walk_state
;
351 union acpi_operand_object
*obj_desc
;
352 struct acpi_namespace_node
*node
;
353 union acpi_parse_object
*root_op
;
354 union acpi_parse_object
*op
;
355 const struct acpi_opcode_info
*op_info
;
357 u32 num_operands
= 0;
358 u32 num_operators
= 0;
359 u32 num_remaining_ops
= 0;
360 u32 num_remaining_operands
= 0;
361 u32 num_remaining_operators
= 0;
362 u8 count_remaining
= FALSE
;
364 walk_state
= acpi_ds_get_current_walk_state(acpi_gbl_current_walk_list
);
366 acpi_os_printf("There is no method currently executing\n");
370 obj_desc
= walk_state
->method_desc
;
371 node
= walk_state
->method_node
;
373 acpi_os_printf("Currently executing control method is [%4.4s]\n",
374 acpi_ut_get_node_name(node
));
375 acpi_os_printf("%X Arguments, SyncLevel = %X\n",
376 (u32
)obj_desc
->method
.param_count
,
377 (u32
)obj_desc
->method
.sync_level
);
380 while (root_op
->common
.parent
) {
381 root_op
= root_op
->common
.parent
;
387 if (op
== start_op
) {
388 count_remaining
= TRUE
;
392 if (count_remaining
) {
396 /* Decode the opcode */
398 op_info
= acpi_ps_get_opcode_info(op
->common
.aml_opcode
);
399 switch (op_info
->class) {
400 case AML_CLASS_ARGUMENT
:
402 if (count_remaining
) {
403 num_remaining_operands
++;
409 case AML_CLASS_UNKNOWN
:
411 /* Bad opcode or ASCII character */
417 if (count_remaining
) {
418 num_remaining_operators
++;
425 op
= acpi_ps_get_depth_next(start_op
, op
);
429 ("Method contains: %X AML Opcodes - %X Operators, %X Operands\n",
430 num_ops
, num_operators
, num_operands
);
433 ("Remaining to execute: %X AML Opcodes - %X Operators, %X Operands\n",
434 num_remaining_ops
, num_remaining_operators
,
435 num_remaining_operands
);
438 /*******************************************************************************
440 * FUNCTION: acpi_db_display_locals
446 * DESCRIPTION: Display all locals for the currently running control method
448 ******************************************************************************/
450 void acpi_db_display_locals(void)
452 struct acpi_walk_state
*walk_state
;
454 walk_state
= acpi_ds_get_current_walk_state(acpi_gbl_current_walk_list
);
456 acpi_os_printf("There is no method currently executing\n");
460 acpi_db_decode_locals(walk_state
);
463 /*******************************************************************************
465 * FUNCTION: acpi_db_display_arguments
471 * DESCRIPTION: Display all arguments for the currently running control method
473 ******************************************************************************/
475 void acpi_db_display_arguments(void)
477 struct acpi_walk_state
*walk_state
;
479 walk_state
= acpi_ds_get_current_walk_state(acpi_gbl_current_walk_list
);
481 acpi_os_printf("There is no method currently executing\n");
485 acpi_db_decode_arguments(walk_state
);
488 /*******************************************************************************
490 * FUNCTION: acpi_db_display_results
496 * DESCRIPTION: Display current contents of a method result stack
498 ******************************************************************************/
500 void acpi_db_display_results(void)
503 struct acpi_walk_state
*walk_state
;
504 union acpi_operand_object
*obj_desc
;
505 u32 result_count
= 0;
506 struct acpi_namespace_node
*node
;
507 union acpi_generic_state
*frame
;
508 u32 index
; /* Index onto current frame */
510 walk_state
= acpi_ds_get_current_walk_state(acpi_gbl_current_walk_list
);
512 acpi_os_printf("There is no method currently executing\n");
516 obj_desc
= walk_state
->method_desc
;
517 node
= walk_state
->method_node
;
519 if (walk_state
->results
) {
520 result_count
= walk_state
->result_count
;
523 acpi_os_printf("Method [%4.4s] has %X stacked result objects\n",
524 acpi_ut_get_node_name(node
), result_count
);
526 /* From the top element of result stack */
528 frame
= walk_state
->results
;
529 index
= (result_count
- 1) % ACPI_RESULTS_FRAME_OBJ_NUM
;
531 for (i
= 0; i
< result_count
; i
++) {
532 obj_desc
= frame
->results
.obj_desc
[index
];
533 acpi_os_printf("Result%u: ", i
);
534 acpi_db_display_internal_object(obj_desc
, walk_state
);
537 frame
= frame
->results
.next
;
538 index
= ACPI_RESULTS_FRAME_OBJ_NUM
;
545 /*******************************************************************************
547 * FUNCTION: acpi_db_display_calling_tree
553 * DESCRIPTION: Display current calling tree of nested control methods
555 ******************************************************************************/
557 void acpi_db_display_calling_tree(void)
559 struct acpi_walk_state
*walk_state
;
560 struct acpi_namespace_node
*node
;
562 walk_state
= acpi_ds_get_current_walk_state(acpi_gbl_current_walk_list
);
564 acpi_os_printf("There is no method currently executing\n");
568 node
= walk_state
->method_node
;
569 acpi_os_printf("Current Control Method Call Tree\n");
572 node
= walk_state
->method_node
;
573 acpi_os_printf(" [%4.4s]\n", acpi_ut_get_node_name(node
));
575 walk_state
= walk_state
->next
;
579 /*******************************************************************************
581 * FUNCTION: acpi_db_display_object_type
583 * PARAMETERS: object_arg - User entered NS node handle
587 * DESCRIPTION: Display type of an arbitrary NS node
589 ******************************************************************************/
591 void acpi_db_display_object_type(char *object_arg
)
595 struct acpi_device_info
*info
;
599 arg
= strtoul(object_arg
, NULL
, 16);
600 handle
= ACPI_TO_POINTER(arg
);
602 status
= acpi_get_object_info(handle
, &info
);
603 if (ACPI_FAILURE(status
)) {
604 acpi_os_printf("Could not get object info, %s\n",
605 acpi_format_exception(status
));
609 acpi_os_printf("ADR: %8.8X%8.8X, Flags: %X\n",
610 ACPI_FORMAT_UINT64(info
->address
), info
->flags
);
612 acpi_os_printf("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
613 info
->highest_dstates
[0], info
->highest_dstates
[1],
614 info
->highest_dstates
[2], info
->highest_dstates
[3]);
616 acpi_os_printf("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
617 info
->lowest_dstates
[0], info
->lowest_dstates
[1],
618 info
->lowest_dstates
[2], info
->lowest_dstates
[3],
619 info
->lowest_dstates
[4]);
621 if (info
->valid
& ACPI_VALID_HID
) {
622 acpi_os_printf("HID: %s\n", info
->hardware_id
.string
);
625 if (info
->valid
& ACPI_VALID_UID
) {
626 acpi_os_printf("UID: %s\n", info
->unique_id
.string
);
629 if (info
->valid
& ACPI_VALID_CID
) {
630 for (i
= 0; i
< info
->compatible_id_list
.count
; i
++) {
631 acpi_os_printf("CID %u: %s\n", i
,
632 info
->compatible_id_list
.ids
[i
].string
);
639 /*******************************************************************************
641 * FUNCTION: acpi_db_display_result_object
643 * PARAMETERS: obj_desc - Object to be displayed
644 * walk_state - Current walk state
648 * DESCRIPTION: Display the result of an AML opcode
650 * Note: Curently only displays the result object if we are single stepping.
651 * However, this output may be useful in other contexts and could be enabled
652 * to do so if needed.
654 ******************************************************************************/
657 acpi_db_display_result_object(union acpi_operand_object
*obj_desc
,
658 struct acpi_walk_state
*walk_state
)
661 #ifndef ACPI_APPLICATION
662 if (acpi_gbl_db_thread_id
!= acpi_os_get_thread_id()) {
667 /* Only display if single stepping */
669 if (!acpi_gbl_cm_single_step
) {
673 acpi_os_printf("ResultObj: ");
674 acpi_db_display_internal_object(obj_desc
, walk_state
);
675 acpi_os_printf("\n");
678 /*******************************************************************************
680 * FUNCTION: acpi_db_display_argument_object
682 * PARAMETERS: obj_desc - Object to be displayed
683 * walk_state - Current walk state
687 * DESCRIPTION: Display the result of an AML opcode
689 ******************************************************************************/
692 acpi_db_display_argument_object(union acpi_operand_object
*obj_desc
,
693 struct acpi_walk_state
*walk_state
)
696 #ifndef ACPI_APPLICATION
697 if (acpi_gbl_db_thread_id
!= acpi_os_get_thread_id()) {
702 if (!acpi_gbl_cm_single_step
) {
706 acpi_os_printf("ArgObj: ");
707 acpi_db_display_internal_object(obj_desc
, walk_state
);
710 #if (!ACPI_REDUCED_HARDWARE)
711 /*******************************************************************************
713 * FUNCTION: acpi_db_display_gpes
719 * DESCRIPTION: Display the current GPE structures
721 ******************************************************************************/
723 void acpi_db_display_gpes(void)
725 struct acpi_gpe_block_info
*gpe_block
;
726 struct acpi_gpe_xrupt_info
*gpe_xrupt_info
;
727 struct acpi_gpe_event_info
*gpe_event_info
;
728 struct acpi_gpe_register_info
*gpe_register_info
;
730 struct acpi_gpe_notify_info
*notify
;
737 struct acpi_buffer ret_buf
;
740 ret_buf
.length
= sizeof(buffer
);
741 ret_buf
.pointer
= buffer
;
745 /* Walk the GPE lists */
747 gpe_xrupt_info
= acpi_gbl_gpe_xrupt_list_head
;
748 while (gpe_xrupt_info
) {
749 gpe_block
= gpe_xrupt_info
->gpe_block_list_head
;
751 status
= acpi_get_name(gpe_block
->node
,
752 ACPI_FULL_PATHNAME_NO_TRAILING
,
754 if (ACPI_FAILURE(status
)) {
756 ("Could not convert name to pathname\n");
759 if (gpe_block
->node
== acpi_gbl_fadt_gpe_device
) {
760 gpe_type
= "FADT-defined GPE block";
762 gpe_type
= "GPE Block Device";
766 ("\nBlock %u - Info %p DeviceNode %p [%s] - %s\n",
767 block
, gpe_block
, gpe_block
->node
, buffer
,
770 acpi_os_printf(" Registers: %u (%u GPEs)\n",
771 gpe_block
->register_count
,
772 gpe_block
->gpe_count
);
775 (" GPE range: 0x%X to 0x%X on interrupt %u\n",
776 gpe_block
->block_base_number
,
777 gpe_block
->block_base_number
+
778 (gpe_block
->gpe_count
- 1),
779 gpe_xrupt_info
->interrupt_number
);
782 (" RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
783 gpe_block
->register_info
,
784 ACPI_FORMAT_UINT64(gpe_block
->register_info
->
785 status_address
.address
),
786 ACPI_FORMAT_UINT64(gpe_block
->register_info
->
787 enable_address
.address
));
789 acpi_os_printf(" EventInfo: %p\n",
790 gpe_block
->event_info
);
792 /* Examine each GPE Register within the block */
794 for (i
= 0; i
< gpe_block
->register_count
; i
++) {
796 &gpe_block
->register_info
[i
];
798 acpi_os_printf(" Reg %u: (GPE %.2X-%.2X) "
799 "RunEnable %2.2X WakeEnable %2.2X"
800 " Status %8.8X%8.8X Enable %8.8X%8.8X\n",
806 (ACPI_GPE_REGISTER_WIDTH
- 1),
813 status_address
.address
),
816 enable_address
.address
));
818 /* Now look at the individual GPEs in this byte register */
820 for (j
= 0; j
< ACPI_GPE_REGISTER_WIDTH
; j
++) {
822 (i
* ACPI_GPE_REGISTER_WIDTH
) + j
;
824 &gpe_block
->event_info
[gpe_index
];
826 if (ACPI_GPE_DISPATCH_TYPE
827 (gpe_event_info
->flags
) ==
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 gpe_block
->block_base_number
+
838 gpe_index
, gpe_event_info
,
839 gpe_event_info
->runtime_count
,
840 gpe_event_info
->flags
);
842 /* Decode the flags byte */
845 flags
& ACPI_GPE_LEVEL_TRIGGERED
) {
846 acpi_os_printf("Level, ");
848 acpi_os_printf("Edge, ");
852 flags
& ACPI_GPE_CAN_WAKE
) {
853 acpi_os_printf("CanWake, ");
855 acpi_os_printf("RunOnly, ");
858 switch (ACPI_GPE_DISPATCH_TYPE
859 (gpe_event_info
->flags
)) {
860 case ACPI_GPE_DISPATCH_NONE
:
862 acpi_os_printf("NotUsed");
865 case ACPI_GPE_DISPATCH_METHOD
:
867 acpi_os_printf("Method");
870 case ACPI_GPE_DISPATCH_HANDLER
:
872 acpi_os_printf("Handler");
875 case ACPI_GPE_DISPATCH_NOTIFY
:
879 gpe_event_info
->dispatch
.
883 notify
= notify
->next
;
887 ("Implicit Notify on %u devices",
891 case ACPI_GPE_DISPATCH_RAW_HANDLER
:
893 acpi_os_printf("RawHandler");
898 acpi_os_printf("UNKNOWN: %X",
899 ACPI_GPE_DISPATCH_TYPE
905 acpi_os_printf(")\n");
910 gpe_block
= gpe_block
->next
;
913 gpe_xrupt_info
= gpe_xrupt_info
->next
;
916 #endif /* !ACPI_REDUCED_HARDWARE */
918 /*******************************************************************************
920 * FUNCTION: acpi_db_display_handlers
926 * DESCRIPTION: Display the currently installed global handlers
928 ******************************************************************************/
930 void acpi_db_display_handlers(void)
932 union acpi_operand_object
*obj_desc
;
933 union acpi_operand_object
*handler_obj
;
934 acpi_adr_space_type space_id
;
937 /* Operation region handlers */
939 acpi_os_printf("\nOperation Region Handlers at the namespace root:\n");
941 obj_desc
= acpi_ns_get_attached_object(acpi_gbl_root_node
);
943 for (i
= 0; i
< ACPI_ARRAY_LENGTH(acpi_gbl_space_id_list
); i
++) {
944 space_id
= acpi_gbl_space_id_list
[i
];
946 acpi_os_printf(ACPI_PREDEFINED_PREFIX
,
947 acpi_ut_get_region_name((u8
)space_id
),
951 acpi_ev_find_region_handler(space_id
,
952 obj_desc
->common_notify
.
955 acpi_os_printf(ACPI_HANDLER_PRESENT_STRING
,
956 (handler_obj
->address_space
.
958 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED
)
959 ? "Default" : "User",
960 handler_obj
->address_space
.
966 /* There is no handler for this space_id */
968 acpi_os_printf("None\n");
973 /* Find all handlers for user-defined space_IDs */
975 handler_obj
= obj_desc
->common_notify
.handler
;
976 while (handler_obj
) {
977 if (handler_obj
->address_space
.space_id
>=
978 ACPI_USER_REGION_BEGIN
) {
979 acpi_os_printf(ACPI_PREDEFINED_PREFIX
,
981 handler_obj
->address_space
.
983 acpi_os_printf(ACPI_HANDLER_PRESENT_STRING
,
984 (handler_obj
->address_space
.
986 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED
)
987 ? "Default" : "User",
988 handler_obj
->address_space
.
992 handler_obj
= handler_obj
->address_space
.next
;
995 #if (!ACPI_REDUCED_HARDWARE)
997 /* Fixed event handlers */
999 acpi_os_printf("\nFixed Event Handlers:\n");
1001 for (i
= 0; i
< ACPI_NUM_FIXED_EVENTS
; i
++) {
1002 acpi_os_printf(ACPI_PREDEFINED_PREFIX
,
1003 acpi_ut_get_event_name(i
), i
);
1004 if (acpi_gbl_fixed_event_handlers
[i
].handler
) {
1005 acpi_os_printf(ACPI_HANDLER_PRESENT_STRING
, "User",
1006 acpi_gbl_fixed_event_handlers
[i
].
1009 acpi_os_printf(ACPI_HANDLER_NOT_PRESENT_STRING
, "None");
1013 #endif /* !ACPI_REDUCED_HARDWARE */
1015 /* Miscellaneous global handlers */
1017 acpi_os_printf("\nMiscellaneous Global Handlers:\n");
1019 for (i
= 0; i
< ACPI_ARRAY_LENGTH(acpi_gbl_handler_list
); i
++) {
1020 acpi_os_printf(ACPI_HANDLER_NAME_STRING
,
1021 acpi_gbl_handler_list
[i
].name
);
1023 if (acpi_gbl_handler_list
[i
].handler
) {
1024 acpi_os_printf(ACPI_HANDLER_PRESENT_STRING
, "User",
1025 acpi_gbl_handler_list
[i
].handler
);
1027 acpi_os_printf(ACPI_HANDLER_NOT_PRESENT_STRING
, "None");
1031 /* Other handlers that are installed throughout the namespace */
1033 acpi_os_printf("\nOperation Region Handlers for specific devices:\n");
1035 (void)acpi_walk_namespace(ACPI_TYPE_DEVICE
, ACPI_ROOT_OBJECT
,
1037 acpi_db_display_non_root_handlers
, NULL
, NULL
,
1041 /*******************************************************************************
1043 * FUNCTION: acpi_db_display_non_root_handlers
1045 * PARAMETERS: acpi_walk_callback
1049 * DESCRIPTION: Display information about all handlers installed for a
1052 ******************************************************************************/
1055 acpi_db_display_non_root_handlers(acpi_handle obj_handle
,
1057 void *context
, void **return_value
)
1059 struct acpi_namespace_node
*node
=
1060 ACPI_CAST_PTR(struct acpi_namespace_node
, obj_handle
);
1061 union acpi_operand_object
*obj_desc
;
1062 union acpi_operand_object
*handler_obj
;
1065 obj_desc
= acpi_ns_get_attached_object(node
);
1070 pathname
= acpi_ns_get_normalized_pathname(node
, TRUE
);
1075 /* Display all handlers associated with this device */
1077 handler_obj
= obj_desc
->common_notify
.handler
;
1078 while (handler_obj
) {
1079 acpi_os_printf(ACPI_PREDEFINED_PREFIX
,
1080 acpi_ut_get_region_name((u8
)handler_obj
->
1081 address_space
.space_id
),
1082 handler_obj
->address_space
.space_id
);
1084 acpi_os_printf(ACPI_HANDLER_PRESENT_STRING2
,
1085 (handler_obj
->address_space
.handler_flags
&
1086 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED
) ? "Default"
1087 : "User", handler_obj
->address_space
.handler
);
1089 acpi_os_printf(" Device Name: %s (%p)\n", pathname
, node
);
1091 handler_obj
= handler_obj
->address_space
.next
;
1094 ACPI_FREE(pathname
);