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
This commit is contained in:
lgao4
2007-12-18 06:15:55 +00:00
parent a182eb4624
commit e111752c18
2 changed files with 23 additions and 5 deletions

View File

@@ -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).