diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:53:52 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 2b16a4fb91b9b31c0d152588f5ac51080c6c0763 (patch) | |
tree | 72c352a8e807a4720c1675a755969206c6370588 /ArmVirtPkg/PrePi | |
parent | 40b0b23ed34f48c26d711d3e4613a4bb35eeadff (diff) | |
download | edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.tar.gz edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.tar.bz2 edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.zip |
ArmVirtPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the ArmVirtPkg package
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'ArmVirtPkg/PrePi')
-rw-r--r-- | ArmVirtPkg/PrePi/FdtParser.c | 19 | ||||
-rwxr-xr-x | ArmVirtPkg/PrePi/PrePi.c | 66 | ||||
-rw-r--r-- | ArmVirtPkg/PrePi/PrePi.h | 10 |
3 files changed, 53 insertions, 42 deletions
diff --git a/ArmVirtPkg/PrePi/FdtParser.c b/ArmVirtPkg/PrePi/FdtParser.c index 4754cba55c..5a91f7e62d 100644 --- a/ArmVirtPkg/PrePi/FdtParser.c +++ b/ArmVirtPkg/PrePi/FdtParser.c @@ -14,11 +14,11 @@ FindMemnode ( OUT UINT64 *SystemMemorySize
)
{
- INT32 MemoryNode;
- INT32 AddressCells;
- INT32 SizeCells;
- INT32 Length;
- CONST INT32 *Prop;
+ INT32 MemoryNode;
+ INT32 AddressCells;
+ INT32 SizeCells;
+ INT32 Length;
+ CONST INT32 *Prop;
if (fdt_check_header (DeviceTreeBlob) != 0) {
return FALSE;
@@ -37,7 +37,7 @@ FindMemnode ( // from the root node, or use the default if not provided.
//
AddressCells = 1;
- SizeCells = 1;
+ SizeCells = 1;
Prop = fdt_getprop (DeviceTreeBlob, 0, "#address-cells", &Length);
if (Length == 4) {
@@ -63,6 +63,7 @@ FindMemnode ( if (AddressCells > 1) {
*SystemMemoryBase = (*SystemMemoryBase << 32) | fdt32_to_cpu (Prop[1]);
}
+
Prop += AddressCells;
*SystemMemorySize = fdt32_to_cpu (Prop[0]);
@@ -75,10 +76,10 @@ FindMemnode ( VOID
CopyFdt (
- IN VOID *FdtDest,
- IN VOID *FdtSource
+ IN VOID *FdtDest,
+ IN VOID *FdtSource
)
{
- fdt_pack(FdtSource);
+ fdt_pack (FdtSource);
CopyMem (FdtDest, FdtSource, fdt_totalsize (FdtSource));
}
diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c index 4f0c3f98ba..c15dc305fc 100755 --- a/ArmVirtPkg/PrePi/PrePi.c +++ b/ArmVirtPkg/PrePi/PrePi.c @@ -30,27 +30,27 @@ ProcessLibraryConstructorList ( VOID
PrePiMain (
- IN UINTN UefiMemoryBase,
- IN UINTN StacksBase,
- IN UINT64 StartTimeStamp
+ IN UINTN UefiMemoryBase,
+ IN UINTN StacksBase,
+ IN UINT64 StartTimeStamp
)
{
- EFI_HOB_HANDOFF_INFO_TABLE* HobList;
- EFI_STATUS Status;
- CHAR8 Buffer[100];
- UINTN CharCount;
- UINTN StacksSize;
+ EFI_HOB_HANDOFF_INFO_TABLE *HobList;
+ EFI_STATUS Status;
+ CHAR8 Buffer[100];
+ UINTN CharCount;
+ UINTN StacksSize;
// Initialize the architecture specific bits
ArchInitialize ();
// Declare the PI/UEFI memory region
HobList = HobConstructor (
- (VOID*)UefiMemoryBase,
- FixedPcdGet32 (PcdSystemMemoryUefiRegionSize),
- (VOID*)UefiMemoryBase,
- (VOID*)StacksBase // The top of the UEFI Memory is reserved for the stacks
- );
+ (VOID *)UefiMemoryBase,
+ FixedPcdGet32 (PcdSystemMemoryUefiRegionSize),
+ (VOID *)UefiMemoryBase,
+ (VOID *)StacksBase // The top of the UEFI Memory is reserved for the stacks
+ );
PrePeiSetHobList (HobList);
//
@@ -58,7 +58,7 @@ PrePiMain ( // modifications we made with the caches and MMU off (such as the applied
// relocations) don't become invisible once we turn them on.
//
- InvalidateDataCacheRange((VOID *)(UINTN)PcdGet64 (PcdFdBaseAddress), PcdGet32 (PcdFdSize));
+ InvalidateDataCacheRange ((VOID *)(UINTN)PcdGet64 (PcdFdBaseAddress), PcdGet32 (PcdFdSize));
// Initialize MMU and Memory HOBs (Resource Descriptor HOBs)
Status = MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUefiRegionSize));
@@ -66,15 +66,21 @@ PrePiMain ( // Initialize the Serial Port
SerialPortInitialize ();
- CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"UEFI firmware (version %s built at %a on %a)\n\r",
- (CHAR16*)PcdGetPtr(PcdFirmwareVersionString), __TIME__, __DATE__);
- SerialPortWrite ((UINT8 *) Buffer, CharCount);
+ CharCount = AsciiSPrint (
+ Buffer,
+ sizeof (Buffer),
+ "UEFI firmware (version %s built at %a on %a)\n\r",
+ (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString),
+ __TIME__,
+ __DATE__
+ );
+ SerialPortWrite ((UINT8 *)Buffer, CharCount);
// Create the Stacks HOB (reserve the memory for all stacks)
StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);
BuildStackHob (StacksBase, StacksSize);
- //TODO: Call CpuPei as a library
+ // TODO: Call CpuPei as a library
BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));
// Set the Boot Mode
@@ -101,12 +107,12 @@ PrePiMain ( VOID
CEntryPoint (
- IN UINTN MpId,
- IN UINTN UefiMemoryBase,
- IN UINTN StacksBase
+ IN UINTN MpId,
+ IN UINTN UefiMemoryBase,
+ IN UINTN StacksBase
)
{
- UINT64 StartTimeStamp;
+ UINT64 StartTimeStamp;
if (PerformanceMeasurementEnabled ()) {
// Initialize the Timer Library to setup the Timer HW controller
@@ -132,8 +138,8 @@ CEntryPoint ( VOID
RelocatePeCoffImage (
- IN EFI_PEI_FV_HANDLE FwVolHeader,
- IN PE_COFF_LOADER_READ_FILE ImageRead
+ IN EFI_PEI_FV_HANDLE FwVolHeader,
+ IN PE_COFF_LOADER_READ_FILE ImageRead
)
{
EFI_PEI_FILE_HANDLE FileHandle;
@@ -142,20 +148,24 @@ RelocatePeCoffImage ( EFI_STATUS Status;
FileHandle = NULL;
- Status = FfsFindNextFile (EFI_FV_FILETYPE_SECURITY_CORE, FwVolHeader,
- &FileHandle);
+ Status = FfsFindNextFile (
+ EFI_FV_FILETYPE_SECURITY_CORE,
+ FwVolHeader,
+ &FileHandle
+ );
ASSERT_EFI_ERROR (Status);
Status = FfsFindSectionData (EFI_SECTION_PE32, FileHandle, &SectionData);
if (EFI_ERROR (Status)) {
Status = FfsFindSectionData (EFI_SECTION_TE, FileHandle, &SectionData);
}
+
ASSERT_EFI_ERROR (Status);
ZeroMem (&ImageContext, sizeof ImageContext);
- ImageContext.Handle = (EFI_HANDLE)SectionData;
- ImageContext.ImageRead = ImageRead;
+ ImageContext.Handle = (EFI_HANDLE)SectionData;
+ ImageContext.ImageRead = ImageRead;
PeCoffLoaderGetImageInfo (&ImageContext);
if (ImageContext.ImageAddress != (UINTN)SectionData) {
diff --git a/ArmVirtPkg/PrePi/PrePi.h b/ArmVirtPkg/PrePi/PrePi.h index cc7a492388..4bb9791e40 100644 --- a/ArmVirtPkg/PrePi/PrePi.h +++ b/ArmVirtPkg/PrePi/PrePi.h @@ -30,16 +30,16 @@ TimerConstructor ( VOID
PrePiMain (
- IN UINTN UefiMemoryBase,
- IN UINTN StacksBase,
- IN UINT64 StartTimeStamp
+ IN UINTN UefiMemoryBase,
+ IN UINTN StacksBase,
+ IN UINT64 StartTimeStamp
);
EFI_STATUS
EFIAPI
MemoryPeim (
- IN EFI_PHYSICAL_ADDRESS UefiMemoryBase,
- IN UINT64 UefiMemorySize
+ IN EFI_PHYSICAL_ADDRESS UefiMemoryBase,
+ IN UINT64 UefiMemorySize
);
EFI_STATUS
|