From: Bin Meng Date: Fri, 21 Apr 2017 14:24:40 +0000 (-0700) Subject: x86: Do not clear high table area for S3 X-Git-Tag: v2017.07-rc1~254^2~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=95e50dd197cb86641a4ad06a18d5a4c57ea0a6f4;p=u-boot x86: Do not clear high table area for S3 When SeaBIOS is being used, U-Boot reserves a memory area to be used for configuration tables like ACPI. But it should not be cleared otherwise ACPI table will be missing. Signed-off-by: Bin Meng Reviewed-by: Simon Glass Tested-by: Stefan Roese --- diff --git a/arch/x86/lib/coreboot_table.c b/arch/x86/lib/coreboot_table.c index ceab3cf5e4..b1b4cd9613 100644 --- a/arch/x86/lib/coreboot_table.c +++ b/arch/x86/lib/coreboot_table.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -19,7 +20,11 @@ int high_table_reserve(void) gd->arch.high_table_ptr = gd->start_addr_sp; /* clear the memory */ - memset((void *)gd->arch.high_table_ptr, 0, CONFIG_HIGH_TABLE_SIZE); +#ifdef CONFIG_HAVE_ACPI_RESUME + if (gd->arch.prev_sleep_state != ACPI_S3) +#endif + memset((void *)gd->arch.high_table_ptr, 0, + CONFIG_HIGH_TABLE_SIZE); gd->start_addr_sp &= ~0xf;