diff options
author | Liu, Jinsong <jinsong.liu@intel.com> | 2011-07-23 08:55:59 +0100 |
---|---|---|
committer | Liu, Jinsong <jinsong.liu@intel.com> | 2011-07-23 08:55:59 +0100 |
commit | 28c216169ed0d3cd5b727b09e87c05fee2410271 (patch) | |
tree | 69c8af7f51dcce0bf44c8c2d7fb60920c31e19c1 /xen/drivers/acpi | |
parent | ec029aaa9a79965f83476808e32b8573891aa79c (diff) | |
download | xen-28c216169ed0d3cd5b727b09e87c05fee2410271.tar.gz xen-28c216169ed0d3cd5b727b09e87c05fee2410271.tar.bz2 xen-28c216169ed0d3cd5b727b09e87c05fee2410271.zip |
acpi: Add support for old and new bios erst, enable mce_apei logic
When testing, we found different bios has different understanding
about APEI ERST table header, depending on whether it count ACPI
standard header or not.
This patch add support for both bios version, and enable mce_apei.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'xen/drivers/acpi')
-rw-r--r-- | xen/drivers/acpi/apei/erst.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xen/drivers/acpi/apei/erst.c b/xen/drivers/acpi/apei/erst.c index eb666a6fca..e012cd39e0 100644 --- a/xen/drivers/acpi/apei/erst.c +++ b/xen/drivers/acpi/apei/erst.c @@ -715,7 +715,13 @@ int erst_clear(u64 record_id) static int __init erst_check_table(struct acpi_table_erst *erst_tab) { - if (erst_tab->header_length != sizeof(struct acpi_table_erst)) + /* + * Some old BIOSes include the ACPI standard header in the ERST header + * length; new BIOSes do not. Our check allows for both methods. + */ + if ((erst_tab->header_length != + (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header))) + && (erst_tab->header_length != sizeof(struct acpi_table_erst))) return -EINVAL; if (erst_tab->header.length < sizeof(struct acpi_table_erst)) return -EINVAL; |