ArmPlatformPkg: PL031RealTimeClockLib: Set MMIO Memory XP

PL031RealTimeClockLib will clear EFI_MEMORY_XP if a platform
has set it for MMIO memory when it does not include that bit
in its SetMemoryAttributes call. This region is not intended
to be executed from and as such the lib should explicitly set
EFI_MEMORY_XP to this region.

Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This commit is contained in:
Oliver Smith-Denny 2024-07-19 15:52:21 -07:00 committed by mergify[bot]
parent 1b8ca81133
commit c5ab17430b
1 changed files with 2 additions and 2 deletions

View File

@ -331,13 +331,13 @@ LibRtcInitialize (
EfiGcdMemoryTypeMemoryMappedIo,
mPL031RtcBase,
SIZE_4KB,
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
EFI_MEMORY_UC | EFI_MEMORY_RUNTIME | EFI_MEMORY_XP
);
if (EFI_ERROR (Status)) {
return Status;
}
Status = gDS->SetMemorySpaceAttributes (mPL031RtcBase, SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_RUNTIME);
Status = gDS->SetMemorySpaceAttributes (mPL031RtcBase, SIZE_4KB, EFI_MEMORY_UC | EFI_MEMORY_RUNTIME | EFI_MEMORY_XP);
if (EFI_ERROR (Status)) {
return Status;
}