UefiCpuPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the UefiCpuPkg 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: Ray Ni <ray.ni@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
91415a36ae
commit
053e878bfb
@@ -38,15 +38,15 @@ EFI_SMM_CPU_SERVICE_PROTOCOL mSmmCpuService = {
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SmmGetProcessorInfo (
|
||||
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
IN UINTN ProcessorNumber,
|
||||
OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer
|
||||
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
IN UINTN ProcessorNumber,
|
||||
OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer
|
||||
)
|
||||
{
|
||||
//
|
||||
// Check parameter
|
||||
//
|
||||
if (ProcessorNumber >= mMaxNumberOfCpus || ProcessorInfoBuffer == NULL) {
|
||||
if ((ProcessorNumber >= mMaxNumberOfCpus) || (ProcessorInfoBuffer == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ SmmGetProcessorInfo (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SmmSwitchBsp (
|
||||
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
IN UINTN ProcessorNumber
|
||||
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
IN UINTN ProcessorNumber
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -90,8 +90,9 @@ SmmSwitchBsp (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (gSmmCpuPrivate->Operation[ProcessorNumber] != SmmCpuNone ||
|
||||
gSmst->CurrentlyExecutingCpu == ProcessorNumber) {
|
||||
if ((gSmmCpuPrivate->Operation[ProcessorNumber] != SmmCpuNone) ||
|
||||
(gSmst->CurrentlyExecutingCpu == ProcessorNumber))
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@@ -132,7 +133,7 @@ SmmAddProcessor (
|
||||
//
|
||||
// Check parameter
|
||||
//
|
||||
if (ProcessorNumber == NULL || ProcessorId == INVALID_APIC_ID) {
|
||||
if ((ProcessorNumber == NULL) || (ProcessorId == INVALID_APIC_ID)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -151,10 +152,11 @@ SmmAddProcessor (
|
||||
// of the APIC ID to SMBASE.
|
||||
//
|
||||
for (Index = 0; Index < mMaxNumberOfCpus; Index++) {
|
||||
if (mCpuHotPlugData.ApicId[Index] == ProcessorId &&
|
||||
gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId == INVALID_APIC_ID) {
|
||||
if ((mCpuHotPlugData.ApicId[Index] == ProcessorId) &&
|
||||
(gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId == INVALID_APIC_ID))
|
||||
{
|
||||
gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId = ProcessorId;
|
||||
gSmmCpuPrivate->ProcessorInfo[Index].StatusFlag = 0;
|
||||
gSmmCpuPrivate->ProcessorInfo[Index].StatusFlag = 0;
|
||||
GetProcessorLocationByApicId (
|
||||
(UINT32)ProcessorId,
|
||||
&gSmmCpuPrivate->ProcessorInfo[Index].Location.Package,
|
||||
@@ -162,7 +164,7 @@ SmmAddProcessor (
|
||||
&gSmmCpuPrivate->ProcessorInfo[Index].Location.Thread
|
||||
);
|
||||
|
||||
*ProcessorNumber = Index;
|
||||
*ProcessorNumber = Index;
|
||||
gSmmCpuPrivate->Operation[Index] = SmmCpuAdd;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -197,8 +199,9 @@ SmmRemoveProcessor (
|
||||
//
|
||||
// Check parameter
|
||||
//
|
||||
if (ProcessorNumber >= mMaxNumberOfCpus ||
|
||||
gSmmCpuPrivate->ProcessorInfo[ProcessorNumber].ProcessorId == INVALID_APIC_ID) {
|
||||
if ((ProcessorNumber >= mMaxNumberOfCpus) ||
|
||||
(gSmmCpuPrivate->ProcessorInfo[ProcessorNumber].ProcessorId == INVALID_APIC_ID))
|
||||
{
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -214,7 +217,7 @@ SmmRemoveProcessor (
|
||||
}
|
||||
|
||||
gSmmCpuPrivate->ProcessorInfo[ProcessorNumber].ProcessorId = INVALID_APIC_ID;
|
||||
mCpuHotPlugData.ApicId[ProcessorNumber] = INVALID_APIC_ID;
|
||||
mCpuHotPlugData.ApicId[ProcessorNumber] = INVALID_APIC_ID;
|
||||
|
||||
//
|
||||
// Removal of the processor from the CPU list is pending until all SMI handlers are finished
|
||||
@@ -237,12 +240,12 @@ SmmRemoveProcessor (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SmmWhoAmI (
|
||||
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
OUT UINTN *ProcessorNumber
|
||||
IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
OUT UINTN *ProcessorNumber
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
UINT64 ApicId;
|
||||
UINTN Index;
|
||||
UINT64 ApicId;
|
||||
|
||||
//
|
||||
// Check parameter
|
||||
@@ -259,6 +262,7 @@ SmmWhoAmI (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// This should not happen
|
||||
//
|
||||
@@ -276,15 +280,15 @@ SmmCpuUpdate (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
UINTN Index;
|
||||
UINTN Index;
|
||||
|
||||
//
|
||||
// Handle pending BSP switch operations
|
||||
//
|
||||
for (Index = 0; Index < mMaxNumberOfCpus; Index++) {
|
||||
if (gSmmCpuPrivate->Operation[Index] == SmmCpuSwitchBsp) {
|
||||
gSmmCpuPrivate->Operation[Index] = SmmCpuNone;
|
||||
mSmmMpSyncData->SwitchBsp = TRUE;
|
||||
gSmmCpuPrivate->Operation[Index] = SmmCpuNone;
|
||||
mSmmMpSyncData->SwitchBsp = TRUE;
|
||||
mSmmMpSyncData->CandidateBsp[Index] = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -330,10 +334,10 @@ SmmCpuUpdate (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SmmRegisterExceptionHandler (
|
||||
IN EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
|
||||
)
|
||||
IN EFI_SMM_CPU_SERVICE_PROTOCOL *This,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
|
||||
)
|
||||
{
|
||||
return RegisterCpuInterruptHandler (ExceptionType, InterruptHandler);
|
||||
}
|
||||
@@ -352,7 +356,7 @@ InitializeSmmCpuServices (
|
||||
IN EFI_HANDLE Handle
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = gSmst->SmmInstallProtocolInterface (
|
||||
&Handle,
|
||||
@@ -363,4 +367,3 @@ InitializeSmmCpuServices (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user