diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-09-24 18:26:19 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-10-19 09:07:13 +0000 |
commit | 0487cac09f23f2f3e3258b903937dc1d45426096 (patch) | |
tree | 7f7886c2bf8ed9db28a6933d5983532dfb9a89b7 /ArmPkg/Include | |
parent | ab644cfac595608f5c8a65531e410d25f0e94c61 (diff) | |
download | edk2-0487cac09f23f2f3e3258b903937dc1d45426096.tar.gz |
ArmPkg/ArmMmuLib: Disable and re-enable MMU only when needed
When updating a page table descriptor in a way that requires break
before make, we temporarily disable the MMU to ensure that we don't
unmap the memory region that the code itself is executing from.
However, this is a condition we can check in a straight-forward manner,
and if the regions are disjoint, we don't have to bother with the MMU
controls, and we can just perform an ordinary break before make.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r-- | ArmPkg/Include/Library/ArmMmuLib.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ArmPkg/Include/Library/ArmMmuLib.h b/ArmPkg/Include/Library/ArmMmuLib.h index 7538a8274a..b745e2230e 100644 --- a/ArmPkg/Include/Library/ArmMmuLib.h +++ b/ArmPkg/Include/Library/ArmMmuLib.h @@ -52,9 +52,10 @@ ArmClearMemoryRegionReadOnly ( VOID
EFIAPI
ArmReplaceLiveTranslationEntry (
- IN UINT64 *Entry,
- IN UINT64 Value,
- IN UINT64 RegionStart
+ IN UINT64 *Entry,
+ IN UINT64 Value,
+ IN UINT64 RegionStart,
+ IN BOOLEAN DisableMmu
);
EFI_STATUS
|