IntelFsp2WrapperPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the IntelFsp2WrapperPkg 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: Chasel Chiu <chasel.chiu@intel.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:00 -08:00
committed by mergify[bot]
parent 111f2228dd
commit 7c7184e201
26 changed files with 584 additions and 552 deletions

View File

@@ -8,7 +8,6 @@
**/
#include <PiPei.h>
#include <Library/PeimEntryPoint.h>
@@ -37,7 +36,7 @@
#include <FspEas.h>
#include <FspStatusCode.h>
extern EFI_GUID gFspHobGuid;
extern EFI_GUID gFspHobGuid;
/**
Call FspMemoryInit API.
@@ -49,26 +48,26 @@ PeiFspMemoryInit (
VOID
)
{
FSP_INFO_HEADER *FspmHeaderPtr;
EFI_STATUS Status;
UINT64 TimeStampCounterStart;
VOID *FspHobListPtr;
VOID *HobData;
FSPM_UPD_COMMON *FspmUpdDataPtr;
UINTN *SourceData;
FSP_INFO_HEADER *FspmHeaderPtr;
EFI_STATUS Status;
UINT64 TimeStampCounterStart;
VOID *FspHobListPtr;
VOID *HobData;
FSPM_UPD_COMMON *FspmUpdDataPtr;
UINTN *SourceData;
DEBUG ((DEBUG_INFO, "PeiFspMemoryInit enter\n"));
FspHobListPtr = NULL;
FspHobListPtr = NULL;
FspmUpdDataPtr = NULL;
FspmHeaderPtr = (FSP_INFO_HEADER *) FspFindFspHeader (PcdGet32 (PcdFspmBaseAddress));
FspmHeaderPtr = (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32 (PcdFspmBaseAddress));
DEBUG ((DEBUG_INFO, "FspmHeaderPtr - 0x%x\n", FspmHeaderPtr));
if (FspmHeaderPtr == NULL) {
return EFI_DEVICE_ERROR;
}
if (PcdGet32 (PcdFspmUpdDataAddress) == 0 && (FspmHeaderPtr->CfgRegionSize != 0) && (FspmHeaderPtr->CfgRegionOffset != 0)) {
if ((PcdGet32 (PcdFspmUpdDataAddress) == 0) && (FspmHeaderPtr->CfgRegionSize != 0) && (FspmHeaderPtr->CfgRegionOffset != 0)) {
//
// Copy default FSP-M UPD data from Flash
//
@@ -94,26 +93,26 @@ PeiFspMemoryInit (
DEBUG ((DEBUG_INFO, " HobListPtr - 0x%x\n", &FspHobListPtr));
TimeStampCounterStart = AsmReadTsc ();
Status = CallFspMemoryInit (FspmUpdDataPtr, &FspHobListPtr);
Status = CallFspMemoryInit (FspmUpdDataPtr, &FspHobListPtr);
// Create hobs after memory initialization and not in temp RAM. Hence passing the recorded timestamp here
PERF_START_EX(&gFspApiPerformanceGuid, "EventRec", NULL, TimeStampCounterStart, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_ENTRY);
PERF_END_EX(&gFspApiPerformanceGuid, "EventRec", NULL, 0, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT);
PERF_START_EX (&gFspApiPerformanceGuid, "EventRec", NULL, TimeStampCounterStart, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_ENTRY);
PERF_END_EX (&gFspApiPerformanceGuid, "EventRec", NULL, 0, FSP_STATUS_CODE_MEMORY_INIT | FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT);
DEBUG ((DEBUG_INFO, "Total time spent executing FspMemoryInitApi: %d millisecond\n", DivU64x32 (GetTimeInNanoSecond (AsmReadTsc () - TimeStampCounterStart), 1000000)));
//
// Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED status
//
if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status <= FSP_STATUS_RESET_REQUIRED_8)) {
DEBUG((DEBUG_INFO, "FspMemoryInitApi requested reset 0x%x\n", Status));
DEBUG ((DEBUG_INFO, "FspMemoryInitApi requested reset 0x%x\n", Status));
CallFspWrapperResetSystem ((UINT32)Status);
}
if (EFI_ERROR(Status)) {
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "ERROR - Failed to execute FspMemoryInitApi(), Status = %r\n", Status));
}
DEBUG((DEBUG_INFO, "FspMemoryInit status: 0x%x\n", Status));
ASSERT_EFI_ERROR (Status);
DEBUG ((DEBUG_INFO, "FspMemoryInit status: 0x%x\n", Status));
ASSERT_EFI_ERROR (Status);
Status = TestFspMemoryInitApiOutput (FspmUpdDataPtr, &FspHobListPtr);
if (EFI_ERROR (Status)) {
@@ -130,9 +129,9 @@ PeiFspMemoryInit (
// Save FspHobList pointer to hob, so that it can be got later
//
HobData = BuildGuidHob (
&gFspHobGuid,
sizeof (VOID *)
);
&gFspHobGuid,
sizeof (VOID *)
);
ASSERT (HobData != NULL);
CopyMem (HobData, &FspHobListPtr, sizeof (FspHobListPtr));
@@ -150,18 +149,18 @@ FspmWrapperInit (
VOID
)
{
EFI_STATUS Status;
EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI *MeasurementExcludedFvPpi;
EFI_PEI_PPI_DESCRIPTOR *MeasurementExcludedPpiList;
EFI_STATUS Status;
EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI *MeasurementExcludedFvPpi;
EFI_PEI_PPI_DESCRIPTOR *MeasurementExcludedPpiList;
MeasurementExcludedFvPpi = AllocatePool (sizeof(*MeasurementExcludedFvPpi));
ASSERT(MeasurementExcludedFvPpi != NULL);
MeasurementExcludedFvPpi->Count = 1;
MeasurementExcludedFvPpi->Fv[0].FvBase = PcdGet32 (PcdFspmBaseAddress);
MeasurementExcludedFvPpi->Fv[0].FvLength = ((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFspmBaseAddress))->FvLength;
MeasurementExcludedFvPpi = AllocatePool (sizeof (*MeasurementExcludedFvPpi));
ASSERT (MeasurementExcludedFvPpi != NULL);
MeasurementExcludedFvPpi->Count = 1;
MeasurementExcludedFvPpi->Fv[0].FvBase = PcdGet32 (PcdFspmBaseAddress);
MeasurementExcludedFvPpi->Fv[0].FvLength = ((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength;
MeasurementExcludedPpiList = AllocatePool (sizeof(*MeasurementExcludedPpiList));
ASSERT(MeasurementExcludedPpiList != NULL);
MeasurementExcludedPpiList = AllocatePool (sizeof (*MeasurementExcludedPpiList));
ASSERT (MeasurementExcludedPpiList != NULL);
MeasurementExcludedPpiList->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
MeasurementExcludedPpiList->Guid = &gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid;
MeasurementExcludedPpiList->Ppi = MeasurementExcludedFvPpi;
@@ -177,8 +176,8 @@ FspmWrapperInit (
PeiServicesInstallFvInfoPpi (
NULL,
(VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFspmBaseAddress))->FvLength,
(VOID *)(UINTN)PcdGet32 (PcdFspmBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength,
NULL,
NULL
);
@@ -200,12 +199,12 @@ FspmWrapperInit (
EFI_STATUS
EFIAPI
TcgPpiNotify (
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
IN VOID *Ppi
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
IN VOID *Ppi
);
EFI_PEI_NOTIFY_DESCRIPTOR mTcgPpiNotifyDesc = {
EFI_PEI_NOTIFY_DESCRIPTOR mTcgPpiNotifyDesc = {
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEdkiiTcgPpiGuid,
TcgPpiNotify
@@ -224,25 +223,33 @@ EFI_PEI_NOTIFY_DESCRIPTOR mTcgPpiNotifyDesc = {
EFI_STATUS
EFIAPI
TcgPpiNotify (
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
IN VOID *Ppi
IN EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
IN VOID *Ppi
)
{
UINT32 FspMeasureMask;
UINT32 FspMeasureMask;
DEBUG ((DEBUG_INFO, "TcgPpiNotify FSPM\n"));
FspMeasureMask = PcdGet32 (PcdFspMeasurementConfig);
if ((FspMeasureMask & FSP_MEASURE_FSPT) != 0) {
MeasureFspFirmwareBlob (0, "FSPT", PcdGet32(PcdFsptBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFsptBaseAddress))->FvLength);
MeasureFspFirmwareBlob (
0,
"FSPT",
PcdGet32 (PcdFsptBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFsptBaseAddress))->FvLength
);
}
if ((FspMeasureMask & FSP_MEASURE_FSPM) != 0) {
MeasureFspFirmwareBlob (0, "FSPM", PcdGet32(PcdFspmBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFspmBaseAddress))->FvLength);
MeasureFspFirmwareBlob (
0,
"FSPM",
PcdGet32 (PcdFspmBaseAddress),
(UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 (PcdFspmBaseAddress))->FvLength
);
}
return EFI_SUCCESS;
@@ -265,7 +272,7 @@ FspmWrapperPeimEntryPoint (
{
EFI_STATUS Status;
DEBUG((DEBUG_INFO, "FspmWrapperPeimEntryPoint\n"));
DEBUG ((DEBUG_INFO, "FspmWrapperPeimEntryPoint\n"));
Status = PeiServicesNotifyPpi (&mTcgPpiNotifyDesc);
ASSERT_EFI_ERROR (Status);