edk2/MdeModulePkg
Heyi Guo 1365bedd48 MdeModulePkg: Fix bug of AllocatePages for large alignment
DescEnd will be clipped for alignment in CoreFindFreePagesI, and it
may fall below DescStart, when alignment is more than 16KB (included)
and both DescStart and original DescEnd fall into a single range of
such alignment. This results in a huge size (Negative number in
unsigned type) for this descriptor, fulfilling the allocation
requirement but failing to run ConvertPages; at last it causes
occasional failure of AllocatePages.

A simple comparison is added to ensure we would never get a negative
number.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17575 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-08 09:24:31 +00:00
..
Application MdeModulePkg: Update memory profile for OEM reserved memory type. 2015-05-18 01:30:04 +00:00
Bus MdeModulePkg: Refine the format of INF file. 2015-06-05 03:22:08 +00:00
Core MdeModulePkg: Fix bug of AllocatePages for large alignment 2015-06-08 09:24:31 +00:00
Include MdeModulePkg: Provide EfiBootManagerRegisterBootDescriptionHandler 2015-06-02 09:03:38 +00:00
Library MdeModulePkg: Add %u and %lu support for PrintLib and DebugLib. 2015-06-08 05:34:08 +00:00
Logo MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
Universal Add UEFI 2.5 properties table support in DXE core. 2015-06-05 12:08:12 +00:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdeModulePkg.dec Add UEFI 2.5 properties table support in DXE core. 2015-06-05 12:08:12 +00:00
MdeModulePkg.dsc Add UEFI 2.5 properties table support in DXE core. 2015-06-05 12:08:12 +00:00
MdeModulePkg.uni MdeModulePkg: Update memory profile for OEM reserved memory type. 2015-05-18 01:30:04 +00:00
MdeModulePkgExtra.uni MdeModulePkg: INF/DEC file updates to EDK II packages 2014-08-28 06:55:48 +00:00