audk/ArmPkg/Library
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
..
ArmArchTimerLib ArmPkg/ArmArchTimerLib: correct typos 2016-04-01 17:19:24 +02:00
ArmCacheMaintenanceLib ArmPkg/ArmLib: don't invalidate entire I-cache on range operation 2016-05-12 13:53:08 +02:00
ArmDisassemblerLib ArmPkg/ArmDisassemblerLib: fix check for MSR instruction 2018-06-07 09:09:07 +02:00
ArmExceptionLib ArmPkg/ArmExceptionLib: Add implementation of new API 2017-12-08 14:38:49 +08:00
ArmGenericTimerPhyCounterLib ArmPkg: add reenable hook to ArmGenericTimerCounterLib 2018-04-26 08:31:12 +02:00
ArmGenericTimerVirtCounterLib ArmPkg: add reenable hook to ArmGenericTimerCounterLib 2018-04-26 08:31:12 +02:00
ArmGicArchLib ArmPkg: cache detected revision in ArmGicArchLib 2015-07-28 20:45:10 +00:00
ArmGicArchSecLib ArmPkg: copy ArmGicArchLib to ArmGicArchSecLib 2015-07-28 20:44:58 +00:00
ArmHvcLib ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib 2017-11-16 16:02:23 +00:00
ArmLib ArmPkg/ArmLib: add support for reading the max physical address space size 2018-11-29 18:54:09 +01:00
ArmMmuLib ArmPkg/ArmMmuLib ARM: fix thinko in second level page table handling 2019-01-13 17:33:28 +01:00
ArmMtlNullLib ArmPkg: MTL Library interface and Null library implementation 2018-04-23 12:12:23 +01:00
ArmPsciResetSystemLib Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg 2015-05-29 13:50:43 +00:00
ArmSmcLib ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib 2017-11-16 16:02:23 +00:00
ArmSmcLibNull ArmPkg/ArmSmcLibNull: move to generic C implementation 2016-08-11 12:29:31 +02:00
ArmSmcPsciResetSystemLib ArmPkg/ArmSmcPsciResetSystemLib: add missing call to ExitBootServices() 2018-11-21 12:02:34 +01:00
ArmSoftFloatLib ArmPkg/ArmSoftFloatLib: drop build flags specific to GCC46/GCC47 2019-01-08 02:39:43 +01:00
ArmSvcLib ArmPkg/ArmSvcLib: Add ArmSvcLib implementation. 2017-10-06 22:35:41 +01:00
CompilerIntrinsicsLib ArmPkg/CompilerIntrinsicsLib: fix GCC8 warning for __aeabi_memcpy aliases 2018-06-11 11:41:36 +02:00
DebugAgentSymbolsBaseLib ArmPkg: Fix typos in comments 2016-10-19 16:31:22 +01:00
DebugPeCoffExtraActionLib ArmPkg: Rectify file modes 2016-01-30 12:25:59 +00:00
DefaultExceptionHandlerLib ArmPkg/DefaultExceptionHandlerLib ARM: avoid endless loop in RELEASE builds 2018-12-19 21:03:08 +01:00
GccLto ArmPkg: add prebuilt glue binaries for GCC5 LTO support 2016-08-02 10:53:57 +02:00
OpteeLib ArmPkg/OpteeLib: Add dummy RPC handler 2018-12-06 17:55:45 +01:00
PeiServicesTablePointerLib ArmPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:35 +08:00
PlatformBootManagerLib ArmPkg/PlatformBootManagerLib: fix hotkey of boot option 2018-08-23 16:41:47 +01:00
RvdPeCoffExtraActionLib
SemiHostingDebugLib ArmPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:35 +08:00
SemiHostingSerialPortLib
SemihostLib ArmPkg/SemihostLib: switch to ASM_FUNC() asm macro 2016-08-11 12:40:52 +02:00
StandaloneMmMmuLib ArmPkg: fix StandaloneMmMmuLib subdirectory case 2018-11-27 13:00:45 +00:00