summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/SmbiosPlatformDxe
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:09 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commitac0a286f4d747a4c6c603a7b225917293cbe1e9f (patch)
tree32654f2b35755afc961e2c97296b2dec5762da75 /OvmfPkg/SmbiosPlatformDxe
parentd1050b9dff1cace252aff86630bfdb59dff5f507 (diff)
downloadedk2-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/SmbiosPlatformDxe')
-rw-r--r--OvmfPkg/SmbiosPlatformDxe/Qemu.c23
-rw-r--r--OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c67
-rw-r--r--OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h2
-rw-r--r--OvmfPkg/SmbiosPlatformDxe/X86Xen.c37
-rw-r--r--OvmfPkg/SmbiosPlatformDxe/Xen.c6
5 files changed, 68 insertions, 67 deletions
diff --git a/OvmfPkg/SmbiosPlatformDxe/Qemu.c b/OvmfPkg/SmbiosPlatformDxe/Qemu.c
index a668c6ac21..4dae4b0b98 100644
--- a/OvmfPkg/SmbiosPlatformDxe/Qemu.c
+++ b/OvmfPkg/SmbiosPlatformDxe/Qemu.c
@@ -24,17 +24,20 @@ GetQemuSmbiosTables (
VOID
)
{
- EFI_STATUS Status;
- FIRMWARE_CONFIG_ITEM Tables;
- UINTN TablesSize;
- UINT8 *QemuTables;
+ EFI_STATUS Status;
+ FIRMWARE_CONFIG_ITEM Tables;
+ UINTN TablesSize;
+ UINT8 *QemuTables;
if (!PcdGetBool (PcdQemuSmbiosValidated)) {
return NULL;
}
- Status = QemuFwCfgFindFile ("etc/smbios/smbios-tables", &Tables,
- &TablesSize);
+ Status = QemuFwCfgFindFile (
+ "etc/smbios/smbios-tables",
+ &Tables,
+ &TablesSize
+ );
ASSERT_EFI_ERROR (Status);
ASSERT (TablesSize > 0);
@@ -62,12 +65,12 @@ GetQemuSmbiosTables (
EFI_STATUS
EFIAPI
SmbiosTablePublishEntry (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
- UINT8 *SmbiosTables;
+ EFI_STATUS Status;
+ UINT8 *SmbiosTables;
Status = EFI_NOT_FOUND;
//
diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index 7bcf83762e..94249d3ff1 100644
--- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -24,34 +24,34 @@
//
#pragma pack(1)
typedef struct {
- SMBIOS_TABLE_TYPE0 Base;
- UINT8 Strings[sizeof(TYPE0_STRINGS)];
+ SMBIOS_TABLE_TYPE0 Base;
+ UINT8 Strings[sizeof (TYPE0_STRINGS)];
} OVMF_TYPE0;
#pragma pack()
-STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
+STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
{
// SMBIOS_STRUCTURE Hdr
{
EFI_SMBIOS_TYPE_BIOS_INFORMATION, // UINT8 Type
sizeof (SMBIOS_TABLE_TYPE0), // UINT8 Length
},
- 1, // SMBIOS_TABLE_STRING Vendor
- 2, // SMBIOS_TABLE_STRING BiosVersion
- 0xE800,// UINT16 BiosSegment
- 3, // SMBIOS_TABLE_STRING BiosReleaseDate
- 0, // UINT8 BiosSize
+ 1, // SMBIOS_TABLE_STRING Vendor
+ 2, // SMBIOS_TABLE_STRING BiosVersion
+ 0xE800, // UINT16 BiosSegment
+ 3, // SMBIOS_TABLE_STRING BiosReleaseDate
+ 0, // UINT8 BiosSize
{ // MISC_BIOS_CHARACTERISTICS BiosCharacteristics
- 0, // Reserved :2
- 0, // Unknown :1
- 1, // BiosCharacteristicsNotSupported :1
- // Remaining BiosCharacteristics bits left unset :60
+ 0, // Reserved :2
+ 0, // Unknown :1
+ 1, // BiosCharacteristicsNotSupported :1
+ // Remaining BiosCharacteristics bits left unset :60
},
{ // BIOSCharacteristicsExtensionBytes[2]
- 0, // BiosReserved
- 0x1C // SystemReserved = VirtualMachineSupported |
- // UefiSpecificationSupported |
- // TargetContentDistributionEnabled
+ 0, // BiosReserved
+ 0x1C // SystemReserved = VirtualMachineSupported |
+ // UefiSpecificationSupported |
+ // TargetContentDistributionEnabled
},
0, // UINT8 SystemBiosMajorRelease
0, // UINT8 SystemBiosMinorRelease
@@ -62,7 +62,6 @@ STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
TYPE0_STRINGS
};
-
/**
Get SMBIOS record length.
@@ -71,7 +70,7 @@ STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
**/
UINTN
SmbiosTableLength (
- IN SMBIOS_STRUCTURE_POINTER SmbiosTable
+ IN SMBIOS_STRUCTURE_POINTER SmbiosTable
)
{
CHAR8 *AChar;
@@ -83,14 +82,14 @@ SmbiosTableLength (
// Each structure shall be terminated by a double-null (SMBIOS spec.7.1)
//
while ((*AChar != 0) || (*(AChar + 1) != 0)) {
- AChar ++;
+ AChar++;
}
+
Length = ((UINTN)AChar - (UINTN)SmbiosTable.Raw + 2);
return Length;
}
-
/**
Install all structures from the given SMBIOS structures block
@@ -99,7 +98,7 @@ SmbiosTableLength (
**/
EFI_STATUS
InstallAllStructures (
- IN UINT8 *TableAddress
+ IN UINT8 *TableAddress
)
{
EFI_SMBIOS_PROTOCOL *Smbios;
@@ -114,7 +113,7 @@ InstallAllStructures (
Status = gBS->LocateProtocol (
&gEfiSmbiosProtocolGuid,
NULL,
- (VOID**)&Smbios
+ (VOID **)&Smbios
);
if (EFI_ERROR (Status)) {
return Status;
@@ -132,12 +131,12 @@ InstallAllStructures (
// Log the SMBIOS data for this structure
//
SmbiosHandle = SmbiosTable.Hdr->Handle;
- Status = Smbios->Add (
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER*) SmbiosTable.Raw
- );
+ Status = Smbios->Add (
+ Smbios,
+ NULL,
+ &SmbiosHandle,
+ (EFI_SMBIOS_TABLE_HEADER *)SmbiosTable.Raw
+ );
ASSERT_EFI_ERROR (Status);
if (SmbiosTable.Hdr->Type == 0) {
@@ -155,12 +154,12 @@ InstallAllStructures (
// Add OVMF default Type 0 (BIOS Information) table
//
SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
- Status = Smbios->Add (
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER*) &mOvmfDefaultType0
- );
+ Status = Smbios->Add (
+ Smbios,
+ NULL,
+ &SmbiosHandle,
+ (EFI_SMBIOS_TABLE_HEADER *)&mOvmfDefaultType0
+ );
ASSERT_EFI_ERROR (Status);
}
diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
index 213a7f39e9..74e314a895 100644
--- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
+++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
@@ -19,7 +19,7 @@
**/
EFI_STATUS
InstallAllStructures (
- IN UINT8 *TableAddress
+ IN UINT8 *TableAddress
);
#endif
diff --git a/OvmfPkg/SmbiosPlatformDxe/X86Xen.c b/OvmfPkg/SmbiosPlatformDxe/X86Xen.c
index 0acedf8995..d8746b614a 100644
--- a/OvmfPkg/SmbiosPlatformDxe/X86Xen.c
+++ b/OvmfPkg/SmbiosPlatformDxe/X86Xen.c
@@ -14,8 +14,8 @@
#include "XenSmbiosPlatformDxe.h"
-#define XEN_SMBIOS_PHYSICAL_ADDRESS 0x000EB000
-#define XEN_SMBIOS_PHYSICAL_END 0x000F0000
+#define XEN_SMBIOS_PHYSICAL_ADDRESS 0x000EB000
+#define XEN_SMBIOS_PHYSICAL_END 0x000F0000
/**
Validates the SMBIOS entry point structure
@@ -32,17 +32,17 @@ IsEntryPointStructureValid (
IN SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure
)
{
- UINTN Index;
- UINT8 Length;
- UINT8 Checksum;
- UINT8 *BytePtr;
+ UINTN Index;
+ UINT8 Length;
+ UINT8 Checksum;
+ UINT8 *BytePtr;
- BytePtr = (UINT8*) EntryPointStructure;
- Length = EntryPointStructure->EntryPointLength;
+ BytePtr = (UINT8 *)EntryPointStructure;
+ Length = EntryPointStructure->EntryPointLength;
Checksum = 0;
for (Index = 0; Index < Length; Index++) {
- Checksum = Checksum + (UINT8) BytePtr[Index];
+ Checksum = Checksum + (UINT8)BytePtr[Index];
}
if (Checksum != 0) {
@@ -75,18 +75,17 @@ GetXenSmbiosTables (
return NULL;
}
- for (XenSmbiosPtr = (UINT8*)(UINTN) XEN_SMBIOS_PHYSICAL_ADDRESS;
- XenSmbiosPtr < (UINT8*)(UINTN) XEN_SMBIOS_PHYSICAL_END;
- XenSmbiosPtr += 0x10) {
-
- XenSmbiosEntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *) XenSmbiosPtr;
-
- if (!AsciiStrnCmp ((CHAR8 *) XenSmbiosEntryPointStructure->AnchorString, "_SM_", 4) &&
- !AsciiStrnCmp ((CHAR8 *) XenSmbiosEntryPointStructure->IntermediateAnchorString, "_DMI_", 5) &&
- IsEntryPointStructureValid (XenSmbiosEntryPointStructure)) {
+ for (XenSmbiosPtr = (UINT8 *)(UINTN)XEN_SMBIOS_PHYSICAL_ADDRESS;
+ XenSmbiosPtr < (UINT8 *)(UINTN)XEN_SMBIOS_PHYSICAL_END;
+ XenSmbiosPtr += 0x10)
+ {
+ XenSmbiosEntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *)XenSmbiosPtr;
+ if (!AsciiStrnCmp ((CHAR8 *)XenSmbiosEntryPointStructure->AnchorString, "_SM_", 4) &&
+ !AsciiStrnCmp ((CHAR8 *)XenSmbiosEntryPointStructure->IntermediateAnchorString, "_DMI_", 5) &&
+ IsEntryPointStructureValid (XenSmbiosEntryPointStructure))
+ {
return XenSmbiosEntryPointStructure;
-
}
}
diff --git a/OvmfPkg/SmbiosPlatformDxe/Xen.c b/OvmfPkg/SmbiosPlatformDxe/Xen.c
index 75d9550913..34526eacb2 100644
--- a/OvmfPkg/SmbiosPlatformDxe/Xen.c
+++ b/OvmfPkg/SmbiosPlatformDxe/Xen.c
@@ -25,8 +25,8 @@
EFI_STATUS
EFIAPI
XenSmbiosTablePublishEntry (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
@@ -39,7 +39,7 @@ XenSmbiosTablePublishEntry (
//
EntryPointStructure = GetXenSmbiosTables ();
if (EntryPointStructure != NULL) {
- SmbiosTables = (UINT8*)(UINTN)EntryPointStructure->TableAddress;
+ SmbiosTables = (UINT8 *)(UINTN)EntryPointStructure->TableAddress;
if (SmbiosTables != NULL) {
Status = InstallAllStructures (SmbiosTables);
}