diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-04-11 15:47:24 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-04-14 18:01:52 +0200 |
commit | 61b02ba1f2a3f80fa06f5006f0aea1572093a067 (patch) | |
tree | 5ec0390876e68b78879c59e5492b8247b8ba45db /ArmPkg/Include/Library | |
parent | d354963f0dc350771167fa5d3c28b9de8d632d9c (diff) | |
download | edk2-platforms-61b02ba1f2a3f80fa06f5006f0aea1572093a067.tar.xz |
ArmPkg/AArch64Mmu: disable MMU during page table manipulations
On ARM, manipulating live page tables is cumbersome since the architecture
mandates the use of break-before-make, i.e., replacing a block entry with
a table entry requires an intermediate step via an invalid entry, or TLB
conflicts may occur.
Since it is not generally feasible to decide in the page table manipulation
routines whether such an invalid entry will result in those routines
themselves to become unavailable, use a function that is callable with
the MMU off (i.e., a leaf function that does not access the stack) to
perform the change of a block entry into a table entry.
Note that the opposite should never occur, i.e., table entries are never
coalesced into block entries.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'ArmPkg/Include/Library')
-rw-r--r-- | ArmPkg/Include/Library/ArmLib.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index 15f610d82e..1689f0072d 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -613,4 +613,10 @@ ArmClearMemoryRegionReadOnly ( IN UINT64 Length
);
+VOID
+ArmReplaceLiveTranslationEntry (
+ IN UINT64 *Entry,
+ IN UINT64 Value
+ );
+
#endif // __ARM_LIB__
|