From 671cc68dc61f029d44b43a681356078e02d8dab8 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 8 Jan 2014 13:43:34 +0800 Subject: ACPICA: Back port and refine validation of the XSDT root table. Some platforms contain an XSDT that is ill-formed or otherwise invalid (such as containing some or all entries that are NULL pointers). This change adds a new function to validate the XSDT before actually using it. If the XSDT is found to be invalid, ACPICA will now fall back to using the RSDT instead. This feature is already in the Linux kernel. When it is back ported to ACPICA, code is refined to follow ACPICA coding style and this patch is the generation of the integration. Original-by: Zhao Yakui Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 94970880126f..325aeae1fa99 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h @@ -182,6 +182,9 @@ struct acpi_table_xsdt { u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */ }; +#define ACPI_RSDT_ENTRY_SIZE (sizeof (u32)) +#define ACPI_XSDT_ENTRY_SIZE (sizeof (u64)) + /******************************************************************************* * * FACS - Firmware ACPI Control Structure (FACS) -- cgit v1.2.3