diff options
author | Bob Moore <robert.moore@intel.com> | 2012-07-15 21:39:54 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-07-17 00:05:49 -0400 |
commit | 3b3ea7759ce484fffce387cf20a2dd39d1be3858 (patch) | |
tree | 734739bcfb6b2fc184fd678d74c7106d387efb78 /drivers/acpi/acpica/tbfadt.c | |
parent | 62cdd14191cdc6749fbc5e489cf80f5149c9ca15 (diff) |
ACPICA: Table manager: deploy new firmware error/warning interfaces
Emit firmware error/warning messages where appropriate for table
and FADT errors.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/tbfadt.c')
-rw-r--r-- | drivers/acpi/acpica/tbfadt.c | 102 |
1 files changed, 52 insertions, 50 deletions
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c index d919f4055dba..b3e3fd030765 100644 --- a/drivers/acpi/acpica/tbfadt.c +++ b/drivers/acpi/acpica/tbfadt.c | |||
@@ -303,11 +303,11 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) | |||
303 | * a warning. | 303 | * a warning. |
304 | */ | 304 | */ |
305 | if (length > sizeof(struct acpi_table_fadt)) { | 305 | if (length > sizeof(struct acpi_table_fadt)) { |
306 | ACPI_WARNING((AE_INFO, | 306 | ACPI_BIOS_WARNING((AE_INFO, |
307 | "FADT (revision %u) is longer than ACPI 5.0 version, " | 307 | "FADT (revision %u) is longer than ACPI 5.0 version, " |
308 | "truncating length %u to %u", | 308 | "truncating length %u to %u", |
309 | table->revision, length, | 309 | table->revision, length, |
310 | (u32)sizeof(struct acpi_table_fadt))); | 310 | (u32)sizeof(struct acpi_table_fadt))); |
311 | } | 311 | } |
312 | 312 | ||
313 | /* Clear the entire local FADT */ | 313 | /* Clear the entire local FADT */ |
@@ -452,11 +452,13 @@ static void acpi_tb_convert_fadt(void) | |||
452 | * they must match. | 452 | * they must match. |
453 | */ | 453 | */ |
454 | if (address64->address && address32 && | 454 | if (address64->address && address32 && |
455 | (address64->address != (u64) address32)) { | 455 | (address64->address != (u64)address32)) { |
456 | ACPI_ERROR((AE_INFO, | 456 | ACPI_BIOS_ERROR((AE_INFO, |
457 | "32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32", | 457 | "32/64X address mismatch in FADT/%s: " |
458 | fadt_info_table[i].name, address32, | 458 | "0x%8.8X/0x%8.8X%8.8X, using 32", |
459 | ACPI_FORMAT_UINT64(address64->address))); | 459 | fadt_info_table[i].name, address32, |
460 | ACPI_FORMAT_UINT64(address64-> | ||
461 | address))); | ||
460 | } | 462 | } |
461 | 463 | ||
462 | /* Always use 32-bit address if it is valid (non-null) */ | 464 | /* Always use 32-bit address if it is valid (non-null) */ |
@@ -511,25 +513,25 @@ static void acpi_tb_validate_fadt(void) | |||
511 | * DSDT/X_DSDT) would indicate the presence of two FACS or two DSDT tables. | 513 | * DSDT/X_DSDT) would indicate the presence of two FACS or two DSDT tables. |
512 | */ | 514 | */ |
513 | if (acpi_gbl_FADT.facs && | 515 | if (acpi_gbl_FADT.facs && |
514 | (acpi_gbl_FADT.Xfacs != (u64) acpi_gbl_FADT.facs)) { | 516 | (acpi_gbl_FADT.Xfacs != (u64)acpi_gbl_FADT.facs)) { |
515 | ACPI_WARNING((AE_INFO, | 517 | ACPI_BIOS_WARNING((AE_INFO, |
516 | "32/64X FACS address mismatch in FADT - " | 518 | "32/64X FACS address mismatch in FADT - " |
517 | "0x%8.8X/0x%8.8X%8.8X, using 32", | 519 | "0x%8.8X/0x%8.8X%8.8X, using 32", |
518 | acpi_gbl_FADT.facs, | 520 | acpi_gbl_FADT.facs, |
519 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xfacs))); | 521 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xfacs))); |
520 | 522 | ||
521 | acpi_gbl_FADT.Xfacs = (u64) acpi_gbl_FADT.facs; | 523 | acpi_gbl_FADT.Xfacs = (u64)acpi_gbl_FADT.facs; |
522 | } | 524 | } |
523 | 525 | ||
524 | if (acpi_gbl_FADT.dsdt && | 526 | if (acpi_gbl_FADT.dsdt && |
525 | (acpi_gbl_FADT.Xdsdt != (u64) acpi_gbl_FADT.dsdt)) { | 527 | (acpi_gbl_FADT.Xdsdt != (u64)acpi_gbl_FADT.dsdt)) { |
526 | ACPI_WARNING((AE_INFO, | 528 | ACPI_BIOS_WARNING((AE_INFO, |
527 | "32/64X DSDT address mismatch in FADT - " | 529 | "32/64X DSDT address mismatch in FADT - " |
528 | "0x%8.8X/0x%8.8X%8.8X, using 32", | 530 | "0x%8.8X/0x%8.8X%8.8X, using 32", |
529 | acpi_gbl_FADT.dsdt, | 531 | acpi_gbl_FADT.dsdt, |
530 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xdsdt))); | 532 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xdsdt))); |
531 | 533 | ||
532 | acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt; | 534 | acpi_gbl_FADT.Xdsdt = (u64)acpi_gbl_FADT.dsdt; |
533 | } | 535 | } |
534 | 536 | ||
535 | /* If Hardware Reduced flag is set, we are all done */ | 537 | /* If Hardware Reduced flag is set, we are all done */ |
@@ -559,10 +561,10 @@ static void acpi_tb_validate_fadt(void) | |||
559 | */ | 561 | */ |
560 | if (address64->address && | 562 | if (address64->address && |
561 | (address64->bit_width != ACPI_MUL_8(length))) { | 563 | (address64->bit_width != ACPI_MUL_8(length))) { |
562 | ACPI_WARNING((AE_INFO, | 564 | ACPI_BIOS_WARNING((AE_INFO, |
563 | "32/64X length mismatch in %s: %u/%u", | 565 | "32/64X length mismatch in FADT/%s: %u/%u", |
564 | name, ACPI_MUL_8(length), | 566 | name, ACPI_MUL_8(length), |
565 | address64->bit_width)); | 567 | address64->bit_width)); |
566 | } | 568 | } |
567 | 569 | ||
568 | if (fadt_info_table[i].type & ACPI_FADT_REQUIRED) { | 570 | if (fadt_info_table[i].type & ACPI_FADT_REQUIRED) { |
@@ -571,13 +573,13 @@ static void acpi_tb_validate_fadt(void) | |||
571 | * Both the address and length must be non-zero. | 573 | * Both the address and length must be non-zero. |
572 | */ | 574 | */ |
573 | if (!address64->address || !length) { | 575 | if (!address64->address || !length) { |
574 | ACPI_ERROR((AE_INFO, | 576 | ACPI_BIOS_ERROR((AE_INFO, |
575 | "Required field %s has zero address and/or length:" | 577 | "Required FADT field %s has zero address and/or length: " |
576 | " 0x%8.8X%8.8X/0x%X", | 578 | "0x%8.8X%8.8X/0x%X", |
577 | name, | 579 | name, |
578 | ACPI_FORMAT_UINT64(address64-> | 580 | ACPI_FORMAT_UINT64(address64-> |
579 | address), | 581 | address), |
580 | length)); | 582 | length)); |
581 | } | 583 | } |
582 | } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { | 584 | } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { |
583 | /* | 585 | /* |
@@ -587,13 +589,13 @@ static void acpi_tb_validate_fadt(void) | |||
587 | */ | 589 | */ |
588 | if ((address64->address && !length) || | 590 | if ((address64->address && !length) || |
589 | (!address64->address && length)) { | 591 | (!address64->address && length)) { |
590 | ACPI_WARNING((AE_INFO, | 592 | ACPI_BIOS_WARNING((AE_INFO, |
591 | "Optional field %s has zero address or length: " | 593 | "Optional FADT field %s has zero address or length: " |
592 | "0x%8.8X%8.8X/0x%X", | 594 | "0x%8.8X%8.8X/0x%X", |
593 | name, | 595 | name, |
594 | ACPI_FORMAT_UINT64(address64-> | 596 | ACPI_FORMAT_UINT64 |
595 | address), | 597 | (address64->address), |
596 | length)); | 598 | length)); |
597 | } | 599 | } |
598 | } | 600 | } |
599 | } | 601 | } |
@@ -638,12 +640,12 @@ static void acpi_tb_setup_fadt_registers(void) | |||
638 | (fadt_info_table[i].default_length > 0) && | 640 | (fadt_info_table[i].default_length > 0) && |
639 | (fadt_info_table[i].default_length != | 641 | (fadt_info_table[i].default_length != |
640 | target64->bit_width)) { | 642 | target64->bit_width)) { |
641 | ACPI_WARNING((AE_INFO, | 643 | ACPI_BIOS_WARNING((AE_INFO, |
642 | "Invalid length for %s: %u, using default %u", | 644 | "Invalid length for FADT/%s: %u, using default %u", |
643 | fadt_info_table[i].name, | 645 | fadt_info_table[i].name, |
644 | target64->bit_width, | 646 | target64->bit_width, |
645 | fadt_info_table[i]. | 647 | fadt_info_table[i]. |
646 | default_length)); | 648 | default_length)); |
647 | 649 | ||
648 | /* Incorrect size, set width to the default */ | 650 | /* Incorrect size, set width to the default */ |
649 | 651 | ||