audk/ArmVirtPkg/Library
Ard Biesheuvel dca7f96fd2 ArmVirtPkg/ArmVirtPlatformLib: map executable NOR region as normal memory
The ARM architecture version 7 and later mandates that device mappings
have the XN (non-executable) bit set, to prevent speculative instruction
fetches from read-sensitive regions. This implies that we should not map
regions as device if we want to execute from them, so the NOR region that
contains our FD image should be mapped as normal memory instead.

The MMU code deals correctly with overlapping ARM_MEMORY_REGION_DESCRIPTOR
entries, and later entries in the array take precedence over earlier ones.
So simply add an entry to the end of the array that overrides the mapping
attributes of the FD image, wherever it resides.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18889 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-18 11:50:33 +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: map executable NOR region as normal memory 2015-11-18 11:50:33 +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