From e111752c1894be73780c6c279cbc31acf69fa6c8 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 18 Dec 2007 06:15:55 +0000 Subject: Fix one bug in PeiExtractGuidedSectionLib to convert the address after hob start address is changed. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4398 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MdePkg/Library/DxeMemoryAllocationLib') diff --git a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c index 5a7ee4d170..3e04bb1cba 100644 --- a/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c @@ -206,7 +206,7 @@ InternalAllocateAlignedPages ( return NULL; } AlignedMemory = ((UINTN) Memory + AlignmentMask) & ~AlignmentMask; - UnalignedPages = EFI_SIZE_TO_PAGES ((UINTN) Memory - AlignedMemory); + UnalignedPages = EFI_SIZE_TO_PAGES (AlignedMemory - (UINTN) Memory); if (UnalignedPages > 0) { // // Free first unaligned page(s). -- cgit v1.2.3