audk/ArmPkg
Ard Biesheuvel 0985beff2c ArmPkg/UncachedMemoryAllocationLib: set XP bit via CPU arch protocol
Commit e7b24ec978 ("ArmPkg/UncachedMemoryAllocationLib: map uncached
allocations non-executable") adds code that manipulates the GCD memory
space attributes of a newly allocated uncached region without checking
whether this region expose these attributes in its capabilities mask.

Given that the intent is to remove executable permissions from the region,
this is a fairly pointless exercise to begin with, regardless of whether
it is correct or not. The reason is that RO/XP memory attributes in the
GCD memory space map or the UEFI memory map are completely disconnected
from the actual mapping permissions used in the page tables.

So instead, invoke the CPU arch protocol directly, and add the non-exec
attributes in the page tables directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
2017-03-15 19:36:10 +00:00
..
Drivers ArmPkg/CpuDxe: handle implied attributes in EfiAttributeToArmAttribute 2017-03-08 15:40:20 +01:00
Filesystem/SemihostFs ArmPkg/SemihostFs: eliminate calls to deprecated string functions 2016-10-28 12:04:04 +01:00
Include ArmPkg/ArmMmuLib: remove VirtualMask arg from ArmSetMemoryAttributes 2017-03-07 09:38:08 +01:00
Library ArmPkg/UncachedMemoryAllocationLib: set XP bit via CPU arch protocol 2017-03-15 19:36:10 +00:00
ArmPkg.dec ArmPkg: remove unused PcdArmUncachedMemoryMask PCD 2017-02-27 16:18:29 +00:00
ArmPkg.dsc ArmPkg: remove DebugUncachedMemoryAllocationLib 2017-02-23 17:56:10 +00:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt ArmPkg: Rectify file modes 2016-01-30 12:25:59 +00:00