acrn-hypervisor/devicemodel/core
Peter Fang 071ce15ed4 dm: build E820 map for OVMF
OVMF requires a more descriptive mechanism than RTC CMOS to retrieve
ACRN's memory layout, so we now pass the E820 map to it, starting at
0xEF000 (ROM area).

ACRN currently uses [4GB, 5GB) as its 64-bit PCI host aperture. This is
inconsistent with OVMF's assumption of its platform's memory layout,
because it derives the size of high memory from RTC CMOS, which is
incapable of describing the 64-bit PCI hole.

By default, OVMF uses RTC CMOS 0x5b/0x5c/0x5d to determine the size of
high memory. This value only tells OVMF how much memory is above 4GB,
but not the platform's memory layout above 4GB.

Using RTC CMOS works for QEMU, because QEMU places its 64-bit PCI host
aperture above its highmem. Therefore, OVMF can always assume highmem is
located at [4GB, 4GB + highmem), which is not where ACRN's highmem is
located. For example, if we have 1GB of usable memory above 4GB, ACRN
will place it at [5GB, 6GB).

This change allows OVMF to correctly identify the guest's memory layout.
It will consider any reserved region above 4GB as 64-bit PCI host
aperture.

MP table, SMBIOS and ACPI tables are all located above 0xF0000 so it is
guaranteed that there is no overlap. There can only be a maximum of 128
E820 entries.

v1 -> v2:
- provide more explanation to this commit
- add signature before E820 map for OVMF backward compatibility

Tracked-On: #2792
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-03-21 10:28:17 +08:00
..
console.c DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00
gc.c DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00
hugetlb.c dm: add support of high MMIO mapping 2019-02-28 18:33:11 +08:00
inout.c dm: fix the issue when guest tries to disable memory range access 2018-10-08 12:57:00 +08:00
main.c [RevertMe] dm: pci: restore workaround when alloc pci mem64 bar 2019-03-05 15:14:24 +08:00
mem.c dm: clean up mem.c 2019-03-21 10:28:17 +08:00
mevent.c dm: create mevent's pipe in non-blocking mode 2019-01-23 10:33:28 +08:00
monitor.c dm: set correct thread name 2018-12-14 19:50:50 +08:00
mptbl.c dm: adapt mptable generation for VM with lapic pt 2019-01-28 19:47:33 +08:00
pm.c DM: register pm ops to monitor 2018-08-02 13:14:03 +08:00
post.c DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00
smbiostbl.c dm: add support of high MMIO mapping 2019-02-28 18:33:11 +08:00
sw_load_bzimage.c dm: use strncpy to replace strcpy 2018-12-25 18:40:04 +08:00
sw_load_common.c dm: remove empty UOS E820 entries 2019-03-21 10:28:17 +08:00
sw_load_elf.c dm: query and save image size during initial checking 2018-12-13 09:56:09 +08:00
sw_load_ovmf.c dm: build E820 map for OVMF 2019-03-21 10:28:17 +08:00
sw_load_vsbl.c dm: use strncpy to replace strcpy 2018-12-25 18:40:04 +08:00
timer.c dm: provide timer callback handlers the number of expirations 2019-01-23 10:33:28 +08:00
vmmapi.c dm: passthru: pass pbdf when reset msi/msix interrupt 2019-03-15 20:57:39 +08:00
vrpmb.c DM: generate random virtual RPMB key 2018-10-29 11:07:45 +08:00