Clean up BottomOfCarHeap, TopOfCarHeap, SizeOfTemporaryMemory, SizeOfCacheAsRam, MaxTopOfCarHeap from PeiCore's private data structure. Because after PI enabling, these data value can be got from SecCore's handoff data structure.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5786 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2008-09-03 06:51:30 +00:00
parent 6a1ae84a26
commit 63b623312d
3 changed files with 4 additions and 22 deletions

View File

@ -463,7 +463,7 @@ PeiDispatcher (
// //
// Reserve the size of new stack at bottom of physical memory // Reserve the size of new stack at bottom of physical memory
// //
OldPeiStackSize = Private->StackSize; OldPeiStackSize = (UINT64) SecCoreData->StackSize;
NewPeiStackSize = (RShiftU64 (Private->PhysicalMemoryLength, 1) + EFI_PAGE_MASK) & ~EFI_PAGE_MASK; NewPeiStackSize = (RShiftU64 (Private->PhysicalMemoryLength, 1) + EFI_PAGE_MASK) & ~EFI_PAGE_MASK;
if (FixedPcdGet32(PcdPeiCoreMaxPeiStackSize) > (UINT32) NewPeiStackSize) { if (FixedPcdGet32(PcdPeiCoreMaxPeiStackSize) > (UINT32) NewPeiStackSize) {
Private->StackSize = NewPeiStackSize; Private->StackSize = NewPeiStackSize;

View File

@ -34,7 +34,7 @@ InitializeMemoryServices (
) )
{ {
PrivateData->SwitchStackSignal = FALSE; PrivateData->SwitchStackSignal = FALSE;
// //
// First entering PeiCore, following code will initialized some field // First entering PeiCore, following code will initialized some field
@ -43,24 +43,11 @@ InitializeMemoryServices (
if (OldCoreData == NULL) { if (OldCoreData == NULL) {
PrivateData->PeiMemoryInstalled = FALSE; PrivateData->PeiMemoryInstalled = FALSE;
PrivateData->HobList.Raw = SecCoreData->PeiTemporaryRamBase;
PrivateData->BottomOfCarHeap = SecCoreData->PeiTemporaryRamBase;
PrivateData->TopOfCarHeap = (VOID *)((UINTN)(PrivateData->BottomOfCarHeap) + SecCoreData->PeiTemporaryRamSize);
PrivateData->SizeOfTemporaryMemory = SecCoreData->TemporaryRamSize;
PrivateData->StackSize = (UINT64) SecCoreData->StackSize;
DEBUG_CODE_BEGIN ();
PrivateData->SizeOfCacheAsRam = SecCoreData->PeiTemporaryRamSize + SecCoreData->StackSize;
PrivateData->MaxTopOfCarHeap = (VOID *) ((UINTN) PrivateData->BottomOfCarHeap + (UINTN) PrivateData->SizeOfCacheAsRam);
PrivateData->StackBase = (EFI_PHYSICAL_ADDRESS) (UINTN) SecCoreData->StackBase;
PrivateData->StackSize = (UINT64) SecCoreData->StackSize;
DEBUG_CODE_END ();
PrivateData->HobList.Raw = PrivateData->BottomOfCarHeap;
PeiCoreBuildHobHandoffInfoTable ( PeiCoreBuildHobHandoffInfoTable (
BOOT_WITH_FULL_CONFIGURATION, BOOT_WITH_FULL_CONFIGURATION,
(EFI_PHYSICAL_ADDRESS) (UINTN) PrivateData->BottomOfCarHeap, (EFI_PHYSICAL_ADDRESS) (UINTN) SecCoreData->PeiTemporaryRamBase,
(UINTN) SecCoreData->PeiTemporaryRamSize (UINTN) SecCoreData->PeiTemporaryRamSize
); );

View File

@ -147,14 +147,9 @@ typedef struct{
BOOLEAN PeiMemoryInstalled; BOOLEAN PeiMemoryInstalled;
EFI_PHYSICAL_ADDRESS StackBase; EFI_PHYSICAL_ADDRESS StackBase;
UINT64 StackSize; UINT64 StackSize;
VOID *BottomOfCarHeap;
VOID *TopOfCarHeap;
VOID *CpuIo; VOID *CpuIo;
EFI_PEI_SECURITY2_PPI *PrivateSecurityPpi; EFI_PEI_SECURITY2_PPI *PrivateSecurityPpi;
EFI_PEI_SERVICES ServiceTableShadow; EFI_PEI_SERVICES ServiceTableShadow;
UINTN SizeOfTemporaryMemory;
UINTN SizeOfCacheAsRam;
VOID *MaxTopOfCarHeap;
EFI_PEI_PPI_DESCRIPTOR *XipLoadFile; EFI_PEI_PPI_DESCRIPTOR *XipLoadFile;
EFI_PHYSICAL_ADDRESS PhysicalMemoryBegin; EFI_PHYSICAL_ADDRESS PhysicalMemoryBegin;
UINT64 PhysicalMemoryLength; UINT64 PhysicalMemoryLength;