mirror of https://github.com/acidanthera/audk.git
8f5ad634ad
Currently, ArmSetMemoryAttributes () takes a combination of EFI_MEMORY_xx constants describing the memory type and permission attributes that should be set on a region of memory. In cases where the memory type is omitted, we assume that the memory permissions being set are final, and that existing memory permissions can be discarded. This is problematic, because we aim to map memory non-executable (EFI_MEMORY_XP) by default, and only relax this requirement for code regions that are mapped read-only (EFI_MEMORY_RO). Currently, setting one permission clears the other, and so code managing these permissions has to be aware of the existing permissions in order to be able to preserve them, and this is not always tractable (e.g., the UEFI memory attribute protocol implements an abstraction that promises to preserve memory permissions that it is not operating on explicitly). So let's add an AttributeMask parameter to ArmSetMemoryAttributes(), which is permitted to be non-zero if no memory type is being provided, in which case only memory permission attributes covered in the mask will be affected by the update. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com> |
||
---|---|---|
.. | ||
ArmArchTimerLib | ||
ArmCacheMaintenanceLib | ||
ArmDisassemblerLib | ||
ArmExceptionLib | ||
ArmGenericTimerPhyCounterLib | ||
ArmGenericTimerVirtCounterLib | ||
ArmGicArchLib | ||
ArmGicArchSecLib | ||
ArmHvcLib | ||
ArmHvcLibNull | ||
ArmLib | ||
ArmMmuLib | ||
ArmMonitorLib | ||
ArmMtlNullLib | ||
ArmPsciResetSystemLib | ||
ArmSmcLib | ||
ArmSmcLibNull | ||
ArmSmcPsciResetSystemLib | ||
ArmSoftFloatLib | ||
ArmSvcLib | ||
ArmTrngLib | ||
CompilerIntrinsicsLib | ||
DebugAgentSymbolsBaseLib | ||
DebugPeCoffExtraActionLib | ||
DefaultExceptionHandlerLib | ||
GccLto | ||
LinuxBootBootManagerLib | ||
OpteeLib | ||
PeiServicesTablePointerLib | ||
PlatformBootManagerLib | ||
SemiHostingDebugLib | ||
SemiHostingSerialPortLib | ||
SemihostLib | ||
StandaloneMmMmuLib | ||
GnuNoteBti.bin |