summaryrefslogtreecommitdiff
path: root/ArmPkg/Universal
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:53:50 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit429309e0c6b74792d679681a8edd0d5ae0ff850c (patch)
tree9d26d88024790b459c60a44e14500b7c7076f0d1 /ArmPkg/Universal
parent7c2a6033c149625482a18cd51b65513c8fb8fe15 (diff)
downloadedk2-429309e0c6b74792d679681a8edd0d5ae0ff850c.zip
edk2-429309e0c6b74792d679681a8edd0d5ae0ff850c.tar.gz
edk2-429309e0c6b74792d679681a8edd0d5ae0ff850c.tar.bz2
ArmPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the ArmPkg 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 'ArmPkg/Universal')
-rw-r--r--ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c29
-rw-r--r--ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c491
-rw-r--r--ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessor.h34
-rw-r--r--ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorAArch64.c47
-rw-r--r--ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArm.c41
-rw-r--r--ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c40
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMisc.h38
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDataTable.c88
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscEntryPoint.c100
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorData.c80
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c151
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerData.c11
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c98
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerData.c2
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c120
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerData.c3
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c96
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesData.c8
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c40
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c8
-rw-r--r--ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c20
21 files changed, 829 insertions, 716 deletions
diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
index 3125269..9897040 100644
--- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
+++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
@@ -15,7 +15,6 @@
#include <Library/HiiLib.h>
#include <Library/OemMiscLib.h>
-
/** Gets the CPU frequency of the specified processor.
@param ProcessorIndex Index of the processor to get the frequency for.
@@ -25,7 +24,7 @@
UINTN
EFIAPI
OemGetCpuFreq (
- IN UINT8 ProcessorIndex
+ IN UINT8 ProcessorIndex
)
{
ASSERT (FALSE);
@@ -45,10 +44,10 @@ OemGetCpuFreq (
BOOLEAN
EFIAPI
OemGetProcessorInformation (
- IN UINTN ProcessorIndex,
- IN OUT PROCESSOR_STATUS_DATA *ProcessorStatus,
- IN OUT PROCESSOR_CHARACTERISTIC_FLAGS *ProcessorCharacteristics,
- IN OUT OEM_MISC_PROCESSOR_DATA *MiscProcessorData
+ IN UINTN ProcessorIndex,
+ IN OUT PROCESSOR_STATUS_DATA *ProcessorStatus,
+ IN OUT PROCESSOR_CHARACTERISTIC_FLAGS *ProcessorCharacteristics,
+ IN OUT OEM_MISC_PROCESSOR_DATA *MiscProcessorData
)
{
ASSERT (FALSE);
@@ -68,11 +67,11 @@ OemGetProcessorInformation (
BOOLEAN
EFIAPI
OemGetCacheInformation (
- IN UINT8 ProcessorIndex,
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache,
- IN OUT SMBIOS_TABLE_TYPE7 *SmbiosCacheTable
+ IN UINT8 ProcessorIndex,
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache,
+ IN OUT SMBIOS_TABLE_TYPE7 *SmbiosCacheTable
)
{
ASSERT (FALSE);
@@ -116,7 +115,7 @@ OemGetChassisType (
BOOLEAN
EFIAPI
OemIsProcessorPresent (
- IN UINTN ProcessorIndex
+ IN UINTN ProcessorIndex
)
{
ASSERT (FALSE);
@@ -132,9 +131,9 @@ OemIsProcessorPresent (
VOID
EFIAPI
OemUpdateSmbiosInfo (
- IN EFI_HII_HANDLE HiiHandle,
- IN EFI_STRING_ID TokenToUpdate,
- IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field
+ IN EFI_HII_HANDLE HiiHandle,
+ IN EFI_STRING_ID TokenToUpdate,
+ IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field
)
{
ASSERT (FALSE);
diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
index cbdf6df..a4f98e6 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
@@ -29,12 +29,12 @@
#include "SmbiosProcessor.h"
-extern UINT8 ProcessorSubClassStrings[];
+extern UINT8 ProcessorSubClassStrings[];
-#define CACHE_SOCKETED_SHIFT 3
-#define CACHE_LOCATION_SHIFT 5
-#define CACHE_ENABLED_SHIFT 7
-#define CACHE_OPERATION_MODE_SHIFT 8
+#define CACHE_SOCKETED_SHIFT 3
+#define CACHE_LOCATION_SHIFT 5
+#define CACHE_ENABLED_SHIFT 7
+#define CACHE_OPERATION_MODE_SHIFT 8
typedef enum {
CacheModeWriteThrough = 0, ///< Cache is write-through
@@ -52,51 +52,51 @@ typedef enum {
CacheLocationMax
} CACHE_LOCATION;
-EFI_HII_HANDLE mHiiHandle;
+EFI_HII_HANDLE mHiiHandle;
EFI_SMBIOS_PROTOCOL *mSmbios;
-SMBIOS_TABLE_TYPE4 mSmbiosProcessorTableTemplate = {
- { // Hdr
- EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION, // Type
- sizeof (SMBIOS_TABLE_TYPE4), // Length
- 0 // Handle
- },
- 1, // Socket
- CentralProcessor, // ProcessorType
- ProcessorFamilyIndicatorFamily2, // ProcessorFamily
- 2, // ProcessorManufacture
- { // ProcessorId
- { // Signature
- 0
- },
- { // FeatureFlags
- 0
- }
- },
- 3, // ProcessorVersion
- { // Voltage
+SMBIOS_TABLE_TYPE4 mSmbiosProcessorTableTemplate = {
+ { // Hdr
+ EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION, // Type
+ sizeof (SMBIOS_TABLE_TYPE4), // Length
+ 0 // Handle
+ },
+ 1, // Socket
+ CentralProcessor, // ProcessorType
+ ProcessorFamilyIndicatorFamily2, // ProcessorFamily
+ 2, // ProcessorManufacture
+ { // ProcessorId
+ { // Signature
0
},
- 0, // ExternalClock
- 0, // MaxSpeed
- 0, // CurrentSpeed
- 0, // Status
- ProcessorUpgradeUnknown, // ProcessorUpgrade
- 0xFFFF, // L1CacheHandle
- 0xFFFF, // L2CacheHandle
- 0xFFFF, // L3CacheHandle
- 4, // SerialNumber
- 5, // AssetTag
- 6, // PartNumber
- 0, // CoreCount
- 0, //EnabledCoreCount
- 0, // ThreadCount
- 0, // ProcessorCharacteristics
- ProcessorFamilyARM, // ProcessorFamily2
- 0, // CoreCount2
- 0, // EnabledCoreCount2
- 0 // ThreadCount2
+ { // FeatureFlags
+ 0
+ }
+ },
+ 3, // ProcessorVersion
+ { // Voltage
+ 0
+ },
+ 0, // ExternalClock
+ 0, // MaxSpeed
+ 0, // CurrentSpeed
+ 0, // Status
+ ProcessorUpgradeUnknown, // ProcessorUpgrade
+ 0xFFFF, // L1CacheHandle
+ 0xFFFF, // L2CacheHandle
+ 0xFFFF, // L3CacheHandle
+ 4, // SerialNumber
+ 5, // AssetTag
+ 6, // PartNumber
+ 0, // CoreCount
+ 0, // EnabledCoreCount
+ 0, // ThreadCount
+ 0, // ProcessorCharacteristics
+ ProcessorFamilyARM, // ProcessorFamily2
+ 0, // CoreCount2
+ 0, // EnabledCoreCount2
+ 0 // ThreadCount2
};
/** Sets the HII variable `StringId` is `Pcd` isn't empty.
@@ -122,7 +122,7 @@ SMBIOS_TABLE_TYPE4 mSmbiosProcessorTableTemplate = {
**/
UINT16
GetCpuFrequency (
- IN UINT8 ProcessorNumber
+ IN UINT8 ProcessorNumber
)
{
return (UINT16)(OemGetCpuFreq (ProcessorNumber) / 1000 / 1000);
@@ -140,30 +140,35 @@ GetCpuFrequency (
**/
UINTN
GetCacheSocketStr (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache,
- OUT CHAR16 *CacheSocketStr
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache,
+ OUT CHAR16 *CacheSocketStr
)
{
- UINTN CacheSocketStrLen;
+ UINTN CacheSocketStrLen;
- if (CacheLevel == CpuCacheL1 && !DataCache && !UnifiedCache) {
+ if ((CacheLevel == CpuCacheL1) && !DataCache && !UnifiedCache) {
CacheSocketStrLen = UnicodeSPrint (
CacheSocketStr,
SMBIOS_STRING_MAX_LENGTH - 1,
L"L%x Instruction Cache",
- CacheLevel);
- } else if (CacheLevel == CpuCacheL1 && DataCache) {
- CacheSocketStrLen = UnicodeSPrint (CacheSocketStr,
+ CacheLevel
+ );
+ } else if ((CacheLevel == CpuCacheL1) && DataCache) {
+ CacheSocketStrLen = UnicodeSPrint (
+ CacheSocketStr,
SMBIOS_STRING_MAX_LENGTH - 1,
L"L%x Data Cache",
- CacheLevel);
+ CacheLevel
+ );
} else {
- CacheSocketStrLen = UnicodeSPrint (CacheSocketStr,
+ CacheSocketStrLen = UnicodeSPrint (
+ CacheSocketStr,
SMBIOS_STRING_MAX_LENGTH - 1,
L"L%x Cache",
- CacheLevel);
+ CacheLevel
+ );
}
return CacheSocketStrLen;
@@ -180,16 +185,16 @@ GetCacheSocketStr (
**/
VOID
ConfigureCacheArchitectureInformation (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache,
- OUT SMBIOS_TABLE_TYPE7 *Type7Record
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache,
+ OUT SMBIOS_TABLE_TYPE7 *Type7Record
)
{
- UINT8 Associativity;
- UINT32 CacheSize32;
- UINT16 CacheSize16;
- UINT64 CacheSize64;
+ UINT8 Associativity;
+ UINT32 CacheSize32;
+ UINT16 CacheSize16;
+ UINT64 CacheSize64;
if (!DataCache && !UnifiedCache) {
Type7Record->SystemCacheType = CacheTypeInstruction;
@@ -198,18 +203,20 @@ ConfigureCacheArchitectureInformation (
} else if (UnifiedCache) {
Type7Record->SystemCacheType = CacheTypeUnified;
} else {
- ASSERT(FALSE);
+ ASSERT (FALSE);
}
- CacheSize64 = SmbiosProcessorGetCacheSize (CacheLevel,
- DataCache,
- UnifiedCache
- );
+ CacheSize64 = SmbiosProcessorGetCacheSize (
+ CacheLevel,
+ DataCache,
+ UnifiedCache
+ );
- Associativity = SmbiosProcessorGetCacheAssociativity (CacheLevel,
- DataCache,
- UnifiedCache
- );
+ Associativity = SmbiosProcessorGetCacheAssociativity (
+ CacheLevel,
+ DataCache,
+ UnifiedCache
+ );
CacheSize64 /= 1024; // Minimum granularity is 1K
@@ -230,10 +237,10 @@ ConfigureCacheArchitectureInformation (
CacheSize16 = -1;
}
- Type7Record->MaximumCacheSize = CacheSize16;
- Type7Record->InstalledSize = CacheSize16;
+ Type7Record->MaximumCacheSize = CacheSize16;
+ Type7Record->InstalledSize = CacheSize16;
Type7Record->MaximumCacheSize2 = CacheSize32;
- Type7Record->InstalledSize2 = CacheSize32;
+ Type7Record->InstalledSize2 = CacheSize32;
switch (Associativity) {
case 2:
@@ -278,7 +285,6 @@ ConfigureCacheArchitectureInformation (
(CacheLevel - 1);
}
-
/** Allocates and initializes an SMBIOS_TABLE_TYPE7 structure.
@param[in] CacheLevel The cache level (L1-L7).
@@ -289,9 +295,9 @@ ConfigureCacheArchitectureInformation (
**/
SMBIOS_TABLE_TYPE7 *
AllocateAndInitCacheInformation (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache
)
{
SMBIOS_TABLE_TYPE7 *Type7Record;
@@ -303,33 +309,35 @@ AllocateAndInitCacheInformation (
// Allocate and fetch the cache description
StringBufferSize = sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH;
- CacheSocketStr = AllocateZeroPool (StringBufferSize);
+ CacheSocketStr = AllocateZeroPool (StringBufferSize);
if (CacheSocketStr == NULL) {
return NULL;
}
- CacheSocketStrLen = GetCacheSocketStr (CacheLevel,
- DataCache,
- UnifiedCache,
- CacheSocketStr);
+ CacheSocketStrLen = GetCacheSocketStr (
+ CacheLevel,
+ DataCache,
+ UnifiedCache,
+ CacheSocketStr
+ );
- TableSize = sizeof (SMBIOS_TABLE_TYPE7) + CacheSocketStrLen + 1 + 1;
+ TableSize = sizeof (SMBIOS_TABLE_TYPE7) + CacheSocketStrLen + 1 + 1;
Type7Record = AllocateZeroPool (TableSize);
if (Type7Record == NULL) {
- FreePool(CacheSocketStr);
+ FreePool (CacheSocketStr);
return NULL;
}
- Type7Record->Hdr.Type = EFI_SMBIOS_TYPE_CACHE_INFORMATION;
+ Type7Record->Hdr.Type = EFI_SMBIOS_TYPE_CACHE_INFORMATION;
Type7Record->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE7);
Type7Record->Hdr.Handle = SMBIOS_HANDLE_PI_RESERVED;
Type7Record->SocketDesignation = 1;
Type7Record->SupportedSRAMType.Unknown = 1;
- Type7Record->CurrentSRAMType.Unknown = 1;
- Type7Record->CacheSpeed = 0;
- Type7Record->ErrorCorrectionType = CacheErrorUnknown;
+ Type7Record->CurrentSRAMType.Unknown = 1;
+ Type7Record->CacheSpeed = 0;
+ Type7Record->ErrorCorrectionType = CacheErrorUnknown;
OptionalStrStart = (CHAR8 *)(Type7Record + 1);
UnicodeStrToAsciiStrS (CacheSocketStr, OptionalStrStart, CacheSocketStrLen + 1);
@@ -349,19 +357,19 @@ AllocateAndInitCacheInformation (
**/
VOID
AddSmbiosCacheTypeTable (
- IN UINTN ProcessorIndex,
- OUT EFI_SMBIOS_HANDLE *L1CacheHandle,
- OUT EFI_SMBIOS_HANDLE *L2CacheHandle,
- OUT EFI_SMBIOS_HANDLE *L3CacheHandle
+ IN UINTN ProcessorIndex,
+ OUT EFI_SMBIOS_HANDLE *L1CacheHandle,
+ OUT EFI_SMBIOS_HANDLE *L2CacheHandle,
+ OUT EFI_SMBIOS_HANDLE *L3CacheHandle
)
{
- EFI_STATUS Status;
- SMBIOS_TABLE_TYPE7 *Type7Record;
- EFI_SMBIOS_HANDLE SmbiosHandle;
- UINT8 CacheLevel;
- UINT8 MaxCacheLevel;
- BOOLEAN DataCacheType;
- BOOLEAN SeparateCaches;
+ EFI_STATUS Status;
+ SMBIOS_TABLE_TYPE7 *Type7Record;
+ EFI_SMBIOS_HANDLE SmbiosHandle;
+ UINT8 CacheLevel;
+ UINT8 MaxCacheLevel;
+ BOOLEAN DataCacheType;
+ BOOLEAN SeparateCaches;
Status = EFI_SUCCESS;
@@ -385,34 +393,46 @@ AddSmbiosCacheTypeTable (
// process the instruction cache.
for (DataCacheType = 0; DataCacheType <= 1; DataCacheType++) {
// If there's no separate data/instruction cache, skip the second iteration
- if (DataCacheType == 1 && !SeparateCaches) {
+ if ((DataCacheType == 1) && !SeparateCaches) {
continue;
}
- Type7Record = AllocateAndInitCacheInformation (CacheLevel,
- DataCacheType,
- !SeparateCaches
- );
+ Type7Record = AllocateAndInitCacheInformation (
+ CacheLevel,
+ DataCacheType,
+ !SeparateCaches
+ );
if (Type7Record == NULL) {
continue;
}
- ConfigureCacheArchitectureInformation(CacheLevel,
- DataCacheType,
- !SeparateCaches,
- Type7Record
- );
+ ConfigureCacheArchitectureInformation (
+ CacheLevel,
+ DataCacheType,
+ !SeparateCaches,
+ Type7Record
+ );
// Allow the platform to fill in other information such as speed, SRAM type etc.
- if (!OemGetCacheInformation (ProcessorIndex, CacheLevel,
- DataCacheType, !SeparateCaches, Type7Record)) {
+ if (!OemGetCacheInformation (
+ ProcessorIndex,
+ CacheLevel,
+ DataCacheType,
+ !SeparateCaches,
+ Type7Record
+ ))
+ {
continue;
}
SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
// Finally, install the table
- Status = mSmbios->Add (mSmbios, NULL, &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *)Type7Record);
+ Status = mSmbios->Add (
+ mSmbios,
+ NULL,
+ &SmbiosHandle,
+ (EFI_SMBIOS_TABLE_HEADER *)Type7Record
+ );
if (EFI_ERROR (Status)) {
continue;
}
@@ -449,33 +469,33 @@ AddSmbiosCacheTypeTable (
**/
EFI_STATUS
AllocateType4AndSetProcessorInformationStrings (
- SMBIOS_TABLE_TYPE4 **Type4Record,
- UINT8 ProcessorIndex,
- BOOLEAN Populated
+ SMBIOS_TABLE_TYPE4 **Type4Record,
+ UINT8 ProcessorIndex,
+ BOOLEAN Populated
)
{
- EFI_STATUS Status;
- EFI_STRING_ID ProcessorManu;
- EFI_STRING_ID ProcessorVersion;
- EFI_STRING_ID SerialNumber;
- EFI_STRING_ID AssetTag;
- EFI_STRING_ID PartNumber;
- EFI_STRING ProcessorStr;
- EFI_STRING ProcessorManuStr;
- EFI_STRING ProcessorVersionStr;
- EFI_STRING SerialNumberStr;
- EFI_STRING AssetTagStr;
- EFI_STRING PartNumberStr;
- CHAR8 *OptionalStrStart;
- CHAR8 *StrStart;
- UINTN ProcessorStrLen;
- UINTN ProcessorManuStrLen;
- UINTN ProcessorVersionStrLen;
- UINTN SerialNumberStrLen;
- UINTN AssetTagStrLen;
- UINTN PartNumberStrLen;
- UINTN TotalSize;
- UINTN StringBufferSize;
+ EFI_STATUS Status;
+ EFI_STRING_ID ProcessorManu;
+ EFI_STRING_ID ProcessorVersion;
+ EFI_STRING_ID SerialNumber;
+ EFI_STRING_ID AssetTag;
+ EFI_STRING_ID PartNumber;
+ EFI_STRING ProcessorStr;
+ EFI_STRING ProcessorManuStr;
+ EFI_STRING ProcessorVersionStr;
+ EFI_STRING SerialNumberStr;
+ EFI_STRING AssetTagStr;
+ EFI_STRING PartNumberStr;
+ CHAR8 *OptionalStrStart;
+ CHAR8 *StrStart;
+ UINTN ProcessorStrLen;
+ UINTN ProcessorManuStrLen;
+ UINTN ProcessorVersionStrLen;
+ UINTN SerialNumberStrLen;
+ UINTN AssetTagStrLen;
+ UINTN PartNumberStrLen;
+ UINTN TotalSize;
+ UINTN StringBufferSize;
Status = EFI_SUCCESS;
@@ -485,11 +505,11 @@ AllocateType4AndSetProcessorInformationStrings (
AssetTagStr = NULL;
PartNumberStr = NULL;
- ProcessorManu = STRING_TOKEN (STR_PROCESSOR_MANUFACTURE);
- ProcessorVersion = STRING_TOKEN (STR_PROCESSOR_VERSION);
- SerialNumber = STRING_TOKEN (STR_PROCESSOR_SERIAL_NUMBER);
- AssetTag = STRING_TOKEN (STR_PROCESSOR_ASSET_TAG);
- PartNumber = STRING_TOKEN (STR_PROCESSOR_PART_NUMBER);
+ ProcessorManu = STRING_TOKEN (STR_PROCESSOR_MANUFACTURE);
+ ProcessorVersion = STRING_TOKEN (STR_PROCESSOR_VERSION);
+ SerialNumber = STRING_TOKEN (STR_PROCESSOR_SERIAL_NUMBER);
+ AssetTag = STRING_TOKEN (STR_PROCESSOR_ASSET_TAG);
+ PartNumber = STRING_TOKEN (STR_PROCESSOR_PART_NUMBER);
SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer, ProcessorManu);
SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion, ProcessorVersion);
@@ -499,32 +519,36 @@ AllocateType4AndSetProcessorInformationStrings (
// Processor Designation
StringBufferSize = sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH;
- ProcessorStr = AllocateZeroPool (StringBufferSize);
+ ProcessorStr = AllocateZeroPool (StringBufferSize);
if (ProcessorStr == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- ProcessorStrLen = UnicodeSPrint (ProcessorStr, StringBufferSize,
- L"CPU%02d", ProcessorIndex + 1);
+ ProcessorStrLen = UnicodeSPrint (
+ ProcessorStr,
+ StringBufferSize,
+ L"CPU%02d",
+ ProcessorIndex + 1
+ );
// Processor Manufacture
- ProcessorManuStr = HiiGetPackageString (&gEfiCallerIdGuid, ProcessorManu, NULL);
+ ProcessorManuStr = HiiGetPackageString (&gEfiCallerIdGuid, ProcessorManu, NULL);
ProcessorManuStrLen = StrLen (ProcessorManuStr);
// Processor Version
- ProcessorVersionStr = HiiGetPackageString (&gEfiCallerIdGuid, ProcessorVersion, NULL);
+ ProcessorVersionStr = HiiGetPackageString (&gEfiCallerIdGuid, ProcessorVersion, NULL);
ProcessorVersionStrLen = StrLen (ProcessorVersionStr);
// Serial Number
- SerialNumberStr = HiiGetPackageString (&gEfiCallerIdGuid, SerialNumber, NULL);
+ SerialNumberStr = HiiGetPackageString (&gEfiCallerIdGuid, SerialNumber, NULL);
SerialNumberStrLen = StrLen (SerialNumberStr);
// Asset Tag
- AssetTagStr = HiiGetPackageString (&gEfiCallerIdGuid, AssetTag, NULL);
+ AssetTagStr = HiiGetPackageString (&gEfiCallerIdGuid, AssetTag, NULL);
AssetTagStrLen = StrLen (AssetTagStr);
// Part Number
- PartNumberStr = HiiGetPackageString (&gEfiCallerIdGuid, PartNumber, NULL);
+ PartNumberStr = HiiGetPackageString (&gEfiCallerIdGuid, PartNumber, NULL);
PartNumberStrLen = StrLen (PartNumberStr);
TotalSize = sizeof (SMBIOS_TABLE_TYPE4) +
@@ -604,33 +628,33 @@ Exit:
**/
EFI_STATUS
AddSmbiosProcessorTypeTable (
- IN UINTN ProcessorIndex
+ IN UINTN ProcessorIndex
)
{
- EFI_STATUS Status;
- SMBIOS_TABLE_TYPE4 *Type4Record;
- EFI_SMBIOS_HANDLE SmbiosHandle;
- EFI_SMBIOS_HANDLE L1CacheHandle;
- EFI_SMBIOS_HANDLE L2CacheHandle;
- EFI_SMBIOS_HANDLE L3CacheHandle;
- UINT8 *LegacyVoltage;
- PROCESSOR_STATUS_DATA ProcessorStatus;
- UINT64 *ProcessorId;
- PROCESSOR_CHARACTERISTIC_FLAGS ProcessorCharacteristics;
- OEM_MISC_PROCESSOR_DATA MiscProcessorData;
- BOOLEAN ProcessorPopulated;
-
- Type4Record = NULL;
-
- MiscProcessorData.Voltage = 0;
- MiscProcessorData.CurrentSpeed = 0;
- MiscProcessorData.CoreCount = 0;
- MiscProcessorData.CoresEnabled = 0;
- MiscProcessorData.ThreadCount = 0;
- MiscProcessorData.MaxSpeed = 0;
- L1CacheHandle = 0xFFFF;
- L2CacheHandle = 0xFFFF;
- L3CacheHandle = 0xFFFF;
+ EFI_STATUS Status;
+ SMBIOS_TABLE_TYPE4 *Type4Record;
+ EFI_SMBIOS_HANDLE SmbiosHandle;
+ EFI_SMBIOS_HANDLE L1CacheHandle;
+ EFI_SMBIOS_HANDLE L2CacheHandle;
+ EFI_SMBIOS_HANDLE L3CacheHandle;
+ UINT8 *LegacyVoltage;
+ PROCESSOR_STATUS_DATA ProcessorStatus;
+ UINT64 *ProcessorId;
+ PROCESSOR_CHARACTERISTIC_FLAGS ProcessorCharacteristics;
+ OEM_MISC_PROCESSOR_DATA MiscProcessorData;
+ BOOLEAN ProcessorPopulated;
+
+ Type4Record = NULL;
+
+ MiscProcessorData.Voltage = 0;
+ MiscProcessorData.CurrentSpeed = 0;
+ MiscProcessorData.CoreCount = 0;
+ MiscProcessorData.CoresEnabled = 0;
+ MiscProcessorData.ThreadCount = 0;
+ MiscProcessorData.MaxSpeed = 0;
+ L1CacheHandle = 0xFFFF;
+ L2CacheHandle = 0xFFFF;
+ L3CacheHandle = 0xFFFF;
ProcessorPopulated = OemIsProcessorPresent (ProcessorIndex);
@@ -643,54 +667,70 @@ AddSmbiosProcessorTypeTable (
return Status;
}
- OemGetProcessorInformation (ProcessorIndex,
- &ProcessorStatus,
- (PROCESSOR_CHARACTERISTIC_FLAGS*)
- &Type4Record->ProcessorCharacteristics,
- &MiscProcessorData);
+ OemGetProcessorInformation (
+ ProcessorIndex,
+ &ProcessorStatus,
+ (PROCESSOR_CHARACTERISTIC_FLAGS *)
+ &Type4Record->ProcessorCharacteristics,
+ &MiscProcessorData
+ );
if (ProcessorPopulated) {
- AddSmbiosCacheTypeTable (ProcessorIndex, &L1CacheHandle,
- &L2CacheHandle, &L3CacheHandle);
+ AddSmbiosCacheTypeTable (
+ ProcessorIndex,
+ &L1CacheHandle,
+ &L2CacheHandle,
+ &L3CacheHandle
+ );
}
- LegacyVoltage = (UINT8*)&Type4Record->Voltage;
-
- *LegacyVoltage = MiscProcessorData.Voltage;
- Type4Record->CurrentSpeed = MiscProcessorData.CurrentSpeed;
- Type4Record->MaxSpeed = MiscProcessorData.MaxSpeed;
- Type4Record->Status = ProcessorStatus.Data;
- Type4Record->L1CacheHandle = L1CacheHandle;
- Type4Record->L2CacheHandle = L2CacheHandle;
- Type4Record->L3CacheHandle = L3CacheHandle;
- Type4Record->CoreCount = MiscProcessorData.CoreCount;
- Type4Record->CoreCount2 = MiscProcessorData.CoreCount;
- Type4Record->EnabledCoreCount = MiscProcessorData.CoresEnabled;
- Type4Record->EnabledCoreCount2 = MiscProcessorData.CoresEnabled;
- Type4Record->ThreadCount = MiscProcessorData.ThreadCount;
- Type4Record->ThreadCount2 = MiscProcessorData.ThreadCount;
-
- Type4Record->CurrentSpeed = GetCpuFrequency (ProcessorIndex);
+ LegacyVoltage = (UINT8 *)&Type4Record->Voltage;
+
+ *LegacyVoltage = MiscProcessorData.Voltage;
+ Type4Record->CurrentSpeed = MiscProcessorData.CurrentSpeed;
+ Type4Record->MaxSpeed = MiscProcessorData.MaxSpeed;
+ Type4Record->Status = ProcessorStatus.Data;
+ Type4Record->L1CacheHandle = L1CacheHandle;
+ Type4Record->L2CacheHandle = L2CacheHandle;
+ Type4Record->L3CacheHandle = L3CacheHandle;
+ Type4Record->CoreCount = MiscProcessorData.CoreCount;
+ Type4Record->CoreCount2 = MiscProcessorData.CoreCount;
+ Type4Record->EnabledCoreCount = MiscProcessorData.CoresEnabled;
+ Type4Record->EnabledCoreCount2 = MiscProcessorData.CoresEnabled;
+ Type4Record->ThreadCount = MiscProcessorData.ThreadCount;
+ Type4Record->ThreadCount2 = MiscProcessorData.ThreadCount;
+
+ Type4Record->CurrentSpeed = GetCpuFrequency (ProcessorIndex);
Type4Record->ExternalClock =
(UINT16)(SmbiosGetExternalClockFrequency () / 1000 / 1000);
- ProcessorId = (UINT64*)&Type4Record->ProcessorId;
+ ProcessorId = (UINT64 *)&Type4Record->ProcessorId;
*ProcessorId = SmbiosGetProcessorId ();
- ProcessorCharacteristics = SmbiosGetProcessorCharacteristics ();
- Type4Record->ProcessorCharacteristics |= *((UINT64*)&ProcessorCharacteristics);
+ ProcessorCharacteristics = SmbiosGetProcessorCharacteristics ();
+ Type4Record->ProcessorCharacteristics |= *((UINT64 *)&ProcessorCharacteristics);
- Type4Record->ProcessorFamily = SmbiosGetProcessorFamily ();
+ Type4Record->ProcessorFamily = SmbiosGetProcessorFamily ();
Type4Record->ProcessorFamily2 = SmbiosGetProcessorFamily2 ();
SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
- Status = mSmbios->Add (mSmbios, NULL, &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *)Type4Record);
+ Status = mSmbios->Add (
+ mSmbios,
+ NULL,
+ &SmbiosHandle,
+ (EFI_SMBIOS_TABLE_HEADER *)Type4Record
+ );
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type04 Table Log Failed! %r \n",
- __FUNCTION__, DEBUG_LINE_NUMBER, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "[%a]:[%dL] Smbios Type04 Table Log Failed! %r \n",
+ __FUNCTION__,
+ DEBUG_LINE_NUMBER,
+ Status
+ ));
}
+
FreePool (Type4Record);
return Status;
@@ -707,18 +747,18 @@ AddSmbiosProcessorTypeTable (
**/
EFI_STATUS
EFIAPI
-ProcessorSubClassEntryPoint(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ProcessorSubClassEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
- UINT32 ProcessorIndex;
+ EFI_STATUS Status;
+ UINT32 ProcessorIndex;
//
// Locate dependent protocols
//
- Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID**)&mSmbios);
+ Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID **)&mSmbios);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Could not locate SMBIOS protocol. %r\n", Status));
return Status;
@@ -727,12 +767,13 @@ ProcessorSubClassEntryPoint(
//
// Add our default strings to the HII database. They will be modified later.
//
- mHiiHandle = HiiAddPackages (&gEfiCallerIdGuid,
- NULL,
- ProcessorSubClassStrings,
- NULL,
- NULL
- );
+ mHiiHandle = HiiAddPackages (
+ &gEfiCallerIdGuid,
+ NULL,
+ ProcessorSubClassStrings,
+ NULL,
+ NULL
+ );
if (mHiiHandle == NULL) {
return EFI_OUT_OF_RESOURCES;
}
diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessor.h b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessor.h
index f64d5cd..8eb285d 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessor.h
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessor.h
@@ -30,7 +30,7 @@ SmbiosProcessorGetMaxCacheLevel (
**/
BOOLEAN
SmbiosProcessorHasSeparateCaches (
- UINT8 CacheLevel
+ UINT8 CacheLevel
);
/** Gets the size of the specified cache.
@@ -43,9 +43,9 @@ SmbiosProcessorHasSeparateCaches (
**/
UINT64
SmbiosProcessorGetCacheSize (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache
);
/** Gets the associativity of the specified cache.
@@ -58,9 +58,9 @@ SmbiosProcessorGetCacheSize (
**/
UINT32
SmbiosProcessorGetCacheAssociativity (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache
);
/** Returns a value for the Processor ID field that conforms to SMBIOS
@@ -69,34 +69,44 @@ SmbiosProcessorGetCacheAssociativity (
@return Processor ID.
**/
UINT64
-SmbiosGetProcessorId (VOID);
+SmbiosGetProcessorId (
+ VOID
+ );
/** Returns the external clock frequency.
@return The external CPU clock frequency.
**/
UINTN
-SmbiosGetExternalClockFrequency (VOID);
+SmbiosGetExternalClockFrequency (
+ VOID
+ );
/** Returns the SMBIOS ProcessorFamily field value.
@return The value for the ProcessorFamily field.
**/
UINT8
-SmbiosGetProcessorFamily (VOID);
+SmbiosGetProcessorFamily (
+ VOID
+ );
/** Returns the ProcessorFamily2 field value.
@return The value for the ProcessorFamily2 field.
**/
UINT16
-SmbiosGetProcessorFamily2 (VOID);
+SmbiosGetProcessorFamily2 (
+ VOID
+ );
/** Returns the SMBIOS Processor Characteristics.
@return Processor Characteristics bitfield.
**/
PROCESSOR_CHARACTERISTIC_FLAGS
-SmbiosGetProcessorCharacteristics (VOID);
+SmbiosGetProcessorCharacteristics (
+ VOID
+ );
#endif // SMBIOS_PROCESSOR_H_
diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorAArch64.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorAArch64.c
index 6fbb95a..42d56ad 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorAArch64.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorAArch64.c
@@ -23,19 +23,19 @@
**/
UINT64
SmbiosProcessorGetCacheSize (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache
-)
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache
+ )
{
- CCSIDR_DATA Ccsidr;
- CSSELR_DATA Csselr;
- BOOLEAN CcidxSupported;
- UINT64 CacheSize;
+ CCSIDR_DATA Ccsidr;
+ CSSELR_DATA Csselr;
+ BOOLEAN CcidxSupported;
+ UINT64 CacheSize;
- Csselr.Data = 0;
+ Csselr.Data = 0;
Csselr.Bits.Level = CacheLevel - 1;
- Csselr.Bits.InD = (!DataCache && !UnifiedCache);
+ Csselr.Bits.InD = (!DataCache && !UnifiedCache);
Ccsidr.Data = ReadCCSIDR (Csselr.Data);
@@ -43,12 +43,12 @@ SmbiosProcessorGetCacheSize (
if (CcidxSupported) {
CacheSize = (1 << (Ccsidr.BitsCcidxAA64.LineSize + 4)) *
- (Ccsidr.BitsCcidxAA64.Associativity + 1) *
- (Ccsidr.BitsCcidxAA64.NumSets + 1);
+ (Ccsidr.BitsCcidxAA64.Associativity + 1) *
+ (Ccsidr.BitsCcidxAA64.NumSets + 1);
} else {
CacheSize = (1 << (Ccsidr.BitsNonCcidx.LineSize + 4)) *
- (Ccsidr.BitsNonCcidx.Associativity + 1) *
- (Ccsidr.BitsNonCcidx.NumSets + 1);
+ (Ccsidr.BitsNonCcidx.Associativity + 1) *
+ (Ccsidr.BitsNonCcidx.NumSets + 1);
}
return CacheSize;
@@ -64,19 +64,19 @@ SmbiosProcessorGetCacheSize (
**/
UINT32
SmbiosProcessorGetCacheAssociativity (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache
)
{
- CCSIDR_DATA Ccsidr;
- CSSELR_DATA Csselr;
- BOOLEAN CcidxSupported;
- UINT32 Associativity;
+ CCSIDR_DATA Ccsidr;
+ CSSELR_DATA Csselr;
+ BOOLEAN CcidxSupported;
+ UINT32 Associativity;
- Csselr.Data = 0;
+ Csselr.Data = 0;
Csselr.Bits.Level = CacheLevel - 1;
- Csselr.Bits.InD = (!DataCache && !UnifiedCache);
+ Csselr.Bits.InD = (!DataCache && !UnifiedCache);
Ccsidr.Data = ReadCCSIDR (Csselr.Data);
@@ -90,4 +90,3 @@ SmbiosProcessorGetCacheAssociativity (
return Associativity;
}
-
diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArm.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArm.c
index 7616fca4..ddee0e4 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArm.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArm.c
@@ -23,21 +23,21 @@
**/
UINT64
SmbiosProcessorGetCacheSize (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache
)
{
- CCSIDR_DATA Ccsidr;
- CCSIDR2_DATA Ccsidr2;
- CSSELR_DATA Csselr;
- BOOLEAN CcidxSupported;
- UINT64 CacheSize;
+ CCSIDR_DATA Ccsidr;
+ CCSIDR2_DATA Ccsidr2;
+ CSSELR_DATA Csselr;
+ BOOLEAN CcidxSupported;
+ UINT64 CacheSize;
// Read the CCSIDR register to get the cache architecture
- Csselr.Data = 0;
+ Csselr.Data = 0;
Csselr.Bits.Level = CacheLevel - 1;
- Csselr.Bits.InD = (!DataCache && !UnifiedCache);
+ Csselr.Bits.InD = (!DataCache && !UnifiedCache);
Ccsidr.Data = ReadCCSIDR (Csselr.Data);
@@ -45,13 +45,13 @@ SmbiosProcessorGetCacheSize (
if (CcidxSupported) {
Ccsidr2.Data = ReadCCSIDR2 (Csselr.Data);
- CacheSize = (1 << (Ccsidr.BitsCcidxAA32.LineSize + 4)) *
- (Ccsidr.BitsCcidxAA32.Associativity + 1) *
- (Ccsidr2.Bits.NumSets + 1);
+ CacheSize = (1 << (Ccsidr.BitsCcidxAA32.LineSize + 4)) *
+ (Ccsidr.BitsCcidxAA32.Associativity + 1) *
+ (Ccsidr2.Bits.NumSets + 1);
} else {
CacheSize = (1 << (Ccsidr.BitsNonCcidx.LineSize + 4)) *
- (Ccsidr.BitsNonCcidx.Associativity + 1) *
- (Ccsidr.BitsNonCcidx.NumSets + 1);
+ (Ccsidr.BitsNonCcidx.Associativity + 1) *
+ (Ccsidr.BitsNonCcidx.NumSets + 1);
}
return CacheSize;
@@ -67,9 +67,9 @@ SmbiosProcessorGetCacheSize (
**/
UINT32
SmbiosProcessorGetCacheAssociativity (
- IN UINT8 CacheLevel,
- IN BOOLEAN DataCache,
- IN BOOLEAN UnifiedCache
+ IN UINT8 CacheLevel,
+ IN BOOLEAN DataCache,
+ IN BOOLEAN UnifiedCache
)
{
CCSIDR_DATA Ccsidr;
@@ -78,9 +78,9 @@ SmbiosProcessorGetCacheAssociativity (
UINT32 Associativity;
// Read the CCSIDR register to get the cache architecture
- Csselr.Data = 0;
+ Csselr.Data = 0;
Csselr.Bits.Level = CacheLevel - 1;
- Csselr.Bits.InD = (!DataCache && !UnifiedCache);
+ Csselr.Bits.InD = (!DataCache && !UnifiedCache);
Ccsidr.Data = ReadCCSIDR (Csselr.Data);
@@ -94,4 +94,3 @@ SmbiosProcessorGetCacheAssociativity (
return Associativity;
}
-
diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
index d644cd3..7a8c3ca 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
@@ -27,9 +27,9 @@ SmbiosProcessorGetMaxCacheLevel (
VOID
)
{
- CLIDR_DATA Clidr;
- UINT8 CacheLevel;
- UINT8 MaxCacheLevel;
+ CLIDR_DATA Clidr;
+ UINT8 CacheLevel;
+ UINT8 MaxCacheLevel;
MaxCacheLevel = 0;
@@ -59,12 +59,12 @@ SmbiosProcessorGetMaxCacheLevel (
**/
BOOLEAN
SmbiosProcessorHasSeparateCaches (
- UINT8 CacheLevel
+ UINT8 CacheLevel
)
{
- CLIDR_CACHE_TYPE CacheType;
- CLIDR_DATA Clidr;
- BOOLEAN SeparateCaches;
+ CLIDR_CACHE_TYPE CacheType;
+ CLIDR_DATA Clidr;
+ BOOLEAN SeparateCaches;
SeparateCaches = FALSE;
@@ -88,9 +88,9 @@ HasSmcArm64SocId (
VOID
)
{
- ARM_SMC_ARGS Args;
- INT32 SmcCallStatus;
- BOOLEAN Arm64SocIdSupported;
+ ARM_SMC_ARGS Args;
+ INT32 SmcCallStatus;
+ BOOLEAN Arm64SocIdSupported;
Arm64SocIdSupported = FALSE;
@@ -98,7 +98,7 @@ HasSmcArm64SocId (
ArmCallSmc (&Args);
SmcCallStatus = (INT32)Args.Arg0;
- if (SmcCallStatus < 0 || (SmcCallStatus >> 16) >= 1) {
+ if ((SmcCallStatus < 0) || ((SmcCallStatus >> 16) >= 1)) {
Args.Arg0 = SMCCC_ARCH_FEATURES;
Args.Arg1 = SMCCC_ARCH_SOC_ID;
ArmCallSmc (&Args);
@@ -121,8 +121,8 @@ HasSmcArm64SocId (
**/
EFI_STATUS
SmbiosGetSmcArm64SocId (
- OUT INT32 *Jep106Code,
- OUT INT32 *SocRevision
+ OUT INT32 *Jep106Code,
+ OUT INT32 *SocRevision
)
{
ARM_SMC_ARGS Args;
@@ -166,9 +166,9 @@ SmbiosGetProcessorId (
VOID
)
{
- INT32 Jep106Code;
- INT32 SocRevision;
- UINT64 ProcessorId;
+ INT32 Jep106Code;
+ INT32 SocRevision;
+ UINT64 ProcessorId;
if (HasSmcArm64SocId ()) {
SmbiosGetSmcArm64SocId (&Jep106Code, &SocRevision);
@@ -213,15 +213,15 @@ SmbiosGetProcessorFamily2 (
VOID
)
{
- UINTN MainIdRegister;
- UINT16 ProcessorFamily2;
+ UINTN MainIdRegister;
+ UINT16 ProcessorFamily2;
MainIdRegister = ArmReadMidr ();
if (((MainIdRegister >> 16) & 0xF) < 8) {
ProcessorFamily2 = ProcessorFamilyARM;
} else {
- if (sizeof (VOID*) == 4) {
+ if (sizeof (VOID *) == 4) {
ProcessorFamily2 = ProcessorFamilyARMv7;
} else {
ProcessorFamily2 = ProcessorFamilyARMv8;
@@ -240,7 +240,7 @@ SmbiosGetProcessorCharacteristics (
VOID
)
{
- PROCESSOR_CHARACTERISTIC_FLAGS Characteristics;
+ PROCESSOR_CHARACTERISTIC_FLAGS Characteristics;
ZeroMem (&Characteristics, sizeof (Characteristics));
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMisc.h b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMisc.h
index 4fd37c4..88f6043 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMisc.h
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMisc.h
@@ -20,12 +20,11 @@
//
// Data table entry update function.
//
-typedef EFI_STATUS (EFIAPI SMBIOS_MISC_DATA_FUNCTION) (
+typedef EFI_STATUS (EFIAPI SMBIOS_MISC_DATA_FUNCTION)(
IN VOID *RecordData,
IN EFI_SMBIOS_PROTOCOL *Smbios
);
-
//
// Data table entry definition.
//
@@ -33,11 +32,10 @@ typedef struct {
//
// intermediate input data for SMBIOS record
//
- VOID *RecordData;
- SMBIOS_MISC_DATA_FUNCTION *Function;
+ VOID *RecordData;
+ SMBIOS_MISC_DATA_FUNCTION *Function;
} SMBIOS_MISC_DATA_TABLE;
-
//
// SMBIOS table extern definitions
//
@@ -45,7 +43,6 @@ typedef struct {
extern NAME1 NAME2 ## Data; \
extern SMBIOS_MISC_DATA_FUNCTION NAME3 ## Function;
-
//
// SMBIOS data table entries
//
@@ -73,15 +70,14 @@ extern SMBIOS_MISC_DATA_FUNCTION NAME3 ## Function;
//
// Data Table Array Entries
//
-extern EFI_HII_HANDLE mSmbiosMiscHiiHandle;
+extern EFI_HII_HANDLE mSmbiosMiscHiiHandle;
-typedef struct _SMBIOS_TYPE13_BIOS_LANGUAGE_INFORMATION_STRING{
- UINT8 *LanguageSignature;
- EFI_STRING_ID InstallableLanguageLongString;
- EFI_STRING_ID InstallableLanguageAbbreviateString;
+typedef struct _SMBIOS_TYPE13_BIOS_LANGUAGE_INFORMATION_STRING {
+ UINT8 *LanguageSignature;
+ EFI_STRING_ID InstallableLanguageLongString;
+ EFI_STRING_ID InstallableLanguageAbbreviateString;
} SMBIOS_TYPE13_BIOS_LANGUAGE_INFORMATION_STRING;
-
/**
Adds an SMBIOS record.
@@ -101,8 +97,8 @@ typedef struct _SMBIOS_TYPE13_BIOS_LANGUAGE_INFORMATION_STRING{
**/
EFI_STATUS
SmbiosMiscAddRecord (
- IN UINT8 *Buffer,
- IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL
+ IN UINT8 *Buffer,
+ IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL
);
/**
@@ -114,21 +110,21 @@ SmbiosMiscAddRecord (
**/
VOID
-SmbiosMiscGetLinkTypeHandle(
- IN UINT8 SmbiosType,
- OUT UINT16 **HandleArray,
- OUT UINTN *HandleCount
+SmbiosMiscGetLinkTypeHandle (
+ IN UINT8 SmbiosType,
+ OUT UINT16 **HandleArray,
+ OUT UINTN *HandleCount
);
//
// Data Table Array
//
-extern SMBIOS_MISC_DATA_TABLE mSmbiosMiscDataTable[];
+extern SMBIOS_MISC_DATA_TABLE mSmbiosMiscDataTable[];
//
// Data Table Array Entries
//
-extern UINTN mSmbiosMiscDataTableEntries;
-extern UINT8 mSmbiosMiscDxeStrings[];
+extern UINTN mSmbiosMiscDataTableEntries;
+extern UINT8 mSmbiosMiscDxeStrings[];
#endif // SMBIOS_MISC_H_
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDataTable.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDataTable.c
index ac16c3a..c1b866f 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDataTable.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDataTable.c
@@ -13,50 +13,72 @@
#include "SmbiosMisc.h"
-SMBIOS_MISC_TABLE_EXTERNS (SMBIOS_TABLE_TYPE0,
- MiscBiosVendor,
- MiscBiosVendor)
-SMBIOS_MISC_TABLE_EXTERNS (SMBIOS_TABLE_TYPE1,
- MiscSystemManufacturer,
- MiscSystemManufacturer)
-SMBIOS_MISC_TABLE_EXTERNS (SMBIOS_TABLE_TYPE3,
- MiscChassisManufacturer,
- MiscChassisManufacturer)
-SMBIOS_MISC_TABLE_EXTERNS (SMBIOS_TABLE_TYPE2,
- MiscBaseBoardManufacturer,
- MiscBaseBoardManufacturer)
-SMBIOS_MISC_TABLE_EXTERNS (SMBIOS_TABLE_TYPE13,
- MiscNumberOfInstallableLanguages,
- MiscNumberOfInstallableLanguages)
-SMBIOS_MISC_TABLE_EXTERNS (SMBIOS_TABLE_TYPE32,
- MiscBootInformation,
- MiscBootInformation)
-
+SMBIOS_MISC_TABLE_EXTERNS (
+ SMBIOS_TABLE_TYPE0,
+ MiscBiosVendor,
+ MiscBiosVendor
+ )
+SMBIOS_MISC_TABLE_EXTERNS (
+ SMBIOS_TABLE_TYPE1,
+ MiscSystemManufacturer,
+ MiscSystemManufacturer
+ )
+SMBIOS_MISC_TABLE_EXTERNS (
+ SMBIOS_TABLE_TYPE3,
+ MiscChassisManufacturer,
+ MiscChassisManufacturer
+ )
+SMBIOS_MISC_TABLE_EXTERNS (
+ SMBIOS_TABLE_TYPE2,
+ MiscBaseBoardManufacturer,
+ MiscBaseBoardManufacturer
+ )
+SMBIOS_MISC_TABLE_EXTERNS (
+ SMBIOS_TABLE_TYPE13,
+ MiscNumberOfInstallableLanguages,
+ MiscNumberOfInstallableLanguages
+ )
+SMBIOS_MISC_TABLE_EXTERNS (
+ SMBIOS_TABLE_TYPE32,
+ MiscBootInformation,
+ MiscBootInformation
+ )
SMBIOS_MISC_DATA_TABLE mSmbiosMiscDataTable[] = {
// Type0
- SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (MiscBiosVendor,
- MiscBiosVendor),
+ SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (
+ MiscBiosVendor,
+ MiscBiosVendor
+ ),
// Type1
- SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (MiscSystemManufacturer,
- MiscSystemManufacturer),
+ SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (
+ MiscSystemManufacturer,
+ MiscSystemManufacturer
+ ),
// Type3
- SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (MiscChassisManufacturer,
- MiscChassisManufacturer),
+ SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (
+ MiscChassisManufacturer,
+ MiscChassisManufacturer
+ ),
// Type2
- SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (MiscBaseBoardManufacturer,
- MiscBaseBoardManufacturer),
+ SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (
+ MiscBaseBoardManufacturer,
+ MiscBaseBoardManufacturer
+ ),
// Type13
- SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (MiscNumberOfInstallableLanguages,
- MiscNumberOfInstallableLanguages),
+ SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (
+ MiscNumberOfInstallableLanguages,
+ MiscNumberOfInstallableLanguages
+ ),
// Type32
- SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (MiscBootInformation,
- MiscBootInformation),
+ SMBIOS_MISC_TABLE_ENTRY_DATA_AND_FUNCTION (
+ MiscBootInformation,
+ MiscBootInformation
+ ),
};
-
//
// Number of Data Table entries.
//
-UINTN mSmbiosMiscDataTableEntries =
+UINTN mSmbiosMiscDataTableEntries =
(sizeof (mSmbiosMiscDataTable)) / sizeof (SMBIOS_MISC_DATA_TABLE);
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscEntryPoint.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscEntryPoint.c
index eb7f4cb..3a5626b 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscEntryPoint.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscEntryPoint.c
@@ -21,11 +21,10 @@
#include "SmbiosMisc.h"
-
STATIC EFI_HANDLE mSmbiosMiscImageHandle;
STATIC EFI_SMBIOS_PROTOCOL *mSmbiosMiscSmbios = NULL;
-EFI_HII_HANDLE mSmbiosMiscHiiHandle;
+EFI_HII_HANDLE mSmbiosMiscHiiHandle;
/**
Standard EFI driver point. This driver parses the mSmbiosMiscDataTable
@@ -39,28 +38,32 @@ EFI_HII_HANDLE mSmbiosMiscHiiHandle;
**/
EFI_STATUS
EFIAPI
-SmbiosMiscEntryPoint(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+SmbiosMiscEntryPoint (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
- UINTN Index;
- EFI_STATUS EfiStatus;
+ UINTN Index;
+ EFI_STATUS EfiStatus;
mSmbiosMiscImageHandle = ImageHandle;
- EfiStatus = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL,
- (VOID**)&mSmbiosMiscSmbios);
+ EfiStatus = gBS->LocateProtocol (
+ &gEfiSmbiosProtocolGuid,
+ NULL,
+ (VOID **)&mSmbiosMiscSmbios
+ );
if (EFI_ERROR (EfiStatus)) {
DEBUG ((DEBUG_ERROR, "Could not locate SMBIOS protocol. %r\n", EfiStatus));
return EfiStatus;
}
- mSmbiosMiscHiiHandle = HiiAddPackages (&gEfiCallerIdGuid,
- mSmbiosMiscImageHandle,
- SmbiosMiscDxeStrings,
- NULL
- );
+ mSmbiosMiscHiiHandle = HiiAddPackages (
+ &gEfiCallerIdGuid,
+ mSmbiosMiscImageHandle,
+ SmbiosMiscDxeStrings,
+ NULL
+ );
if (mSmbiosMiscHiiHandle == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -70,13 +73,19 @@ SmbiosMiscEntryPoint(
// If the entry have a function pointer, just log the data.
//
if (mSmbiosMiscDataTable[Index].Function != NULL) {
- EfiStatus = (*mSmbiosMiscDataTable[Index].Function)(mSmbiosMiscDataTable[Index].RecordData,
- mSmbiosMiscSmbios
- );
-
- if (EFI_ERROR(EfiStatus)) {
- DEBUG ((DEBUG_ERROR, "Misc smbios store error. Index=%d,"
- "ReturnStatus=%r\n", Index, EfiStatus));
+ EfiStatus = (*mSmbiosMiscDataTable[Index].Function)(
+ mSmbiosMiscDataTable[Index].RecordData,
+ mSmbiosMiscSmbios
+ );
+
+ if (EFI_ERROR (EfiStatus)) {
+ DEBUG ((
+ DEBUG_ERROR,
+ "Misc smbios store error. Index=%d,"
+ "ReturnStatus=%r\n",
+ Index,
+ EfiStatus
+ ));
return EfiStatus;
}
}
@@ -85,7 +94,6 @@ SmbiosMiscEntryPoint(
return EfiStatus;
}
-
/**
Adds an SMBIOS record.
@@ -119,11 +127,11 @@ SmbiosMiscAddRecord (
}
Status = mSmbiosMiscSmbios->Add (
- mSmbiosMiscSmbios,
- NULL,
- &Handle,
- (EFI_SMBIOS_TABLE_HEADER *)Buffer
- );
+ mSmbiosMiscSmbios,
+ NULL,
+ &Handle,
+ (EFI_SMBIOS_TABLE_HEADER *)Buffer
+ );
if (SmbiosHandle != NULL) {
*SmbiosHandle = Handle;
@@ -132,7 +140,6 @@ SmbiosMiscAddRecord (
return Status;
}
-
/** Fetches the number of handles of the specified SMBIOS type.
*
* @param SmbiosType The type of SMBIOS record to look for.
@@ -143,7 +150,7 @@ SmbiosMiscAddRecord (
STATIC
UINTN
GetHandleCount (
- IN UINT8 SmbiosType
+ IN UINT8 SmbiosType
)
{
UINTN HandleCount;
@@ -155,12 +162,13 @@ GetHandleCount (
// Iterate through entries to get the number
do {
- Status = mSmbiosMiscSmbios->GetNext (mSmbiosMiscSmbios,
- &SmbiosHandle,
- &SmbiosType,
- &Record,
- NULL
- );
+ Status = mSmbiosMiscSmbios->GetNext (
+ mSmbiosMiscSmbios,
+ &SmbiosHandle,
+ &SmbiosType,
+ &Record,
+ NULL
+ );
if (Status == EFI_SUCCESS) {
HandleCount++;
@@ -178,10 +186,10 @@ GetHandleCount (
@param[out] *HandleCount Number of handles in the array
**/
VOID
-SmbiosMiscGetLinkTypeHandle(
- IN UINT8 SmbiosType,
- OUT SMBIOS_HANDLE **HandleArray,
- OUT UINTN *HandleCount
+SmbiosMiscGetLinkTypeHandle (
+ IN UINT8 SmbiosType,
+ OUT SMBIOS_HANDLE **HandleArray,
+ OUT UINTN *HandleCount
)
{
UINTN Index;
@@ -206,12 +214,13 @@ SmbiosMiscGetLinkTypeHandle(
SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
for (Index = 0; Index < (*HandleCount); Index++) {
- Status = mSmbiosMiscSmbios->GetNext (mSmbiosMiscSmbios,
- &SmbiosHandle,
- &SmbiosType,
- &Record,
- NULL
- );
+ Status = mSmbiosMiscSmbios->GetNext (
+ mSmbiosMiscSmbios,
+ &SmbiosHandle,
+ &SmbiosType,
+ &Record,
+ NULL
+ );
if (!EFI_ERROR (Status)) {
(*HandleArray)[Index] = Record->Handle;
@@ -220,4 +229,3 @@ SmbiosMiscGetLinkTypeHandle(
}
}
}
-
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorData.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorData.c
index edf0186..14ded60 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorData.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorData.c
@@ -11,18 +11,16 @@
**/
-
#include "SmbiosMisc.h"
-
//
// Static (possibly build generated) Bios Vendor data.
//
-SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE0, MiscBiosVendor) = {
+SMBIOS_MISC_TABLE_DATA (SMBIOS_TABLE_TYPE0, MiscBiosVendor) = {
{ // Hdr
- EFI_SMBIOS_TYPE_BIOS_INFORMATION, // Type,
- 0, // Length,
- 0 // Handle
+ EFI_SMBIOS_TYPE_BIOS_INFORMATION, // Type,
+ 0, // Length,
+ 0 // Handle
},
1, // Vendor
2, // BiosVersion
@@ -30,38 +28,38 @@ SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE0, MiscBiosVendor) = {
3, // BiosReleaseDate
0, // BiosSize
{ // BiosCharacteristics
- 0, // Reserved :2
- 0, // Unknown :1
- 0, // BiosCharacteristicsNotSupported :1
- 0, // IsaIsSupported :1
- 0, // McaIsSupported :1
- 0, // EisaIsSupported :1
- 1, // PciIsSupported :1
- 0, // PcmciaIsSupported :1
- 1, // PlugAndPlayIsSupported :1
- 0, // ApmIsSupported :1
- 1, // BiosIsUpgradable :1
- 1, // BiosShadowingAllowed :1
- 0, // VlVesaIsSupported :1
- 0, // EscdSupportIsAvailable :1
- 1, // BootFromCdIsSupported :1
- 1, // SelectableBootIsSupported :1
- 0, // RomBiosIsSocketed :1
- 0, // BootFromPcmciaIsSupported :1
- 0, // EDDSpecificationIsSupported :1
- 0, // JapaneseNecFloppyIsSupported :1
- 0, // JapaneseToshibaFloppyIsSupported :1
- 0, // Floppy525_360IsSupported :1
- 0, // Floppy525_12IsSupported :1
- 0, // Floppy35_720IsSupported :1
- 0, // Floppy35_288IsSupported :1
- 0, // PrintScreenIsSupported :1
- 0, // Keyboard8042IsSupported :1
- 0, // SerialIsSupported :1
- 0, // PrinterIsSupported :1
- 0, // CgaMonoIsSupported :1
- 0, // NecPc98 :1
- 0 // ReservedForVendor :32
+ 0, // Reserved :2
+ 0, // Unknown :1
+ 0, // BiosCharacteristicsNotSupported :1
+ 0, // IsaIsSupported :1
+ 0, // McaIsSupported :1
+ 0, // EisaIsSupported :1
+ 1, // PciIsSupported :1
+ 0, // PcmciaIsSupported :1
+ 1, // PlugAndPlayIsSupported :1
+ 0, // ApmIsSupported :1
+ 1, // BiosIsUpgradable :1
+ 1, // BiosShadowingAllowed :1
+ 0, // VlVesaIsSupported :1
+ 0, // EscdSupportIsAvailable :1
+ 1, // BootFromCdIsSupported :1
+ 1, // SelectableBootIsSupported :1
+ 0, // RomBiosIsSocketed :1
+ 0, // BootFromPcmciaIsSupported :1
+ 0, // EDDSpecificationIsSupported :1
+ 0, // JapaneseNecFloppyIsSupported :1
+ 0, // JapaneseToshibaFloppyIsSupported :1
+ 0, // Floppy525_360IsSupported :1
+ 0, // Floppy525_12IsSupported :1
+ 0, // Floppy35_720IsSupported :1
+ 0, // Floppy35_288IsSupported :1
+ 0, // PrintScreenIsSupported :1
+ 0, // Keyboard8042IsSupported :1
+ 0, // SerialIsSupported :1
+ 0, // PrinterIsSupported :1
+ 0, // CgaMonoIsSupported :1
+ 0, // NecPc98 :1
+ 0 // ReservedForVendor :32
},
{
@@ -76,7 +74,7 @@ SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE0, MiscBiosVendor) = {
// 0, // Boot1394IsSupported :1
// 0 // SmartBatteryIsSupported :1
// },
- 0x0C //BIOSCharacteristicsExtensionBytes[1]
+ 0x0C // BIOSCharacteristicsExtensionBytes[1]
// { //SystemReserved
// 0, //BiosBootSpecIsSupported :1
// 0, //FunctionKeyNetworkBootIsSupported :1
@@ -86,8 +84,8 @@ SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE0, MiscBiosVendor) = {
// 0 //ExtensionByte2Reserved :3
// },
},
- 0xFF, // SystemBiosMajorRelease;
- 0xFF, // SystemBiosMinorRelease;
+ 0xFF, // SystemBiosMajorRelease;
+ 0xFF, // SystemBiosMinorRelease;
0xFF, // EmbeddedControllerFirmwareMajorRelease;
0xFF // EmbeddedControllerFirmwareMinorRelease;
};
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
index 2506c03..b49c4b7 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
@@ -18,27 +18,26 @@
#include "SmbiosMisc.h"
-
typedef struct {
- CONST CHAR8* MonthStr;
- UINT32 MonthInt;
+ CONST CHAR8 *MonthStr;
+ UINT32 MonthInt;
} MONTH_DESCRIPTION;
STATIC CONST
-MONTH_DESCRIPTION mMonthDescription[] = {
- { "Jan", 1 },
- { "Feb", 2 },
- { "Mar", 3 },
- { "Apr", 4 },
- { "May", 5 },
- { "Jun", 6 },
- { "Jul", 7 },
- { "Aug", 8 },
- { "Sep", 9 },
+MONTH_DESCRIPTION mMonthDescription[] = {
+ { "Jan", 1 },
+ { "Feb", 2 },
+ { "Mar", 3 },
+ { "Apr", 4 },
+ { "May", 5 },
+ { "Jun", 6 },
+ { "Jul", 7 },
+ { "Aug", 8 },
+ { "Sep", 9 },
{ "Oct", 10 },
{ "Nov", 11 },
{ "Dec", 12 },
- { "???", 1 }, // Use 1 as default month
+ { "???", 1 }, // Use 1 as default month
};
/**
@@ -55,7 +54,7 @@ Base2ToByteWith64KUnit (
IN UINTN Value
)
{
- UINT8 Size;
+ UINT8 Size;
Size = ((Value + (SIZE_64KB - 1)) >> 16);
@@ -69,12 +68,12 @@ Base2ToByteWith64KUnit (
**/
VOID
GetReleaseTime (
- OUT EFI_TIME *Time
+ OUT EFI_TIME *Time
)
{
- CONST CHAR8 *ReleaseDate = __DATE__;
- CONST CHAR8 *ReleaseTime = __TIME__;
- UINTN i;
+ CONST CHAR8 *ReleaseDate = __DATE__;
+ CONST CHAR8 *ReleaseTime = __TIME__;
+ UINTN i;
for (i = 0; i < 12; i++) {
if (AsciiStrnCmp (ReleaseDate, mMonthDescription[i].MonthStr, 3) == 0) {
@@ -82,10 +81,10 @@ GetReleaseTime (
}
}
- Time->Month = mMonthDescription[i].MonthInt;
- Time->Day = AsciiStrDecimalToUintn (ReleaseDate + 4);
- Time->Year = AsciiStrDecimalToUintn (ReleaseDate + 7);
- Time->Hour = AsciiStrDecimalToUintn (ReleaseTime);
+ Time->Month = mMonthDescription[i].MonthInt;
+ Time->Day = AsciiStrDecimalToUintn (ReleaseDate + 4);
+ Time->Year = AsciiStrDecimalToUintn (ReleaseDate + 7);
+ Time->Hour = AsciiStrDecimalToUintn (ReleaseTime);
Time->Minute = AsciiStrDecimalToUintn (ReleaseTime + 3);
Time->Second = AsciiStrDecimalToUintn (ReleaseTime + 6);
}
@@ -101,23 +100,24 @@ GetBiosReleaseDate (
VOID
)
{
- CHAR16 *ReleaseDate;
- EFI_TIME BuildTime;
+ CHAR16 *ReleaseDate;
+ EFI_TIME BuildTime;
ReleaseDate = AllocateZeroPool ((sizeof (CHAR16)) * SMBIOS_STRING_MAX_LENGTH);
if (ReleaseDate == NULL) {
- return NULL;
+ return NULL;
}
GetReleaseTime (&BuildTime);
- (VOID)UnicodeSPrintAsciiFormat (ReleaseDate,
- (sizeof (CHAR16)) * SMBIOS_STRING_MAX_LENGTH,
- "%02d/%02d/%4d",
- BuildTime.Month,
- BuildTime.Day,
- BuildTime.Year
- );
+ (VOID)UnicodeSPrintAsciiFormat (
+ ReleaseDate,
+ (sizeof (CHAR16)) * SMBIOS_STRING_MAX_LENGTH,
+ "%02d/%02d/%4d",
+ BuildTime.Month,
+ BuildTime.Day,
+ BuildTime.Year
+ );
return ReleaseDate;
}
@@ -133,14 +133,13 @@ GetBiosVersion (
VOID
)
{
- CHAR16 *ReleaseString;
+ CHAR16 *ReleaseString;
ReleaseString = (CHAR16 *)FixedPcdGetPtr (PcdFirmwareVersionString);
return ReleaseString;
}
-
/**
This function makes boot time changes to the contents of the
MiscBiosVendor (Type 0) record.
@@ -153,23 +152,22 @@ GetBiosVersion (
@retval EFI_OUT_OF_RESOURCES Failed to allocate required memory.
**/
-SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
-{
- CHAR8 *OptionalStrStart;
- CHAR8 *StrStart;
- UINTN VendorStrLen;
- UINTN VerStrLen;
- UINTN DateStrLen;
- UINTN BiosPhysicalSize;
- CHAR16 *Vendor;
- CHAR16 *Version;
- CHAR16 *ReleaseDate;
- CHAR16 *Char16String;
- EFI_STATUS Status;
- EFI_STRING_ID TokenToUpdate;
- EFI_STRING_ID TokenToGet;
- SMBIOS_TABLE_TYPE0 *SmbiosRecord;
- SMBIOS_TABLE_TYPE0 *InputData;
+SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) {
+ CHAR8 *OptionalStrStart;
+ CHAR8 *StrStart;
+ UINTN VendorStrLen;
+ UINTN VerStrLen;
+ UINTN DateStrLen;
+ UINTN BiosPhysicalSize;
+ CHAR16 *Vendor;
+ CHAR16 *Version;
+ CHAR16 *ReleaseDate;
+ CHAR16 *Char16String;
+ EFI_STATUS Status;
+ EFI_STRING_ID TokenToUpdate;
+ EFI_STRING_ID TokenToGet;
+ SMBIOS_TABLE_TYPE0 *SmbiosRecord;
+ SMBIOS_TABLE_TYPE0 *InputData;
//
// First check for invalid parameters.
@@ -180,20 +178,20 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
InputData = (SMBIOS_TABLE_TYPE0 *)RecordData;
- Vendor = (CHAR16 *) PcdGetPtr (PcdFirmwareVendor);
+ Vendor = (CHAR16 *)PcdGetPtr (PcdFirmwareVendor);
if (StrLen (Vendor) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VENDOR);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Vendor, NULL);
}
- Version = GetBiosVersion();
+ Version = GetBiosVersion ();
if (StrLen (Version) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL);
} else {
- Version = (CHAR16 *) PcdGetPtr (PcdFirmwareVersionString);
+ Version = (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString);
if (StrLen (Version) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL);
@@ -201,22 +199,22 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
}
Char16String = GetBiosReleaseDate ();
- if (StrLen(Char16String) > 0) {
+ if (StrLen (Char16String) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_RELEASE_DATE);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Char16String, NULL);
}
- TokenToGet = STRING_TOKEN (STR_MISC_BIOS_VENDOR);
- Vendor = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ TokenToGet = STRING_TOKEN (STR_MISC_BIOS_VENDOR);
+ Vendor = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
VendorStrLen = StrLen (Vendor);
TokenToGet = STRING_TOKEN (STR_MISC_BIOS_VERSION);
- Version = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- VerStrLen = StrLen (Version);
+ Version = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ VerStrLen = StrLen (Version);
- TokenToGet = STRING_TOKEN (STR_MISC_BIOS_RELEASE_DATE);
+ TokenToGet = STRING_TOKEN (STR_MISC_BIOS_RELEASE_DATE);
ReleaseDate = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- DateStrLen = StrLen (ReleaseDate);
+ DateStrLen = StrLen (ReleaseDate);
//
// Now update the BiosPhysicalSize
@@ -226,9 +224,11 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
//
// Two zeros following the last string.
//
- SmbiosRecord = AllocateZeroPool (sizeof (SMBIOS_TABLE_TYPE0) + VendorStrLen + 1 +
- VerStrLen + 1 +
- DateStrLen + 1 + 1);
+ SmbiosRecord = AllocateZeroPool (
+ sizeof (SMBIOS_TABLE_TYPE0) + VendorStrLen + 1 +
+ VerStrLen + 1 +
+ DateStrLen + 1 + 1
+ );
if (SmbiosRecord == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
@@ -236,7 +236,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
(VOID)CopyMem (SmbiosRecord, InputData, sizeof (SMBIOS_TABLE_TYPE0));
- SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE0);
+ SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE0);
SmbiosRecord->BiosSegment = (UINT16)(FixedPcdGet32 (PcdFdBaseAddress) / SIZE_64KB);
if (BiosPhysicalSize < SIZE_16MB) {
SmbiosRecord->BiosSize = Base2ToByteWith64KUnit (BiosPhysicalSize) - 1;
@@ -251,13 +251,13 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
}
}
- SmbiosRecord->SystemBiosMajorRelease = (UINT8) (PcdGet16 (PcdSystemBiosRelease) >> 8);
- SmbiosRecord->SystemBiosMinorRelease = (UINT8) (PcdGet16 (PcdSystemBiosRelease) & 0xFF);
+ SmbiosRecord->SystemBiosMajorRelease = (UINT8)(PcdGet16 (PcdSystemBiosRelease) >> 8);
+ SmbiosRecord->SystemBiosMinorRelease = (UINT8)(PcdGet16 (PcdSystemBiosRelease) & 0xFF);
SmbiosRecord->EmbeddedControllerFirmwareMajorRelease = (UINT16)
- (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) >> 8);
+ (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) >> 8);
SmbiosRecord->EmbeddedControllerFirmwareMinorRelease = (UINT16)
- (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) & 0xFF);
+ (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) & 0xFF);
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
UnicodeStrToAsciiStrS (Vendor, OptionalStrStart, VendorStrLen + 1);
@@ -268,10 +268,15 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- Status = SmbiosMiscAddRecord ((UINT8*)SmbiosRecord, NULL);
+ Status = SmbiosMiscAddRecord ((UINT8 *)SmbiosRecord, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type00 Table Log Failed! %r \n",
- __FUNCTION__, DEBUG_LINE_NUMBER, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "[%a]:[%dL] Smbios Type00 Table Log Failed! %r \n",
+ __FUNCTION__,
+ DEBUG_LINE_NUMBER,
+ Status
+ ));
}
FreePool (SmbiosRecord);
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerData.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerData.c
index c03b133..00f448a 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerData.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerData.c
@@ -13,22 +13,21 @@
#include "SmbiosMisc.h"
-
//
// Static (possibly build generated) System Manufacturer data.
//
-SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE1, MiscSystemManufacturer) = {
+SMBIOS_MISC_TABLE_DATA (SMBIOS_TABLE_TYPE1, MiscSystemManufacturer) = {
{ // Hdr
- EFI_SMBIOS_TYPE_SYSTEM_INFORMATION, // Type,
- 0, // Length,
- 0 // Handle
+ EFI_SMBIOS_TYPE_SYSTEM_INFORMATION, // Type,
+ 0, // Length,
+ 0 // Handle
},
1, // Manufacturer
2, // ProductName
3, // Version
4, // SerialNumber
{ // Uuid
- 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+ 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
},
SystemWakeupTypePowerSwitch, // SystemWakeupType
5, // SKUNumber,
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
index 555557a..6d08a75 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
@@ -35,30 +35,29 @@
@retval EFI_OUT_OF_RESOURCES Failed to allocate required memory.
**/
-SMBIOS_MISC_TABLE_FUNCTION(MiscSystemManufacturer)
-{
- CHAR8 *OptionalStrStart;
- CHAR8 *StrStart;
- UINTN ManuStrLen;
- UINTN VerStrLen;
- UINTN PdNameStrLen;
- UINTN SerialNumStrLen;
- UINTN SKUNumStrLen;
- UINTN FamilyStrLen;
- UINTN RecordLength;
- EFI_STRING Manufacturer;
- EFI_STRING ProductName;
- EFI_STRING Version;
- EFI_STRING SerialNumber;
- EFI_STRING SKUNumber;
- EFI_STRING Family;
- EFI_STRING_ID TokenToGet;
- SMBIOS_TABLE_TYPE1 *SmbiosRecord;
- SMBIOS_TABLE_TYPE1 *InputData;
- EFI_STATUS Status;
- EFI_STRING_ID TokenToUpdate;
- CHAR16 *Product;
- CHAR16 *pVersion;
+SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) {
+ CHAR8 *OptionalStrStart;
+ CHAR8 *StrStart;
+ UINTN ManuStrLen;
+ UINTN VerStrLen;
+ UINTN PdNameStrLen;
+ UINTN SerialNumStrLen;
+ UINTN SKUNumStrLen;
+ UINTN FamilyStrLen;
+ UINTN RecordLength;
+ EFI_STRING Manufacturer;
+ EFI_STRING ProductName;
+ EFI_STRING Version;
+ EFI_STRING SerialNumber;
+ EFI_STRING SKUNumber;
+ EFI_STRING Family;
+ EFI_STRING_ID TokenToGet;
+ SMBIOS_TABLE_TYPE1 *SmbiosRecord;
+ SMBIOS_TABLE_TYPE1 *InputData;
+ EFI_STATUS Status;
+ EFI_STRING_ID TokenToUpdate;
+ CHAR16 *Product;
+ CHAR16 *pVersion;
Status = EFI_SUCCESS;
@@ -71,30 +70,38 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscSystemManufacturer)
InputData = (SMBIOS_TABLE_TYPE1 *)RecordData;
- Product = (CHAR16 *) PcdGetPtr (PcdSystemProductName);
+ Product = (CHAR16 *)PcdGetPtr (PcdSystemProductName);
if (StrLen (Product) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_SYSTEM_PRODUCT_NAME);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Product, NULL);
}
- pVersion = (CHAR16 *) PcdGetPtr (PcdSystemVersion);
+ pVersion = (CHAR16 *)PcdGetPtr (PcdSystemVersion);
if (StrLen (pVersion) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_SYSTEM_VERSION);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, pVersion, NULL);
}
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
- STRING_TOKEN (STR_MISC_SYSTEM_SERIAL_NUMBER),
- SerialNumType01);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
- STRING_TOKEN (STR_MISC_SYSTEM_MANUFACTURER),
- SystemManufacturerType01);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
- STRING_TOKEN (STR_MISC_SYSTEM_SKU_NUMBER),
- SkuNumberType01);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
- STRING_TOKEN (STR_MISC_SYSTEM_FAMILY),
- FamilyType01);
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
+ STRING_TOKEN (STR_MISC_SYSTEM_SERIAL_NUMBER),
+ SerialNumType01
+ );
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
+ STRING_TOKEN (STR_MISC_SYSTEM_MANUFACTURER),
+ SystemManufacturerType01
+ );
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
+ STRING_TOKEN (STR_MISC_SYSTEM_SKU_NUMBER),
+ SkuNumberType01
+ );
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
+ STRING_TOKEN (STR_MISC_SYSTEM_FAMILY),
+ FamilyType01
+ );
TokenToGet = STRING_TOKEN (STR_MISC_SYSTEM_MANUFACTURER);
Manufacturer = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
@@ -141,12 +148,12 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscSystemManufacturer)
SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1);
- CopyGuid(&SmbiosRecord->Uuid, &InputData->Uuid);
+ CopyGuid (&SmbiosRecord->Uuid, &InputData->Uuid);
OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1);
StrStart = OptionalStrStart + ManuStrLen + 1;
- UnicodeStrToAsciiStrS (ProductName, StrStart, PdNameStrLen + 1);
+ UnicodeStrToAsciiStrS (ProductName, StrStart, PdNameStrLen + 1);
StrStart += PdNameStrLen + 1;
UnicodeStrToAsciiStrS (Version, StrStart, VerStrLen + 1);
StrStart += VerStrLen + 1;
@@ -159,10 +166,15 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscSystemManufacturer)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- Status = SmbiosMiscAddRecord ((UINT8*)SmbiosRecord, NULL);
+ Status = SmbiosMiscAddRecord ((UINT8 *)SmbiosRecord, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type01 Table Log Failed! %r \n",
- __FUNCTION__, DEBUG_LINE_NUMBER, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "[%a]:[%dL] Smbios Type01 Table Log Failed! %r \n",
+ __FUNCTION__,
+ DEBUG_LINE_NUMBER,
+ Status
+ ));
}
FreePool (SmbiosRecord);
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerData.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerData.c
index dfe1f2d..2c3f181 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerData.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerData.c
@@ -17,7 +17,7 @@
//
// Static (possibly build generated) Chassis Manufacturer data.
//
-SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE2, MiscBaseBoardManufacturer) = {
+SMBIOS_MISC_TABLE_DATA (SMBIOS_TABLE_TYPE2, MiscBaseBoardManufacturer) = {
{ // Hdr
EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION, // Type,
0, // Length,
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
index f11295b..99ba99e 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
@@ -23,7 +23,6 @@
#include "SmbiosMisc.h"
-
/**
This function makes boot time changes to the contents of the
MiscBaseBoardManufacturer (Type 2) record.
@@ -36,35 +35,34 @@
@retval EFI_OUT_OF_RESOURCES Failed to allocate required memory.
**/
-SMBIOS_MISC_TABLE_FUNCTION(MiscBaseBoardManufacturer)
-{
- CHAR8 *OptionalStrStart;
- CHAR8 *StrStart;
- UINTN RecordLength;
- UINTN ManuStrLen;
- UINTN ProductNameStrLen;
- UINTN VerStrLen;
- UINTN SerialNumStrLen;
- UINTN AssetTagStrLen;
- UINTN ChassisLocaStrLen;
- UINTN HandleCount;
- UINT16 *HandleArray;
- CHAR16 *BaseBoardManufacturer;
- CHAR16 *BaseBoardProductName;
- CHAR16 *Version;
- EFI_STRING SerialNumber;
- EFI_STRING AssetTag;
- EFI_STRING ChassisLocation;
- EFI_STRING_ID TokenToGet;
- SMBIOS_TABLE_TYPE2 *SmbiosRecord;
- SMBIOS_TABLE_TYPE2 *InputData;
- EFI_STATUS Status;
-
- EFI_STRING_ID TokenToUpdate;
+SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer) {
+ CHAR8 *OptionalStrStart;
+ CHAR8 *StrStart;
+ UINTN RecordLength;
+ UINTN ManuStrLen;
+ UINTN ProductNameStrLen;
+ UINTN VerStrLen;
+ UINTN SerialNumStrLen;
+ UINTN AssetTagStrLen;
+ UINTN ChassisLocaStrLen;
+ UINTN HandleCount;
+ UINT16 *HandleArray;
+ CHAR16 *BaseBoardManufacturer;
+ CHAR16 *BaseBoardProductName;
+ CHAR16 *Version;
+ EFI_STRING SerialNumber;
+ EFI_STRING AssetTag;
+ EFI_STRING ChassisLocation;
+ EFI_STRING_ID TokenToGet;
+ SMBIOS_TABLE_TYPE2 *SmbiosRecord;
+ SMBIOS_TABLE_TYPE2 *InputData;
+ EFI_STATUS Status;
+
+ EFI_STRING_ID TokenToUpdate;
HandleCount = 0;
HandleArray = NULL;
- InputData = NULL;
+ InputData = NULL;
//
// First check for invalid parameters.
@@ -73,73 +71,79 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscBaseBoardManufacturer)
return EFI_INVALID_PARAMETER;
}
- InputData = (SMBIOS_TABLE_TYPE2*)RecordData;
+ InputData = (SMBIOS_TABLE_TYPE2 *)RecordData;
- BaseBoardManufacturer = (CHAR16 *) PcdGetPtr (PcdBaseBoardManufacturer);
+ BaseBoardManufacturer = (CHAR16 *)PcdGetPtr (PcdBaseBoardManufacturer);
if (StrLen (BaseBoardManufacturer) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, BaseBoardManufacturer, NULL);
}
- BaseBoardProductName = (CHAR16 *) PcdGetPtr (PcdBaseBoardProductName);
+ BaseBoardProductName = (CHAR16 *)PcdGetPtr (PcdBaseBoardProductName);
if (StrLen (BaseBoardProductName) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BASE_BOARD_PRODUCT_NAME);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, BaseBoardProductName, NULL);
}
- Version = (CHAR16 *) PcdGetPtr (PcdBaseBoardVersion);
+ Version = (CHAR16 *)PcdGetPtr (PcdBaseBoardVersion);
if (StrLen (Version) > 0) {
TokenToUpdate = STRING_TOKEN (STR_MISC_BASE_BOARD_VERSION);
HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL);
}
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG),
AssertTagType02
);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER),
SerialNumberType02
);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER),
BoardManufacturerType02
);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER),
SerialNumberType02
);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
STRING_TOKEN (STR_MISC_BASE_BOARD_SKU_NUMBER),
SerialNumberType02
);
- OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle,
+ OemUpdateSmbiosInfo (
+ mSmbiosMiscHiiHandle,
STRING_TOKEN (STR_MISC_BASE_BOARD_CHASSIS_LOCATION),
ChassisLocationType02
);
- TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER);
+ TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER);
BaseBoardManufacturer = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- ManuStrLen = StrLen (BaseBoardManufacturer);
+ ManuStrLen = StrLen (BaseBoardManufacturer);
- TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_PRODUCT_NAME);
+ TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_PRODUCT_NAME);
BaseBoardProductName = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- ProductNameStrLen = StrLen (BaseBoardProductName);
+ ProductNameStrLen = StrLen (BaseBoardProductName);
TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_VERSION);
- Version = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- VerStrLen = StrLen (Version);
+ Version = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ VerStrLen = StrLen (Version);
- TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER);
- SerialNumber = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER);
+ SerialNumber = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
SerialNumStrLen = StrLen (SerialNumber);
- TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG);
- AssetTag = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG);
+ AssetTag = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
AssetTagStrLen = StrLen (AssetTag);
- TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_CHASSIS_LOCATION);
- ChassisLocation = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ TokenToGet = STRING_TOKEN (STR_MISC_BASE_BOARD_CHASSIS_LOCATION);
+ ChassisLocation = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
ChassisLocaStrLen = StrLen (ChassisLocation);
//
@@ -159,14 +163,17 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscBaseBoardManufacturer)
}
(VOID)CopyMem (SmbiosRecord, InputData, sizeof (SMBIOS_TABLE_TYPE2));
- SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE2);
+ SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE2);
//
// Update Contained objects Handle
//
SmbiosRecord->NumberOfContainedObjectHandles = 0;
- SmbiosMiscGetLinkTypeHandle (EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE, &HandleArray,
- &HandleCount);
+ SmbiosMiscGetLinkTypeHandle (
+ EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE,
+ &HandleArray,
+ &HandleCount
+ );
// It's assumed there's at most a single chassis
ASSERT (HandleCount < 2);
if (HandleCount > 0) {
@@ -195,8 +202,13 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscBaseBoardManufacturer)
Status = SmbiosMiscAddRecord ((UINT8 *)SmbiosRecord, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type02 Table Log Failed! %r \n",
- __FUNCTION__, DEBUG_LINE_NUMBER, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "[%a]:[%dL] Smbios Type02 Table Log Failed! %r \n",
+ __FUNCTION__,
+ DEBUG_LINE_NUMBER,
+ Status
+ ));
}
FreePool (SmbiosRecord);
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerData.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerData.c
index 29449b8..67cb5fe 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerData.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerData.c
@@ -13,11 +13,10 @@
#include "SmbiosMisc.h"
-
//
// Static (possibly build generated) Chassis Manufacturer data.
//
-SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE3, MiscChassisManufacturer) = {
+SMBIOS_MISC_TABLE_DATA (SMBIOS_TABLE_TYPE3, MiscChassisManufacturer) = {
{ // Hdr
EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE, // Type,
0, // Length,
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
index d640461..d161970 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c
@@ -35,30 +35,29 @@
@retval EFI_OUT_OF_RESOURCES Failed to allocate required memory.
**/
-SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
-{
- CHAR8 *OptionalStrStart;
- CHAR8 *StrStart;
- UINT8 *SkuNumberField;
- UINTN RecordLength;
- UINTN ManuStrLen;
- UINTN VerStrLen;
- UINTN AssertTagStrLen;
- UINTN SerialNumStrLen;
- UINTN ChaNumStrLen;
- EFI_STRING Manufacturer;
- EFI_STRING Version;
- EFI_STRING SerialNumber;
- EFI_STRING AssertTag;
- EFI_STRING ChassisSkuNumber;
- EFI_STRING_ID TokenToGet;
- SMBIOS_TABLE_TYPE3 *SmbiosRecord;
- SMBIOS_TABLE_TYPE3 *InputData;
- EFI_STATUS Status;
-
- UINT8 ContainedElementCount;
- CONTAINED_ELEMENT ContainedElements;
- UINT8 ExtendLength;
+SMBIOS_MISC_TABLE_FUNCTION (MiscChassisManufacturer) {
+ CHAR8 *OptionalStrStart;
+ CHAR8 *StrStart;
+ UINT8 *SkuNumberField;
+ UINTN RecordLength;
+ UINTN ManuStrLen;
+ UINTN VerStrLen;
+ UINTN AssertTagStrLen;
+ UINTN SerialNumStrLen;
+ UINTN ChaNumStrLen;
+ EFI_STRING Manufacturer;
+ EFI_STRING Version;
+ EFI_STRING SerialNumber;
+ EFI_STRING AssertTag;
+ EFI_STRING ChassisSkuNumber;
+ EFI_STRING_ID TokenToGet;
+ SMBIOS_TABLE_TYPE3 *SmbiosRecord;
+ SMBIOS_TABLE_TYPE3 *InputData;
+ EFI_STATUS Status;
+
+ UINT8 ContainedElementCount;
+ CONTAINED_ELEMENT ContainedElements;
+ UINT8 ExtendLength;
ExtendLength = 0;
@@ -97,28 +96,28 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
SkuNumberType03
);
- TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_MANUFACTURER);
+ TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_MANUFACTURER);
Manufacturer = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- ManuStrLen = StrLen (Manufacturer);
+ ManuStrLen = StrLen (Manufacturer);
TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_VERSION);
- Version = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- VerStrLen = StrLen (Version);
+ Version = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ VerStrLen = StrLen (Version);
- TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_SERIAL_NUMBER);
- SerialNumber = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_SERIAL_NUMBER);
+ SerialNumber = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
SerialNumStrLen = StrLen (SerialNumber);
- TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_ASSET_TAG);
- AssertTag = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
+ TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_ASSET_TAG);
+ AssertTag = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
AssertTagStrLen = StrLen (AssertTag);
- TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_SKU_NUMBER);
+ TokenToGet = STRING_TOKEN (STR_MISC_CHASSIS_SKU_NUMBER);
ChassisSkuNumber = HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL);
- ChaNumStrLen = StrLen (ChassisSkuNumber);
+ ChaNumStrLen = StrLen (ChassisSkuNumber);
ContainedElementCount = InputData->ContainedElementCount;
- ExtendLength = ContainedElementCount * sizeof (CONTAINED_ELEMENT);
+ ExtendLength = ContainedElementCount * sizeof (CONTAINED_ELEMENT);
//
// Two zeros following the last string.
@@ -142,11 +141,11 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
SmbiosRecord->Type = OemGetChassisType ();
- //ContainedElements
+ // ContainedElements
ASSERT (ContainedElementCount < 2);
(VOID)CopyMem (SmbiosRecord + 1, &ContainedElements, ExtendLength);
- //ChassisSkuNumber
+ // ChassisSkuNumber
SkuNumberField = (UINT8 *)SmbiosRecord +
sizeof (SMBIOS_TABLE_TYPE3) -
sizeof (CONTAINED_ELEMENT) + ExtendLength;
@@ -154,7 +153,7 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
*SkuNumberField = 5;
OptionalStrStart = (CHAR8 *)((UINT8 *)SmbiosRecord + sizeof (SMBIOS_TABLE_TYPE3) +
- ExtendLength + 1);
+ ExtendLength + 1);
UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1);
StrStart = OptionalStrStart + ManuStrLen + 1;
UnicodeStrToAsciiStrS (Version, StrStart, VerStrLen + 1);
@@ -165,20 +164,25 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
StrStart += AssertTagStrLen + 1;
UnicodeStrToAsciiStrS (ChassisSkuNumber, StrStart, ChaNumStrLen + 1);
- SmbiosRecord->BootupState = OemGetChassisBootupState ();
- SmbiosRecord->PowerSupplyState = OemGetChassisPowerSupplyState ();
- SmbiosRecord->ThermalState = OemGetChassisThermalState ();
- SmbiosRecord->SecurityStatus = OemGetChassisSecurityStatus ();
- SmbiosRecord->Height = OemGetChassisHeight ();
+ SmbiosRecord->BootupState = OemGetChassisBootupState ();
+ SmbiosRecord->PowerSupplyState = OemGetChassisPowerSupplyState ();
+ SmbiosRecord->ThermalState = OemGetChassisThermalState ();
+ SmbiosRecord->SecurityStatus = OemGetChassisSecurityStatus ();
+ SmbiosRecord->Height = OemGetChassisHeight ();
SmbiosRecord->NumberofPowerCords = OemGetChassisNumPowerCords ();
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- Status = SmbiosMiscAddRecord ((UINT8*)SmbiosRecord, NULL);
+ Status = SmbiosMiscAddRecord ((UINT8 *)SmbiosRecord, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type03 Table Log Failed! %r \n",
- __FUNCTION__, DEBUG_LINE_NUMBER, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "[%a]:[%dL] Smbios Type03 Table Log Failed! %r \n",
+ __FUNCTION__,
+ DEBUG_LINE_NUMBER,
+ Status
+ ));
}
FreePool (SmbiosRecord);
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesData.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesData.c
index 97d7303..014dec5 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesData.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesData.c
@@ -17,12 +17,12 @@
// Static (possibly build generated) Bios Vendor data.
//
-SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE13, MiscNumberOfInstallableLanguages) =
+SMBIOS_MISC_TABLE_DATA (SMBIOS_TABLE_TYPE13, MiscNumberOfInstallableLanguages) =
{
{ // Hdr
- EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION, // Type,
- 0, // Length,
- 0 // Handle
+ EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION, // Type,
+ 0, // Length,
+ 0 // Handle
},
0, // InstallableLanguages
0, // Flags
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c
index 017b410..386b880 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLanguagesFunction.c
@@ -32,14 +32,14 @@
VOID
EFIAPI
GetNextLanguage (
- IN OUT CHAR8 **LangCode,
- OUT CHAR8 *Lang
+ IN OUT CHAR8 **LangCode,
+ OUT CHAR8 *Lang
)
{
UINTN Index;
CHAR8 *StringPtr;
- if (LangCode == NULL || *LangCode == NULL || Lang == NULL) {
+ if ((LangCode == NULL) || (*LangCode == NULL) || (Lang == NULL)) {
return;
}
@@ -55,6 +55,7 @@ GetNextLanguage (
if (StringPtr[Index] == ';') {
Index++;
}
+
*LangCode = StringPtr + Index;
}
@@ -69,7 +70,7 @@ GetNextLanguage (
UINT16
EFIAPI
GetSupportedLanguageNumber (
- IN EFI_HII_HANDLE HiiHandle
+ IN EFI_HII_HANDLE HiiHandle
)
{
CHAR8 *Lang;
@@ -83,20 +84,21 @@ GetSupportedLanguageNumber (
}
LangNumber = 0;
- Lang = AllocatePool (AsciiStrSize (Languages));
+ Lang = AllocatePool (AsciiStrSize (Languages));
if (Lang != NULL) {
LanguageString = Languages;
while (*LanguageString != 0) {
GetNextLanguage (&LanguageString, Lang);
LangNumber++;
}
+
FreePool (Lang);
}
+
FreePool (Languages);
return LangNumber;
}
-
/**
This function makes boot time changes to the contents of the
MiscNumberOfInstallableLanguages (Type 13) record.
@@ -109,14 +111,13 @@ GetSupportedLanguageNumber (
@retval EFI_OUT_OF_RESOURCES Failed to allocate required memory.
**/
-SMBIOS_MISC_TABLE_FUNCTION(MiscNumberOfInstallableLanguages)
-{
- UINTN LangStrLen;
- CHAR8 CurrentLang[SMBIOS_STRING_MAX_LENGTH + 1];
- CHAR8 *OptionalStrStart;
- EFI_STATUS Status;
- SMBIOS_TABLE_TYPE13 *SmbiosRecord;
- SMBIOS_TABLE_TYPE13 *InputData;
+SMBIOS_MISC_TABLE_FUNCTION (MiscNumberOfInstallableLanguages) {
+ UINTN LangStrLen;
+ CHAR8 CurrentLang[SMBIOS_STRING_MAX_LENGTH + 1];
+ CHAR8 *OptionalStrStart;
+ EFI_STATUS Status;
+ SMBIOS_TABLE_TYPE13 *SmbiosRecord;
+ SMBIOS_TABLE_TYPE13 *InputData;
InputData = NULL;
@@ -155,10 +156,15 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscNumberOfInstallableLanguages)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- Status = SmbiosMiscAddRecord ((UINT8*)SmbiosRecord, NULL);
+ Status = SmbiosMiscAddRecord ((UINT8 *)SmbiosRecord, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type13 Table Log Failed! %r \n",
- __FUNCTION__, DEBUG_LINE_NUMBER, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "[%a]:[%dL] Smbios Type13 Table Log Failed! %r \n",
+ __FUNCTION__,
+ DEBUG_LINE_NUMBER,
+ Status
+ ));
}
FreePool (SmbiosRecord);
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c
index ebe4ad9..5e1a6e4 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c
@@ -14,11 +14,11 @@
//
// Static (possibly build generated) Bios Vendor data.
//
-SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE32, MiscBootInformation) = {
+SMBIOS_MISC_TABLE_DATA (SMBIOS_TABLE_TYPE32, MiscBootInformation) = {
{ // Hdr
- EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, // Type,
- 0, // Length,
- 0 // Handle
+ EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, // Type,
+ 0, // Length,
+ 0 // Handle
},
{ // Reserved[6]
0,
diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c
index c4ce6a5..fdf6262 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c
@@ -33,11 +33,10 @@
@retval EFI_OUT_OF_RESOURCES Failed to allocate required memory.
**/
-SMBIOS_MISC_TABLE_FUNCTION(MiscBootInformation)
-{
- EFI_STATUS Status;
- SMBIOS_TABLE_TYPE32 *SmbiosRecord;
- SMBIOS_TABLE_TYPE32 *InputData;
+SMBIOS_MISC_TABLE_FUNCTION (MiscBootInformation) {
+ EFI_STATUS Status;
+ SMBIOS_TABLE_TYPE32 *SmbiosRecord;
+ SMBIOS_TABLE_TYPE32 *InputData;
//
// First check for invalid parameters.
@@ -65,10 +64,15 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscBootInformation)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- Status = SmbiosMiscAddRecord ((UINT8*)SmbiosRecord, NULL);
+ Status = SmbiosMiscAddRecord ((UINT8 *)SmbiosRecord, NULL);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type32 Table Log Failed! %r \n",
- __FUNCTION__, DEBUG_LINE_NUMBER, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "[%a]:[%dL] Smbios Type32 Table Log Failed! %r \n",
+ __FUNCTION__,
+ DEBUG_LINE_NUMBER,
+ Status
+ ));
}
FreePool (SmbiosRecord);