audk/OvmfPkg/Library/PlatformInitLib
Gerd Hoffmann 8f9ef9c9a0 OvmfPkg/PlatformInitLib: qemu cpuid physbits detection
Add some qemu specific quirks to PlatformAddressWidthFromCpuid()
to figure whenever the PhysBits value returned by CPUID is
something real we can work with or not.

See the source code comment for details on the logic.

Also apply some limits to the address space we are going to use:
 * Place a hard cap at 47 PhysBits (128 TB) to avoid using addresses
   which require 5-level paging support.
 * Cap at 40 PhysBits (1 TB) in case the CPU has no support for
   gigabyte pages, to avoid excessive amounts of pages being
   used for page tables.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-10-07 18:14:05 +00:00
..
Cmos.c OvmfPkg: Create initial version of PlatformInitLib 2022-04-02 08:15:12 +00:00
IntelTdx.c OvmfPkg: Update PlatformInitLib for Tdx guest 2022-04-02 08:15:12 +00:00
IntelTdxNull.c OvmfPkg: Update PlatformInitLib for Tdx guest 2022-04-02 08:15:12 +00:00
MemDetect.c OvmfPkg/PlatformInitLib: qemu cpuid physbits detection 2022-10-07 18:14:05 +00:00
Platform.c OvmfPkg/PlatformInitLib: Add functions for EmuVariableNvStore 2022-09-06 07:21:42 +00:00
PlatformInitLib.inf OvmfPkg/PlatformInitLib: Add functions for EmuVariableNvStore 2022-09-06 07:21:42 +00:00