]> git.proxmox.com Git - mirror_edk2.git/commit - ArmPkg/Library/ArmLib/AArch64/AArch64Support.S
ArmPkg/AArch64Mmu: disable MMU during page table manipulations
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 11 Apr 2016 13:47:24 +0000 (15:47 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 14 Apr 2016 16:01:52 +0000 (18:01 +0200)
commit61b02ba1f2a3f80fa06f5006f0aea1572093a067
tree5ec0390876e68b78879c59e5492b8247b8ba45db
parentd354963f0dc350771167fa5d3c28b9de8d632d9c
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>
ArmPkg/Include/Library/ArmLib.h
ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
ArmPkg/Library/ArmLib/AArch64/AArch64LibConstructor.c [new file with mode: 0644]
ArmPkg/Library/ArmLib/AArch64/AArch64Mmu.c
ArmPkg/Library/ArmLib/AArch64/AArch64Support.S