exdump.c 22 KB

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