aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/tbfadt.c102
-rw-r--r--drivers/acpi/acpica/tbinstal.c15
-rw-r--r--drivers/acpi/acpica/tbutils.c34
-rw-r--r--drivers/acpi/acpica/tbxfroot.c2
4 files changed, 80 insertions, 73 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
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index c03500b4cc7a..a265d4ab40ac 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -138,13 +138,14 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
138 if ((table_desc->pointer->signature[0] != 0x00) && 138 if ((table_desc->pointer->signature[0] != 0x00) &&
139 (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)) 139 (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))
140 && (ACPI_STRNCMP(table_desc->pointer->signature, "OEM", 3))) { 140 && (ACPI_STRNCMP(table_desc->pointer->signature, "OEM", 3))) {
141 ACPI_ERROR((AE_INFO, 141 ACPI_BIOS_ERROR((AE_INFO,
142 "Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx", 142 "Table has invalid signature [%4.4s] (0x%8.8X), "
143 acpi_ut_valid_acpi_name(*(u32 *)table_desc-> 143 "must be SSDT or OEMx",
144 pointer-> 144 acpi_ut_valid_acpi_name(*(u32 *)table_desc->
145 signature) ? table_desc-> 145 pointer->
146 pointer->signature : "????", 146 signature) ?
147 *(u32 *)table_desc->pointer->signature)); 147 table_desc->pointer->signature : "????",
148 *(u32 *)table_desc->pointer->signature));
148 149
149 return_ACPI_STATUS(AE_BAD_SIGNATURE); 150 return_ACPI_STATUS(AE_BAD_SIGNATURE);
150 } 151 }
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 0a706cac37de..6818b31954c8 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -317,10 +317,11 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)
317 /* Checksum ok? (should be zero) */ 317 /* Checksum ok? (should be zero) */
318 318
319 if (checksum) { 319 if (checksum) {
320 ACPI_WARNING((AE_INFO, 320 ACPI_BIOS_WARNING((AE_INFO,
321 "Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X", 321 "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
322 table->signature, table->checksum, 322 "should be 0x%2.2X",
323 (u8) (table->checksum - checksum))); 323 table->signature, table->checksum,
324 (u8)(table->checksum - checksum)));
324 325
325#if (ACPI_CHECKSUM_ABORT) 326#if (ACPI_CHECKSUM_ABORT)
326 327
@@ -377,8 +378,9 @@ void acpi_tb_check_dsdt_header(void)
377 378
378 if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length || 379 if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length ||
379 acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) { 380 acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) {
380 ACPI_ERROR((AE_INFO, 381 ACPI_BIOS_ERROR((AE_INFO,
381 "The DSDT has been corrupted or replaced - old, new headers below")); 382 "The DSDT has been corrupted or replaced - "
383 "old, new headers below"));
382 acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header); 384 acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header);
383 acpi_tb_print_table_header(0, acpi_gbl_DSDT); 385 acpi_tb_print_table_header(0, acpi_gbl_DSDT);
384 386
@@ -480,9 +482,10 @@ acpi_tb_install_table(acpi_physical_address address,
480 /* If a particular signature is expected (DSDT/FACS), it must match */ 482 /* If a particular signature is expected (DSDT/FACS), it must match */
481 483
482 if (signature && !ACPI_COMPARE_NAME(table->signature, signature)) { 484 if (signature && !ACPI_COMPARE_NAME(table->signature, signature)) {
483 ACPI_ERROR((AE_INFO, 485 ACPI_BIOS_ERROR((AE_INFO,
484 "Invalid signature 0x%X for ACPI table, expected [%s]", 486 "Invalid signature 0x%X for ACPI table, expected [%s]",
485 *ACPI_CAST_PTR(u32, table->signature), signature)); 487 *ACPI_CAST_PTR(u32, table->signature),
488 signature));
486 goto unmap_and_exit; 489 goto unmap_and_exit;
487 } 490 }
488 491
@@ -589,10 +592,10 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
589 592
590 /* Will truncate 64-bit address to 32 bits, issue warning */ 593 /* Will truncate 64-bit address to 32 bits, issue warning */
591 594
592 ACPI_WARNING((AE_INFO, 595 ACPI_BIOS_WARNING((AE_INFO,
593 "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X)," 596 "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X),"
594 " truncating", 597 " truncating",
595 ACPI_FORMAT_UINT64(address64))); 598 ACPI_FORMAT_UINT64(address64)));
596 } 599 }
597#endif 600#endif
598 return ((acpi_physical_address) (address64)); 601 return ((acpi_physical_address) (address64));
@@ -694,8 +697,9 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
694 acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); 697 acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
695 698
696 if (length < sizeof(struct acpi_table_header)) { 699 if (length < sizeof(struct acpi_table_header)) {
697 ACPI_ERROR((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", 700 ACPI_BIOS_ERROR((AE_INFO,
698 length)); 701 "Invalid table length 0x%X in RSDT/XSDT",
702 length));
699 return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); 703 return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
700 } 704 }
701 705
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index 4258f647ca3d..5f6f7445c37c 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -216,7 +216,7 @@ acpi_status acpi_find_root_pointer(acpi_size *table_address)
216 216
217 /* A valid RSDP was not found */ 217 /* A valid RSDP was not found */
218 218
219 ACPI_ERROR((AE_INFO, "A valid RSDP was not found")); 219 ACPI_BIOS_ERROR((AE_INFO, "A valid RSDP was not found"));
220 return_ACPI_STATUS(AE_NOT_FOUND); 220 return_ACPI_STATUS(AE_NOT_FOUND);
221} 221}
222 222