summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2011-02-14 15:50:42 +0800
committerLen Brown <len.brown@intel.com>2011-03-02 19:38:03 -0500
commit64b3db22c04586997ab4be46dd5a5b99f8a2d390 (patch)
treee0642436efe91c824d84383cba3e8fc906c4a2d0 /include/acpi
parent6dfad339645247c9deb553e4d68e21211ddc61bd (diff)
downloadlinux-3.10-64b3db22c04586997ab4be46dd5a5b99f8a2d390.tar.gz
linux-3.10-64b3db22c04586997ab4be46dd5a5b99f8a2d390.tar.bz2
linux-3.10-64b3db22c04586997ab4be46dd5a5b99f8a2d390.zip
ACPICA: Remove use of unreliable FADT revision field
The revision number in the FADT has been found to be completely unreliable and cannot be trusted. Only the table length can be used to infer the actual version. 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>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/actbl.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 7e42bfee0e2..d41c9488521 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -343,4 +343,20 @@ struct acpi_table_desc {
#include <acpi/actbl1.h>
#include <acpi/actbl2.h>
+/*
+ * Sizes of the various flavors of FADT. We need to look closely
+ * at the FADT length because the version number essentially tells
+ * us nothing because of many BIOS bugs where the version does not
+ * match the expected length. In other words, the length of the
+ * FADT is the bottom line as to what the version really is.
+ *
+ * For reference, the values below are as follows:
+ * FADT V1 size: 0x74
+ * FADT V2 size: 0x84
+ * FADT V3+ size: 0xF4
+ */
+#define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4)
+#define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3)
+#define ACPI_FADT_V3_SIZE (u32) (sizeof (struct acpi_table_fadt))
+
#endif /* __ACTBL_H__ */