mirror_edk2/MdeModulePkg/Core/Dxe
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
..
Dispatcher MdeModulePkg DxeCore: Fix VS2013 build failure. 2014-11-19 07:11:59 +00:00
DxeMain Add UEFI 2.5 properties table support in DXE core. 2015-06-05 12:08:12 +00:00
Event MdeModulePkg DxeCore: Add debug message to assist TPL related issues. 2015-06-01 06:40:38 +00:00
FwVol MdeModulePkg DxeCore: Fix potential FV overflow of 4GB boundary on a 32-bit systems. 2014-12-17 00:39:51 +00:00
FwVolBlock DxeCore is designed to trust input data, so add comments to reminder caller to do check to follow PI specification when necessary. 2014-01-17 03:42:09 +00:00
Gcd MdeModulePkg: Update the short name for persistent memory type. 2015-05-19 07:22:14 +00:00
Hand Update code to support VS2013 tool chain. 2014-07-28 07:52:57 +00:00
Image Add UEFI 2.5 properties table support in DXE core. 2015-06-05 12:08:12 +00:00
Library Update the copyright notice format 2010-04-24 09:49:11 +00:00
Mem MdeModulePkg: Fix bug of AllocatePages for large alignment 2015-06-08 09:24:31 +00:00
Misc Fix GCC build error. 2015-06-05 13:19:45 +00:00
SectionExtraction MdeModulePkg DxeCore: Don't cache memory mapped IO FV. 2014-08-27 08:31:44 +00:00
DxeCore.uni MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files. 2014-09-03 08:39:12 +00:00
DxeCoreExtra.uni MdeModulePkg: INF/DEC file updates to EDK II packages 2014-08-28 06:53:43 +00:00
DxeMain.h Add UEFI 2.5 properties table support in DXE core. 2015-06-05 12:08:12 +00:00
DxeMain.inf Add UEFI 2.5 properties table support in DXE core. 2015-06-05 12:08:12 +00:00