aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/tbxface.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/tbxface.c')
-rw-r--r--drivers/acpi/acpica/tbxface.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 684614d0d327..30565100b94c 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -518,33 +518,25 @@ static acpi_status acpi_tb_load_namespace(void)
518 518
519 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 519 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
520 520
521 acpi_gbl_DSDT = &acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT];
522
521 /* 523 /*
522 * Load the namespace. The DSDT is required, but any SSDT and PSDT tables 524 * Load the namespace. The DSDT is required, but any SSDT and
523 * are optional. 525 * PSDT tables are optional. Verify the DSDT.
524 */ 526 */
525 if (!acpi_gbl_root_table_list.count || 527 if (!acpi_gbl_root_table_list.count ||
526 !ACPI_COMPARE_NAME(& 528 !ACPI_COMPARE_NAME(&acpi_gbl_DSDT->signature, ACPI_SIG_DSDT) ||
527 (acpi_gbl_root_table_list. 529 ACPI_FAILURE(acpi_tb_verify_table(acpi_gbl_DSDT))) {
528 tables[ACPI_TABLE_INDEX_DSDT].signature),
529 ACPI_SIG_DSDT)
530 ||
531 ACPI_FAILURE(acpi_tb_verify_table
532 (&acpi_gbl_root_table_list.
533 tables[ACPI_TABLE_INDEX_DSDT]))) {
534 status = AE_NO_ACPI_TABLES; 530 status = AE_NO_ACPI_TABLES;
535 goto unlock_and_exit; 531 goto unlock_and_exit;
536 } 532 }
537 533
538 /* A valid DSDT is required */ 534 /*
539 535 * Save the original DSDT header for detection of table corruption
540 status = 536 * and/or replacement of the DSDT from outside the OS.
541 acpi_tb_verify_table(&acpi_gbl_root_table_list. 537 */
542 tables[ACPI_TABLE_INDEX_DSDT]); 538 ACPI_MEMCPY(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT->pointer,
543 if (ACPI_FAILURE(status)) { 539 sizeof(struct acpi_table_header));
544
545 status = AE_NO_ACPI_TABLES;
546 goto unlock_and_exit;
547 }
548 540
549 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 541 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
550 542