aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-11-12 02:23:20 -0500
committerLen Brown <len.brown@intel.com>2008-12-29 22:38:37 -0500
commitc87609f31a8641009641fc1d19dac75e6de06fd4 (patch)
treeb16d522007529176c2bfd11d1103c25f2f506037
parent34830726c9761f66299f4d82c4357e5faec54013 (diff)
ACPICA: Emit warning if two FACS or DSDT tables found in the FADT
Checks if there are two valid but different addresses for the FACS and DSDT within the FADT (mismatch between the 32-bit and 64-bit fields.) 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>
-rw-r--r--drivers/acpi/tables/tbfadt.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/acpi/tables/tbfadt.c b/drivers/acpi/tables/tbfadt.c
index d2e60a8fa9a5..14661a861c58 100644
--- a/drivers/acpi/tables/tbfadt.c
+++ b/drivers/acpi/tables/tbfadt.c
@@ -286,14 +286,27 @@ static void acpi_tb_convert_fadt(void)
286 286
287 acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt); 287 acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt);
288 288
289 /* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary */ 289 /*
290 290 * Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary.
291 * Later code will always use the X 64-bit field. Also, check for an
292 * address mismatch between the 32-bit and 64-bit address fields
293 * (FIRMWARE_CTRL/X_FIRMWARE_CTRL, DSDT/X_DSDT) which would indicate
294 * the presence of two FACS or two DSDT tables.
295 */
291 if (!acpi_gbl_FADT.Xfacs) { 296 if (!acpi_gbl_FADT.Xfacs) {
292 acpi_gbl_FADT.Xfacs = (u64) acpi_gbl_FADT.facs; 297 acpi_gbl_FADT.Xfacs = (u64) acpi_gbl_FADT.facs;
298 } else if (acpi_gbl_FADT.facs &&
299 (acpi_gbl_FADT.Xfacs != (u64) acpi_gbl_FADT.facs)) {
300 ACPI_WARNING((AE_INFO,
301 "32/64 FACS address mismatch in FADT - two FACS tables!"));
293 } 302 }
294 303
295 if (!acpi_gbl_FADT.Xdsdt) { 304 if (!acpi_gbl_FADT.Xdsdt) {
296 acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt; 305 acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt;
306 } else if (acpi_gbl_FADT.dsdt &&
307 (acpi_gbl_FADT.Xdsdt != (u64) acpi_gbl_FADT.dsdt)) {
308 ACPI_WARNING((AE_INFO,
309 "32/64 DSDT address mismatch in FADT - two DSDT tables!"));
297 } 310 }
298 311
299 /* 312 /*