]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg: ArmVirtQemu: expose only 64-bit entry point for v3.0+ SMBIOS
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 18 Feb 2016 08:59:09 +0000 (09:59 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 18 Feb 2016 11:00:10 +0000 (12:00 +0100)
The legacy 32-bit SMBIOS entry point has little use on AARCH64 systems,
since many such systems have no 32-bit addressable physical RAM, and so
OSes that implement SMBIOS will have to be able to deal with the 64-bit
entry point anyway.

Given that the OS will map main memory in 1 GB chunks if it can, and that
punching a page sized hole (e.g., for SMBIOS data) into it will result in
the whole 1 GB chunk being mapped using 2 MB and 4 KB blocks instead, it
is important to group memory reservations from the OS as much as we can,
and allocating below 4 GB for no good reason interferes with that.

This is especially important under virtualization, considering that each
*level* of lookup at stage 1 (the guest virtual page table) will result in
a full page table walk at stage 2 (the guest PA to host PA mapping).

So expose only the 64-bit entry point when the SMBIOS tables adhere to
version 3.0 or later.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
ArmVirtPkg/ArmVirtQemu.dsc

index e6440ec5da32d618c535d654863076a1a58f6ca6..e2641fd2c28951512659b2f8d407b8e610ff1d2f 100644 (file)
   # support anything bigger, even if the host hardware does\r
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|40\r
 \r
+  # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,\r
+  # if the entry point version is >= 3.0. AARCH64 OSes cannot assume the\r
+  # presence of the 32-bit entry point anyway (because many AARCH64 systems\r
+  # don't have 32-bit addressable physical RAM), and the additional allocations\r
+  # below 4 GB needlessly fragment the memory map. So expose the 64-bit entry\r
+  # point only, for entry point versions >= 3.0.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosEntryPointProvideMethod|0x2\r
+\r
 [PcdsDynamicDefault.common]\r
   ## If TRUE, OvmfPkg/AcpiPlatformDxe will not wait for PCI\r
   #  enumeration to complete before installing ACPI tables.\r