mb/emulation/qemu-i440fx: Reserve low memory

Ensure that the low memory is properly reserved so it does not get
marked as normal RAM and get wiped or reused by firmware or the kernel.
This ensures that the low RSDP is always available for the kernel.

This is only noticed if something wipes the RSDP before the kernel
boots, which happens if you use the depthcharge payload and boot in
developer mode.

Change-Id: I7295018416229bc957ecbf26f77623a57965557e
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39834
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Duncan Laurie 2020-03-17 18:46:28 -07:00 committed by Patrick Georgi
parent 9f5c8503d1
commit ddd4f9a717
1 changed files with 6 additions and 0 deletions

View File

@ -129,6 +129,12 @@ static void cpu_pci_domain_read_resources(struct device *dev)
"debugcon");
}
/* A segment is legacy VGA region */
mmio_resource(dev, idx++, 0xa0000 / KiB, (0xc0000 - 0xa0000) / KiB);
/* C segment to 1MB is reserved RAM (low tables) */
reserved_ram_resource(dev, idx++, 0xc0000 / KiB, (1 * MiB - 0xc0000) / KiB);
if (q35 && ((tomk * 1024) < 0xb0000000)) {
/*
* Reserve the region between top-of-ram and the