exdump.c 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. /******************************************************************************
  2. *
  3. * Module Name: exdump - Interpreter debug output routines
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2005, R. Byron Moore
  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 <acpi/acinterp.h>
  44. #include <acpi/amlcode.h>
  45. #include <acpi/acnamesp.h>
  46. #include <acpi/acparser.h>
  47. #define _COMPONENT ACPI_EXECUTER
  48. ACPI_MODULE_NAME ("exdump")
  49. /*
  50. * The following routines are used for debug output only
  51. */
  52. #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
  53. /*****************************************************************************
  54. *
  55. * FUNCTION: acpi_ex_dump_operand
  56. *
  57. * PARAMETERS: *obj_desc - Pointer to entry to be dumped
  58. *
  59. * RETURN: None
  60. *
  61. * DESCRIPTION: Dump an operand object
  62. *
  63. ****************************************************************************/
  64. void
  65. acpi_ex_dump_operand (
  66. union acpi_operand_object *obj_desc,
  67. u32 depth)
  68. {
  69. u32 length;
  70. u32 index;
  71. ACPI_FUNCTION_NAME ("ex_dump_operand")
  72. if (!((ACPI_LV_EXEC & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
  73. return;
  74. }
  75. if (!obj_desc) {
  76. /*
  77. * This could be a null element of a package
  78. */
  79. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
  80. return;
  81. }
  82. if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
  83. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is a NS Node: ", obj_desc));
  84. ACPI_DUMP_ENTRY (obj_desc, ACPI_LV_EXEC);
  85. return;
  86. }
  87. if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
  88. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  89. "%p is not a node or operand object: [%s]\n",
  90. obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
  91. ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object));
  92. return;
  93. }
  94. /* obj_desc is a valid object */
  95. if (depth > 0) {
  96. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
  97. depth, " ", depth, obj_desc));
  98. }
  99. else {
  100. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", obj_desc));
  101. }
  102. switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
  103. case ACPI_TYPE_LOCAL_REFERENCE:
  104. switch (obj_desc->reference.opcode) {
  105. case AML_DEBUG_OP:
  106. acpi_os_printf ("Reference: Debug\n");
  107. break;
  108. case AML_NAME_OP:
  109. ACPI_DUMP_PATHNAME (obj_desc->reference.object,
  110. "Reference: Name: ", ACPI_LV_INFO, _COMPONENT);
  111. ACPI_DUMP_ENTRY (obj_desc->reference.object, ACPI_LV_INFO);
  112. break;
  113. case AML_INDEX_OP:
  114. acpi_os_printf ("Reference: Index %p\n",
  115. obj_desc->reference.object);
  116. break;
  117. case AML_REF_OF_OP:
  118. acpi_os_printf ("Reference: (ref_of) %p\n",
  119. obj_desc->reference.object);
  120. break;
  121. case AML_ARG_OP:
  122. acpi_os_printf ("Reference: Arg%d",
  123. obj_desc->reference.offset);
  124. if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
  125. /* Value is an Integer */
  126. acpi_os_printf (" value is [%8.8X%8.8x]",
  127. ACPI_FORMAT_UINT64 (obj_desc->integer.value));
  128. }
  129. acpi_os_printf ("\n");
  130. break;
  131. case AML_LOCAL_OP:
  132. acpi_os_printf ("Reference: Local%d",
  133. obj_desc->reference.offset);
  134. if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
  135. /* Value is an Integer */
  136. acpi_os_printf (" value is [%8.8X%8.8x]",
  137. ACPI_FORMAT_UINT64 (obj_desc->integer.value));
  138. }
  139. acpi_os_printf ("\n");
  140. break;
  141. case AML_INT_NAMEPATH_OP:
  142. acpi_os_printf ("Reference.Node->Name %X\n",
  143. obj_desc->reference.node->name.integer);
  144. break;
  145. default:
  146. /* Unknown opcode */
  147. acpi_os_printf ("Unknown Reference opcode=%X\n",
  148. obj_desc->reference.opcode);
  149. break;
  150. }
  151. break;
  152. case ACPI_TYPE_BUFFER:
  153. acpi_os_printf ("Buffer len %X @ %p \n",
  154. obj_desc->buffer.length, obj_desc->buffer.pointer);
  155. length = obj_desc->buffer.length;
  156. if (length > 64) {
  157. length = 64;
  158. }
  159. /* Debug only -- dump the buffer contents */
  160. if (obj_desc->buffer.pointer) {
  161. acpi_os_printf ("Buffer Contents: ");
  162. for (index = 0; index < length; index++) {
  163. acpi_os_printf (" %02x", obj_desc->buffer.pointer[index]);
  164. }
  165. acpi_os_printf ("\n");
  166. }
  167. break;
  168. case ACPI_TYPE_INTEGER:
  169. acpi_os_printf ("Integer %8.8X%8.8X\n",
  170. ACPI_FORMAT_UINT64 (obj_desc->integer.value));
  171. break;
  172. case ACPI_TYPE_PACKAGE:
  173. acpi_os_printf ("Package [Len %X] element_array %p\n",
  174. obj_desc->package.count, obj_desc->package.elements);
  175. /*
  176. * If elements exist, package element pointer is valid,
  177. * and debug_level exceeds 1, dump package's elements.
  178. */
  179. if (obj_desc->package.count &&
  180. obj_desc->package.elements &&
  181. acpi_dbg_level > 1) {
  182. for (index = 0; index < obj_desc->package.count; index++) {
  183. acpi_ex_dump_operand (obj_desc->package.elements[index], depth+1);
  184. }
  185. }
  186. break;
  187. case ACPI_TYPE_REGION:
  188. acpi_os_printf ("Region %s (%X)",
  189. acpi_ut_get_region_name (obj_desc->region.space_id),
  190. obj_desc->region.space_id);
  191. /*
  192. * If the address and length have not been evaluated,
  193. * don't print them.
  194. */
  195. if (!(obj_desc->region.flags & AOPOBJ_DATA_VALID)) {
  196. acpi_os_printf ("\n");
  197. }
  198. else {
  199. acpi_os_printf (" base %8.8X%8.8X Length %X\n",
  200. ACPI_FORMAT_UINT64 (obj_desc->region.address),
  201. obj_desc->region.length);
  202. }
  203. break;
  204. case ACPI_TYPE_STRING:
  205. acpi_os_printf ("String length %X @ %p ",
  206. obj_desc->string.length, obj_desc->string.pointer);
  207. acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX);
  208. acpi_os_printf ("\n");
  209. break;
  210. case ACPI_TYPE_LOCAL_BANK_FIELD:
  211. acpi_os_printf ("bank_field\n");
  212. break;
  213. case ACPI_TYPE_LOCAL_REGION_FIELD:
  214. acpi_os_printf (
  215. "region_field: Bits=%X acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n",
  216. obj_desc->field.bit_length, obj_desc->field.access_byte_width,
  217. obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK,
  218. obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK,
  219. obj_desc->field.base_byte_offset, obj_desc->field.start_field_bit_offset);
  220. acpi_ex_dump_operand (obj_desc->field.region_obj, depth+1);
  221. break;
  222. case ACPI_TYPE_LOCAL_INDEX_FIELD:
  223. acpi_os_printf ("index_field\n");
  224. break;
  225. case ACPI_TYPE_BUFFER_FIELD:
  226. acpi_os_printf (
  227. "buffer_field: %X bits at byte %X bit %X of \n",
  228. obj_desc->buffer_field.bit_length, obj_desc->buffer_field.base_byte_offset,
  229. obj_desc->buffer_field.start_field_bit_offset);
  230. if (!obj_desc->buffer_field.buffer_obj) {
  231. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL* \n"));
  232. }
  233. else if (ACPI_GET_OBJECT_TYPE (obj_desc->buffer_field.buffer_obj) != ACPI_TYPE_BUFFER) {
  234. acpi_os_printf ("*not a Buffer* \n");
  235. }
  236. else {
  237. acpi_ex_dump_operand (obj_desc->buffer_field.buffer_obj, depth+1);
  238. }
  239. break;
  240. case ACPI_TYPE_EVENT:
  241. acpi_os_printf ("Event\n");
  242. break;
  243. case ACPI_TYPE_METHOD:
  244. acpi_os_printf (
  245. "Method(%X) @ %p:%X\n",
  246. obj_desc->method.param_count,
  247. obj_desc->method.aml_start, obj_desc->method.aml_length);
  248. break;
  249. case ACPI_TYPE_MUTEX:
  250. acpi_os_printf ("Mutex\n");
  251. break;
  252. case ACPI_TYPE_DEVICE:
  253. acpi_os_printf ("Device\n");
  254. break;
  255. case ACPI_TYPE_POWER:
  256. acpi_os_printf ("Power\n");
  257. break;
  258. case ACPI_TYPE_PROCESSOR:
  259. acpi_os_printf ("Processor\n");
  260. break;
  261. case ACPI_TYPE_THERMAL:
  262. acpi_os_printf ("Thermal\n");
  263. break;
  264. default:
  265. /* Unknown Type */
  266. acpi_os_printf ("Unknown Type %X\n", ACPI_GET_OBJECT_TYPE (obj_desc));
  267. break;
  268. }
  269. return;
  270. }
  271. /*****************************************************************************
  272. *
  273. * FUNCTION: acpi_ex_dump_operands
  274. *
  275. * PARAMETERS: Operands - Operand list
  276. * interpreter_mode - Load or Exec
  277. * Ident - Identification
  278. * num_levels - # of stack entries to dump above line
  279. * Note - Output notation
  280. * module_name - Caller's module name
  281. * line_number - Caller's invocation line number
  282. *
  283. * DESCRIPTION: Dump the object stack
  284. *
  285. ****************************************************************************/
  286. void
  287. acpi_ex_dump_operands (
  288. union acpi_operand_object **operands,
  289. acpi_interpreter_mode interpreter_mode,
  290. char *ident,
  291. u32 num_levels,
  292. char *note,
  293. char *module_name,
  294. u32 line_number)
  295. {
  296. acpi_native_uint i;
  297. ACPI_FUNCTION_NAME ("ex_dump_operands");
  298. if (!ident) {
  299. ident = "?";
  300. }
  301. if (!note) {
  302. note = "?";
  303. }
  304. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  305. "************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
  306. ident, num_levels));
  307. if (num_levels == 0) {
  308. num_levels = 1;
  309. }
  310. /* Dump the operand stack starting at the top */
  311. for (i = 0; num_levels > 0; i--, num_levels--) {
  312. acpi_ex_dump_operand (operands[i], 0);
  313. }
  314. ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
  315. "************* Stack dump from %s(%d), %s\n",
  316. module_name, line_number, note));
  317. return;
  318. }
  319. #ifdef ACPI_FUTURE_USAGE
  320. /*****************************************************************************
  321. *
  322. * FUNCTION: acpi_ex_out*
  323. *
  324. * PARAMETERS: Title - Descriptive text
  325. * Value - Value to be displayed
  326. *
  327. * DESCRIPTION: Object dump output formatting functions. These functions
  328. * reduce the number of format strings required and keeps them
  329. * all in one place for easy modification.
  330. *
  331. ****************************************************************************/
  332. void
  333. acpi_ex_out_string (
  334. char *title,
  335. char *value)
  336. {
  337. acpi_os_printf ("%20s : %s\n", title, value);
  338. }
  339. void
  340. acpi_ex_out_pointer (
  341. char *title,
  342. void *value)
  343. {
  344. acpi_os_printf ("%20s : %p\n", title, value);
  345. }
  346. void
  347. acpi_ex_out_integer (
  348. char *title,
  349. u32 value)
  350. {
  351. acpi_os_printf ("%20s : %X\n", title, value);
  352. }
  353. void
  354. acpi_ex_out_address (
  355. char *title,
  356. acpi_physical_address value)
  357. {
  358. #if ACPI_MACHINE_WIDTH == 16
  359. acpi_os_printf ("%20s : %p\n", title, value);
  360. #else
  361. acpi_os_printf ("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64 (value));
  362. #endif
  363. }
  364. /*****************************************************************************
  365. *
  366. * FUNCTION: acpi_ex_dump_node
  367. *
  368. * PARAMETERS: *Node - Descriptor to dump
  369. * Flags - Force display
  370. *
  371. * DESCRIPTION: Dumps the members of the given.Node
  372. *
  373. ****************************************************************************/
  374. void
  375. acpi_ex_dump_node (
  376. struct acpi_namespace_node *node,
  377. u32 flags)
  378. {
  379. ACPI_FUNCTION_ENTRY ();
  380. if (!flags) {
  381. if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
  382. return;
  383. }
  384. }
  385. acpi_os_printf ("%20s : %4.4s\n", "Name", acpi_ut_get_node_name (node));
  386. acpi_ex_out_string ("Type", acpi_ut_get_type_name (node->type));
  387. acpi_ex_out_integer ("Flags", node->flags);
  388. acpi_ex_out_integer ("Owner Id", node->owner_id);
  389. acpi_ex_out_integer ("Reference Count", node->reference_count);
  390. acpi_ex_out_pointer ("Attached Object", acpi_ns_get_attached_object (node));
  391. acpi_ex_out_pointer ("child_list", node->child);
  392. acpi_ex_out_pointer ("next_peer", node->peer);
  393. acpi_ex_out_pointer ("Parent", acpi_ns_get_parent_node (node));
  394. }
  395. /*****************************************************************************
  396. *
  397. * FUNCTION: acpi_ex_dump_object_descriptor
  398. *
  399. * PARAMETERS: *Object - Descriptor to dump
  400. * Flags - Force display
  401. *
  402. * DESCRIPTION: Dumps the members of the object descriptor given.
  403. *
  404. ****************************************************************************/
  405. void
  406. acpi_ex_dump_object_descriptor (
  407. union acpi_operand_object *obj_desc,
  408. u32 flags)
  409. {
  410. u32 i;
  411. ACPI_FUNCTION_TRACE ("ex_dump_object_descriptor");
  412. if (!flags) {
  413. if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
  414. return_VOID;
  415. }
  416. }
  417. if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
  418. acpi_ex_dump_node ((struct acpi_namespace_node *) obj_desc, flags);
  419. acpi_os_printf ("\nAttached Object (%p):\n",
  420. ((struct acpi_namespace_node *) obj_desc)->object);
  421. acpi_ex_dump_object_descriptor (
  422. ((struct acpi_namespace_node *) obj_desc)->object, flags);
  423. return_VOID;
  424. }
  425. if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
  426. acpi_os_printf (
  427. "ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n",
  428. obj_desc, acpi_ut_get_descriptor_name (obj_desc));
  429. return_VOID;
  430. }
  431. /* Common Fields */
  432. acpi_ex_out_string ("Type", acpi_ut_get_object_type_name (obj_desc));
  433. acpi_ex_out_integer ("Reference Count", obj_desc->common.reference_count);
  434. acpi_ex_out_integer ("Flags", obj_desc->common.flags);
  435. /* Object-specific Fields */
  436. switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
  437. case ACPI_TYPE_INTEGER:
  438. acpi_os_printf ("%20s : %8.8X%8.8X\n", "Value",
  439. ACPI_FORMAT_UINT64 (obj_desc->integer.value));
  440. break;
  441. case ACPI_TYPE_STRING:
  442. acpi_ex_out_integer ("Length", obj_desc->string.length);
  443. acpi_os_printf ("%20s : %p ", "Pointer", obj_desc->string.pointer);
  444. acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX);
  445. acpi_os_printf ("\n");
  446. break;
  447. case ACPI_TYPE_BUFFER:
  448. acpi_ex_out_integer ("Length", obj_desc->buffer.length);
  449. acpi_ex_out_pointer ("Pointer", obj_desc->buffer.pointer);
  450. ACPI_DUMP_BUFFER (obj_desc->buffer.pointer, obj_desc->buffer.length);
  451. break;
  452. case ACPI_TYPE_PACKAGE:
  453. acpi_ex_out_integer ("Flags", obj_desc->package.flags);
  454. acpi_ex_out_integer ("Count", obj_desc->package.count);
  455. acpi_ex_out_pointer ("Elements", obj_desc->package.elements);
  456. /* Dump the package contents */
  457. if (obj_desc->package.count > 0) {
  458. acpi_os_printf ("\nPackage Contents:\n");
  459. for (i = 0; i < obj_desc->package.count; i++) {
  460. acpi_os_printf ("[%.3d] %p", i, obj_desc->package.elements[i]);
  461. if (obj_desc->package.elements[i]) {
  462. acpi_os_printf (" %s",
  463. acpi_ut_get_object_type_name (obj_desc->package.elements[i]));
  464. }
  465. acpi_os_printf ("\n");
  466. }
  467. }
  468. break;
  469. case ACPI_TYPE_DEVICE:
  470. acpi_ex_out_pointer ("Handler", obj_desc->device.handler);
  471. acpi_ex_out_pointer ("system_notify", obj_desc->device.system_notify);
  472. acpi_ex_out_pointer ("device_notify", obj_desc->device.device_notify);
  473. break;
  474. case ACPI_TYPE_EVENT:
  475. acpi_ex_out_pointer ("Semaphore", obj_desc->event.semaphore);
  476. break;
  477. case ACPI_TYPE_METHOD:
  478. acpi_ex_out_integer ("param_count", obj_desc->method.param_count);
  479. acpi_ex_out_integer ("Concurrency", obj_desc->method.concurrency);
  480. acpi_ex_out_pointer ("Semaphore", obj_desc->method.semaphore);
  481. acpi_ex_out_integer ("owning_id", obj_desc->method.owning_id);
  482. acpi_ex_out_integer ("aml_length", obj_desc->method.aml_length);
  483. acpi_ex_out_pointer ("aml_start", obj_desc->method.aml_start);
  484. break;
  485. case ACPI_TYPE_MUTEX:
  486. acpi_ex_out_integer ("sync_level", obj_desc->mutex.sync_level);
  487. acpi_ex_out_pointer ("owner_thread", obj_desc->mutex.owner_thread);
  488. acpi_ex_out_integer ("acquire_depth", obj_desc->mutex.acquisition_depth);
  489. acpi_ex_out_pointer ("Semaphore", obj_desc->mutex.semaphore);
  490. break;
  491. case ACPI_TYPE_REGION:
  492. acpi_ex_out_integer ("space_id", obj_desc->region.space_id);
  493. acpi_ex_out_integer ("Flags", obj_desc->region.flags);
  494. acpi_ex_out_address ("Address", obj_desc->region.address);
  495. acpi_ex_out_integer ("Length", obj_desc->region.length);
  496. acpi_ex_out_pointer ("Handler", obj_desc->region.handler);
  497. acpi_ex_out_pointer ("Next", obj_desc->region.next);
  498. break;
  499. case ACPI_TYPE_POWER:
  500. acpi_ex_out_integer ("system_level", obj_desc->power_resource.system_level);
  501. acpi_ex_out_integer ("resource_order", obj_desc->power_resource.resource_order);
  502. acpi_ex_out_pointer ("system_notify", obj_desc->power_resource.system_notify);
  503. acpi_ex_out_pointer ("device_notify", obj_desc->power_resource.device_notify);
  504. break;
  505. case ACPI_TYPE_PROCESSOR:
  506. acpi_ex_out_integer ("Processor ID", obj_desc->processor.proc_id);
  507. acpi_ex_out_integer ("Length", obj_desc->processor.length);
  508. acpi_ex_out_address ("Address", (acpi_physical_address) obj_desc->processor.address);
  509. acpi_ex_out_pointer ("system_notify", obj_desc->processor.system_notify);
  510. acpi_ex_out_pointer ("device_notify", obj_desc->processor.device_notify);
  511. acpi_ex_out_pointer ("Handler", obj_desc->processor.handler);
  512. break;
  513. case ACPI_TYPE_THERMAL:
  514. acpi_ex_out_pointer ("system_notify", obj_desc->thermal_zone.system_notify);
  515. acpi_ex_out_pointer ("device_notify", obj_desc->thermal_zone.device_notify);
  516. acpi_ex_out_pointer ("Handler", obj_desc->thermal_zone.handler);
  517. break;
  518. case ACPI_TYPE_BUFFER_FIELD:
  519. case ACPI_TYPE_LOCAL_REGION_FIELD:
  520. case ACPI_TYPE_LOCAL_BANK_FIELD:
  521. case ACPI_TYPE_LOCAL_INDEX_FIELD:
  522. acpi_ex_out_integer ("field_flags", obj_desc->common_field.field_flags);
  523. acpi_ex_out_integer ("access_byte_width",obj_desc->common_field.access_byte_width);
  524. acpi_ex_out_integer ("bit_length", obj_desc->common_field.bit_length);
  525. acpi_ex_out_integer ("fld_bit_offset", obj_desc->common_field.start_field_bit_offset);
  526. acpi_ex_out_integer ("base_byte_offset", obj_desc->common_field.base_byte_offset);
  527. acpi_ex_out_pointer ("parent_node", obj_desc->common_field.node);
  528. switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
  529. case ACPI_TYPE_BUFFER_FIELD:
  530. acpi_ex_out_pointer ("buffer_obj", obj_desc->buffer_field.buffer_obj);
  531. break;
  532. case ACPI_TYPE_LOCAL_REGION_FIELD:
  533. acpi_ex_out_pointer ("region_obj", obj_desc->field.region_obj);
  534. break;
  535. case ACPI_TYPE_LOCAL_BANK_FIELD:
  536. acpi_ex_out_integer ("Value", obj_desc->bank_field.value);
  537. acpi_ex_out_pointer ("region_obj", obj_desc->bank_field.region_obj);
  538. acpi_ex_out_pointer ("bank_obj", obj_desc->bank_field.bank_obj);
  539. break;
  540. case ACPI_TYPE_LOCAL_INDEX_FIELD:
  541. acpi_ex_out_integer ("Value", obj_desc->index_field.value);
  542. acpi_ex_out_pointer ("Index", obj_desc->index_field.index_obj);
  543. acpi_ex_out_pointer ("Data", obj_desc->index_field.data_obj);
  544. break;
  545. default:
  546. /* All object types covered above */
  547. break;
  548. }
  549. break;
  550. case ACPI_TYPE_LOCAL_REFERENCE:
  551. acpi_ex_out_integer ("target_type", obj_desc->reference.target_type);
  552. acpi_ex_out_string ("Opcode", (acpi_ps_get_opcode_info (obj_desc->reference.opcode))->name);
  553. acpi_ex_out_integer ("Offset", obj_desc->reference.offset);
  554. acpi_ex_out_pointer ("obj_desc", obj_desc->reference.object);
  555. acpi_ex_out_pointer ("Node", obj_desc->reference.node);
  556. acpi_ex_out_pointer ("Where", obj_desc->reference.where);
  557. break;
  558. case ACPI_TYPE_LOCAL_ADDRESS_HANDLER:
  559. acpi_ex_out_integer ("space_id", obj_desc->address_space.space_id);
  560. acpi_ex_out_pointer ("Next", obj_desc->address_space.next);
  561. acpi_ex_out_pointer ("region_list", obj_desc->address_space.region_list);
  562. acpi_ex_out_pointer ("Node", obj_desc->address_space.node);
  563. acpi_ex_out_pointer ("Context", obj_desc->address_space.context);
  564. break;
  565. case ACPI_TYPE_LOCAL_NOTIFY:
  566. acpi_ex_out_pointer ("Node", obj_desc->notify.node);
  567. acpi_ex_out_pointer ("Context", obj_desc->notify.context);
  568. break;
  569. case ACPI_TYPE_LOCAL_ALIAS:
  570. case ACPI_TYPE_LOCAL_METHOD_ALIAS:
  571. case ACPI_TYPE_LOCAL_EXTRA:
  572. case ACPI_TYPE_LOCAL_DATA:
  573. default:
  574. acpi_os_printf (
  575. "ex_dump_object_descriptor: Display not implemented for object type %s\n",
  576. acpi_ut_get_object_type_name (obj_desc));
  577. break;
  578. }
  579. return_VOID;
  580. }
  581. #endif /* ACPI_FUTURE_USAGE */
  582. #endif