aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/tbutils.c21
-rw-r--r--tools/power/acpi/os_specific/service_layers/oslinuxtbl.c12
2 files changed, 27 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index e1638ad5db4c..801d1963d7d8 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -474,12 +474,19 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
474 474
475 /* Get the table physical address (32-bit for RSDT, 64-bit for XSDT) */ 475 /* Get the table physical address (32-bit for RSDT, 64-bit for XSDT) */
476 476
477 status = 477 address =
478 acpi_tb_install_standard_table(acpi_tb_get_root_table_entry 478 acpi_tb_get_root_table_entry(table_entry, table_entry_size);
479 (table_entry, 479
480 table_entry_size), 480 /* Skip NULL entries in RSDT/XSDT */
481 ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, 481
482 FALSE, TRUE, &table_index); 482 if (!address) {
483 goto next_table;
484 }
485
486 status = acpi_tb_install_standard_table(address,
487 ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
488 FALSE, TRUE,
489 &table_index);
483 490
484 if (ACPI_SUCCESS(status) && 491 if (ACPI_SUCCESS(status) &&
485 ACPI_COMPARE_NAME(&acpi_gbl_root_table_list. 492 ACPI_COMPARE_NAME(&acpi_gbl_root_table_list.
@@ -488,6 +495,8 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
488 acpi_tb_parse_fadt(table_index); 495 acpi_tb_parse_fadt(table_index);
489 } 496 }
490 497
498next_table:
499
491 table_entry += table_entry_size; 500 table_entry += table_entry_size;
492 } 501 }
493 502
diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
index e0699e6e1f26..ba7bad04dff1 100644
--- a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
+++ b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
@@ -720,6 +720,12 @@ static acpi_status osl_list_bios_tables(void)
720 (acpi_physical_address) (*ACPI_CAST32(table_data)); 720 (acpi_physical_address) (*ACPI_CAST32(table_data));
721 } 721 }
722 722
723 /* Skip NULL entries in RSDT/XSDT */
724
725 if (!table_address) {
726 continue;
727 }
728
723 status = osl_map_table(table_address, NULL, &mapped_table); 729 status = osl_map_table(table_address, NULL, &mapped_table);
724 if (ACPI_FAILURE(status)) { 730 if (ACPI_FAILURE(status)) {
725 return (status); 731 return (status);
@@ -865,6 +871,12 @@ osl_get_bios_table(char *signature,
865 (table_data)); 871 (table_data));
866 } 872 }
867 873
874 /* Skip NULL entries in RSDT/XSDT */
875
876 if (!table_address) {
877 continue;
878 }
879
868 status = 880 status =
869 osl_map_table(table_address, NULL, &mapped_table); 881 osl_map_table(table_address, NULL, &mapped_table);
870 if (ACPI_FAILURE(status)) { 882 if (ACPI_FAILURE(status)) {