Clean up BottomOfCarHeap, TopOfCarHeap, SizeOfTemporaryMemory, SizeOfCacheAsRam,...
authorklu2 <klu2@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 3 Sep 2008 06:51:30 +0000 (06:51 +0000)
committerklu2 <klu2@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 3 Sep 2008 06:51:30 +0000 (06:51 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@5786 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
edk2/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
edk2/MdeModulePkg/Core/Pei/PeiMain.h

index d31b721..f050ca9 100644 (file)
@@ -463,7 +463,7 @@ PeiDispatcher (
               //\r
               // Reserve the size of new stack at bottom of physical memory\r
               //\r
-              OldPeiStackSize = Private->StackSize;\r
+              OldPeiStackSize = (UINT64) SecCoreData->StackSize;\r
               NewPeiStackSize = (RShiftU64 (Private->PhysicalMemoryLength, 1) + EFI_PAGE_MASK) & ~EFI_PAGE_MASK;\r
               if (FixedPcdGet32(PcdPeiCoreMaxPeiStackSize) > (UINT32) NewPeiStackSize) {\r
                 Private->StackSize = NewPeiStackSize;\r
index 7e841c3..9c57083 100644 (file)
@@ -34,7 +34,7 @@ InitializeMemoryServices (
   )\r
 {\r
   \r
-  PrivateData->SwitchStackSignal      = FALSE;\r
+  PrivateData->SwitchStackSignal    = FALSE;\r
 \r
   //\r
   // First entering PeiCore, following code will initialized some field\r
@@ -43,24 +43,11 @@ InitializeMemoryServices (
   if (OldCoreData == NULL) {\r
 \r
     PrivateData->PeiMemoryInstalled = FALSE;\r
-\r
-    PrivateData->BottomOfCarHeap        = SecCoreData->PeiTemporaryRamBase; \r
-    PrivateData->TopOfCarHeap           = (VOID *)((UINTN)(PrivateData->BottomOfCarHeap) + SecCoreData->PeiTemporaryRamSize);\r
-    PrivateData->SizeOfTemporaryMemory  = SecCoreData->TemporaryRamSize;\r
-    PrivateData->StackSize              = (UINT64) SecCoreData->StackSize;\r
-    \r
-    DEBUG_CODE_BEGIN ();\r
-      PrivateData->SizeOfCacheAsRam = SecCoreData->PeiTemporaryRamSize + SecCoreData->StackSize;\r
-      PrivateData->MaxTopOfCarHeap  = (VOID *) ((UINTN) PrivateData->BottomOfCarHeap + (UINTN) PrivateData->SizeOfCacheAsRam);\r
-      PrivateData->StackBase        = (EFI_PHYSICAL_ADDRESS) (UINTN) SecCoreData->StackBase;\r
-      PrivateData->StackSize        = (UINT64) SecCoreData->StackSize;\r
-    DEBUG_CODE_END ();\r
-\r
-    PrivateData->HobList.Raw = PrivateData->BottomOfCarHeap;\r
+    PrivateData->HobList.Raw        = SecCoreData->PeiTemporaryRamBase;\r
     \r
     PeiCoreBuildHobHandoffInfoTable (\r
       BOOT_WITH_FULL_CONFIGURATION,\r
-      (EFI_PHYSICAL_ADDRESS) (UINTN) PrivateData->BottomOfCarHeap,\r
+      (EFI_PHYSICAL_ADDRESS) (UINTN) SecCoreData->PeiTemporaryRamBase,\r
       (UINTN) SecCoreData->PeiTemporaryRamSize\r
       );\r
 \r
index 0524d95..b1ccf5a 100644 (file)
@@ -147,14 +147,9 @@ typedef struct{
   BOOLEAN                            PeiMemoryInstalled;\r
   EFI_PHYSICAL_ADDRESS               StackBase;\r
   UINT64                             StackSize;\r
-  VOID                               *BottomOfCarHeap;\r
-  VOID                               *TopOfCarHeap;\r
   VOID                               *CpuIo;\r
   EFI_PEI_SECURITY2_PPI              *PrivateSecurityPpi;\r
   EFI_PEI_SERVICES                   ServiceTableShadow;\r
-  UINTN                              SizeOfTemporaryMemory;\r
-  UINTN                              SizeOfCacheAsRam;\r
-  VOID                               *MaxTopOfCarHeap;\r
   EFI_PEI_PPI_DESCRIPTOR             *XipLoadFile;\r
   EFI_PHYSICAL_ADDRESS               PhysicalMemoryBegin;\r
   UINT64                             PhysicalMemoryLength;\r