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 <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50267
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Patrick Rudolph 2021-02-03 17:33:40 +01:00 committed by Patrick Rudolph
parent a85d4a5a9c
commit d12f030150
1 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include <device/pci.h>
#include <device/pci_ops.h>
#include <pc80/keyboard.h>
#include <cpu/x86/smm.h>
#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);
}