summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@linux.microsoft.com>2024-07-19 15:52:21 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-23 06:07:45 +0000
commitc5ab17430b2579dd79e3cbd497b8b9deccd34abc (patch)
treee2a2a5032990d1651e7d384ffb70d1fbbba18659
parent1b8ca81133f1860a08d6e5477ab8d2fdf4b23b1e (diff)
downloadedk2-c5ab17430b2579dd79e3cbd497b8b9deccd34abc.zip
edk2-c5ab17430b2579dd79e3cbd497b8b9deccd34abc.tar.gz
edk2-c5ab17430b2579dd79e3cbd497b8b9deccd34abc.tar.bz2
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>
-rw-r--r--ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index 6ab3e99..fb353cf 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -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;
}