audk/ArmPkg/Library
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
..
ArmArchTimerLib ArmPkg/ArmArchTimerLib: correct typos 2016-04-01 17:19:24 +02:00
ArmCacheMaintenanceLib
ArmDisassemblerLib ArmPkg/ArmDisassemblerLib: replace AsciiStrCat() with AsciiStrCatS() 2016-10-25 10:46:40 +02:00
ArmDmaLib ArmPkg: fix compilation error in ArmDmaLib 2016-12-01 17:02:13 +00:00
ArmExceptionLib
ArmGenericTimerPhyCounterLib ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00
ArmGenericTimerVirtCounterLib ArmPkg/ArmLib: remove indirection layer from timer register accessors 2017-01-20 15:51:34 +00:00
ArmGicArchLib
ArmGicArchSecLib
ArmHvcLib
ArmLib ArmPkg/ArmLib: AARCH64: allow the stack aligment (SA) bit to be managed 2017-02-22 13:22:42 +00:00
ArmMmuLib ArmPkg/ArmMmuLib ARM: implement memory permission control routines 2017-03-07 10:31:53 +01:00
ArmPsciResetSystemLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
ArmSmcLib
ArmSmcLibNull
ArmSoftFloatLib
BdsLib ArmPkg/BdsLib: eliminate calls to deprecated string functions 2016-10-28 12:04:07 +01:00
CompilerIntrinsicsLib ArmPkg: Fix modsi3.S compilation across toolchains. 2017-03-14 08:02:09 +00:00
DebugAgentSymbolsBaseLib ArmPkg: Fix typos in comments 2016-10-19 16:31:22 +01:00
DebugPeCoffExtraActionLib
DefaultExceptionHandlerLib ArmPkg/DefaultExceptionHandlerLib: replace AsciiStrCat() with AsciiStrCatS() 2016-10-25 10:46:42 +02:00
GccLto
PeiServicesTablePointerLib
PlatformBootManagerLib
RvdPeCoffExtraActionLib
SemiHostingDebugLib
SemiHostingSerialPortLib
SemihostLib ArmPkg/SemihostLib: switch to ASM_FUNC() asm macro 2016-08-11 12:40:52 +02:00
UncachedMemoryAllocationLib ArmPkg/UncachedMemoryAllocationLib: set XP bit via CPU arch protocol 2017-03-15 19:36:10 +00:00