1 /*******************************************************************************
3 * Module Name: dbnames - Debugger commands for the acpi namespace
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.
44 #include <acpi/acpi.h>
50 #define _COMPONENT ACPI_CA_DEBUGGER
51 ACPI_MODULE_NAME("dbnames")
53 /* Local prototypes */
55 acpi_db_walk_and_match_name(acpi_handle obj_handle
,
57 void *context
, void **return_value
);
60 acpi_db_walk_for_predefined_names(acpi_handle obj_handle
,
62 void *context
, void **return_value
);
65 acpi_db_walk_for_specific_objects(acpi_handle obj_handle
,
67 void *context
, void **return_value
);
70 acpi_db_walk_for_object_counts(acpi_handle obj_handle
,
72 void *context
, void **return_value
);
75 acpi_db_integrity_walk(acpi_handle obj_handle
,
76 u32 nesting_level
, void *context
, void **return_value
);
79 acpi_db_walk_for_references(acpi_handle obj_handle
,
81 void *context
, void **return_value
);
84 acpi_db_bus_walk(acpi_handle obj_handle
,
85 u32 nesting_level
, void *context
, void **return_value
);
88 * Arguments for the Objects command
89 * These object types map directly to the ACPI_TYPES
91 static struct acpi_db_argument_info acpi_db_object_types
[] = {
120 {NULL
} /* Must be null terminated */
123 /*******************************************************************************
125 * FUNCTION: acpi_db_set_scope
127 * PARAMETERS: name - New scope path
131 * DESCRIPTION: Set the "current scope" as maintained by this utility.
132 * The scope is used as a prefix to ACPI paths.
134 ******************************************************************************/
136 void acpi_db_set_scope(char *name
)
139 struct acpi_namespace_node
*node
;
141 if (!name
|| name
[0] == 0) {
142 acpi_os_printf("Current scope: %s\n", acpi_gbl_db_scope_buf
);
146 acpi_db_prep_namestring(name
);
148 if (ACPI_IS_ROOT_PREFIX(name
[0])) {
150 /* Validate new scope from the root */
152 status
= acpi_ns_get_node(acpi_gbl_root_node
, name
,
153 ACPI_NS_NO_UPSEARCH
, &node
);
154 if (ACPI_FAILURE(status
)) {
158 acpi_gbl_db_scope_buf
[0] = 0;
160 /* Validate new scope relative to old scope */
162 status
= acpi_ns_get_node(acpi_gbl_db_scope_node
, name
,
163 ACPI_NS_NO_UPSEARCH
, &node
);
164 if (ACPI_FAILURE(status
)) {
169 /* Build the final pathname */
171 if (acpi_ut_safe_strcat
172 (acpi_gbl_db_scope_buf
, sizeof(acpi_gbl_db_scope_buf
), name
)) {
173 status
= AE_BUFFER_OVERFLOW
;
177 if (acpi_ut_safe_strcat
178 (acpi_gbl_db_scope_buf
, sizeof(acpi_gbl_db_scope_buf
), "\\")) {
179 status
= AE_BUFFER_OVERFLOW
;
183 acpi_gbl_db_scope_node
= node
;
184 acpi_os_printf("New scope: %s\n", acpi_gbl_db_scope_buf
);
189 acpi_os_printf("Could not attach scope: %s, %s\n",
190 name
, acpi_format_exception(status
));
193 /*******************************************************************************
195 * FUNCTION: acpi_db_dump_namespace
197 * PARAMETERS: start_arg - Node to begin namespace dump
198 * depth_arg - Maximum tree depth to be dumped
202 * DESCRIPTION: Dump entire namespace or a subtree. Each node is displayed
203 * with type and other information.
205 ******************************************************************************/
207 void acpi_db_dump_namespace(char *start_arg
, char *depth_arg
)
209 acpi_handle subtree_entry
= acpi_gbl_root_node
;
210 u32 max_depth
= ACPI_UINT32_MAX
;
212 /* No argument given, just start at the root and dump entire namespace */
215 subtree_entry
= acpi_db_convert_to_node(start_arg
);
216 if (!subtree_entry
) {
220 /* Now we can check for the depth argument */
223 max_depth
= strtoul(depth_arg
, NULL
, 0);
227 acpi_db_set_output_destination(ACPI_DB_DUPLICATE_OUTPUT
);
228 acpi_os_printf("ACPI Namespace (from %4.4s (%p) subtree):\n",
229 ((struct acpi_namespace_node
*)subtree_entry
)->name
.
230 ascii
, subtree_entry
);
232 /* Display the subtree */
234 acpi_db_set_output_destination(ACPI_DB_REDIRECTABLE_OUTPUT
);
235 acpi_ns_dump_objects(ACPI_TYPE_ANY
, ACPI_DISPLAY_SUMMARY
, max_depth
,
236 ACPI_OWNER_ID_MAX
, subtree_entry
);
237 acpi_db_set_output_destination(ACPI_DB_CONSOLE_OUTPUT
);
240 /*******************************************************************************
242 * FUNCTION: acpi_db_dump_namespace_paths
248 * DESCRIPTION: Dump entire namespace with full object pathnames and object
249 * type information. Alternative to "namespace" command.
251 ******************************************************************************/
253 void acpi_db_dump_namespace_paths(void)
256 acpi_db_set_output_destination(ACPI_DB_DUPLICATE_OUTPUT
);
257 acpi_os_printf("ACPI Namespace (from root):\n");
259 /* Display the entire namespace */
261 acpi_db_set_output_destination(ACPI_DB_REDIRECTABLE_OUTPUT
);
262 acpi_ns_dump_object_paths(ACPI_TYPE_ANY
, ACPI_DISPLAY_SUMMARY
,
263 ACPI_UINT32_MAX
, ACPI_OWNER_ID_MAX
,
266 acpi_db_set_output_destination(ACPI_DB_CONSOLE_OUTPUT
);
269 /*******************************************************************************
271 * FUNCTION: acpi_db_dump_namespace_by_owner
273 * PARAMETERS: owner_arg - Owner ID whose nodes will be displayed
274 * depth_arg - Maximum tree depth to be dumped
278 * DESCRIPTION: Dump elements of the namespace that are owned by the owner_id.
280 ******************************************************************************/
282 void acpi_db_dump_namespace_by_owner(char *owner_arg
, char *depth_arg
)
284 acpi_handle subtree_entry
= acpi_gbl_root_node
;
285 u32 max_depth
= ACPI_UINT32_MAX
;
286 acpi_owner_id owner_id
;
288 owner_id
= (acpi_owner_id
)strtoul(owner_arg
, NULL
, 0);
290 /* Now we can check for the depth argument */
293 max_depth
= strtoul(depth_arg
, NULL
, 0);
296 acpi_db_set_output_destination(ACPI_DB_DUPLICATE_OUTPUT
);
297 acpi_os_printf("ACPI Namespace by owner %X:\n", owner_id
);
299 /* Display the subtree */
301 acpi_db_set_output_destination(ACPI_DB_REDIRECTABLE_OUTPUT
);
302 acpi_ns_dump_objects(ACPI_TYPE_ANY
, ACPI_DISPLAY_SUMMARY
, max_depth
,
303 owner_id
, subtree_entry
);
304 acpi_db_set_output_destination(ACPI_DB_CONSOLE_OUTPUT
);
307 /*******************************************************************************
309 * FUNCTION: acpi_db_walk_and_match_name
311 * PARAMETERS: Callback from walk_namespace
315 * DESCRIPTION: Find a particular name/names within the namespace. Wildcards
316 * are supported -- '?' matches any character.
318 ******************************************************************************/
321 acpi_db_walk_and_match_name(acpi_handle obj_handle
,
323 void *context
, void **return_value
)
326 char *requested_name
= (char *)context
;
328 struct acpi_buffer buffer
;
329 struct acpi_walk_info info
;
331 /* Check for a name match */
333 for (i
= 0; i
< 4; i
++) {
335 /* Wildcard support */
337 if ((requested_name
[i
] != '?') &&
338 (requested_name
[i
] != ((struct acpi_namespace_node
*)
339 obj_handle
)->name
.ascii
[i
])) {
341 /* No match, just exit */
347 /* Get the full pathname to this object */
349 buffer
.length
= ACPI_ALLOCATE_LOCAL_BUFFER
;
350 status
= acpi_ns_handle_to_pathname(obj_handle
, &buffer
, TRUE
);
351 if (ACPI_FAILURE(status
)) {
352 acpi_os_printf("Could Not get pathname for object %p\n",
355 info
.owner_id
= ACPI_OWNER_ID_MAX
;
356 info
.debug_level
= ACPI_UINT32_MAX
;
357 info
.display_type
= ACPI_DISPLAY_SUMMARY
| ACPI_DISPLAY_SHORT
;
359 acpi_os_printf("%32s", (char *)buffer
.pointer
);
360 (void)acpi_ns_dump_one_object(obj_handle
, nesting_level
, &info
,
362 ACPI_FREE(buffer
.pointer
);
368 /*******************************************************************************
370 * FUNCTION: acpi_db_find_name_in_namespace
372 * PARAMETERS: name_arg - The 4-character ACPI name to find.
373 * wildcards are supported.
377 * DESCRIPTION: Search the namespace for a given name (with wildcards)
379 ******************************************************************************/
381 acpi_status
acpi_db_find_name_in_namespace(char *name_arg
)
383 char acpi_name
[5] = "____";
384 char *acpi_name_ptr
= acpi_name
;
386 if (strlen(name_arg
) > ACPI_NAME_SIZE
) {
387 acpi_os_printf("Name must be no longer than 4 characters\n");
391 /* Pad out name with underscores as necessary to create a 4-char name */
393 acpi_ut_strupr(name_arg
);
395 *acpi_name_ptr
= *name_arg
;
400 /* Walk the namespace from the root */
402 (void)acpi_walk_namespace(ACPI_TYPE_ANY
, ACPI_ROOT_OBJECT
,
403 ACPI_UINT32_MAX
, acpi_db_walk_and_match_name
,
404 NULL
, acpi_name
, NULL
);
406 acpi_db_set_output_destination(ACPI_DB_CONSOLE_OUTPUT
);
410 /*******************************************************************************
412 * FUNCTION: acpi_db_walk_for_predefined_names
414 * PARAMETERS: Callback from walk_namespace
418 * DESCRIPTION: Detect and display predefined ACPI names (names that start with
421 ******************************************************************************/
424 acpi_db_walk_for_predefined_names(acpi_handle obj_handle
,
426 void *context
, void **return_value
)
428 struct acpi_namespace_node
*node
=
429 (struct acpi_namespace_node
*)obj_handle
;
430 u32
*count
= (u32
*)context
;
431 const union acpi_predefined_info
*predefined
;
432 const union acpi_predefined_info
*package
= NULL
;
434 char string_buffer
[48];
436 predefined
= acpi_ut_match_predefined_method(node
->name
.ascii
);
441 pathname
= acpi_ns_get_normalized_pathname(node
, TRUE
);
446 /* If method returns a package, the info is in the next table entry */
448 if (predefined
->info
.expected_btypes
& ACPI_RTYPE_PACKAGE
) {
449 package
= predefined
+ 1;
452 acpi_ut_get_expected_return_types(string_buffer
,
453 predefined
->info
.expected_btypes
);
455 acpi_os_printf("%-32s Arguments %X, Return Types: %s", pathname
,
456 METHOD_GET_ARG_COUNT(predefined
->info
.argument_list
),
460 acpi_os_printf(" (PkgType %2.2X, ObjType %2.2X, Count %2.2X)",
461 package
->ret_info
.type
,
462 package
->ret_info
.object_type1
,
463 package
->ret_info
.count1
);
466 acpi_os_printf("\n");
468 /* Check that the declared argument count matches the ACPI spec */
470 acpi_ns_check_acpi_compliance(pathname
, node
, predefined
);
477 /*******************************************************************************
479 * FUNCTION: acpi_db_check_predefined_names
485 * DESCRIPTION: Validate all predefined names in the namespace
487 ******************************************************************************/
489 void acpi_db_check_predefined_names(void)
493 /* Search all nodes in namespace */
495 (void)acpi_walk_namespace(ACPI_TYPE_ANY
, ACPI_ROOT_OBJECT
,
497 acpi_db_walk_for_predefined_names
, NULL
,
498 (void *)&count
, NULL
);
500 acpi_os_printf("Found %u predefined names in the namespace\n", count
);
503 /*******************************************************************************
505 * FUNCTION: acpi_db_walk_for_object_counts
507 * PARAMETERS: Callback from walk_namespace
511 * DESCRIPTION: Display short info about objects in the namespace
513 ******************************************************************************/
516 acpi_db_walk_for_object_counts(acpi_handle obj_handle
,
518 void *context
, void **return_value
)
520 struct acpi_object_info
*info
= (struct acpi_object_info
*)context
;
521 struct acpi_namespace_node
*node
=
522 (struct acpi_namespace_node
*)obj_handle
;
524 if (node
->type
> ACPI_TYPE_NS_NODE_MAX
) {
525 acpi_os_printf("[%4.4s]: Unknown object type %X\n",
526 node
->name
.ascii
, node
->type
);
528 info
->types
[node
->type
]++;
534 /*******************************************************************************
536 * FUNCTION: acpi_db_walk_for_specific_objects
538 * PARAMETERS: Callback from walk_namespace
542 * DESCRIPTION: Display short info about objects in the namespace
544 ******************************************************************************/
547 acpi_db_walk_for_specific_objects(acpi_handle obj_handle
,
549 void *context
, void **return_value
)
551 struct acpi_walk_info
*info
= (struct acpi_walk_info
*)context
;
552 struct acpi_buffer buffer
;
557 /* Get and display the full pathname to this object */
559 buffer
.length
= ACPI_ALLOCATE_LOCAL_BUFFER
;
560 status
= acpi_ns_handle_to_pathname(obj_handle
, &buffer
, TRUE
);
561 if (ACPI_FAILURE(status
)) {
562 acpi_os_printf("Could Not get pathname for object %p\n",
567 acpi_os_printf("%32s", (char *)buffer
.pointer
);
568 ACPI_FREE(buffer
.pointer
);
570 /* Dump short info about the object */
572 (void)acpi_ns_dump_one_object(obj_handle
, nesting_level
, info
, NULL
);
576 /*******************************************************************************
578 * FUNCTION: acpi_db_display_objects
580 * PARAMETERS: obj_type_arg - Type of object to display
581 * display_count_arg - Max depth to display
585 * DESCRIPTION: Display objects in the namespace of the requested type
587 ******************************************************************************/
589 acpi_status
acpi_db_display_objects(char *obj_type_arg
, char *display_count_arg
)
591 struct acpi_walk_info info
;
592 acpi_object_type type
;
593 struct acpi_object_info
*object_info
;
595 u32 total_objects
= 0;
597 /* No argument means display summary/count of all object types */
601 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info
));
603 /* Walk the namespace from the root */
605 (void)acpi_walk_namespace(ACPI_TYPE_ANY
, ACPI_ROOT_OBJECT
,
607 acpi_db_walk_for_object_counts
, NULL
,
608 (void *)object_info
, NULL
);
610 acpi_os_printf("\nSummary of namespace objects:\n\n");
612 for (i
= 0; i
< ACPI_TOTAL_TYPES
; i
++) {
613 acpi_os_printf("%8u %s\n", object_info
->types
[i
],
614 acpi_ut_get_type_name(i
));
616 total_objects
+= object_info
->types
[i
];
619 acpi_os_printf("\n%8u Total namespace objects\n\n",
622 ACPI_FREE(object_info
);
626 /* Get the object type */
628 type
= acpi_db_match_argument(obj_type_arg
, acpi_db_object_types
);
629 if (type
== ACPI_TYPE_NOT_FOUND
) {
630 acpi_os_printf("Invalid or unsupported argument\n");
634 acpi_db_set_output_destination(ACPI_DB_DUPLICATE_OUTPUT
);
636 ("Objects of type [%s] defined in the current ACPI Namespace:\n",
637 acpi_ut_get_type_name(type
));
639 acpi_db_set_output_destination(ACPI_DB_REDIRECTABLE_OUTPUT
);
642 info
.owner_id
= ACPI_OWNER_ID_MAX
;
643 info
.debug_level
= ACPI_UINT32_MAX
;
644 info
.display_type
= ACPI_DISPLAY_SUMMARY
| ACPI_DISPLAY_SHORT
;
646 /* Walk the namespace from the root */
648 (void)acpi_walk_namespace(type
, ACPI_ROOT_OBJECT
, ACPI_UINT32_MAX
,
649 acpi_db_walk_for_specific_objects
, NULL
,
650 (void *)&info
, NULL
);
653 ("\nFound %u objects of type [%s] in the current ACPI Namespace\n",
654 info
.count
, acpi_ut_get_type_name(type
));
656 acpi_db_set_output_destination(ACPI_DB_CONSOLE_OUTPUT
);
660 /*******************************************************************************
662 * FUNCTION: acpi_db_integrity_walk
664 * PARAMETERS: Callback from walk_namespace
668 * DESCRIPTION: Examine one NS node for valid values.
670 ******************************************************************************/
673 acpi_db_integrity_walk(acpi_handle obj_handle
,
674 u32 nesting_level
, void *context
, void **return_value
)
676 struct acpi_integrity_info
*info
=
677 (struct acpi_integrity_info
*)context
;
678 struct acpi_namespace_node
*node
=
679 (struct acpi_namespace_node
*)obj_handle
;
680 union acpi_operand_object
*object
;
685 /* Verify the NS node, and dereference aliases */
688 if (ACPI_GET_DESCRIPTOR_TYPE(node
) != ACPI_DESC_TYPE_NAMED
) {
690 ("Invalid Descriptor Type for Node %p [%s] - "
691 "is %2.2X should be %2.2X\n", node
,
692 acpi_ut_get_descriptor_name(node
),
693 ACPI_GET_DESCRIPTOR_TYPE(node
),
694 ACPI_DESC_TYPE_NAMED
);
698 if ((node
->type
== ACPI_TYPE_LOCAL_ALIAS
) ||
699 (node
->type
== ACPI_TYPE_LOCAL_METHOD_ALIAS
)) {
700 node
= (struct acpi_namespace_node
*)node
->object
;
706 if (node
->type
> ACPI_TYPE_LOCAL_MAX
) {
707 acpi_os_printf("Invalid Object Type for Node %p, Type = %X\n",
712 if (!acpi_ut_valid_nameseg(node
->name
.ascii
)) {
713 acpi_os_printf("Invalid AcpiName for Node %p\n", node
);
717 object
= acpi_ns_get_attached_object(node
);
720 if (ACPI_GET_DESCRIPTOR_TYPE(object
) != ACPI_DESC_TYPE_OPERAND
) {
722 ("Invalid Descriptor Type for Object %p [%s]\n",
723 object
, acpi_ut_get_descriptor_name(object
));
730 /*******************************************************************************
732 * FUNCTION: acpi_db_check_integrity
738 * DESCRIPTION: Check entire namespace for data structure integrity
740 ******************************************************************************/
742 void acpi_db_check_integrity(void)
744 struct acpi_integrity_info info
= { 0, 0 };
746 /* Search all nodes in namespace */
748 (void)acpi_walk_namespace(ACPI_TYPE_ANY
, ACPI_ROOT_OBJECT
,
749 ACPI_UINT32_MAX
, acpi_db_integrity_walk
, NULL
,
750 (void *)&info
, NULL
);
752 acpi_os_printf("Verified %u namespace nodes with %u Objects\n",
753 info
.nodes
, info
.objects
);
756 /*******************************************************************************
758 * FUNCTION: acpi_db_walk_for_references
760 * PARAMETERS: Callback from walk_namespace
764 * DESCRIPTION: Check if this namespace object refers to the target object
765 * that is passed in as the context value.
767 * Note: Currently doesn't check subobjects within the Node's object
769 ******************************************************************************/
772 acpi_db_walk_for_references(acpi_handle obj_handle
,
774 void *context
, void **return_value
)
776 union acpi_operand_object
*obj_desc
=
777 (union acpi_operand_object
*)context
;
778 struct acpi_namespace_node
*node
=
779 (struct acpi_namespace_node
*)obj_handle
;
781 /* Check for match against the namespace node itself */
783 if (node
== (void *)obj_desc
) {
784 acpi_os_printf("Object is a Node [%4.4s]\n",
785 acpi_ut_get_node_name(node
));
788 /* Check for match against the object attached to the node */
790 if (acpi_ns_get_attached_object(node
) == obj_desc
) {
791 acpi_os_printf("Reference at Node->Object %p [%4.4s]\n",
792 node
, acpi_ut_get_node_name(node
));
798 /*******************************************************************************
800 * FUNCTION: acpi_db_find_references
802 * PARAMETERS: object_arg - String with hex value of the object
806 * DESCRIPTION: Search namespace for all references to the input object
808 ******************************************************************************/
810 void acpi_db_find_references(char *object_arg
)
812 union acpi_operand_object
*obj_desc
;
815 /* Convert string to object pointer */
817 address
= strtoul(object_arg
, NULL
, 16);
818 obj_desc
= ACPI_TO_POINTER(address
);
820 /* Search all nodes in namespace */
822 (void)acpi_walk_namespace(ACPI_TYPE_ANY
, ACPI_ROOT_OBJECT
,
823 ACPI_UINT32_MAX
, acpi_db_walk_for_references
,
824 NULL
, (void *)obj_desc
, NULL
);
827 /*******************************************************************************
829 * FUNCTION: acpi_db_bus_walk
831 * PARAMETERS: Callback from walk_namespace
835 * DESCRIPTION: Display info about device objects that have a corresponding
838 ******************************************************************************/
841 acpi_db_bus_walk(acpi_handle obj_handle
,
842 u32 nesting_level
, void *context
, void **return_value
)
844 struct acpi_namespace_node
*node
=
845 (struct acpi_namespace_node
*)obj_handle
;
847 struct acpi_buffer buffer
;
848 struct acpi_namespace_node
*temp_node
;
849 struct acpi_device_info
*info
;
852 if ((node
->type
!= ACPI_TYPE_DEVICE
) &&
853 (node
->type
!= ACPI_TYPE_PROCESSOR
)) {
857 /* Exit if there is no _PRT under this device */
859 status
= acpi_get_handle(node
, METHOD_NAME__PRT
,
860 ACPI_CAST_PTR(acpi_handle
, &temp_node
));
861 if (ACPI_FAILURE(status
)) {
865 /* Get the full path to this device object */
867 buffer
.length
= ACPI_ALLOCATE_LOCAL_BUFFER
;
868 status
= acpi_ns_handle_to_pathname(obj_handle
, &buffer
, TRUE
);
869 if (ACPI_FAILURE(status
)) {
870 acpi_os_printf("Could Not get pathname for object %p\n",
875 status
= acpi_get_object_info(obj_handle
, &info
);
876 if (ACPI_FAILURE(status
)) {
880 /* Display the full path */
882 acpi_os_printf("%-32s Type %X", (char *)buffer
.pointer
, node
->type
);
883 ACPI_FREE(buffer
.pointer
);
885 if (info
->flags
& ACPI_PCI_ROOT_BRIDGE
) {
886 acpi_os_printf(" - Is PCI Root Bridge");
888 acpi_os_printf("\n");
892 acpi_os_printf("_PRT: %p\n", temp_node
);
894 /* Dump _ADR, _HID, _UID, _CID */
896 if (info
->valid
& ACPI_VALID_ADR
) {
897 acpi_os_printf("_ADR: %8.8X%8.8X\n",
898 ACPI_FORMAT_UINT64(info
->address
));
900 acpi_os_printf("_ADR: <Not Present>\n");
903 if (info
->valid
& ACPI_VALID_HID
) {
904 acpi_os_printf("_HID: %s\n", info
->hardware_id
.string
);
906 acpi_os_printf("_HID: <Not Present>\n");
909 if (info
->valid
& ACPI_VALID_UID
) {
910 acpi_os_printf("_UID: %s\n", info
->unique_id
.string
);
912 acpi_os_printf("_UID: <Not Present>\n");
915 if (info
->valid
& ACPI_VALID_CID
) {
916 for (i
= 0; i
< info
->compatible_id_list
.count
; i
++) {
917 acpi_os_printf("_CID: %s\n",
918 info
->compatible_id_list
.ids
[i
].string
);
921 acpi_os_printf("_CID: <Not Present>\n");
928 /*******************************************************************************
930 * FUNCTION: acpi_db_get_bus_info
936 * DESCRIPTION: Display info about system busses.
938 ******************************************************************************/
940 void acpi_db_get_bus_info(void)
942 /* Search all nodes in namespace */
944 (void)acpi_walk_namespace(ACPI_TYPE_ANY
, ACPI_ROOT_OBJECT
,
945 ACPI_UINT32_MAX
, acpi_db_bus_walk
, NULL
, NULL
,