audk/ArmVirtPkg
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
..
Include Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
Library ArmVirtPkg/ArmVirtPlatformLib: map executable NOR region as normal memory 2015-11-18 11:50:33 +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: enable non-exec DXE stack for AARCH64 2015-10-08 18:52:33 +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