]> git.sur5r.net Git - u-boot/commitdiff
x86: Do not clear high table area for S3
authorBin Meng <bmeng.cn@gmail.com>
Fri, 21 Apr 2017 14:24:40 +0000 (07:24 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 17 May 2017 09:11:46 +0000 (17:11 +0800)
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 <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Roese <sr@denx.de>
arch/x86/lib/coreboot_table.c

index ceab3cf5e4f1bab37022c4bf520f13eb27d9ac6d..b1b4cd961312df8972f7cec528cae70283458b51 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <vbe.h>
+#include <asm/acpi_s3.h>
 #include <asm/coreboot_tables.h>
 #include <asm/e820.h>
 
@@ -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;