summaryrefslogtreecommitdiffstats
path: root/MdePkg/MdePkgExtra.uni
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-06-03 16:11:08 +0200
committerLaszlo Ersek <lersek@redhat.com>2017-06-08 00:49:02 +0200
commit4275f38507a4a44260555495dfb6da1d8a307307 (patch)
treeca28ee3db541319cfcfa621f453a501bf230a9c0 /MdePkg/MdePkgExtra.uni
parentb941c34ef859971e29683ffb57c309e24e6a96be (diff)
downloadedk2-4275f38507a4a44260555495dfb6da1d8a307307.tar.gz
edk2-4275f38507a4a44260555495dfb6da1d8a307307.tar.bz2
edk2-4275f38507a4a44260555495dfb6da1d8a307307.zip
OvmfPkg/AcpiPlatformDxe: alloc blobs from 64-bit space unless restricted
... by narrower than 8-byte ADD_POINTER references. Introduce the CollectAllocationsRestrictedTo32Bit() function, which iterates over the linker/loader script, and collects the names of the fw_cfg blobs that are referenced by QEMU_LOADER_ADD_POINTER.PointeeFile fields, such that QEMU_LOADER_ADD_POINTER.PointerSize is less than 8. This means that the pointee blob's address will have to be patched into a narrower-than-8 byte pointer field, hence the pointee blob must not be allocated from 64-bit address space. In ProcessCmdAllocate(), consult these restrictions when setting the maximum address for gBS->AllocatePages(). The default is now MAX_UINT64, unless restricted like described above to the pre-patch MAX_UINT32 limit. In combination with Ard's QEMU commit cb51ac2ffe36 ("hw/arm/virt: generate 64-bit addressable ACPI objects", 2017-04-10), this patch enables OvmfPkg/AcpiPlatformDxe to work entirely above the 4GB mark. (An upcoming / planned aarch64 QEMU machine type will have no RAM under 4GB at all. Plus, moving the allocations higher is beneficial to the current "virt" machine type as well; in Ard's words: "having all firmware allocations inside the same 1 GB (or 512 MB for 64k pages) frame reduces the TLB footprint".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: Igor Mammedov <imammedo@redhat.com> Suggested-by: Gerd Hoffmann <kraxel@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'MdePkg/MdePkgExtra.uni')
0 files changed, 0 insertions, 0 deletions