diff options
author | Oliver Smith-Denny <osde@linux.microsoft.com> | 2024-07-19 15:50:48 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-23 06:07:45 +0000 |
commit | 1b8ca81133f1860a08d6e5477ab8d2fdf4b23b1e (patch) | |
tree | b4a0351bc9bbc9d6b438e04f6e0ae83306ebbc51 /ArmVirtPkg | |
parent | e10de1cb0345e54c0b4d83f5979a76111d10d6c7 (diff) | |
download | edk2-1b8ca81133f1860a08d6e5477ab8d2fdf4b23b1e.tar.gz |
ArmVirtPkg: KvmtoolRtcFdtClientLib: Set MMIO Memory NX
When setting memory attributes on its MMIO region,
KvmtoolRtcFdtClientLib will clear EFI_MEMORY_XP from
the region if a platform has it set. This MMIO region is
not intended to be executed from, so fix this by explicitly
setting EFI_MEMORY_XP on this region in the lib.
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r-- | ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c index e8d3576a71..2afb56ccf8 100644 --- a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c +++ b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c @@ -44,7 +44,7 @@ KvmtoolRtcMapMemory ( EfiGcdMemoryTypeMemoryMappedIo,
RtcPageBase,
EFI_PAGE_SIZE,
- EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
+ EFI_MEMORY_UC | EFI_MEMORY_RUNTIME | EFI_MEMORY_XP
);
if (EFI_ERROR (Status)) {
DEBUG ((
@@ -80,7 +80,7 @@ KvmtoolRtcMapMemory ( Status = gDS->SetMemorySpaceAttributes (
RtcPageBase,
EFI_PAGE_SIZE,
- EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
+ EFI_MEMORY_UC | EFI_MEMORY_RUNTIME | EFI_MEMORY_XP
);
if (EFI_ERROR (Status)) {
DEBUG ((
|