diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:09 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | ac0a286f4d747a4c6c603a7b225917293cbe1e9f (patch) | |
tree | 32654f2b35755afc961e2c97296b2dec5762da75 /OvmfPkg/CpuS3DataDxe | |
parent | d1050b9dff1cace252aff86630bfdb59dff5f507 (diff) | |
download | edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.gz edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.bz2 edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.zip |
OvmfPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the OvmfPkg 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: Andrew Fish <afish@apple.com>
Diffstat (limited to 'OvmfPkg/CpuS3DataDxe')
-rw-r--r-- | OvmfPkg/CpuS3DataDxe/CpuS3Data.c | 78 |
1 files changed, 40 insertions, 38 deletions
diff --git a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c b/OvmfPkg/CpuS3DataDxe/CpuS3Data.c index de20d87567..c192a09cf1 100644 --- a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c +++ b/OvmfPkg/CpuS3DataDxe/CpuS3Data.c @@ -34,10 +34,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // Data structure used to allocate ACPI_CPU_DATA and its supporting structures
//
typedef struct {
- ACPI_CPU_DATA AcpiCpuData;
- MTRR_SETTINGS MtrrTable;
- IA32_DESCRIPTOR GdtrProfile;
- IA32_DESCRIPTOR IdtrProfile;
+ ACPI_CPU_DATA AcpiCpuData;
+ MTRR_SETTINGS MtrrTable;
+ IA32_DESCRIPTOR GdtrProfile;
+ IA32_DESCRIPTOR IdtrProfile;
} ACPI_CPU_DATA_EX;
/**
@@ -57,12 +57,12 @@ AllocateAcpiNvsMemory ( EFI_STATUS Status;
VOID *Buffer;
- Status = gBS->AllocatePages (
- AllocateAnyPages,
- EfiACPIMemoryNVS,
- EFI_SIZE_TO_PAGES (Size),
- &Address
- );
+ Status = gBS->AllocatePages (
+ AllocateAnyPages,
+ EfiACPIMemoryNVS,
+ EFI_SIZE_TO_PAGES (Size),
+ &Address
+ );
if (EFI_ERROR (Status)) {
return NULL;
}
@@ -86,7 +86,7 @@ AllocateZeroPages ( IN UINTN Size
)
{
- VOID *Buffer;
+ VOID *Buffer;
Buffer = AllocatePages (EFI_SIZE_TO_PAGES (Size));
if (Buffer != NULL) {
@@ -95,6 +95,7 @@ AllocateZeroPages ( return Buffer;
}
+
/**
Callback function executed when the EndOfDxe event group is signaled.
@@ -110,20 +111,20 @@ CpuS3DataOnEndOfDxe ( OUT VOID *Context
)
{
- EFI_STATUS Status;
- ACPI_CPU_DATA_EX *AcpiCpuDataEx;
+ EFI_STATUS Status;
+ ACPI_CPU_DATA_EX *AcpiCpuDataEx;
- AcpiCpuDataEx = (ACPI_CPU_DATA_EX *) Context;
+ AcpiCpuDataEx = (ACPI_CPU_DATA_EX *)Context;
//
// Allocate a 4KB reserved page below 1MB
//
AcpiCpuDataEx->AcpiCpuData.StartupVector = BASE_1MB - 1;
- Status = gBS->AllocatePages (
- AllocateMaxAddress,
- EfiReservedMemoryType,
- 1,
- &AcpiCpuDataEx->AcpiCpuData.StartupVector
- );
+ Status = gBS->AllocatePages (
+ AllocateMaxAddress,
+ EfiReservedMemoryType,
+ 1,
+ &AcpiCpuDataEx->AcpiCpuData.StartupVector
+ );
ASSERT_EFI_ERROR (Status);
DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__));
@@ -158,18 +159,18 @@ CpuS3DataInitialize ( IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
- ACPI_CPU_DATA_EX *AcpiCpuDataEx;
- ACPI_CPU_DATA *AcpiCpuData;
- EFI_MP_SERVICES_PROTOCOL *MpServices;
- UINTN NumberOfCpus;
- VOID *Stack;
- UINTN GdtSize;
- UINTN IdtSize;
- VOID *Gdt;
- VOID *Idt;
- EFI_EVENT Event;
- ACPI_CPU_DATA *OldAcpiCpuData;
+ EFI_STATUS Status;
+ ACPI_CPU_DATA_EX *AcpiCpuDataEx;
+ ACPI_CPU_DATA *AcpiCpuData;
+ EFI_MP_SERVICES_PROTOCOL *MpServices;
+ UINTN NumberOfCpus;
+ VOID *Stack;
+ UINTN GdtSize;
+ UINTN IdtSize;
+ VOID *Gdt;
+ VOID *Idt;
+ EFI_EVENT Event;
+ ACPI_CPU_DATA *OldAcpiCpuData;
if (!PcdGetBool (PcdAcpiS3Enable)) {
return EFI_UNSUPPORTED;
@@ -178,7 +179,7 @@ CpuS3DataInitialize ( //
// Set PcdCpuS3DataAddress to the base address of the ACPI_CPU_DATA structure
//
- OldAcpiCpuData = (ACPI_CPU_DATA *) (UINTN) PcdGet64 (PcdCpuS3DataAddress);
+ OldAcpiCpuData = (ACPI_CPU_DATA *)(UINTN)PcdGet64 (PcdCpuS3DataAddress);
AcpiCpuDataEx = AllocateZeroPages (sizeof (ACPI_CPU_DATA_EX));
ASSERT (AcpiCpuDataEx != NULL);
@@ -187,7 +188,7 @@ CpuS3DataInitialize ( if (PcdGetBool (PcdQ35SmramAtDefaultSmbase)) {
NumberOfCpus = PcdGet32 (PcdCpuMaxLogicalProcessorNumber);
} else {
- UINTN NumberOfEnabledProcessors;
+ UINTN NumberOfEnabledProcessors;
//
// Get MP Services Protocol
@@ -209,6 +210,7 @@ CpuS3DataInitialize ( );
ASSERT_EFI_ERROR (Status);
}
+
AcpiCpuData->NumberOfCpus = (UINT32)NumberOfCpus;
//
@@ -217,9 +219,9 @@ CpuS3DataInitialize ( AcpiCpuData->StackSize = PcdGet32 (PcdCpuApStackSize);
AcpiCpuData->ApMachineCheckHandlerBase = 0;
AcpiCpuData->ApMachineCheckHandlerSize = 0;
- AcpiCpuData->GdtrProfile = (EFI_PHYSICAL_ADDRESS)(UINTN)&AcpiCpuDataEx->GdtrProfile;
- AcpiCpuData->IdtrProfile = (EFI_PHYSICAL_ADDRESS)(UINTN)&AcpiCpuDataEx->IdtrProfile;
- AcpiCpuData->MtrrTable = (EFI_PHYSICAL_ADDRESS)(UINTN)&AcpiCpuDataEx->MtrrTable;
+ AcpiCpuData->GdtrProfile = (EFI_PHYSICAL_ADDRESS)(UINTN)&AcpiCpuDataEx->GdtrProfile;
+ AcpiCpuData->IdtrProfile = (EFI_PHYSICAL_ADDRESS)(UINTN)&AcpiCpuDataEx->IdtrProfile;
+ AcpiCpuData->MtrrTable = (EFI_PHYSICAL_ADDRESS)(UINTN)&AcpiCpuDataEx->MtrrTable;
//
// Allocate stack space for all CPUs.
@@ -243,7 +245,7 @@ CpuS3DataInitialize ( //
GdtSize = AcpiCpuDataEx->GdtrProfile.Limit + 1;
IdtSize = AcpiCpuDataEx->IdtrProfile.Limit + 1;
- Gdt = AllocateZeroPages (GdtSize + IdtSize);
+ Gdt = AllocateZeroPages (GdtSize + IdtSize);
ASSERT (Gdt != NULL);
Idt = (VOID *)((UINTN)Gdt + GdtSize);
CopyMem (Gdt, (VOID *)AcpiCpuDataEx->GdtrProfile.Base, GdtSize);
|