summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
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 /ArmPlatformPkg
parent1b8ca81133f1860a08d6e5477ab8d2fdf4b23b1e (diff)
downloadedk2-c5ab17430b2579dd79e3cbd497b8b9deccd34abc.tar.gz
edk2-c5ab17430b2579dd79e3cbd497b8b9deccd34abc.tar.bz2
edk2-c5ab17430b2579dd79e3cbd497b8b9deccd34abc.zip
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>
Diffstat (limited to 'ArmPlatformPkg')
-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 6ab3e99483..fb353cf2df 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;
}