/** @file\r
EFI PEI Core memory services\r
- \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
\r
IN PEI_CORE_INSTANCE *OldCoreData\r
)\r
{\r
- \r
+\r
PrivateData->SwitchStackSignal = FALSE;\r
\r
//\r
\r
PrivateData->PeiMemoryInstalled = FALSE;\r
PrivateData->HobList.Raw = SecCoreData->PeiTemporaryRamBase;\r
- \r
+\r
PeiCoreBuildHobHandoffInfoTable (\r
BOOT_WITH_FULL_CONFIGURATION,\r
(EFI_PHYSICAL_ADDRESS) (UINTN) SecCoreData->PeiTemporaryRamBase,\r
//\r
PrivateData->Ps = &(PrivateData->ServiceTableShadow);\r
}\r
- \r
+\r
return;\r
}\r
\r
This routine will hold discoveried memory information into PeiCore's private data,\r
and set SwitchStackSignal flag. After PEIM who discovery memory is dispatched,\r
PeiDispatcher will migrate temporary memory to permenement memory.\r
- \r
+\r
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
@param MemoryBegin Start of memory address.\r
@param MemoryLength Length of memory.\r
// PEI_SERVICE.InstallPeiMemory should only be called one time during whole PEI phase.\r
// If it is invoked more than one time, ASSERT information is given for developer debugging in debug tip and\r
// simply return EFI_SUCESS in release tip to ignore it.\r
- // \r
+ //\r
if (PrivateData->PeiMemoryInstalled) {\r
DEBUG ((EFI_D_ERROR, "ERROR: PeiInstallPeiMemory is called more than once!\n"));\r
ASSERT (FALSE);\r
return EFI_SUCCESS;\r
}\r
- \r
+\r
PrivateData->PhysicalMemoryBegin = MemoryBegin;\r
PrivateData->PhysicalMemoryLength = MemoryLength;\r
PrivateData->FreePhysicalMemoryTop = MemoryBegin + MemoryLength;\r
- \r
+\r
PrivateData->SwitchStackSignal = TRUE;\r
\r
- return EFI_SUCCESS; \r
+ return EFI_SUCCESS;\r
}\r
\r
/**\r
/**\r
\r
Pool allocation service. Before permanent memory is discoveried, the pool will\r
- be allocated the heap in the temporary memory. Genenrally, the size of heap in temporary \r
- memory does not exceed to 64K, so the biggest pool size could be allocated is \r
+ be allocated the heap in the temporary memory. Genenrally, the size of heap in temporary\r
+ memory does not exceed to 64K, so the biggest pool size could be allocated is\r
64K.\r
\r
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
// If some "post-memory" PEIM wishes to allocate larger pool,\r
// it should use AllocatePages service instead.\r
//\r
- \r
+\r
//\r
// Generally, the size of heap in temporary memory does not exceed to 64K,\r
// HobLength is multiples of 8 bytes, so the maxmium size of pool is 0xFFF8 - sizeof (EFI_HOB_MEMORY_POOL)\r
if (Size > (0xFFF8 - sizeof (EFI_HOB_MEMORY_POOL))) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
- \r
+\r
Status = PeiServicesCreateHob (\r
EFI_HOB_TYPE_MEMORY_POOL,\r
(UINT16)(sizeof (EFI_HOB_MEMORY_POOL) + Size),\r
(VOID **)&Hob\r
);\r
ASSERT_EFI_ERROR (Status);\r
- *Buffer = Hob+1; \r
+ *Buffer = Hob+1;\r
\r
return Status;\r
}\r