nsdump.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. /******************************************************************************
  2. *
  3. * Module Name: nsdump - table dumping routines for debug
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2012, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #include <acpi/acpi.h>
  43. #include "accommon.h"
  44. #include "acnamesp.h"
  45. #define _COMPONENT ACPI_NAMESPACE
  46. ACPI_MODULE_NAME("nsdump")
  47. /* Local prototypes */
  48. #ifdef ACPI_OBSOLETE_FUNCTIONS
  49. void acpi_ns_dump_root_devices(void);
  50. static acpi_status
  51. acpi_ns_dump_one_device(acpi_handle obj_handle,
  52. u32 level, void *context, void **return_value);
  53. #endif
  54. #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
  55. /*******************************************************************************
  56. *
  57. * FUNCTION: acpi_ns_print_pathname
  58. *
  59. * PARAMETERS: num_segments - Number of ACPI name segments
  60. * pathname - The compressed (internal) path
  61. *
  62. * RETURN: None
  63. *
  64. * DESCRIPTION: Print an object's full namespace pathname
  65. *
  66. ******************************************************************************/
  67. void acpi_ns_print_pathname(u32 num_segments, char *pathname)
  68. {
  69. u32 i;
  70. ACPI_FUNCTION_NAME(ns_print_pathname);
  71. if (!(acpi_dbg_level & ACPI_LV_NAMES)
  72. || !(acpi_dbg_layer & ACPI_NAMESPACE)) {
  73. return;
  74. }
  75. /* Print the entire name */
  76. ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "["));
  77. while (num_segments) {
  78. for (i = 0; i < 4; i++) {
  79. ACPI_IS_PRINT(pathname[i]) ?
  80. acpi_os_printf("%c", pathname[i]) :
  81. acpi_os_printf("?");
  82. }
  83. pathname += ACPI_NAME_SIZE;
  84. num_segments--;
  85. if (num_segments) {
  86. acpi_os_printf(".");
  87. }
  88. }
  89. acpi_os_printf("]\n");
  90. }
  91. /*******************************************************************************
  92. *
  93. * FUNCTION: acpi_ns_dump_pathname
  94. *
  95. * PARAMETERS: handle - Object
  96. * msg - Prefix message
  97. * level - Desired debug level
  98. * component - Caller's component ID
  99. *
  100. * RETURN: None
  101. *
  102. * DESCRIPTION: Print an object's full namespace pathname
  103. * Manages allocation/freeing of a pathname buffer
  104. *
  105. ******************************************************************************/
  106. void
  107. acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component)
  108. {
  109. ACPI_FUNCTION_TRACE(ns_dump_pathname);
  110. /* Do this only if the requested debug level and component are enabled */
  111. if (!(acpi_dbg_level & level) || !(acpi_dbg_layer & component)) {
  112. return_VOID;
  113. }
  114. /* Convert handle to a full pathname and print it (with supplied message) */
  115. acpi_ns_print_node_pathname(handle, msg);
  116. acpi_os_printf("\n");
  117. return_VOID;
  118. }
  119. /*******************************************************************************
  120. *
  121. * FUNCTION: acpi_ns_dump_one_object
  122. *
  123. * PARAMETERS: obj_handle - Node to be dumped
  124. * level - Nesting level of the handle
  125. * context - Passed into walk_namespace
  126. * return_value - Not used
  127. *
  128. * RETURN: Status
  129. *
  130. * DESCRIPTION: Dump a single Node
  131. * This procedure is a user_function called by acpi_ns_walk_namespace.
  132. *
  133. ******************************************************************************/
  134. acpi_status
  135. acpi_ns_dump_one_object(acpi_handle obj_handle,
  136. u32 level, void *context, void **return_value)
  137. {
  138. struct acpi_walk_info *info = (struct acpi_walk_info *)context;
  139. struct acpi_namespace_node *this_node;
  140. union acpi_operand_object *obj_desc = NULL;
  141. acpi_object_type obj_type;
  142. acpi_object_type type;
  143. u32 bytes_to_dump;
  144. u32 dbg_level;
  145. u32 i;
  146. ACPI_FUNCTION_NAME(ns_dump_one_object);
  147. /* Is output enabled? */
  148. if (!(acpi_dbg_level & info->debug_level)) {
  149. return (AE_OK);
  150. }
  151. if (!obj_handle) {
  152. ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Null object handle\n"));
  153. return (AE_OK);
  154. }
  155. this_node = acpi_ns_validate_handle(obj_handle);
  156. if (!this_node) {
  157. ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid object handle %p\n",
  158. obj_handle));
  159. return (AE_OK);
  160. }
  161. type = this_node->type;
  162. /* Check if the owner matches */
  163. if ((info->owner_id != ACPI_OWNER_ID_MAX) &&
  164. (info->owner_id != this_node->owner_id)) {
  165. return (AE_OK);
  166. }
  167. if (!(info->display_type & ACPI_DISPLAY_SHORT)) {
  168. /* Indent the object according to the level */
  169. acpi_os_printf("%2d%*s", (u32) level - 1, (int)level * 2, " ");
  170. /* Check the node type and name */
  171. if (type > ACPI_TYPE_LOCAL_MAX) {
  172. ACPI_WARNING((AE_INFO,
  173. "Invalid ACPI Object Type 0x%08X", type));
  174. }
  175. acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node));
  176. }
  177. /* Now we can print out the pertinent information */
  178. acpi_os_printf(" %-12s %p %2.2X ",
  179. acpi_ut_get_type_name(type), this_node,
  180. this_node->owner_id);
  181. dbg_level = acpi_dbg_level;
  182. acpi_dbg_level = 0;
  183. obj_desc = acpi_ns_get_attached_object(this_node);
  184. acpi_dbg_level = dbg_level;
  185. /* Temp nodes are those nodes created by a control method */
  186. if (this_node->flags & ANOBJ_TEMPORARY) {
  187. acpi_os_printf("(T) ");
  188. }
  189. switch (info->display_type & ACPI_DISPLAY_MASK) {
  190. case ACPI_DISPLAY_SUMMARY:
  191. if (!obj_desc) {
  192. /* No attached object. Some types should always have an object */
  193. switch (type) {
  194. case ACPI_TYPE_INTEGER:
  195. case ACPI_TYPE_PACKAGE:
  196. case ACPI_TYPE_BUFFER:
  197. case ACPI_TYPE_STRING:
  198. case ACPI_TYPE_METHOD:
  199. acpi_os_printf("<No attached object>");
  200. break;
  201. default:
  202. break;
  203. }
  204. acpi_os_printf("\n");
  205. return (AE_OK);
  206. }
  207. switch (type) {
  208. case ACPI_TYPE_PROCESSOR:
  209. acpi_os_printf("ID %02X Len %02X Addr %p\n",
  210. obj_desc->processor.proc_id,
  211. obj_desc->processor.length,
  212. ACPI_CAST_PTR(void,
  213. obj_desc->processor.
  214. address));
  215. break;
  216. case ACPI_TYPE_DEVICE:
  217. acpi_os_printf("Notify Object: %p\n", obj_desc);
  218. break;
  219. case ACPI_TYPE_METHOD:
  220. acpi_os_printf("Args %X Len %.4X Aml %p\n",
  221. (u32) obj_desc->method.param_count,
  222. obj_desc->method.aml_length,
  223. obj_desc->method.aml_start);
  224. break;
  225. case ACPI_TYPE_INTEGER:
  226. acpi_os_printf("= %8.8X%8.8X\n",
  227. ACPI_FORMAT_UINT64(obj_desc->integer.
  228. value));
  229. break;
  230. case ACPI_TYPE_PACKAGE:
  231. if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
  232. acpi_os_printf("Elements %.2X\n",
  233. obj_desc->package.count);
  234. } else {
  235. acpi_os_printf("[Length not yet evaluated]\n");
  236. }
  237. break;
  238. case ACPI_TYPE_BUFFER:
  239. if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
  240. acpi_os_printf("Len %.2X",
  241. obj_desc->buffer.length);
  242. /* Dump some of the buffer */
  243. if (obj_desc->buffer.length > 0) {
  244. acpi_os_printf(" =");
  245. for (i = 0;
  246. (i < obj_desc->buffer.length
  247. && i < 12); i++) {
  248. acpi_os_printf(" %.2hX",
  249. obj_desc->buffer.
  250. pointer[i]);
  251. }
  252. }
  253. acpi_os_printf("\n");
  254. } else {
  255. acpi_os_printf("[Length not yet evaluated]\n");
  256. }
  257. break;
  258. case ACPI_TYPE_STRING:
  259. acpi_os_printf("Len %.2X ", obj_desc->string.length);
  260. acpi_ut_print_string(obj_desc->string.pointer, 32);
  261. acpi_os_printf("\n");
  262. break;
  263. case ACPI_TYPE_REGION:
  264. acpi_os_printf("[%s]",
  265. acpi_ut_get_region_name(obj_desc->region.
  266. space_id));
  267. if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
  268. acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
  269. ACPI_FORMAT_NATIVE_UINT
  270. (obj_desc->region.address),
  271. obj_desc->region.length);
  272. } else {
  273. acpi_os_printf
  274. (" [Address/Length not yet evaluated]\n");
  275. }
  276. break;
  277. case ACPI_TYPE_LOCAL_REFERENCE:
  278. acpi_os_printf("[%s]\n",
  279. acpi_ut_get_reference_name(obj_desc));
  280. break;
  281. case ACPI_TYPE_BUFFER_FIELD:
  282. if (obj_desc->buffer_field.buffer_obj &&
  283. obj_desc->buffer_field.buffer_obj->buffer.node) {
  284. acpi_os_printf("Buf [%4.4s]",
  285. acpi_ut_get_node_name(obj_desc->
  286. buffer_field.
  287. buffer_obj->
  288. buffer.
  289. node));
  290. }
  291. break;
  292. case ACPI_TYPE_LOCAL_REGION_FIELD:
  293. acpi_os_printf("Rgn [%4.4s]",
  294. acpi_ut_get_node_name(obj_desc->
  295. common_field.
  296. region_obj->region.
  297. node));
  298. break;
  299. case ACPI_TYPE_LOCAL_BANK_FIELD:
  300. acpi_os_printf("Rgn [%4.4s] Bnk [%4.4s]",
  301. acpi_ut_get_node_name(obj_desc->
  302. common_field.
  303. region_obj->region.
  304. node),
  305. acpi_ut_get_node_name(obj_desc->
  306. bank_field.
  307. bank_obj->
  308. common_field.
  309. node));
  310. break;
  311. case ACPI_TYPE_LOCAL_INDEX_FIELD:
  312. acpi_os_printf("Idx [%4.4s] Dat [%4.4s]",
  313. acpi_ut_get_node_name(obj_desc->
  314. index_field.
  315. index_obj->
  316. common_field.node),
  317. acpi_ut_get_node_name(obj_desc->
  318. index_field.
  319. data_obj->
  320. common_field.
  321. node));
  322. break;
  323. case ACPI_TYPE_LOCAL_ALIAS:
  324. case ACPI_TYPE_LOCAL_METHOD_ALIAS:
  325. acpi_os_printf("Target %4.4s (%p)\n",
  326. acpi_ut_get_node_name(obj_desc),
  327. obj_desc);
  328. break;
  329. default:
  330. acpi_os_printf("Object %p\n", obj_desc);
  331. break;
  332. }
  333. /* Common field handling */
  334. switch (type) {
  335. case ACPI_TYPE_BUFFER_FIELD:
  336. case ACPI_TYPE_LOCAL_REGION_FIELD:
  337. case ACPI_TYPE_LOCAL_BANK_FIELD:
  338. case ACPI_TYPE_LOCAL_INDEX_FIELD:
  339. acpi_os_printf(" Off %.3X Len %.2X Acc %.2hd\n",
  340. (obj_desc->common_field.
  341. base_byte_offset * 8)
  342. +
  343. obj_desc->common_field.
  344. start_field_bit_offset,
  345. obj_desc->common_field.bit_length,
  346. obj_desc->common_field.
  347. access_byte_width);
  348. break;
  349. default:
  350. break;
  351. }
  352. break;
  353. case ACPI_DISPLAY_OBJECTS:
  354. acpi_os_printf("O:%p", obj_desc);
  355. if (!obj_desc) {
  356. /* No attached object, we are done */
  357. acpi_os_printf("\n");
  358. return (AE_OK);
  359. }
  360. acpi_os_printf("(R%u)", obj_desc->common.reference_count);
  361. switch (type) {
  362. case ACPI_TYPE_METHOD:
  363. /* Name is a Method and its AML offset/length are set */
  364. acpi_os_printf(" M:%p-%X\n", obj_desc->method.aml_start,
  365. obj_desc->method.aml_length);
  366. break;
  367. case ACPI_TYPE_INTEGER:
  368. acpi_os_printf(" I:%8.8X8.8%X\n",
  369. ACPI_FORMAT_UINT64(obj_desc->integer.
  370. value));
  371. break;
  372. case ACPI_TYPE_STRING:
  373. acpi_os_printf(" S:%p-%X\n", obj_desc->string.pointer,
  374. obj_desc->string.length);
  375. break;
  376. case ACPI_TYPE_BUFFER:
  377. acpi_os_printf(" B:%p-%X\n", obj_desc->buffer.pointer,
  378. obj_desc->buffer.length);
  379. break;
  380. default:
  381. acpi_os_printf("\n");
  382. break;
  383. }
  384. break;
  385. default:
  386. acpi_os_printf("\n");
  387. break;
  388. }
  389. /* If debug turned off, done */
  390. if (!(acpi_dbg_level & ACPI_LV_VALUES)) {
  391. return (AE_OK);
  392. }
  393. /* If there is an attached object, display it */
  394. dbg_level = acpi_dbg_level;
  395. acpi_dbg_level = 0;
  396. obj_desc = acpi_ns_get_attached_object(this_node);
  397. acpi_dbg_level = dbg_level;
  398. /* Dump attached objects */
  399. while (obj_desc) {
  400. obj_type = ACPI_TYPE_INVALID;
  401. acpi_os_printf("Attached Object %p: ", obj_desc);
  402. /* Decode the type of attached object and dump the contents */
  403. switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) {
  404. case ACPI_DESC_TYPE_NAMED:
  405. acpi_os_printf("(Ptr to Node)\n");
  406. bytes_to_dump = sizeof(struct acpi_namespace_node);
  407. ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
  408. break;
  409. case ACPI_DESC_TYPE_OPERAND:
  410. obj_type = obj_desc->common.type;
  411. if (obj_type > ACPI_TYPE_LOCAL_MAX) {
  412. acpi_os_printf
  413. ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n",
  414. obj_type);
  415. bytes_to_dump = 32;
  416. } else {
  417. acpi_os_printf
  418. ("(Pointer to ACPI Object type %.2X [%s])\n",
  419. obj_type, acpi_ut_get_type_name(obj_type));
  420. bytes_to_dump =
  421. sizeof(union acpi_operand_object);
  422. }
  423. ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
  424. break;
  425. default:
  426. break;
  427. }
  428. /* If value is NOT an internal object, we are done */
  429. if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) !=
  430. ACPI_DESC_TYPE_OPERAND) {
  431. goto cleanup;
  432. }
  433. /* Valid object, get the pointer to next level, if any */
  434. switch (obj_type) {
  435. case ACPI_TYPE_BUFFER:
  436. case ACPI_TYPE_STRING:
  437. /*
  438. * NOTE: takes advantage of common fields between string/buffer
  439. */
  440. bytes_to_dump = obj_desc->string.length;
  441. obj_desc = (void *)obj_desc->string.pointer;
  442. acpi_os_printf("(Buffer/String pointer %p length %X)\n",
  443. obj_desc, bytes_to_dump);
  444. ACPI_DUMP_BUFFER(obj_desc, bytes_to_dump);
  445. goto cleanup;
  446. case ACPI_TYPE_BUFFER_FIELD:
  447. obj_desc =
  448. (union acpi_operand_object *)obj_desc->buffer_field.
  449. buffer_obj;
  450. break;
  451. case ACPI_TYPE_PACKAGE:
  452. obj_desc = (void *)obj_desc->package.elements;
  453. break;
  454. case ACPI_TYPE_METHOD:
  455. obj_desc = (void *)obj_desc->method.aml_start;
  456. break;
  457. case ACPI_TYPE_LOCAL_REGION_FIELD:
  458. obj_desc = (void *)obj_desc->field.region_obj;
  459. break;
  460. case ACPI_TYPE_LOCAL_BANK_FIELD:
  461. obj_desc = (void *)obj_desc->bank_field.region_obj;
  462. break;
  463. case ACPI_TYPE_LOCAL_INDEX_FIELD:
  464. obj_desc = (void *)obj_desc->index_field.index_obj;
  465. break;
  466. default:
  467. goto cleanup;
  468. }
  469. obj_type = ACPI_TYPE_INVALID; /* Terminate loop after next pass */
  470. }
  471. cleanup:
  472. acpi_os_printf("\n");
  473. return (AE_OK);
  474. }
  475. #ifdef ACPI_FUTURE_USAGE
  476. /*******************************************************************************
  477. *
  478. * FUNCTION: acpi_ns_dump_objects
  479. *
  480. * PARAMETERS: type - Object type to be dumped
  481. * display_type - 0 or ACPI_DISPLAY_SUMMARY
  482. * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX
  483. * for an effectively unlimited depth.
  484. * owner_id - Dump only objects owned by this ID. Use
  485. * ACPI_UINT32_MAX to match all owners.
  486. * start_handle - Where in namespace to start/end search
  487. *
  488. * RETURN: None
  489. *
  490. * DESCRIPTION: Dump typed objects within the loaded namespace. Uses
  491. * acpi_ns_walk_namespace in conjunction with acpi_ns_dump_one_object.
  492. *
  493. ******************************************************************************/
  494. void
  495. acpi_ns_dump_objects(acpi_object_type type,
  496. u8 display_type,
  497. u32 max_depth,
  498. acpi_owner_id owner_id, acpi_handle start_handle)
  499. {
  500. struct acpi_walk_info info;
  501. acpi_status status;
  502. ACPI_FUNCTION_ENTRY();
  503. /*
  504. * Just lock the entire namespace for the duration of the dump.
  505. * We don't want any changes to the namespace during this time,
  506. * especially the temporary nodes since we are going to display
  507. * them also.
  508. */
  509. status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
  510. if (ACPI_FAILURE(status)) {
  511. acpi_os_printf("Could not acquire namespace mutex\n");
  512. return;
  513. }
  514. info.debug_level = ACPI_LV_TABLES;
  515. info.owner_id = owner_id;
  516. info.display_type = display_type;
  517. (void)acpi_ns_walk_namespace(type, start_handle, max_depth,
  518. ACPI_NS_WALK_NO_UNLOCK |
  519. ACPI_NS_WALK_TEMP_NODES,
  520. acpi_ns_dump_one_object, NULL,
  521. (void *)&info, NULL);
  522. (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
  523. }
  524. #endif /* ACPI_FUTURE_USAGE */
  525. /*******************************************************************************
  526. *
  527. * FUNCTION: acpi_ns_dump_entry
  528. *
  529. * PARAMETERS: handle - Node to be dumped
  530. * debug_level - Output level
  531. *
  532. * RETURN: None
  533. *
  534. * DESCRIPTION: Dump a single Node
  535. *
  536. ******************************************************************************/
  537. void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level)
  538. {
  539. struct acpi_walk_info info;
  540. ACPI_FUNCTION_ENTRY();
  541. info.debug_level = debug_level;
  542. info.owner_id = ACPI_OWNER_ID_MAX;
  543. info.display_type = ACPI_DISPLAY_SUMMARY;
  544. (void)acpi_ns_dump_one_object(handle, 1, &info, NULL);
  545. }
  546. #ifdef ACPI_ASL_COMPILER
  547. /*******************************************************************************
  548. *
  549. * FUNCTION: acpi_ns_dump_tables
  550. *
  551. * PARAMETERS: search_base - Root of subtree to be dumped, or
  552. * NS_ALL to dump the entire namespace
  553. * max_depth - Maximum depth of dump. Use INT_MAX
  554. * for an effectively unlimited depth.
  555. *
  556. * RETURN: None
  557. *
  558. * DESCRIPTION: Dump the name space, or a portion of it.
  559. *
  560. ******************************************************************************/
  561. void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth)
  562. {
  563. acpi_handle search_handle = search_base;
  564. ACPI_FUNCTION_TRACE(ns_dump_tables);
  565. if (!acpi_gbl_root_node) {
  566. /*
  567. * If the name space has not been initialized,
  568. * there is nothing to dump.
  569. */
  570. ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
  571. "namespace not initialized!\n"));
  572. return_VOID;
  573. }
  574. if (ACPI_NS_ALL == search_base) {
  575. /* Entire namespace */
  576. search_handle = acpi_gbl_root_node;
  577. ACPI_DEBUG_PRINT((ACPI_DB_TABLES, "\\\n"));
  578. }
  579. acpi_ns_dump_objects(ACPI_TYPE_ANY, ACPI_DISPLAY_OBJECTS, max_depth,
  580. ACPI_OWNER_ID_MAX, search_handle);
  581. return_VOID;
  582. }
  583. #endif /* _ACPI_ASL_COMPILER */
  584. #endif /* defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) */