Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: ab644cfac595608f5c8a65531e410d25f0e94c61 https://github.com/tianocore/edk2/commit/ab644cfac595608f5c8a65531e410d25f0e94c61 Author: Ard Biesheuvel <a...@kernel.org> Date: 2022-10-19 (Wed, 19 Oct 2022)
Changed paths: M ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c Log Message: ----------- ArmPkg/ArmMmuLib: don't replace table entries with block entries Drop the optimization that replaces table entries with block entries and frees the page tables in the subhierarchy that is being replaced. This rarely occurs in practice anyway, and will require more elaborate TLB maintenance once we switch to a different approach where we no longer disable the MMU and nuke the TLB entirely every time we update a descriptor in a way that requires break-before-make (BBM). Signed-off-by: Ard Biesheuvel <a...@kernel.org> Reviewed-by: Leif Lindholm <quic_llind...@quicinc.com> Commit: 0487cac09f23f2f3e3258b903937dc1d45426096 https://github.com/tianocore/edk2/commit/0487cac09f23f2f3e3258b903937dc1d45426096 Author: Ard Biesheuvel <a...@kernel.org> Date: 2022-10-19 (Wed, 19 Oct 2022) Changed paths: M ArmPkg/Include/Library/ArmMmuLib.h M ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c M ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibReplaceEntry.S Log Message: ----------- 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 <a...@kernel.org> Reviewed-by: Leif Lindholm <quic_llind...@quicinc.com> Commit: 999c53e2caf4a97538c7960f8c2862098541ffb8 https://github.com/tianocore/edk2/commit/999c53e2caf4a97538c7960f8c2862098541ffb8 Author: Ard Biesheuvel <a...@kernel.org> Date: 2022-10-19 (Wed, 19 Oct 2022) Changed paths: M ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c Log Message: ----------- ArmPkg/ArmMmuLib: permit initial configuration with MMU enabled Permit the use of this library with the MMU and caches already enabled. This removes the need for any cache maintenance for coherency, and is generally better for robustness and performance, especially when running under virtualization. Note that this means we have to defer assignment of TTBR0 until the page tables are ready to be used, and so UpdateRegionMapping() can no longer read back TTBR0 directly to discover the root table address. Signed-off-by: Ard Biesheuvel <a...@kernel.org> Acked-by: Leif Lindholm <quic_llind...@quicinc.com> Commit: 31b16384688df9ce0e8f59021fd667e47d7d3972 https://github.com/tianocore/edk2/commit/31b16384688df9ce0e8f59021fd667e47d7d3972 Author: Ard Biesheuvel <a...@kernel.org> Date: 2022-10-19 (Wed, 19 Oct 2022) Changed paths: M ArmPkg/ArmPkg.dec M ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c M ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuPeiLibConstructor.c M ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf M ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf Log Message: ----------- ArmPkg/ArmMmuLib: Reuse XIP MMU routines when splitting entries In order to reduce the likelihood that we will need to rely on the logic that disables and re-enables the MMU for updating a page table entry safely, expose the XIP version of the helper routine via a HOB and use it instead of the one that is copied into DRAM. Since the XIP copy is already clean to the PoC, and will never end up getting unmapped during a block entry split, we can use it safely without any cache maintenance, and without running the risk of pulling the rug from under our feet when updating an entry by going through an invalid mapping. Signed-off-by: Ard Biesheuvel <a...@kernel.org> Acked-by: Leif Lindholm <quic_llind...@quicinc.com> Compare: https://github.com/tianocore/edk2/compare/0f6eccdbf758...31b16384688d _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits