audk/ArmPkg/Library/ArmMmuLib/AArch64
Ard Biesheuvel d32702d2c2 ArmPkg/ArmMmuLib: use a pool allocation for the root table
Currently, we allocate a full page for the root translation table, even
if the configured translation only requires two entries (16 bytes) for
the root level, which happens to be the case for a 40 bit VA. Likewise,
for a 36-bit VA space, the root table only needs 16 entries of 8 bytes
each, adding up to 128 bytes.

So switch to a pool allocation for the root table if we can, but take into
account that the architecture requires it to be naturally aligned to its
size, i.e., a 64 byte table requires 64 byte alignment, whereas pool
allocations in general are only guaranteed to be aligned to 8 bytes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-09-13 13:43:11 +01:00
..
ArmMmuLibCore.c ArmPkg/ArmMmuLib: use a pool allocation for the root table 2016-09-13 13:43:11 +01:00
ArmMmuLibReplaceEntry.S ArmPkg/ArmMmuLib: switch to ASM_FUNC() asm macro 2016-08-11 12:29:31 +02:00
ArmMmuPeiLibConstructor.c