audk/ArmVirtPkg
Ard Biesheuvel 1dc3f34f61 ArmVirtPkg/ArmVirtPlatformLib: reduce ID map size to GCD region size
The ID mapping routines on virtual platforms simply map the entire
hardware supported physical address space as device memory, and then
punch some holes for regions that need to be mapped cacheable.
On virtual platforms hosted on CPUs that support a large physical
address range, this may result in a lot of overhead, i.e., 4 KB of page
tables for each 512 GB of address space, which quickly adds up (i.e.,
2 MB for the architectural maximum of 48 bits).

Since there may be a platform specific limit to the size of the (I)PA
space that is not reflected by CPU id registers, restrict the range of
the ID mapping to gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize bits.
This makes sense by itself, since we cannot manipulate mappings above
that limit anwyay (because they are not covered by GCD), and it allows
the PCD be set to a lower value by platforms whose (I)PA space is
smaller than the hardware supported maximum.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Wei Huang <wei@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18929 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-24 07:44:41 +00:00
..
Include Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
Library ArmVirtPkg/ArmVirtPlatformLib: reduce ID map size to GCD region size 2015-11-24 07:44:41 +00:00
PciHostBridgeDxe Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
PrePi ArmVirtPkg/PrePi: do not invalidate the entire data cache at startup 2015-11-09 13:27:56 +00:00
VirtFdtDxe ArmVirtPkg: VirtFdtDxe: detect fw-cfg DMA interface from the DTB 2015-09-24 21:40:36 +00:00
ArmVirt.dsc.inc ArmVirtPkg: include BaseStackCheckLib also for AARCH64 2015-10-16 15:23:46 +00:00
ArmVirtPkg.dec ArmVirtPkg: VirtFdtDxe: detect fw-cfg DMA interface from the DTB 2015-09-24 21:40:36 +00:00
ArmVirtQemu.dsc ArmVirtPkg/ArmVirtQemu: limit the (I)PA space to 40 bits 2015-11-24 07:44:28 +00:00
ArmVirtQemu.fdf ArmVirtPkg: revert "ArmVirtPkg: add QemuFwCfgToPcdDxe" 2015-08-06 10:13:50 +00:00
ArmVirtXen.dsc ArmVirtPkg: VirtFdtDxe: detect fw-cfg DMA interface from the DTB 2015-09-24 21:40:36 +00:00
ArmVirtXen.fdf ArmVirtPkg: use 'auto' alignment and FIXED placement for XIP modules 2015-07-31 08:24:18 +00:00
Contributions.txt ArmVirtPkg: add "Contributions.txt" and "License.txt" 2015-06-08 22:00:36 +00:00
License.txt ArmVirtPkg: add "Contributions.txt" and "License.txt" 2015-06-08 22:00:36 +00:00