summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-02-07 17:32:19 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-16 21:14:49 +0000
commit28dce5b130f75750bae4b5643dc57bea1aefd30c (patch)
tree90cb32236a53a80ba1e5d34687f46994d4dbf839 /ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
parent699372d388a796441d938dba4fdb6525b69ea250 (diff)
downloadedk2-28dce5b130f75750bae4b5643dc57bea1aefd30c.tar.gz
edk2-28dce5b130f75750bae4b5643dc57bea1aefd30c.tar.bz2
edk2-28dce5b130f75750bae4b5643dc57bea1aefd30c.zip
ArmPkg/ArmMmuLib ARM: Isolate the access flag from AP mask
Split the ARM permission fields in the short descriptors into an access flag and AP[2:1] as per the recommendation in the ARM ARM. This makes the access flag available separately, which allows us to implement EFI_MEMORY_RP memory analogous to how it will be implemented for AArch64. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'ArmPkg/Library/ArmLib/Arm/ArmV7Support.S')
-rw-r--r--ArmPkg/Library/ArmLib/Arm/ArmV7Support.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
index 4925f6628e..1f396adffc 100644
--- a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
+++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
@@ -16,6 +16,7 @@
.set CTRL_C_BIT, (1 << 2)
.set CTRL_B_BIT, (1 << 7)
.set CTRL_I_BIT, (1 << 12)
+.set CTRL_AFE_BIT,(1 << 29)
ASM_FUNC(ArmInvalidateDataCacheEntryByMVA)
@@ -64,6 +65,7 @@ ASM_FUNC(ArmInvalidateInstructionCache)
ASM_FUNC(ArmEnableMmu)
mrc p15,0,R0,c1,c0,0
orr R0,R0,#1
+ orr R0,R0,#CTRL_AFE_BIT
mcr p15,0,R0,c1,c0,0
dsb
isb