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>
This commit is contained in:
Oliver Smith-Denny 2024-07-19 15:50:48 -07:00 committed by mergify[bot]
parent e10de1cb03
commit 1b8ca81133
1 changed files with 2 additions and 2 deletions

View File

@ -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 ((