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>
This commit is contained in:
committed by
mergify[bot]
parent
ab644cfac5
commit
0487cac09f
@@ -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
|
||||
|
Reference in New Issue
Block a user