summaryrefslogtreecommitdiff
path: root/MdePkg/Library/DxeMemoryAllocationLib
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-18 06:15:55 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-18 06:15:55 +0000
commite111752c1894be73780c6c279cbc31acf69fa6c8 (patch)
tree13b8b7aafdba227cf679044bb7bd3c673e79603f /MdePkg/Library/DxeMemoryAllocationLib
parenta182eb4624778902c5042300e529d47a6741c281 (diff)
downloadedk2-platforms-e111752c1894be73780c6c279cbc31acf69fa6c8.tar.xz
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
Diffstat (limited to 'MdePkg/Library/DxeMemoryAllocationLib')
-rw-r--r--MdePkg/Library/DxeMemoryAllocationLib/MemoryAllocationLib.c2
1 files changed, 1 insertions, 1 deletions
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).