aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-01-08 00:43:40 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-08 09:31:36 -0500
commitfab4610583855d544394320d47fccb43305a6398 (patch)
treeff0e09aec798612f32dd0be6fb7f29b586d99c87 /drivers/acpi
parent671cc68dc61f029d44b43a681356078e02d8dab8 (diff)
ACPICA: Cleanup the option of forcing the use of the RSDT.
This change adds a runtime option that will force ACPICA to use the RSDT instead of the XSDT. Although the ACPI spec requires that an XSDT be used instead of the RSDT, the XSDT has been found to be corrupt or ill-formed on some machines. This option is already in the Linux kernel. When it is back ported to ACPICA, code is re-written to follow ACPICA coding style. This patch is the generation of the integration. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/acglobal.h8
-rw-r--r--drivers/acpi/acpica/tbutils.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index e9f1fc7f99c7..cffb45742aa5 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -119,6 +119,14 @@ bool ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
119u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE); 119u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
120 120
121/* 121/*
122 * Optionally ignore an XSDT if present and use the RSDT instead.
123 * Although the ACPI specification requires that an XSDT be used instead
124 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
125 * some machines. Default behavior is to use the XSDT if present.
126 */
127u8 ACPI_INIT_GLOBAL(acpi_gbl_do_not_use_xsdt, FALSE);
128
129/*
122 * Optionally truncate I/O addresses to 16 bits. Provides compatibility 130 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
123 * with other ACPI implementations. NOTE: During ACPICA initialization, 131 * with other ACPI implementations. NOTE: During ACPICA initialization,
124 * this value is set to TRUE if any Windows OSI strings have been 132 * this value is set to TRUE if any Windows OSI strings have been
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index ee6067062cdc..6412d3c301cb 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -478,10 +478,10 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
478 ACPI_CAST_PTR(struct acpi_table_header, 478 ACPI_CAST_PTR(struct acpi_table_header,
479 rsdp)); 479 rsdp));
480 480
481 /* Differentiate between RSDT and XSDT root tables */ 481 /* Use XSDT if present and not overridden. Otherwise, use RSDT */
482 482
483 if ((rsdp->revision > 1) && rsdp->xsdt_physical_address 483 if ((rsdp->revision > 1) &&
484 && !acpi_rsdt_forced) { 484 rsdp->xsdt_physical_address && !acpi_gbl_do_not_use_xsdt) {
485 /* 485 /*
486 * RSDP contains an XSDT (64-bit physical addresses). We must use 486 * RSDP contains an XSDT (64-bit physical addresses). We must use
487 * the XSDT if the revision is > 1 and the XSDT pointer is present, 487 * the XSDT if the revision is > 1 and the XSDT pointer is present,
@@ -503,8 +503,8 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
503 acpi_os_unmap_memory(rsdp, sizeof(struct acpi_table_rsdp)); 503 acpi_os_unmap_memory(rsdp, sizeof(struct acpi_table_rsdp));
504 504
505 /* 505 /*
506 * If it is present, validate the XSDT for access/size and ensure 506 * If it is present and used, validate the XSDT for access/size
507 * that all table entries are at least non-NULL 507 * and ensure that all table entries are at least non-NULL
508 */ 508 */
509 if (table_entry_size == ACPI_XSDT_ENTRY_SIZE) { 509 if (table_entry_size == ACPI_XSDT_ENTRY_SIZE) {
510 status = acpi_tb_validate_xsdt(address); 510 status = acpi_tb_validate_xsdt(address);