Don't re-init EBDA in S3 resume path.
authorDuncan Laurie <dlaurie@chromium.org>
Wed, 18 Jan 2012 18:05:18 +0000 (10:05 -0800)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Fri, 30 Mar 2012 15:52:11 +0000 (17:52 +0200)
I forgot to implement this the first time around.

It does not seem to cause noticeable problems but
in heavy suspend/resume testing I saw a suspicious
crash in the kernel when trying to bring one of the
CPUs back online.

Change-Id: I950ac260f251e2683693d9bd20a0dd5e041aa26e
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: http://review.coreboot.org/770
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
src/arch/x86/lib/ebda.c

index faf1451a2f14fb3c17ec952db0ef4e92f30ae4f2..fb407b6ac8e50abae2e790b159aa6d73b9a80371 100644 (file)
 #include <string.h>
 #include <arch/io.h>
 #include <arch/ebda.h>
+#if CONFIG_HAVE_ACPI_RESUME
+#include <arch/acpi.h>
+#endif
 
 void setup_ebda(u32 low_memory_size, u16 ebda_segment, u16 ebda_size)
 {
+#if CONFIG_HAVE_ACPI_RESUME
+       /* Skip in S3 resume path */
+       if (acpi_slp_type == 3)
+               return;
+#endif
+
        if (!low_memory_size || !ebda_segment || !ebda_size)
                return;