summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/ArmLib/AArch64
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-03-17 14:55:00 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-03-22 17:32:25 +0100
commitb5d89de167a683eeba3e2dbb6557f402b952cdc2 (patch)
tree78838a804165d8ae1e8492c79ec3b35c55909ea2 /ArmPkg/Library/ArmLib/AArch64
parent1b02a38329ecd4c396a6ec878ce1be10b1789aa5 (diff)
downloadedk2-b5d89de167a683eeba3e2dbb6557f402b952cdc2.tar.gz
edk2-b5d89de167a683eeba3e2dbb6557f402b952cdc2.tar.bz2
edk2-b5d89de167a683eeba3e2dbb6557f402b952cdc2.zip
ArmPkg/AArch64Mmu: use correct AP[] bits in ArmClearMemoryRegionReadOnly
The function ArmClearMemoryRegionReadOnly() was supposed to undo the effect of ArmSetMemoryRegionReadOnly(), but instead, it sets the permissions to EL0-no access, EL1-read-only. Since the EL0 bit should be 1 to align with EL2/3 (where the bit is SBO), use TT_AP_RW_RW instead, which makes the entry read-write for EL0 when executing at EL1, and read-write for all other levels. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg/Library/ArmLib/AArch64')
-rw-r--r--ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c b/ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c
index f967a64788..b7d23c6f32 100644
--- a/ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c
+++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c
@@ -558,7 +558,7 @@ ArmClearMemoryRegionReadOnly (
return SetMemoryRegionAttribute (
BaseAddress,
Length,
- TT_AP_NO_RO,
+ TT_AP_RW_RW,
~(TT_ADDRESS_MASK_BLOCK_ENTRY | TT_AP_MASK));
}