From 6d389121c85f38c1e993b02b90654164f6192832 Mon Sep 17 00:00:00 2001 From: Mikhail Krichanov Date: Fri, 13 Sep 2024 14:40:24 +0300 Subject: [PATCH] ArmMmuLib: Worked around lack of EL2&0 translation support. --- ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c index f3507b2f27..6a2970f8cf 100644 --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c @@ -464,7 +464,12 @@ GcdAttributeToPageAttribute ( PageAttributes |= TT_AP_RW_RW; } } else { - PageAttributes |= TT_UXN_MASK; + if (ArmReadCurrentEL () == AARCH64_EL1) { + // + // TODO: Add EL2&0 support. + // + PageAttributes |= TT_UXN_MASK; + } if ((GcdAttributes & EFI_MEMORY_RO) != 0) { PageAttributes |= TT_AP_NO_RO;