mirror_edk2/ArmVirtPkg/Library
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
..
ArmVirtDxeHobLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
ArmVirtGicArchLib ArmVirtPkg: implement DT-based ArmGicArchLib 2015-07-28 20:45:36 +00:00
ArmVirtMemoryInitPeiLib ArmVirtPkg/ArmVirtMemoryInitPeiLib: handle memory above 4 GB on 32-bit ARM 2015-09-09 14:48:33 +00:00
ArmVirtPlatformLib ArmVirtPkg/ArmVirtPlatformLib: reduce ID map size to GCD region size 2015-11-24 07:44:41 +00:00
ArmVirtPsciResetSystemLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
ArmXenRelocatablePlatformLib ArmVirtPkg: avoid relocated immediates in AARCH64 asm 2015-08-11 12:32:38 +00:00
BaseCachingPciExpressLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
FdtPL011SerialPortLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
NorFlashQemuLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
PlatformIntelBdsLib ArmVirtPkg: PlatformIntelBdsLib: signal ReadyToBoot on direct kernel boot 2015-09-18 13:58:35 +00:00
PlatformPeiLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
QemuFwCfgLib ArmVirtPkg: QemuFwCfgLib: read bytes from fw-cfg with DMA when available 2015-09-24 21:40:41 +00:00
XenRealTimeClockLib ArmVirtPkg: XenRealTimeClockLib: fixup typo in Linaro copyright notice 2015-06-08 22:00:32 +00:00