From d12f0301507ebb2e4acbdcd752817a4b6f9756af Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 3 Feb 2021 17:33:40 +0100 Subject: mb/emulation/qemu-q35: Mark TSEG region as reserved Mark TSEG as reserved, which is done on other platforms as well. For some reason CorebootPayloadPkg crashes when using the region where TSEG typically resides, which is basically RAM. UefiPayloadPkg doesn't show this issue. Change-Id: I3ae3659349d2a88bc3575fe9675433c054e28832 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/50267 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/mainboard/emulation/qemu-q35/mainboard.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mainboard/emulation/qemu-q35/mainboard.c') diff --git a/src/mainboard/emulation/qemu-q35/mainboard.c b/src/mainboard/emulation/qemu-q35/mainboard.c index 540db040c9..e53404d55c 100644 --- a/src/mainboard/emulation/qemu-q35/mainboard.c +++ b/src/mainboard/emulation/qemu-q35/mainboard.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "q35.h" @@ -39,6 +40,9 @@ static void qemu_nb_init(struct device *dev) static void qemu_nb_read_resources(struct device *dev) { + size_t tseg_size; + uintptr_t tseg_base; + pci_dev_read_resources(dev); mmconf_resource(dev, 2); @@ -48,6 +52,9 @@ static void qemu_nb_read_resources(struct device *dev) reserved_ram_resource(dev, 0, CONFIG_ARCH_X86_64_PGTBL_LOC / KiB, (6 * 0x1000) / KiB); } + + smm_region(&tseg_base, &tseg_size); + reserved_ram_resource(dev, ESMRAMC, tseg_base / 1024, tseg_size / 1024); } -- cgit v1.2.3