aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rsdump.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2005-11-02 00:00:00 -0500
committerLen Brown <len.brown@intel.com>2005-12-10 00:26:05 -0500
commit96db255c8f014ae3497507104e8df809785a619f (patch)
tree79d2c506644370fd6c10d94bd40c419cd3bad148 /drivers/acpi/resources/rsdump.c
parent0897831bb54eb36fd9e2a22da7f0f64be1b20d09 (diff)
[ACPI] ACPICA 20051102
Modified the subsystem initialization sequence to improve GPE support. The GPE initialization has been split into two parts in order to defer execution of the _PRW methods (Power Resources for Wake) until after the hardware is fully initialized and the SCI handler is installed. This allows the _PRW methods to access fields protected by the Global Lock. This will fix systems where a NO_GLOBAL_LOCK exception has been seen during initialization. Fixed a regression with the ConcatenateResTemplate() ASL operator introduced in the 20051021 release. Implemented support for "local" internal ACPI object types within the debugger "Object" command and the acpi_walk_namespace() external interfaces. These local types include RegionFields, BankFields, IndexFields, Alias, and reference objects. Moved common AML resource handling code into a new file, "utresrc.c". This code is shared by both the Resource Manager and the AML Debugger. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/resources/rsdump.c')
-rw-r--r--drivers/acpi/resources/rsdump.c70
1 files changed, 37 insertions, 33 deletions
diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c
index 27172a3d55d7..f617ca80c5a6 100644
--- a/drivers/acpi/resources/rsdump.c
+++ b/drivers/acpi/resources/rsdump.c
@@ -324,7 +324,7 @@ static struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = {
324 324
325static struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = { 325static struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = {
326 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags), 326 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags),
327 "Resource Type", "Memory Range"}, 327 "Resource Type", (void *)"Memory Range"},
328 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect), 328 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect),
329 "Write Protect", acpi_gbl_RWdecode}, 329 "Write Protect", acpi_gbl_RWdecode},
330 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching), 330 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching),
@@ -337,7 +337,7 @@ static struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = {
337 337
338static struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = { 338static struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = {
339 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags), 339 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags),
340 "Resource Type", "I/O Range"}, 340 "Resource Type", (void *)"I/O Range"},
341 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type), 341 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type),
342 "Range Type", acpi_gbl_RNGdecode}, 342 "Range Type", acpi_gbl_RNGdecode},
343 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation), 343 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation),
@@ -372,8 +372,8 @@ static struct acpi_rsdump_info acpi_rs_dump_prt[5] = {
372static void 372static void
373acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) 373acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
374{ 374{
375 void *target = NULL; 375 u8 *target = NULL;
376 void *previous_target; 376 u8 *previous_target;
377 char *name; 377 char *name;
378 u8 count; 378 u8 count;
379 379
@@ -399,43 +399,49 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
399 /* Strings */ 399 /* Strings */
400 400
401 case ACPI_RSD_LITERAL: 401 case ACPI_RSD_LITERAL:
402 acpi_rs_out_string(name, (char *)table->pointer); 402 acpi_rs_out_string(name,
403 ACPI_CAST_PTR(char, table->pointer));
403 break; 404 break;
404 405
405 case ACPI_RSD_STRING: 406 case ACPI_RSD_STRING:
406 acpi_rs_out_string(name, (char *)target); 407 acpi_rs_out_string(name, ACPI_CAST_PTR(char, target));
407 break; 408 break;
408 409
409 /* Data items, 8/16/32/64 bit */ 410 /* Data items, 8/16/32/64 bit */
410 411
411 case ACPI_RSD_UINT8: 412 case ACPI_RSD_UINT8:
412 acpi_rs_out_integer8(name, *(u8 *) target); 413 acpi_rs_out_integer8(name, *ACPI_CAST_PTR(u8, target));
413 break; 414 break;
414 415
415 case ACPI_RSD_UINT16: 416 case ACPI_RSD_UINT16:
416 acpi_rs_out_integer16(name, *(u16 *) target); 417 acpi_rs_out_integer16(name,
418 *ACPI_CAST_PTR(u16, target));
417 break; 419 break;
418 420
419 case ACPI_RSD_UINT32: 421 case ACPI_RSD_UINT32:
420 acpi_rs_out_integer32(name, *(u32 *) target); 422 acpi_rs_out_integer32(name,
423 *ACPI_CAST_PTR(u32, target));
421 break; 424 break;
422 425
423 case ACPI_RSD_UINT64: 426 case ACPI_RSD_UINT64:
424 acpi_rs_out_integer64(name, *(u64 *) target); 427 acpi_rs_out_integer64(name,
428 *ACPI_CAST_PTR(u64, target));
425 break; 429 break;
426 430
427 /* Flags: 1-bit and 2-bit flags supported */ 431 /* Flags: 1-bit and 2-bit flags supported */
428 432
429 case ACPI_RSD_1BITFLAG: 433 case ACPI_RSD_1BITFLAG:
430 acpi_rs_out_string(name, (char *) 434 acpi_rs_out_string(name, ACPI_CAST_PTR(char,
431 ((const char **)table-> 435 table->
432 pointer)[(*(u8 *) target) & 0x01]); 436 pointer[*target &
437 0x01]));
433 break; 438 break;
434 439
435 case ACPI_RSD_2BITFLAG: 440 case ACPI_RSD_2BITFLAG:
436 acpi_rs_out_string(name, (char *) 441 acpi_rs_out_string(name, ACPI_CAST_PTR(char,
437 ((const char **)table-> 442 table->
438 pointer)[(*(u8 *) target) & 0x03]); 443 pointer[*target &
444 0x03]));
439 break; 445 break;
440 446
441 case ACPI_RSD_SHORTLIST: 447 case ACPI_RSD_SHORTLIST:
@@ -445,10 +451,8 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
445 */ 451 */
446 if (previous_target) { 452 if (previous_target) {
447 acpi_rs_out_title(name); 453 acpi_rs_out_title(name);
448 acpi_rs_dump_short_byte_list(* 454 acpi_rs_dump_short_byte_list(*previous_target,
449 ((u8 *) 455 target);
450 previous_target),
451 (u8 *) target);
452 } 456 }
453 break; 457 break;
454 458
@@ -458,10 +462,9 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
458 * Note: The list length is obtained from the previous table entry 462 * Note: The list length is obtained from the previous table entry
459 */ 463 */
460 if (previous_target) { 464 if (previous_target) {
461 acpi_rs_dump_byte_list(* 465 acpi_rs_dump_byte_list(*ACPI_CAST_PTR
462 ((u16 *) 466 (u16, previous_target),
463 previous_target), 467 target);
464 (u8 *) target);
465 } 468 }
466 break; 469 break;
467 470
@@ -471,10 +474,9 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
471 * Note: The list length is obtained from the previous table entry 474 * Note: The list length is obtained from the previous table entry
472 */ 475 */
473 if (previous_target) { 476 if (previous_target) {
474 acpi_rs_dump_dword_list(* 477 acpi_rs_dump_dword_list(*previous_target,
475 ((u8 *) 478 ACPI_CAST_PTR(u32,
476 previous_target), 479 target));
477 (u32 *) target);
478 } 480 }
479 break; 481 break;
480 482
@@ -482,17 +484,19 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
482 /* 484 /*
483 * Common flags for all Address resources 485 * Common flags for all Address resources
484 */ 486 */
485 acpi_rs_dump_address_common((union acpi_resource_data *) 487 acpi_rs_dump_address_common(ACPI_CAST_PTR
486 target); 488 (union acpi_resource_data,
489 target));
487 break; 490 break;
488 491
489 case ACPI_RSD_SOURCE: 492 case ACPI_RSD_SOURCE:
490 /* 493 /*
491 * Optional resource_source for Address resources 494 * Optional resource_source for Address resources
492 */ 495 */
493 acpi_rs_dump_resource_source((struct 496 acpi_rs_dump_resource_source(ACPI_CAST_PTR
494 acpi_resource_source *) 497 (struct
495 target); 498 acpi_resource_source,
499 target));
496 break; 500 break;
497 501
498 default: 502 default: