\r
VOID\r
PrePiMain (\r
- IN UINTN UefiMemoryBase,\r
- IN UINTN StacksBase,\r
- IN UINT64 StartTimeStamp\r
+ IN UINTN UefiMemoryBase,\r
+ IN UINTN StacksBase,\r
+ IN UINT64 StartTimeStamp\r
)\r
{\r
- EFI_HOB_HANDOFF_INFO_TABLE* HobList;\r
- EFI_STATUS Status;\r
- CHAR8 Buffer[100];\r
- UINTN CharCount;\r
- UINTN StacksSize;\r
+ EFI_HOB_HANDOFF_INFO_TABLE *HobList;\r
+ EFI_STATUS Status;\r
+ CHAR8 Buffer[100];\r
+ UINTN CharCount;\r
+ UINTN StacksSize;\r
\r
// Initialize the architecture specific bits\r
ArchInitialize ();\r
\r
// Declare the PI/UEFI memory region\r
HobList = HobConstructor (\r
- (VOID*)UefiMemoryBase,\r
- FixedPcdGet32 (PcdSystemMemoryUefiRegionSize),\r
- (VOID*)UefiMemoryBase,\r
- (VOID*)StacksBase // The top of the UEFI Memory is reserved for the stacks\r
- );\r
+ (VOID *)UefiMemoryBase,\r
+ FixedPcdGet32 (PcdSystemMemoryUefiRegionSize),\r
+ (VOID *)UefiMemoryBase,\r
+ (VOID *)StacksBase // The top of the UEFI Memory is reserved for the stacks\r
+ );\r
PrePeiSetHobList (HobList);\r
\r
//\r
// modifications we made with the caches and MMU off (such as the applied\r
// relocations) don't become invisible once we turn them on.\r
//\r
- InvalidateDataCacheRange((VOID *)(UINTN)PcdGet64 (PcdFdBaseAddress), PcdGet32 (PcdFdSize));\r
+ InvalidateDataCacheRange ((VOID *)(UINTN)PcdGet64 (PcdFdBaseAddress), PcdGet32 (PcdFdSize));\r
\r
// Initialize MMU and Memory HOBs (Resource Descriptor HOBs)\r
Status = MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUefiRegionSize));\r
\r
// Initialize the Serial Port\r
SerialPortInitialize ();\r
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"UEFI firmware (version %s built at %a on %a)\n\r",\r
- (CHAR16*)PcdGetPtr(PcdFirmwareVersionString), __TIME__, __DATE__);\r
- SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
+ CharCount = AsciiSPrint (\r
+ Buffer,\r
+ sizeof (Buffer),\r
+ "UEFI firmware (version %s built at %a on %a)\n\r",\r
+ (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString),\r
+ __TIME__,\r
+ __DATE__\r
+ );\r
+ SerialPortWrite ((UINT8 *)Buffer, CharCount);\r
\r
// Create the Stacks HOB (reserve the memory for all stacks)\r
StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);\r
BuildStackHob (StacksBase, StacksSize);\r
\r
- //TODO: Call CpuPei as a library\r
+ // TODO: Call CpuPei as a library\r
BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));\r
\r
// Set the Boot Mode\r
\r
VOID\r
CEntryPoint (\r
- IN UINTN MpId,\r
- IN UINTN UefiMemoryBase,\r
- IN UINTN StacksBase\r
+ IN UINTN MpId,\r
+ IN UINTN UefiMemoryBase,\r
+ IN UINTN StacksBase\r
)\r
{\r
- UINT64 StartTimeStamp;\r
+ UINT64 StartTimeStamp;\r
\r
if (PerformanceMeasurementEnabled ()) {\r
// Initialize the Timer Library to setup the Timer HW controller\r
\r
VOID\r
RelocatePeCoffImage (\r
- IN EFI_PEI_FV_HANDLE FwVolHeader,\r
- IN PE_COFF_LOADER_READ_FILE ImageRead\r
+ IN EFI_PEI_FV_HANDLE FwVolHeader,\r
+ IN PE_COFF_LOADER_READ_FILE ImageRead\r
)\r
{\r
EFI_PEI_FILE_HANDLE FileHandle;\r
EFI_STATUS Status;\r
\r
FileHandle = NULL;\r
- Status = FfsFindNextFile (EFI_FV_FILETYPE_SECURITY_CORE, FwVolHeader,\r
- &FileHandle);\r
+ Status = FfsFindNextFile (\r
+ EFI_FV_FILETYPE_SECURITY_CORE,\r
+ FwVolHeader,\r
+ &FileHandle\r
+ );\r
ASSERT_EFI_ERROR (Status);\r
\r
Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &SectionData);\r
if (EFI_ERROR (Status)) {\r
Status = FfsFindSectionData (EFI_SECTION_TE, FileHandle, &SectionData);\r
}\r
+\r
ASSERT_EFI_ERROR (Status);\r
\r
ZeroMem (&ImageContext, sizeof ImageContext);\r
\r
- ImageContext.Handle = (EFI_HANDLE)SectionData;\r
- ImageContext.ImageRead = ImageRead;\r
+ ImageContext.Handle = (EFI_HANDLE)SectionData;\r
+ ImageContext.ImageRead = ImageRead;\r
PeCoffLoaderGetImageInfo (&ImageContext);\r
\r
if (ImageContext.ImageAddress != (UINTN)SectionData) {\r