arch/x86/ebda: Don't trash the EBDA on the resume path

Clearing the EBDA was introduced with b4aaaa "Prepare the BIOS data
areas before device init." which states that the purpose of setting up
these area's is just to make sure they are sane. On the S3 path doing
this is not needed and can even thrash data set up by payloads (mostly
SeaBIOS) that used that memory.

Change-Id: I9c54156bd8247e8a34dec6edc27cfc2d33cde595
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30789
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Arthur Heymans 2019-01-09 18:30:33 +01:00 committed by Nico Huber
parent c6bf74ec75
commit 804adaa1f1
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <arch/io.h> #include <arch/io.h>
#include <arch/acpi.h>
#include <arch/ebda.h> #include <arch/ebda.h>
#include <commonlib/endian.h> #include <commonlib/endian.h>
#include <console/console.h> #include <console/console.h>
@ -104,6 +105,9 @@ void setup_ebda(u32 low_memory_size, u16 ebda_segment, u16 ebda_size)
void setup_default_ebda(void) void setup_default_ebda(void)
{ {
if (acpi_is_wakeup_s3())
return;
setup_ebda(DEFAULT_EBDA_LOWMEM, setup_ebda(DEFAULT_EBDA_LOWMEM,
DEFAULT_EBDA_SEGMENT, DEFAULT_EBDA_SEGMENT,
DEFAULT_EBDA_SIZE); DEFAULT_EBDA_SIZE);