diff options
Diffstat (limited to 'drivers/acpi/executer/exdump.c')
| -rw-r--r-- | drivers/acpi/executer/exdump.c | 671 |
1 files changed, 410 insertions, 261 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index bc2fa996047e..a7cca8d4f855 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -55,20 +55,386 @@ ACPI_MODULE_NAME("exdump") | |||
| 55 | */ | 55 | */ |
| 56 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 56 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
| 57 | /* Local prototypes */ | 57 | /* Local prototypes */ |
| 58 | #ifdef ACPI_FUTURE_USAGE | ||
| 59 | static void acpi_ex_out_string(char *title, char *value); | 58 | static void acpi_ex_out_string(char *title, char *value); |
| 60 | 59 | ||
| 61 | static void acpi_ex_out_pointer(char *title, void *value); | 60 | static void acpi_ex_out_pointer(char *title, void *value); |
| 62 | 61 | ||
| 63 | static void acpi_ex_out_integer(char *title, u32 value); | ||
| 64 | |||
| 65 | static void acpi_ex_out_address(char *title, acpi_physical_address value); | 62 | static void acpi_ex_out_address(char *title, acpi_physical_address value); |
| 66 | 63 | ||
| 67 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc); | 64 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc); |
| 68 | 65 | ||
| 69 | static void | 66 | static void |
| 70 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index); | 67 | acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, |
| 71 | #endif /* ACPI_FUTURE_USAGE */ | 68 | u32 level, u32 index); |
| 69 | |||
| 70 | /******************************************************************************* | ||
| 71 | * | ||
| 72 | * Object Descriptor info tables | ||
| 73 | * | ||
| 74 | * Note: The first table entry must be an INIT opcode and must contain | ||
| 75 | * the table length (number of table entries) | ||
| 76 | * | ||
| 77 | ******************************************************************************/ | ||
| 78 | |||
| 79 | static struct acpi_exdump_info acpi_ex_dump_integer[2] = { | ||
| 80 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_integer), NULL}, | ||
| 81 | {ACPI_EXD_UINT64, ACPI_EXD_OFFSET(integer.value), "Value"} | ||
| 82 | }; | ||
| 83 | |||
| 84 | static struct acpi_exdump_info acpi_ex_dump_string[4] = { | ||
| 85 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_string), NULL}, | ||
| 86 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(string.length), "Length"}, | ||
| 87 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(string.pointer), "Pointer"}, | ||
| 88 | {ACPI_EXD_STRING, 0, NULL} | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct acpi_exdump_info acpi_ex_dump_buffer[4] = { | ||
| 92 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL}, | ||
| 93 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"}, | ||
| 94 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"}, | ||
| 95 | {ACPI_EXD_BUFFER, 0, NULL} | ||
| 96 | }; | ||
| 97 | |||
| 98 | static struct acpi_exdump_info acpi_ex_dump_package[5] = { | ||
| 99 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL}, | ||
| 100 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"}, | ||
| 101 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"}, | ||
| 102 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"}, | ||
| 103 | {ACPI_EXD_PACKAGE, 0, NULL} | ||
| 104 | }; | ||
| 105 | |||
| 106 | static struct acpi_exdump_info acpi_ex_dump_device[4] = { | ||
| 107 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, | ||
| 108 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"}, | ||
| 109 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.system_notify), | ||
| 110 | "System Notify"}, | ||
| 111 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.device_notify), | ||
| 112 | "Device Notify"} | ||
| 113 | }; | ||
| 114 | |||
| 115 | static struct acpi_exdump_info acpi_ex_dump_event[2] = { | ||
| 116 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_event), NULL}, | ||
| 117 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.semaphore), "Semaphore"} | ||
| 118 | }; | ||
| 119 | |||
| 120 | static struct acpi_exdump_info acpi_ex_dump_method[8] = { | ||
| 121 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL}, | ||
| 122 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "param_count"}, | ||
| 123 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"}, | ||
| 124 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"}, | ||
| 125 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, | ||
| 126 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"}, | ||
| 127 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"}, | ||
| 128 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"} | ||
| 129 | }; | ||
| 130 | |||
| 131 | static struct acpi_exdump_info acpi_ex_dump_mutex[5] = { | ||
| 132 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_mutex), NULL}, | ||
| 133 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(mutex.sync_level), "Sync Level"}, | ||
| 134 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.owner_thread), "Owner Thread"}, | ||
| 135 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(mutex.acquisition_depth), | ||
| 136 | "Acquire Depth"}, | ||
| 137 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.semaphore), "Semaphore"} | ||
| 138 | }; | ||
| 139 | |||
| 140 | static struct acpi_exdump_info acpi_ex_dump_region[7] = { | ||
| 141 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL}, | ||
| 142 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"}, | ||
| 143 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"}, | ||
| 144 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"}, | ||
| 145 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"}, | ||
| 146 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.handler), "Handler"}, | ||
| 147 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"} | ||
| 148 | }; | ||
| 149 | |||
| 150 | static struct acpi_exdump_info acpi_ex_dump_power[5] = { | ||
| 151 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL}, | ||
| 152 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level), | ||
| 153 | "System Level"}, | ||
| 154 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.resource_order), | ||
| 155 | "Resource Order"}, | ||
| 156 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.system_notify), | ||
| 157 | "System Notify"}, | ||
| 158 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.device_notify), | ||
| 159 | "Device Notify"} | ||
| 160 | }; | ||
| 161 | |||
| 162 | static struct acpi_exdump_info acpi_ex_dump_processor[7] = { | ||
| 163 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_processor), NULL}, | ||
| 164 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"}, | ||
| 165 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.length), "Length"}, | ||
| 166 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"}, | ||
| 167 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.system_notify), | ||
| 168 | "System Notify"}, | ||
| 169 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.device_notify), | ||
| 170 | "Device Notify"}, | ||
| 171 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.handler), "Handler"} | ||
| 172 | }; | ||
| 173 | |||
| 174 | static struct acpi_exdump_info acpi_ex_dump_thermal[4] = { | ||
| 175 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_thermal), NULL}, | ||
| 176 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.system_notify), | ||
| 177 | "System Notify"}, | ||
| 178 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.device_notify), | ||
| 179 | "Device Notify"}, | ||
| 180 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.handler), "Handler"} | ||
| 181 | }; | ||
| 182 | |||
| 183 | static struct acpi_exdump_info acpi_ex_dump_buffer_field[3] = { | ||
| 184 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer_field), NULL}, | ||
| 185 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 186 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer_field.buffer_obj), | ||
| 187 | "Buffer Object"} | ||
| 188 | }; | ||
| 189 | |||
| 190 | static struct acpi_exdump_info acpi_ex_dump_region_field[3] = { | ||
| 191 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region_field), NULL}, | ||
| 192 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 193 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"} | ||
| 194 | }; | ||
| 195 | |||
| 196 | static struct acpi_exdump_info acpi_ex_dump_bank_field[5] = { | ||
| 197 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL}, | ||
| 198 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 199 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(bank_field.value), "Value"}, | ||
| 200 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.region_obj), | ||
| 201 | "Region Object"}, | ||
| 202 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.bank_obj), "Bank Object"} | ||
| 203 | }; | ||
| 204 | |||
| 205 | static struct acpi_exdump_info acpi_ex_dump_index_field[5] = { | ||
| 206 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL}, | ||
| 207 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 208 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(index_field.value), "Value"}, | ||
| 209 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.index_obj), | ||
| 210 | "Index Object"}, | ||
| 211 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} | ||
| 212 | }; | ||
| 213 | |||
| 214 | static struct acpi_exdump_info acpi_ex_dump_reference[7] = { | ||
| 215 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, | ||
| 216 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, | ||
| 217 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"}, | ||
| 218 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, | ||
| 219 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, | ||
| 220 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, | ||
| 221 | {ACPI_EXD_REFERENCE, 0, NULL} | ||
| 222 | }; | ||
| 223 | |||
| 224 | static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = { | ||
| 225 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler), | ||
| 226 | NULL}, | ||
| 227 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"}, | ||
| 228 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.next), "Next"}, | ||
| 229 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.region_list), | ||
| 230 | "Region List"}, | ||
| 231 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.node), "Node"}, | ||
| 232 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} | ||
| 233 | }; | ||
| 234 | |||
| 235 | static struct acpi_exdump_info acpi_ex_dump_notify[3] = { | ||
| 236 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, | ||
| 237 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"}, | ||
| 238 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"} | ||
| 239 | }; | ||
| 240 | |||
| 241 | /* Miscellaneous tables */ | ||
| 242 | |||
| 243 | static struct acpi_exdump_info acpi_ex_dump_common[4] = { | ||
| 244 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL}, | ||
| 245 | {ACPI_EXD_TYPE, 0, NULL}, | ||
| 246 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count), | ||
| 247 | "Reference Count"}, | ||
| 248 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"} | ||
| 249 | }; | ||
| 250 | |||
| 251 | static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { | ||
| 252 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_field_common), NULL}, | ||
| 253 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.field_flags), | ||
| 254 | "Field Flags"}, | ||
| 255 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.access_byte_width), | ||
| 256 | "Access Byte Width"}, | ||
| 257 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.bit_length), | ||
| 258 | "Bit Length"}, | ||
| 259 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.start_field_bit_offset), | ||
| 260 | "Field Bit Offset"}, | ||
| 261 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset), | ||
| 262 | "Base Byte Offset"}, | ||
| 263 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} | ||
| 264 | }; | ||
| 265 | |||
| 266 | static struct acpi_exdump_info acpi_ex_dump_node[6] = { | ||
| 267 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, | ||
| 268 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, | ||
| 269 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, | ||
| 270 | {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(reference_count), | ||
| 271 | "Reference Count"}, | ||
| 272 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, | ||
| 273 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} | ||
| 274 | }; | ||
| 275 | |||
| 276 | /* Dispatch table, indexed by object type */ | ||
| 277 | |||
| 278 | static struct acpi_exdump_info *acpi_ex_dump_info[] = { | ||
| 279 | NULL, | ||
| 280 | acpi_ex_dump_integer, | ||
| 281 | acpi_ex_dump_string, | ||
| 282 | acpi_ex_dump_buffer, | ||
| 283 | acpi_ex_dump_package, | ||
| 284 | NULL, | ||
| 285 | acpi_ex_dump_device, | ||
| 286 | acpi_ex_dump_event, | ||
| 287 | acpi_ex_dump_method, | ||
| 288 | acpi_ex_dump_mutex, | ||
| 289 | acpi_ex_dump_region, | ||
| 290 | acpi_ex_dump_power, | ||
| 291 | acpi_ex_dump_processor, | ||
| 292 | acpi_ex_dump_thermal, | ||
| 293 | acpi_ex_dump_buffer_field, | ||
| 294 | NULL, | ||
| 295 | NULL, | ||
| 296 | acpi_ex_dump_region_field, | ||
| 297 | acpi_ex_dump_bank_field, | ||
| 298 | acpi_ex_dump_index_field, | ||
| 299 | acpi_ex_dump_reference, | ||
| 300 | NULL, | ||
| 301 | NULL, | ||
| 302 | acpi_ex_dump_notify, | ||
| 303 | acpi_ex_dump_address_handler, | ||
| 304 | NULL, | ||
| 305 | NULL, | ||
| 306 | NULL | ||
| 307 | }; | ||
| 308 | |||
| 309 | /******************************************************************************* | ||
| 310 | * | ||
| 311 | * FUNCTION: acpi_ex_dump_object | ||
| 312 | * | ||
| 313 | * PARAMETERS: obj_desc - Descriptor to dump | ||
| 314 | * Info - Info table corresponding to this object | ||
| 315 | * type | ||
| 316 | * | ||
| 317 | * RETURN: None | ||
| 318 | * | ||
| 319 | * DESCRIPTION: Walk the info table for this object | ||
| 320 | * | ||
| 321 | ******************************************************************************/ | ||
| 322 | |||
| 323 | static void | ||
| 324 | acpi_ex_dump_object(union acpi_operand_object *obj_desc, | ||
| 325 | struct acpi_exdump_info *info) | ||
| 326 | { | ||
| 327 | u8 *target; | ||
| 328 | char *name; | ||
| 329 | u8 count; | ||
| 330 | |||
| 331 | if (!info) { | ||
| 332 | acpi_os_printf | ||
| 333 | ("ex_dump_object: Display not implemented for object type %s\n", | ||
| 334 | acpi_ut_get_object_type_name(obj_desc)); | ||
| 335 | return; | ||
| 336 | } | ||
| 337 | |||
| 338 | /* First table entry must contain the table length (# of table entries) */ | ||
| 339 | |||
| 340 | count = info->offset; | ||
| 341 | |||
| 342 | while (count) { | ||
| 343 | target = ACPI_ADD_PTR(u8, obj_desc, info->offset); | ||
| 344 | name = info->name; | ||
| 345 | |||
| 346 | switch (info->opcode) { | ||
| 347 | case ACPI_EXD_INIT: | ||
| 348 | break; | ||
| 349 | |||
| 350 | case ACPI_EXD_TYPE: | ||
| 351 | acpi_ex_out_string("Type", | ||
| 352 | acpi_ut_get_object_type_name | ||
| 353 | (obj_desc)); | ||
| 354 | break; | ||
| 355 | |||
| 356 | case ACPI_EXD_UINT8: | ||
| 357 | |||
| 358 | acpi_os_printf("%20s : %2.2X\n", name, *target); | ||
| 359 | break; | ||
| 360 | |||
| 361 | case ACPI_EXD_UINT16: | ||
| 362 | |||
| 363 | acpi_os_printf("%20s : %4.4X\n", name, | ||
| 364 | ACPI_GET16(target)); | ||
| 365 | break; | ||
| 366 | |||
| 367 | case ACPI_EXD_UINT32: | ||
| 368 | |||
| 369 | acpi_os_printf("%20s : %8.8X\n", name, | ||
| 370 | ACPI_GET32(target)); | ||
| 371 | break; | ||
| 372 | |||
| 373 | case ACPI_EXD_UINT64: | ||
| 374 | |||
| 375 | acpi_os_printf("%20s : %8.8X%8.8X\n", "Value", | ||
| 376 | ACPI_FORMAT_UINT64(ACPI_GET64(target))); | ||
| 377 | break; | ||
| 378 | |||
| 379 | case ACPI_EXD_POINTER: | ||
| 380 | |||
| 381 | acpi_ex_out_pointer(name, | ||
| 382 | *ACPI_CAST_PTR(void *, target)); | ||
| 383 | break; | ||
| 384 | |||
| 385 | case ACPI_EXD_ADDRESS: | ||
| 386 | |||
| 387 | acpi_ex_out_address(name, | ||
| 388 | *ACPI_CAST_PTR | ||
| 389 | (acpi_physical_address, target)); | ||
| 390 | break; | ||
| 391 | |||
| 392 | case ACPI_EXD_STRING: | ||
| 393 | |||
| 394 | acpi_ut_print_string(obj_desc->string.pointer, | ||
| 395 | ACPI_UINT8_MAX); | ||
| 396 | acpi_os_printf("\n"); | ||
| 397 | break; | ||
| 398 | |||
| 399 | case ACPI_EXD_BUFFER: | ||
| 400 | |||
| 401 | ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, | ||
| 402 | obj_desc->buffer.length); | ||
| 403 | break; | ||
| 404 | |||
| 405 | case ACPI_EXD_PACKAGE: | ||
| 406 | |||
| 407 | /* Dump the package contents */ | ||
| 408 | |||
| 409 | acpi_os_printf("\nPackage Contents:\n"); | ||
| 410 | acpi_ex_dump_package_obj(obj_desc, 0, 0); | ||
| 411 | break; | ||
| 412 | |||
| 413 | case ACPI_EXD_FIELD: | ||
| 414 | |||
| 415 | acpi_ex_dump_object(obj_desc, | ||
| 416 | acpi_ex_dump_field_common); | ||
| 417 | break; | ||
| 418 | |||
| 419 | case ACPI_EXD_REFERENCE: | ||
| 420 | |||
| 421 | acpi_ex_out_string("Opcode", | ||
| 422 | (acpi_ps_get_opcode_info | ||
| 423 | (obj_desc->reference.opcode))-> | ||
| 424 | name); | ||
| 425 | acpi_ex_dump_reference_obj(obj_desc); | ||
| 426 | break; | ||
| 427 | |||
| 428 | default: | ||
| 429 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", | ||
| 430 | info->opcode); | ||
| 431 | return; | ||
| 432 | } | ||
| 433 | |||
| 434 | info++; | ||
| 435 | count--; | ||
| 436 | } | ||
| 437 | } | ||
| 72 | 438 | ||
| 73 | /******************************************************************************* | 439 | /******************************************************************************* |
| 74 | * | 440 | * |
| @@ -214,7 +580,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 214 | 580 | ||
| 215 | case ACPI_TYPE_BUFFER: | 581 | case ACPI_TYPE_BUFFER: |
| 216 | 582 | ||
| 217 | acpi_os_printf("Buffer len %X @ %p \n", | 583 | acpi_os_printf("Buffer len %X @ %p\n", |
| 218 | obj_desc->buffer.length, | 584 | obj_desc->buffer.length, |
| 219 | obj_desc->buffer.pointer); | 585 | obj_desc->buffer.pointer); |
| 220 | 586 | ||
| @@ -320,17 +686,17 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 320 | 686 | ||
| 321 | case ACPI_TYPE_BUFFER_FIELD: | 687 | case ACPI_TYPE_BUFFER_FIELD: |
| 322 | 688 | ||
| 323 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of \n", | 689 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of\n", |
| 324 | obj_desc->buffer_field.bit_length, | 690 | obj_desc->buffer_field.bit_length, |
| 325 | obj_desc->buffer_field.base_byte_offset, | 691 | obj_desc->buffer_field.base_byte_offset, |
| 326 | obj_desc->buffer_field.start_field_bit_offset); | 692 | obj_desc->buffer_field.start_field_bit_offset); |
| 327 | 693 | ||
| 328 | if (!obj_desc->buffer_field.buffer_obj) { | 694 | if (!obj_desc->buffer_field.buffer_obj) { |
| 329 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL* \n")); | 695 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n")); |
| 330 | } else | 696 | } else |
| 331 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) | 697 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) |
| 332 | != ACPI_TYPE_BUFFER) { | 698 | != ACPI_TYPE_BUFFER) { |
| 333 | acpi_os_printf("*not a Buffer* \n"); | 699 | acpi_os_printf("*not a Buffer*\n"); |
| 334 | } else { | 700 | } else { |
| 335 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, | 701 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, |
| 336 | depth + 1); | 702 | depth + 1); |
| @@ -441,7 +807,6 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
| 441 | return; | 807 | return; |
| 442 | } | 808 | } |
| 443 | 809 | ||
| 444 | #ifdef ACPI_FUTURE_USAGE | ||
| 445 | /******************************************************************************* | 810 | /******************************************************************************* |
| 446 | * | 811 | * |
| 447 | * FUNCTION: acpi_ex_out* functions | 812 | * FUNCTION: acpi_ex_out* functions |
| @@ -465,11 +830,6 @@ static void acpi_ex_out_pointer(char *title, void *value) | |||
| 465 | acpi_os_printf("%20s : %p\n", title, value); | 830 | acpi_os_printf("%20s : %p\n", title, value); |
| 466 | } | 831 | } |
| 467 | 832 | ||
| 468 | static void acpi_ex_out_integer(char *title, u32 value) | ||
| 469 | { | ||
| 470 | acpi_os_printf("%20s : %.2X\n", title, value); | ||
| 471 | } | ||
| 472 | |||
| 473 | static void acpi_ex_out_address(char *title, acpi_physical_address value) | 833 | static void acpi_ex_out_address(char *title, acpi_physical_address value) |
| 474 | { | 834 | { |
| 475 | 835 | ||
| @@ -482,16 +842,16 @@ static void acpi_ex_out_address(char *title, acpi_physical_address value) | |||
| 482 | 842 | ||
| 483 | /******************************************************************************* | 843 | /******************************************************************************* |
| 484 | * | 844 | * |
| 485 | * FUNCTION: acpi_ex_dump_node | 845 | * FUNCTION: acpi_ex_dump_namespace_node |
| 486 | * | 846 | * |
| 487 | * PARAMETERS: *Node - Descriptor to dump | 847 | * PARAMETERS: Node - Descriptor to dump |
| 488 | * Flags - Force display if TRUE | 848 | * Flags - Force display if TRUE |
| 489 | * | 849 | * |
| 490 | * DESCRIPTION: Dumps the members of the given.Node | 850 | * DESCRIPTION: Dumps the members of the given.Node |
| 491 | * | 851 | * |
| 492 | ******************************************************************************/ | 852 | ******************************************************************************/ |
| 493 | 853 | ||
| 494 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | 854 | void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags) |
| 495 | { | 855 | { |
| 496 | 856 | ||
| 497 | ACPI_FUNCTION_ENTRY(); | 857 | ACPI_FUNCTION_ENTRY(); |
| @@ -506,19 +866,17 @@ void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | |||
| 506 | 866 | ||
| 507 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); | 867 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); |
| 508 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); | 868 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); |
| 509 | acpi_ex_out_integer("Flags", node->flags); | ||
| 510 | acpi_ex_out_integer("Owner Id", node->owner_id); | ||
| 511 | acpi_ex_out_integer("Reference Count", node->reference_count); | ||
| 512 | acpi_ex_out_pointer("Attached Object", | 869 | acpi_ex_out_pointer("Attached Object", |
| 513 | acpi_ns_get_attached_object(node)); | 870 | acpi_ns_get_attached_object(node)); |
| 514 | acpi_ex_out_pointer("child_list", node->child); | ||
| 515 | acpi_ex_out_pointer("next_peer", node->peer); | ||
| 516 | acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node)); | 871 | acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node)); |
| 872 | |||
| 873 | acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node), | ||
| 874 | acpi_ex_dump_node); | ||
| 517 | } | 875 | } |
| 518 | 876 | ||
| 519 | /******************************************************************************* | 877 | /******************************************************************************* |
| 520 | * | 878 | * |
| 521 | * FUNCTION: acpi_ex_dump_reference | 879 | * FUNCTION: acpi_ex_dump_reference_obj |
| 522 | * | 880 | * |
| 523 | * PARAMETERS: Object - Descriptor to dump | 881 | * PARAMETERS: Object - Descriptor to dump |
| 524 | * | 882 | * |
| @@ -526,14 +884,16 @@ void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | |||
| 526 | * | 884 | * |
| 527 | ******************************************************************************/ | 885 | ******************************************************************************/ |
| 528 | 886 | ||
| 529 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | 887 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) |
| 530 | { | 888 | { |
| 531 | struct acpi_buffer ret_buf; | 889 | struct acpi_buffer ret_buf; |
| 532 | acpi_status status; | 890 | acpi_status status; |
| 533 | 891 | ||
| 892 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | ||
| 893 | |||
| 534 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { | 894 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { |
| 535 | acpi_os_printf("Named Object %p ", obj_desc->reference.node); | 895 | acpi_os_printf("Named Object %p ", obj_desc->reference.node); |
| 536 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | 896 | |
| 537 | status = | 897 | status = |
| 538 | acpi_ns_handle_to_pathname(obj_desc->reference.node, | 898 | acpi_ns_handle_to_pathname(obj_desc->reference.node, |
| 539 | &ret_buf); | 899 | &ret_buf); |
| @@ -551,9 +911,9 @@ static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | |||
| 551 | 911 | ||
| 552 | /******************************************************************************* | 912 | /******************************************************************************* |
| 553 | * | 913 | * |
| 554 | * FUNCTION: acpi_ex_dump_package | 914 | * FUNCTION: acpi_ex_dump_package_obj |
| 555 | * | 915 | * |
| 556 | * PARAMETERS: Object - Descriptor to dump | 916 | * PARAMETERS: obj_desc - Descriptor to dump |
| 557 | * Level - Indentation Level | 917 | * Level - Indentation Level |
| 558 | * Index - Package index for this object | 918 | * Index - Package index for this object |
| 559 | * | 919 | * |
| @@ -562,7 +922,8 @@ static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | |||
| 562 | ******************************************************************************/ | 922 | ******************************************************************************/ |
| 563 | 923 | ||
| 564 | static void | 924 | static void |
| 565 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | 925 | acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, |
| 926 | u32 level, u32 index) | ||
| 566 | { | 927 | { |
| 567 | u32 i; | 928 | u32 i; |
| 568 | 929 | ||
| @@ -608,7 +969,8 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
| 608 | acpi_os_printf("[Buffer] Length %.2X = ", | 969 | acpi_os_printf("[Buffer] Length %.2X = ", |
| 609 | obj_desc->buffer.length); | 970 | obj_desc->buffer.length); |
| 610 | if (obj_desc->buffer.length) { | 971 | if (obj_desc->buffer.length) { |
| 611 | acpi_ut_dump_buffer((u8 *) obj_desc->buffer.pointer, | 972 | acpi_ut_dump_buffer(ACPI_CAST_PTR |
| 973 | (u8, obj_desc->buffer.pointer), | ||
| 612 | obj_desc->buffer.length, | 974 | obj_desc->buffer.length, |
| 613 | DB_DWORD_DISPLAY, _COMPONENT); | 975 | DB_DWORD_DISPLAY, _COMPONENT); |
| 614 | } else { | 976 | } else { |
| @@ -618,19 +980,19 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
| 618 | 980 | ||
| 619 | case ACPI_TYPE_PACKAGE: | 981 | case ACPI_TYPE_PACKAGE: |
| 620 | 982 | ||
| 621 | acpi_os_printf("[Package] Contains %d Elements: \n", | 983 | acpi_os_printf("[Package] Contains %d Elements:\n", |
| 622 | obj_desc->package.count); | 984 | obj_desc->package.count); |
| 623 | 985 | ||
| 624 | for (i = 0; i < obj_desc->package.count; i++) { | 986 | for (i = 0; i < obj_desc->package.count; i++) { |
| 625 | acpi_ex_dump_package(obj_desc->package.elements[i], | 987 | acpi_ex_dump_package_obj(obj_desc->package.elements[i], |
| 626 | level + 1, i); | 988 | level + 1, i); |
| 627 | } | 989 | } |
| 628 | break; | 990 | break; |
| 629 | 991 | ||
| 630 | case ACPI_TYPE_LOCAL_REFERENCE: | 992 | case ACPI_TYPE_LOCAL_REFERENCE: |
| 631 | 993 | ||
| 632 | acpi_os_printf("[Object Reference] "); | 994 | acpi_os_printf("[Object Reference] "); |
| 633 | acpi_ex_dump_reference(obj_desc); | 995 | acpi_ex_dump_reference_obj(obj_desc); |
| 634 | break; | 996 | break; |
| 635 | 997 | ||
| 636 | default: | 998 | default: |
| @@ -645,7 +1007,7 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
| 645 | * | 1007 | * |
| 646 | * FUNCTION: acpi_ex_dump_object_descriptor | 1008 | * FUNCTION: acpi_ex_dump_object_descriptor |
| 647 | * | 1009 | * |
| 648 | * PARAMETERS: Object - Descriptor to dump | 1010 | * PARAMETERS: obj_desc - Descriptor to dump |
| 649 | * Flags - Force display if TRUE | 1011 | * Flags - Force display if TRUE |
| 650 | * | 1012 | * |
| 651 | * DESCRIPTION: Dumps the members of the object descriptor given. | 1013 | * DESCRIPTION: Dumps the members of the object descriptor given. |
| @@ -670,11 +1032,13 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
| 670 | } | 1032 | } |
| 671 | 1033 | ||
| 672 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { | 1034 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { |
| 673 | acpi_ex_dump_node((struct acpi_namespace_node *)obj_desc, | 1035 | acpi_ex_dump_namespace_node((struct acpi_namespace_node *) |
| 674 | flags); | 1036 | obj_desc, flags); |
| 1037 | |||
| 675 | acpi_os_printf("\nAttached Object (%p):\n", | 1038 | acpi_os_printf("\nAttached Object (%p):\n", |
| 676 | ((struct acpi_namespace_node *)obj_desc)-> | 1039 | ((struct acpi_namespace_node *)obj_desc)-> |
| 677 | object); | 1040 | object); |
| 1041 | |||
| 678 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) | 1042 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) |
| 679 | obj_desc)->object, flags); | 1043 | obj_desc)->object, flags); |
| 680 | return_VOID; | 1044 | return_VOID; |
| @@ -687,233 +1051,18 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
| 687 | return_VOID; | 1051 | return_VOID; |
| 688 | } | 1052 | } |
| 689 | 1053 | ||
| 690 | /* Common Fields */ | 1054 | if (obj_desc->common.type > ACPI_TYPE_NS_NODE_MAX) { |
| 691 | 1055 | return_VOID; | |
| 692 | acpi_ex_out_string("Type", acpi_ut_get_object_type_name(obj_desc)); | 1056 | } |
| 693 | acpi_ex_out_integer("Reference Count", | ||
| 694 | obj_desc->common.reference_count); | ||
| 695 | acpi_ex_out_integer("Flags", obj_desc->common.flags); | ||
| 696 | |||
| 697 | /* Object-specific Fields */ | ||
| 698 | |||
| 699 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | ||
| 700 | case ACPI_TYPE_INTEGER: | ||
| 701 | |||
| 702 | acpi_os_printf("%20s : %8.8X%8.8X\n", "Value", | ||
| 703 | ACPI_FORMAT_UINT64(obj_desc->integer.value)); | ||
| 704 | break; | ||
| 705 | |||
| 706 | case ACPI_TYPE_STRING: | ||
| 707 | |||
| 708 | acpi_ex_out_integer("Length", obj_desc->string.length); | ||
| 709 | |||
| 710 | acpi_os_printf("%20s : %p ", "Pointer", | ||
| 711 | obj_desc->string.pointer); | ||
| 712 | acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX); | ||
| 713 | acpi_os_printf("\n"); | ||
| 714 | break; | ||
| 715 | |||
| 716 | case ACPI_TYPE_BUFFER: | ||
| 717 | |||
| 718 | acpi_ex_out_integer("Length", obj_desc->buffer.length); | ||
| 719 | acpi_ex_out_pointer("Pointer", obj_desc->buffer.pointer); | ||
| 720 | ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, | ||
| 721 | obj_desc->buffer.length); | ||
| 722 | break; | ||
| 723 | |||
| 724 | case ACPI_TYPE_PACKAGE: | ||
| 725 | |||
| 726 | acpi_ex_out_integer("Flags", obj_desc->package.flags); | ||
| 727 | acpi_ex_out_integer("Elements", obj_desc->package.count); | ||
| 728 | acpi_ex_out_pointer("Element List", obj_desc->package.elements); | ||
| 729 | |||
| 730 | /* Dump the package contents */ | ||
| 731 | |||
| 732 | acpi_os_printf("\nPackage Contents:\n"); | ||
| 733 | acpi_ex_dump_package(obj_desc, 0, 0); | ||
| 734 | break; | ||
| 735 | |||
| 736 | case ACPI_TYPE_DEVICE: | ||
| 737 | |||
| 738 | acpi_ex_out_pointer("Handler", obj_desc->device.handler); | ||
| 739 | acpi_ex_out_pointer("system_notify", | ||
| 740 | obj_desc->device.system_notify); | ||
| 741 | acpi_ex_out_pointer("device_notify", | ||
| 742 | obj_desc->device.device_notify); | ||
| 743 | break; | ||
| 744 | |||
| 745 | case ACPI_TYPE_EVENT: | ||
| 746 | |||
| 747 | acpi_ex_out_pointer("Semaphore", obj_desc->event.semaphore); | ||
| 748 | break; | ||
| 749 | |||
| 750 | case ACPI_TYPE_METHOD: | ||
| 751 | |||
| 752 | acpi_ex_out_integer("param_count", | ||
| 753 | obj_desc->method.param_count); | ||
| 754 | acpi_ex_out_integer("Concurrency", | ||
| 755 | obj_desc->method.concurrency); | ||
| 756 | acpi_ex_out_pointer("Semaphore", obj_desc->method.semaphore); | ||
| 757 | acpi_ex_out_integer("owner_id", obj_desc->method.owner_id); | ||
| 758 | acpi_ex_out_integer("aml_length", obj_desc->method.aml_length); | ||
| 759 | acpi_ex_out_pointer("aml_start", obj_desc->method.aml_start); | ||
| 760 | break; | ||
| 761 | |||
| 762 | case ACPI_TYPE_MUTEX: | ||
| 763 | |||
| 764 | acpi_ex_out_integer("sync_level", obj_desc->mutex.sync_level); | ||
| 765 | acpi_ex_out_pointer("owner_thread", | ||
| 766 | obj_desc->mutex.owner_thread); | ||
| 767 | acpi_ex_out_integer("acquire_depth", | ||
| 768 | obj_desc->mutex.acquisition_depth); | ||
| 769 | acpi_ex_out_pointer("Semaphore", obj_desc->mutex.semaphore); | ||
| 770 | break; | ||
| 771 | |||
| 772 | case ACPI_TYPE_REGION: | ||
| 773 | |||
| 774 | acpi_ex_out_integer("space_id", obj_desc->region.space_id); | ||
| 775 | acpi_ex_out_integer("Flags", obj_desc->region.flags); | ||
| 776 | acpi_ex_out_address("Address", obj_desc->region.address); | ||
| 777 | acpi_ex_out_integer("Length", obj_desc->region.length); | ||
| 778 | acpi_ex_out_pointer("Handler", obj_desc->region.handler); | ||
| 779 | acpi_ex_out_pointer("Next", obj_desc->region.next); | ||
| 780 | break; | ||
| 781 | |||
| 782 | case ACPI_TYPE_POWER: | ||
| 783 | |||
| 784 | acpi_ex_out_integer("system_level", | ||
| 785 | obj_desc->power_resource.system_level); | ||
| 786 | acpi_ex_out_integer("resource_order", | ||
| 787 | obj_desc->power_resource.resource_order); | ||
| 788 | acpi_ex_out_pointer("system_notify", | ||
| 789 | obj_desc->power_resource.system_notify); | ||
| 790 | acpi_ex_out_pointer("device_notify", | ||
| 791 | obj_desc->power_resource.device_notify); | ||
| 792 | break; | ||
| 793 | |||
| 794 | case ACPI_TYPE_PROCESSOR: | ||
| 795 | |||
| 796 | acpi_ex_out_integer("Processor ID", | ||
| 797 | obj_desc->processor.proc_id); | ||
| 798 | acpi_ex_out_integer("Length", obj_desc->processor.length); | ||
| 799 | acpi_ex_out_address("Address", | ||
| 800 | (acpi_physical_address) obj_desc->processor. | ||
| 801 | address); | ||
| 802 | acpi_ex_out_pointer("system_notify", | ||
| 803 | obj_desc->processor.system_notify); | ||
| 804 | acpi_ex_out_pointer("device_notify", | ||
| 805 | obj_desc->processor.device_notify); | ||
| 806 | acpi_ex_out_pointer("Handler", obj_desc->processor.handler); | ||
| 807 | break; | ||
| 808 | |||
| 809 | case ACPI_TYPE_THERMAL: | ||
| 810 | |||
| 811 | acpi_ex_out_pointer("system_notify", | ||
| 812 | obj_desc->thermal_zone.system_notify); | ||
| 813 | acpi_ex_out_pointer("device_notify", | ||
| 814 | obj_desc->thermal_zone.device_notify); | ||
| 815 | acpi_ex_out_pointer("Handler", obj_desc->thermal_zone.handler); | ||
| 816 | break; | ||
| 817 | |||
| 818 | case ACPI_TYPE_BUFFER_FIELD: | ||
| 819 | case ACPI_TYPE_LOCAL_REGION_FIELD: | ||
| 820 | case ACPI_TYPE_LOCAL_BANK_FIELD: | ||
| 821 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | ||
| 822 | |||
| 823 | acpi_ex_out_integer("field_flags", | ||
| 824 | obj_desc->common_field.field_flags); | ||
| 825 | acpi_ex_out_integer("access_byte_width", | ||
| 826 | obj_desc->common_field.access_byte_width); | ||
| 827 | acpi_ex_out_integer("bit_length", | ||
| 828 | obj_desc->common_field.bit_length); | ||
| 829 | acpi_ex_out_integer("fld_bit_offset", | ||
| 830 | obj_desc->common_field. | ||
| 831 | start_field_bit_offset); | ||
| 832 | acpi_ex_out_integer("base_byte_offset", | ||
| 833 | obj_desc->common_field.base_byte_offset); | ||
| 834 | acpi_ex_out_pointer("parent_node", obj_desc->common_field.node); | ||
| 835 | |||
| 836 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | ||
| 837 | case ACPI_TYPE_BUFFER_FIELD: | ||
| 838 | acpi_ex_out_pointer("buffer_obj", | ||
| 839 | obj_desc->buffer_field.buffer_obj); | ||
| 840 | break; | ||
| 841 | |||
| 842 | case ACPI_TYPE_LOCAL_REGION_FIELD: | ||
| 843 | acpi_ex_out_pointer("region_obj", | ||
| 844 | obj_desc->field.region_obj); | ||
| 845 | break; | ||
| 846 | |||
| 847 | case ACPI_TYPE_LOCAL_BANK_FIELD: | ||
| 848 | acpi_ex_out_integer("Value", | ||
| 849 | obj_desc->bank_field.value); | ||
| 850 | acpi_ex_out_pointer("region_obj", | ||
| 851 | obj_desc->bank_field.region_obj); | ||
| 852 | acpi_ex_out_pointer("bank_obj", | ||
| 853 | obj_desc->bank_field.bank_obj); | ||
| 854 | break; | ||
| 855 | |||
| 856 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | ||
| 857 | acpi_ex_out_integer("Value", | ||
| 858 | obj_desc->index_field.value); | ||
| 859 | acpi_ex_out_pointer("Index", | ||
| 860 | obj_desc->index_field.index_obj); | ||
| 861 | acpi_ex_out_pointer("Data", | ||
| 862 | obj_desc->index_field.data_obj); | ||
| 863 | break; | ||
| 864 | |||
| 865 | default: | ||
| 866 | /* All object types covered above */ | ||
| 867 | break; | ||
| 868 | } | ||
| 869 | break; | ||
| 870 | |||
| 871 | case ACPI_TYPE_LOCAL_REFERENCE: | ||
| 872 | |||
| 873 | acpi_ex_out_integer("target_type", | ||
| 874 | obj_desc->reference.target_type); | ||
| 875 | acpi_ex_out_string("Opcode", | ||
| 876 | (acpi_ps_get_opcode_info | ||
| 877 | (obj_desc->reference.opcode))->name); | ||
| 878 | acpi_ex_out_integer("Offset", obj_desc->reference.offset); | ||
| 879 | acpi_ex_out_pointer("obj_desc", obj_desc->reference.object); | ||
| 880 | acpi_ex_out_pointer("Node", obj_desc->reference.node); | ||
| 881 | acpi_ex_out_pointer("Where", obj_desc->reference.where); | ||
| 882 | |||
| 883 | acpi_ex_dump_reference(obj_desc); | ||
| 884 | break; | ||
| 885 | |||
| 886 | case ACPI_TYPE_LOCAL_ADDRESS_HANDLER: | ||
| 887 | |||
| 888 | acpi_ex_out_integer("space_id", | ||
| 889 | obj_desc->address_space.space_id); | ||
| 890 | acpi_ex_out_pointer("Next", obj_desc->address_space.next); | ||
| 891 | acpi_ex_out_pointer("region_list", | ||
| 892 | obj_desc->address_space.region_list); | ||
| 893 | acpi_ex_out_pointer("Node", obj_desc->address_space.node); | ||
| 894 | acpi_ex_out_pointer("Context", obj_desc->address_space.context); | ||
| 895 | break; | ||
| 896 | 1057 | ||
| 897 | case ACPI_TYPE_LOCAL_NOTIFY: | 1058 | /* Common Fields */ |
| 898 | 1059 | ||
| 899 | acpi_ex_out_pointer("Node", obj_desc->notify.node); | 1060 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_common); |
| 900 | acpi_ex_out_pointer("Context", obj_desc->notify.context); | ||
| 901 | break; | ||
| 902 | 1061 | ||
| 903 | case ACPI_TYPE_LOCAL_ALIAS: | 1062 | /* Object-specific fields */ |
| 904 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: | ||
| 905 | case ACPI_TYPE_LOCAL_EXTRA: | ||
| 906 | case ACPI_TYPE_LOCAL_DATA: | ||
| 907 | default: | ||
| 908 | |||
| 909 | acpi_os_printf | ||
| 910 | ("ex_dump_object_descriptor: Display not implemented for object type %s\n", | ||
| 911 | acpi_ut_get_object_type_name(obj_desc)); | ||
| 912 | break; | ||
| 913 | } | ||
| 914 | 1063 | ||
| 1064 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]); | ||
| 915 | return_VOID; | 1065 | return_VOID; |
| 916 | } | 1066 | } |
| 917 | 1067 | ||
| 918 | #endif /* ACPI_FUTURE_USAGE */ | ||
| 919 | #endif | 1068 | #endif |
