audk/ArmPkg
Ard Biesheuvel 28ce4cb359 ArmPkg/ArmMmuLib ARM: fix thinko in second level page table handling
PopulateLevel2PageTable () is invoked for [parts of] mappings that
start or end on a non-1 MB aligned address (or both). The size of
the mapping depends on both the start address modulo 1 MB and the
length of the mapping, but the logic that calculates this size is
flawed: subtracting 'start address modulo 1 MB' could result in a
negative value for the remaining length, which is obviously wrong.

So instead, take either RemainLength, or the rest of the 1 MB
block, whichever is smaller.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Eugene Cohen <eugene@hp.com>
2019-01-13 17:33:28 +01:00
..
Drivers ArmPkg/ArmScmiDxe: Add clock enable function 2018-12-21 18:30:46 +01:00
Filesystem/SemihostFs ArmPkg/SemihostFs: eliminate calls to deprecated string functions 2016-10-28 12:04:04 +01:00
Include ArmPkg/ArmScmiDxe: Add clock enable function 2018-12-21 18:30:46 +01:00
Library ArmPkg/ArmMmuLib ARM: fix thinko in second level page table handling 2019-01-13 17:33:28 +01:00
ArmPkg.dec ArmPkg/ArmScmiDxe: Add clock enable function 2018-12-21 18:30:46 +01:00
ArmPkg.dsc ArmPkg: remove redundant _ARM_PLATFORM_FLAGS overrides 2018-12-15 19:15:16 +01:00