diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-03 06:51:30 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-03 06:51:30 +0000 |
commit | 63b623312ddbaa5e75efb02c210846af3816ac3a (patch) | |
tree | 88cbcdf3bcb7d8c15176dd48f347a8eff1f9ce92 | |
parent | 6a1ae84a261720085beafb32ebbe2d2b179e6056 (diff) | |
download | edk2-platforms-63b623312ddbaa5e75efb02c210846af3816ac3a.tar.xz |
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
-rw-r--r-- | MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 19 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain.h | 5 |
3 files changed, 4 insertions, 22 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index d31b72104f..f050ca9fd6 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -463,7 +463,7 @@ PeiDispatcher ( //
// 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;
if (FixedPcdGet32(PcdPeiCoreMaxPeiStackSize) > (UINT32) NewPeiStackSize) {
Private->StackSize = NewPeiStackSize;
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c index 7e841c3c46..9c570834da 100644 --- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c +++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c @@ -34,7 +34,7 @@ InitializeMemoryServices ( )
{
- PrivateData->SwitchStackSignal = FALSE;
+ PrivateData->SwitchStackSignal = FALSE;
//
// First entering PeiCore, following code will initialized some field
@@ -43,24 +43,11 @@ InitializeMemoryServices ( if (OldCoreData == NULL) {
PrivateData->PeiMemoryInstalled = FALSE;
-
- 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;
+ PrivateData->HobList.Raw = SecCoreData->PeiTemporaryRamBase;
PeiCoreBuildHobHandoffInfoTable (
BOOT_WITH_FULL_CONFIGURATION,
- (EFI_PHYSICAL_ADDRESS) (UINTN) PrivateData->BottomOfCarHeap,
+ (EFI_PHYSICAL_ADDRESS) (UINTN) SecCoreData->PeiTemporaryRamBase,
(UINTN) SecCoreData->PeiTemporaryRamSize
);
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index 0524d95636..b1ccf5aaab 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -147,14 +147,9 @@ typedef struct{ BOOLEAN PeiMemoryInstalled;
EFI_PHYSICAL_ADDRESS StackBase;
UINT64 StackSize;
- VOID *BottomOfCarHeap;
- VOID *TopOfCarHeap;
VOID *CpuIo;
EFI_PEI_SECURITY2_PPI *PrivateSecurityPpi;
EFI_PEI_SERVICES ServiceTableShadow;
- UINTN SizeOfTemporaryMemory;
- UINTN SizeOfCacheAsRam;
- VOID *MaxTopOfCarHeap;
EFI_PEI_PPI_DESCRIPTOR *XipLoadFile;
EFI_PHYSICAL_ADDRESS PhysicalMemoryBegin;
UINT64 PhysicalMemoryLength;
|