// Loading Module at Fixed Address is enabled\r
//\r
PeiLoadFixAddressHook(Private);\r
+ //\r
+ // if Loading Module at Fixed Address is enabled, This is the first invoke to page\r
+ // allocation for Pei Code range. This memory range should be reserved for loading PEIMs\r
+ //\r
+ LoadFixPeiCodeBegin = AllocatePages((UINTN)PcdGet32(PcdLoadFixAddressPeiCodePageNumber));\r
+ DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PeiCodeBegin = 0x%lX, PeiCodeTop= 0x%lX\n", (UINT64)LoadFixPeiCodeBegin, (UINT64)((UINTN)LoadFixPeiCodeBegin + PcdGet32(PcdLoadFixAddressPeiCodePageNumber) * EFI_PAGE_SIZE)));\r
}\r
\r
//\r
PrivateInMem->PeimDispatcherReenter = TRUE;\r
\r
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) {\r
- //\r
- // if Loading Module at Fixed Address is enabled, This is the first invoke to page \r
- // allocation for Pei Core segment. This memory segment should be reserved for loading PEIM\r
- //\r
- LoadFixPeiCodeBegin = AllocatePages((UINTN)PcdGet32(PcdLoadFixAddressPeiCodePageNumber));\r
- DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PeiCodeBegin = 0x%lx, PeiCodeTop= 0xl%x\n", (UINTN)LoadFixPeiCodeBegin, ((UINTN)LoadFixPeiCodeBegin) + PcdGet32(PcdLoadFixAddressPeiCodePageNumber) * EFI_PAGE_SIZE)); \r
//\r
// if Loading Module at Fixed Address is enabled, allocate the PEI code memory range usage bit map array.\r
- // Every bit in the array indicate the status of the corresponding memory page, available or not\r
+ // Every bit in the array indicate the status of the corresponding memory page available or not\r
//\r
PrivateInMem->PeiCodeMemoryRangeUsageBitMap = AllocateZeroPool (((PcdGet32(PcdLoadFixAddressPeiCodePageNumber)>>6) + 1)*sizeof(UINT64));\r
}\r