summaryrefslogtreecommitdiff
path: root/EmbeddedPkg
diff options
context:
space:
mode:
authorNicolas Ojeda Leon <ncoleon@amazon.com>2022-01-19 15:48:33 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-06-22 15:34:16 +0000
commit3497fd5c26da3956c4f06eed46a1e3a8fdac9c15 (patch)
treeea30508be8d6d3c71748cd271c66cda3f77cca93 /EmbeddedPkg
parenta1bd79c5144cf39f4dee951974b377f5c1c03ce7 (diff)
downloadedk2-3497fd5c26da3956c4f06eed46a1e3a8fdac9c15.zip
edk2-3497fd5c26da3956c4f06eed46a1e3a8fdac9c15.tar.gz
edk2-3497fd5c26da3956c4f06eed46a1e3a8fdac9c15.tar.bz2
Ovmf/PlatformPei: Use host-provided GPA end if available
Read the "hardware-info" item from fw-cfg to extract specifications of PCI host bridges and analyze the 64-bit apertures of them to find out the highest 64-bit MMIO address required which determines the address space required by the guest, and, consequently, the FirstNonAddress used to calculate size of physical addresses. Using the static PeiHardwareInfoLib, read the fw-cfg file of hardware information to extract, one by one, all the host bridges. Find the last 64-bit MMIO address of each host bridge, using the HardwareInfoPciHostBridgeLib API, and compare it to an accumulate value to discover the highest address used, which corresponds to the highest value that must be included in the guest's physical address space. Given that platforms with multiple host bridges may provide the PCI apertures' addresses, the memory detection logic must take into account that, if the host provided the MMIO windows that can and must be used, the guest needs to take those values. Therefore, if the MMIO windows are found in the host-provided fw-cfg file, skip all the logic calculating the physical address size and just use the value provided. Since each PCI host bridge corresponds to an element in the information provided by the host, each of these must be analyzed looking for the highest address used. Cc: Alexander Graf <graf@amazon.de> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Nicolas Ojeda Leon <ncoleon@amazon.com>
Diffstat (limited to 'EmbeddedPkg')
0 files changed, 0 insertions, 0 deletions