\r
#include "PeiMain.h"\r
\r
-///\r
-/// temporary memory is filled with this initial value during SEC phase\r
-///\r
-#define INIT_CAR_VALUE 0x5AA55AA5\r
-\r
/**\r
\r
Discover all Peims and optional Apriori file in one FV. There is at most one\r
// usage in temporary memory for debugging.\r
//\r
DEBUG_CODE_BEGIN ();\r
- UINT32 *StackPointer;\r
+ UINT32 *StackPointer;\r
+ EFI_PEI_HOB_POINTERS Hob;\r
\r
for (StackPointer = (UINT32*)SecCoreData->StackBase;\r
(StackPointer < (UINT32*)((UINTN)SecCoreData->StackBase + SecCoreData->StackSize)) \\r
- && (*StackPointer == INIT_CAR_VALUE);\r
+ && (*StackPointer == PcdGet32 (PcdInitValueInTempStack));\r
StackPointer ++);\r
\r
DEBUG ((DEBUG_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize));\r
DEBUG ((DEBUG_INFO, " temporary memory heap used for HobList: %d bytes.\n",\r
(UINT32)((UINTN)Private->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN)Private->HobList.Raw)\r
));\r
+ DEBUG ((DEBUG_INFO, " temporary memory heap occupied by memory pages: %d bytes.\n",\r
+ (UINT32)(UINTN)(Private->HobList.HandoffInformationTable->EfiMemoryTop - Private->HobList.HandoffInformationTable->EfiFreeMemoryTop)\r
+ ));\r
+ for (Hob.Raw = Private->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
+ if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) {\r
+ DEBUG ((DEBUG_INFO, "Memory Allocation 0x%08x 0x%0lx - 0x%0lx\n", \\r
+ Hob.MemoryAllocation->AllocDescriptor.MemoryType, \\r
+ Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress, \\r
+ Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress + Hob.MemoryAllocation->AllocDescriptor.MemoryLength - 1));\r
+ }\r
+ }\r
DEBUG_CODE_END ();\r
\r
if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) {\r