diff options
-rw-r--r-- | drivers/acpi/acpica/acinterp.h | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/exdump.c | 229 |
2 files changed, 199 insertions, 34 deletions
diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h index 277f4d03c080..fc222d69e2ab 100644 --- a/drivers/acpi/acpica/acinterp.h +++ b/drivers/acpi/acpica/acinterp.h | |||
@@ -89,6 +89,10 @@ typedef const struct acpi_exdump_info { | |||
89 | #define ACPI_EXD_PACKAGE 11 | 89 | #define ACPI_EXD_PACKAGE 11 |
90 | #define ACPI_EXD_FIELD 12 | 90 | #define ACPI_EXD_FIELD 12 |
91 | #define ACPI_EXD_REFERENCE 13 | 91 | #define ACPI_EXD_REFERENCE 13 |
92 | #define ACPI_EXD_LIST 14 /* Operand object list */ | ||
93 | #define ACPI_EXD_HDLR_LIST 15 /* Address Handler list */ | ||
94 | #define ACPI_EXD_RGN_LIST 16 /* Region list */ | ||
95 | #define ACPI_EXD_NODE 17 /* Namespace Node */ | ||
92 | 96 | ||
93 | /* restore default alignment */ | 97 | /* restore default alignment */ |
94 | 98 | ||
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c index c3e419c23d17..973fdae00f94 100644 --- a/drivers/acpi/acpica/exdump.c +++ b/drivers/acpi/acpica/exdump.c | |||
@@ -94,12 +94,13 @@ static struct acpi_exdump_info acpi_ex_dump_buffer[5] = { | |||
94 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL}, | 94 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL}, |
95 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"}, | 95 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"}, |
96 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"}, | 96 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"}, |
97 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.node), "Parent Node"}, | 97 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(buffer.node), "Parent Node"}, |
98 | {ACPI_EXD_BUFFER, 0, NULL} | 98 | {ACPI_EXD_BUFFER, 0, NULL} |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static struct acpi_exdump_info acpi_ex_dump_package[5] = { | 101 | static struct acpi_exdump_info acpi_ex_dump_package[6] = { |
102 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL}, | 102 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL}, |
103 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(package.node), "Parent Node"}, | ||
103 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"}, | 104 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"}, |
104 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"}, | 105 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"}, |
105 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"}, | 106 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"}, |
@@ -108,11 +109,11 @@ static struct acpi_exdump_info acpi_ex_dump_package[5] = { | |||
108 | 109 | ||
109 | static struct acpi_exdump_info acpi_ex_dump_device[4] = { | 110 | static struct acpi_exdump_info acpi_ex_dump_device[4] = { |
110 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, | 111 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, |
111 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"}, | ||
112 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[0]), | 112 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[0]), |
113 | "System Notify"}, | 113 | "System Notify"}, |
114 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[1]), | 114 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[1]), |
115 | "Device Notify"} | 115 | "Device Notify"}, |
116 | {ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(device.handler), "Handler"} | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | static struct acpi_exdump_info acpi_ex_dump_event[2] = { | 119 | static struct acpi_exdump_info acpi_ex_dump_event[2] = { |
@@ -142,17 +143,18 @@ static struct acpi_exdump_info acpi_ex_dump_mutex[5] = { | |||
142 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.os_mutex), "OsMutex"} | 143 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.os_mutex), "OsMutex"} |
143 | }; | 144 | }; |
144 | 145 | ||
145 | static struct acpi_exdump_info acpi_ex_dump_region[7] = { | 146 | static struct acpi_exdump_info acpi_ex_dump_region[8] = { |
146 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL}, | 147 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL}, |
147 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"}, | 148 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"}, |
148 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"}, | 149 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"}, |
150 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(region.node), "Parent Node"}, | ||
149 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"}, | 151 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"}, |
150 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"}, | 152 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"}, |
151 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.handler), "Handler"}, | 153 | {ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(region.handler), "Handler"}, |
152 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"} | 154 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"} |
153 | }; | 155 | }; |
154 | 156 | ||
155 | static struct acpi_exdump_info acpi_ex_dump_power[5] = { | 157 | static struct acpi_exdump_info acpi_ex_dump_power[6] = { |
156 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL}, | 158 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL}, |
157 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level), | 159 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level), |
158 | "System Level"}, | 160 | "System Level"}, |
@@ -161,7 +163,8 @@ static struct acpi_exdump_info acpi_ex_dump_power[5] = { | |||
161 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[0]), | 163 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[0]), |
162 | "System Notify"}, | 164 | "System Notify"}, |
163 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[1]), | 165 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[1]), |
164 | "Device Notify"} | 166 | "Device Notify"}, |
167 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.handler), "Handler"} | ||
165 | }; | 168 | }; |
166 | 169 | ||
167 | static struct acpi_exdump_info acpi_ex_dump_processor[7] = { | 170 | static struct acpi_exdump_info acpi_ex_dump_processor[7] = { |
@@ -225,7 +228,7 @@ static struct acpi_exdump_info acpi_ex_dump_reference[8] = { | |||
225 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, | 228 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, |
226 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"}, | 229 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"}, |
227 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, | 230 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, |
228 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, | 231 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(reference.node), "Node"}, |
229 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, | 232 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, |
230 | {ACPI_EXD_REFERENCE, 0, NULL} | 233 | {ACPI_EXD_REFERENCE, 0, NULL} |
231 | }; | 234 | }; |
@@ -234,16 +237,16 @@ static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = { | |||
234 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler), | 237 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler), |
235 | NULL}, | 238 | NULL}, |
236 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"}, | 239 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"}, |
237 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.next), "Next"}, | 240 | {ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(address_space.next), "Next"}, |
238 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.region_list), | 241 | {ACPI_EXD_RGN_LIST, ACPI_EXD_OFFSET(address_space.region_list), |
239 | "Region List"}, | 242 | "Region List"}, |
240 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.node), "Node"}, | 243 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(address_space.node), "Node"}, |
241 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} | 244 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} |
242 | }; | 245 | }; |
243 | 246 | ||
244 | static struct acpi_exdump_info acpi_ex_dump_notify[7] = { | 247 | static struct acpi_exdump_info acpi_ex_dump_notify[7] = { |
245 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, | 248 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, |
246 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"}, | 249 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(notify.node), "Node"}, |
247 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(notify.handler_type), "Handler Type"}, | 250 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(notify.handler_type), "Handler Type"}, |
248 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.handler), "Handler"}, | 251 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.handler), "Handler"}, |
249 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"}, | 252 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"}, |
@@ -252,14 +255,31 @@ static struct acpi_exdump_info acpi_ex_dump_notify[7] = { | |||
252 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.next[1]), "Next Device Notify"} | 255 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.next[1]), "Next Device Notify"} |
253 | }; | 256 | }; |
254 | 257 | ||
258 | static struct acpi_exdump_info acpi_ex_dump_extra[6] = { | ||
259 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_extra), NULL}, | ||
260 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.method_REG), "_REG Method"}, | ||
261 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(extra.scope_node), "Scope Node"}, | ||
262 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.region_context), | ||
263 | "Region Context"}, | ||
264 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.aml_start), "Aml Start"}, | ||
265 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(extra.aml_length), "Aml Length"} | ||
266 | }; | ||
267 | |||
268 | static struct acpi_exdump_info acpi_ex_dump_data[3] = { | ||
269 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_data), NULL}, | ||
270 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(data.handler), "Handler"}, | ||
271 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(data.pointer), "Raw Data"} | ||
272 | }; | ||
273 | |||
255 | /* Miscellaneous tables */ | 274 | /* Miscellaneous tables */ |
256 | 275 | ||
257 | static struct acpi_exdump_info acpi_ex_dump_common[4] = { | 276 | static struct acpi_exdump_info acpi_ex_dump_common[5] = { |
258 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL}, | 277 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL}, |
259 | {ACPI_EXD_TYPE, 0, NULL}, | 278 | {ACPI_EXD_TYPE, 0, NULL}, |
260 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count), | 279 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count), |
261 | "Reference Count"}, | 280 | "Reference Count"}, |
262 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"} | 281 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"}, |
282 | {ACPI_EXD_LIST, ACPI_EXD_OFFSET(common.next_object), "Object List"} | ||
263 | }; | 283 | }; |
264 | 284 | ||
265 | static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { | 285 | static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { |
@@ -274,15 +294,17 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { | |||
274 | "Field Bit Offset"}, | 294 | "Field Bit Offset"}, |
275 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset), | 295 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset), |
276 | "Base Byte Offset"}, | 296 | "Base Byte Offset"}, |
277 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} | 297 | {ACPI_EXD_NODE, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} |
278 | }; | 298 | }; |
279 | 299 | ||
280 | static struct acpi_exdump_info acpi_ex_dump_node[5] = { | 300 | static struct acpi_exdump_info acpi_ex_dump_node[7] = { |
281 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, | 301 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, |
282 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, | 302 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, |
283 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, | 303 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, |
284 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, | 304 | {ACPI_EXD_LIST, ACPI_EXD_NSOFFSET(object), "Object List"}, |
285 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} | 305 | {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(parent), "Parent"}, |
306 | {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(child), "Child"}, | ||
307 | {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(peer), "Peer"} | ||
286 | }; | 308 | }; |
287 | 309 | ||
288 | /* Dispatch table, indexed by object type */ | 310 | /* Dispatch table, indexed by object type */ |
@@ -315,7 +337,9 @@ static struct acpi_exdump_info *acpi_ex_dump_info[] = { | |||
315 | acpi_ex_dump_address_handler, | 337 | acpi_ex_dump_address_handler, |
316 | NULL, | 338 | NULL, |
317 | NULL, | 339 | NULL, |
318 | NULL | 340 | NULL, |
341 | acpi_ex_dump_extra, | ||
342 | acpi_ex_dump_data | ||
319 | }; | 343 | }; |
320 | 344 | ||
321 | /******************************************************************************* | 345 | /******************************************************************************* |
@@ -340,6 +364,10 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
340 | char *name; | 364 | char *name; |
341 | const char *reference_name; | 365 | const char *reference_name; |
342 | u8 count; | 366 | u8 count; |
367 | union acpi_operand_object *start; | ||
368 | union acpi_operand_object *data = NULL; | ||
369 | union acpi_operand_object *next; | ||
370 | struct acpi_namespace_node *node; | ||
343 | 371 | ||
344 | if (!info) { | 372 | if (!info) { |
345 | acpi_os_printf | 373 | acpi_os_printf |
@@ -363,9 +391,9 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
363 | 391 | ||
364 | case ACPI_EXD_TYPE: | 392 | case ACPI_EXD_TYPE: |
365 | 393 | ||
366 | acpi_ex_out_string("Type", | 394 | acpi_os_printf("%20s : %2.2X [%s]\n", "Type", |
367 | acpi_ut_get_object_type_name | 395 | obj_desc->common.type, |
368 | (obj_desc)); | 396 | acpi_ut_get_object_type_name(obj_desc)); |
369 | break; | 397 | break; |
370 | 398 | ||
371 | case ACPI_EXD_UINT8: | 399 | case ACPI_EXD_UINT8: |
@@ -433,6 +461,121 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
433 | acpi_ex_dump_reference_obj(obj_desc); | 461 | acpi_ex_dump_reference_obj(obj_desc); |
434 | break; | 462 | break; |
435 | 463 | ||
464 | case ACPI_EXD_LIST: | ||
465 | |||
466 | start = *ACPI_CAST_PTR(void *, target); | ||
467 | next = start; | ||
468 | |||
469 | acpi_os_printf("%20s : %p", name, next); | ||
470 | if (next) { | ||
471 | acpi_os_printf("(%s %2.2X)", | ||
472 | acpi_ut_get_object_type_name | ||
473 | (next), next->common.type); | ||
474 | |||
475 | while (next->common.next_object) { | ||
476 | if ((next->common.type == | ||
477 | ACPI_TYPE_LOCAL_DATA) && !data) { | ||
478 | data = next; | ||
479 | } | ||
480 | |||
481 | next = next->common.next_object; | ||
482 | acpi_os_printf("->%p(%s %2.2X)", next, | ||
483 | acpi_ut_get_object_type_name | ||
484 | (next), | ||
485 | next->common.type); | ||
486 | |||
487 | if ((next == start) || (next == data)) { | ||
488 | acpi_os_printf | ||
489 | ("\n**** Error: Object list appears to be circular linked"); | ||
490 | break; | ||
491 | } | ||
492 | } | ||
493 | } | ||
494 | |||
495 | acpi_os_printf("\n", next); | ||
496 | break; | ||
497 | |||
498 | case ACPI_EXD_HDLR_LIST: | ||
499 | |||
500 | start = *ACPI_CAST_PTR(void *, target); | ||
501 | next = start; | ||
502 | |||
503 | acpi_os_printf("%20s : %p", name, next); | ||
504 | if (next) { | ||
505 | acpi_os_printf("(%s %2.2X)", | ||
506 | acpi_ut_get_object_type_name | ||
507 | (next), next->common.type); | ||
508 | |||
509 | while (next->address_space.next) { | ||
510 | if ((next->common.type == | ||
511 | ACPI_TYPE_LOCAL_DATA) && !data) { | ||
512 | data = next; | ||
513 | } | ||
514 | |||
515 | next = next->address_space.next; | ||
516 | acpi_os_printf("->%p(%s %2.2X)", next, | ||
517 | acpi_ut_get_object_type_name | ||
518 | (next), | ||
519 | next->common.type); | ||
520 | |||
521 | if ((next == start) || (next == data)) { | ||
522 | acpi_os_printf | ||
523 | ("\n**** Error: Handler list appears to be circular linked"); | ||
524 | break; | ||
525 | } | ||
526 | } | ||
527 | } | ||
528 | |||
529 | acpi_os_printf("\n", next); | ||
530 | break; | ||
531 | |||
532 | case ACPI_EXD_RGN_LIST: | ||
533 | |||
534 | start = *ACPI_CAST_PTR(void *, target); | ||
535 | next = start; | ||
536 | |||
537 | acpi_os_printf("%20s : %p", name, next); | ||
538 | if (next) { | ||
539 | acpi_os_printf("(%s %2.2X)", | ||
540 | acpi_ut_get_object_type_name | ||
541 | (next), next->common.type); | ||
542 | |||
543 | while (next->region.next) { | ||
544 | if ((next->common.type == | ||
545 | ACPI_TYPE_LOCAL_DATA) && !data) { | ||
546 | data = next; | ||
547 | } | ||
548 | |||
549 | next = next->region.next; | ||
550 | acpi_os_printf("->%p(%s %2.2X)", next, | ||
551 | acpi_ut_get_object_type_name | ||
552 | (next), | ||
553 | next->common.type); | ||
554 | |||
555 | if ((next == start) || (next == data)) { | ||
556 | acpi_os_printf | ||
557 | ("\n**** Error: Region list appears to be circular linked"); | ||
558 | break; | ||
559 | } | ||
560 | } | ||
561 | } | ||
562 | |||
563 | acpi_os_printf("\n", next); | ||
564 | break; | ||
565 | |||
566 | case ACPI_EXD_NODE: | ||
567 | |||
568 | node = | ||
569 | *ACPI_CAST_PTR(struct acpi_namespace_node *, | ||
570 | target); | ||
571 | |||
572 | acpi_os_printf("%20s : %p", name, node); | ||
573 | if (node) { | ||
574 | acpi_os_printf(" [%4.4s]", node->name.ascii); | ||
575 | } | ||
576 | acpi_os_printf("\n"); | ||
577 | break; | ||
578 | |||
436 | default: | 579 | default: |
437 | 580 | ||
438 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", | 581 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", |
@@ -821,10 +964,8 @@ void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags) | |||
821 | } | 964 | } |
822 | 965 | ||
823 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); | 966 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); |
824 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); | 967 | acpi_os_printf("%20s : %2.2X [%s]\n", "Type", |
825 | acpi_ex_out_pointer("Attached Object", | 968 | node->type, acpi_ut_get_type_name(node->type)); |
826 | acpi_ns_get_attached_object(node)); | ||
827 | acpi_ex_out_pointer("Parent", node->parent); | ||
828 | 969 | ||
829 | acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node), | 970 | acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node), |
830 | acpi_ex_dump_node); | 971 | acpi_ex_dump_node); |
@@ -1017,22 +1158,26 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
1017 | ((struct acpi_namespace_node *)obj_desc)-> | 1158 | ((struct acpi_namespace_node *)obj_desc)-> |
1018 | object); | 1159 | object); |
1019 | 1160 | ||
1020 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) | 1161 | obj_desc = ((struct acpi_namespace_node *)obj_desc)->object; |
1021 | obj_desc)->object, flags); | 1162 | goto dump_object; |
1022 | return_VOID; | ||
1023 | } | 1163 | } |
1024 | 1164 | ||
1025 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { | 1165 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { |
1026 | acpi_os_printf | 1166 | acpi_os_printf("%p is not an ACPI operand object: [%s]\n", |
1027 | ("ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n", | 1167 | obj_desc, acpi_ut_get_descriptor_name(obj_desc)); |
1028 | obj_desc, acpi_ut_get_descriptor_name(obj_desc)); | ||
1029 | return_VOID; | 1168 | return_VOID; |
1030 | } | 1169 | } |
1031 | 1170 | ||
1032 | if (obj_desc->common.type > ACPI_TYPE_NS_NODE_MAX) { | 1171 | /* Validate the object type */ |
1172 | |||
1173 | if (obj_desc->common.type > ACPI_TYPE_LOCAL_MAX) { | ||
1174 | acpi_os_printf("Not a known object type: %2.2X\n", | ||
1175 | obj_desc->common.type); | ||
1033 | return_VOID; | 1176 | return_VOID; |
1034 | } | 1177 | } |
1035 | 1178 | ||
1179 | dump_object: | ||
1180 | |||
1036 | /* Common Fields */ | 1181 | /* Common Fields */ |
1037 | 1182 | ||
1038 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_common); | 1183 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_common); |
@@ -1040,6 +1185,22 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
1040 | /* Object-specific fields */ | 1185 | /* Object-specific fields */ |
1041 | 1186 | ||
1042 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]); | 1187 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]); |
1188 | |||
1189 | if (obj_desc->common.type == ACPI_TYPE_REGION) { | ||
1190 | obj_desc = obj_desc->common.next_object; | ||
1191 | if (obj_desc->common.type > ACPI_TYPE_LOCAL_MAX) { | ||
1192 | acpi_os_printf | ||
1193 | ("Secondary object is not a known object type: %2.2X\n", | ||
1194 | obj_desc->common.type); | ||
1195 | |||
1196 | return_VOID; | ||
1197 | } | ||
1198 | |||
1199 | acpi_os_printf("\nExtra attached Object (%p):\n", obj_desc); | ||
1200 | acpi_ex_dump_object(obj_desc, | ||
1201 | acpi_ex_dump_info[obj_desc->common.type]); | ||
1202 | } | ||
1203 | |||
1043 | return_VOID; | 1204 | return_VOID; |
1044 | } | 1205 | } |
1045 | 1206 | ||