]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/ArmMmuLib: deobfuscate GetRootTranslationTableInfo ()
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 9 Sep 2016 09:52:25 +0000 (10:52 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 13 Sep 2016 12:42:57 +0000 (13:42 +0100)
commite93cb72e597df7b37aad7910787b8ecaeac31382
tree619edd9cc706d557b3049f69161c85e6a1d6fa11
parentb6b33f67dfc6e81dbbdd10c102f2665e7472cd4d
ArmPkg/ArmMmuLib: deobfuscate GetRootTranslationTableInfo ()

The relations between T0SZ, the number of translation levels and the
size/alignment of the root table can be expressed in simple arithmetic
expressions, so get rid of the lookup table.

Note that this disregards the fact that the maximum value of T0SZ is
39 not 42 (as one would expect for the smallest VA size using 2 levels)
but since this corresponds to a VA size of 32 MB and 4 MB, respectively,
neither of which are sufficient to run UEFI, we can safely ignore the
distinction.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c