[edk2-devel] [edk2-platform][PATCH v1 7/7] Platforms/RaspberryPi: SMBIOS minor cleanup

Samer El-Haj-Mahmoud samer.el-haj-mahmoud at arm.com
Mon Jul 20 18:16:46 UTC 2020


Minor code cleanup:
 - Update file header to list SBBR required/recommended tables
 - Rename DataSmbiosHande to DataSmbiosHandle
 - Remove SMBIOS_HANDLE_PI_RESERVED from Type 11 template for
   consistency. This is already done in LogSmbiosData().

Cc: Leif Lindholm <leif at nuviainc.com>
Cc: Pete Batard <pete at akeo.ie>
Cc: Andrei Warkentin <awarkentin at vmware.com>
Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud at arm.com>
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 43 ++++++++++++--------
 1 file changed, 25 insertions(+), 18 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index d382797602ce..d955291c5bb7 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -1,20 +1,27 @@
 /** @file
  *
- *  Static SMBIOS Table for ARM platform
+ *  Static SMBIOS Table for the RaspberryPi platform
  *  Derived from EmulatorPkg package
  *
- *  Note SMBIOS 2.7.1 Required structures:
- *  BIOS Information (Type 0)
- *  System Information (Type 1)
- *  Board Information (Type 2)
- *  System Enclosure (Type 3)
- *  Processor Information (Type 4) - CPU Driver
- *  Cache Information (Type 7) - For cache that is external to processor
- *  System Slots (Type 9) - If system has slots
- *  Physical Memory Array (Type 16)
- *  Memory Device (Type 17) - For each socketed system-memory Device
- *  Memory Array Mapped Address (Type 19) - One per contiguous block per Physical Memroy Array
- *  System Boot Information (Type 32)
+ *  Note - Arm SBBR ver 1.2 required and recommended SMBIOS structures:
+ *    BIOS Information (Type 0)
+ *    System Information (Type 1)
+ *    Board Information (Type 2) - Recommended
+ *    System Enclosure (Type 3)
+ *    Processor Information (Type 4) - CPU Driver
+ *    Cache Information (Type 7) - For cache that is external to processor
+ *    Port Information (Type 8) - Recommended for platforms with physical ports
+ *    System Slots (Type 9) - If system has slots
+ *    OEM Strings (Type 11) - Recommended
+ *    BIOS Language Information (Type 13) - Recommended
+ *    System Event Log (Type 15) - Recommended (does not exit on RPi)
+ *    Physical Memory Array (Type 16)
+ *    Memory Device (Type 17) - For each socketed system-memory Device
+ *    Memory Array Mapped Address (Type 19) - One per contiguous block per Physical Memroy Array
+ *    System Boot Information (Type 32)
+ *    IPMI Device Information (Type 38) - Required for platforms with IPMIv1.0 BMC Host Interface (not applicable to RPi)
+ *    Onboard Devices Extended Information (Type 41) - Recommended
+ *    Redfish Host Interface (Type 42) - Required for platforms supporting Redfish Host Interface (not applicable to RPi)
  *
  *  Copyright (c) 2017-2018, Andrey Warkentin <andrey.warkentin at gmail.com>
  *  Copyright (c) 2013, Linaro.org
@@ -480,7 +487,7 @@ CHAR8 *mSysSlotInfoType9Strings[] = {
 ************************************************************************/
 
 SMBIOS_TABLE_TYPE11 mOemStringsType11 = {
-  { EFI_SMBIOS_TYPE_OEM_STRINGS, sizeof (SMBIOS_TABLE_TYPE11), SMBIOS_HANDLE_PI_RESERVED },
+  { EFI_SMBIOS_TYPE_OEM_STRINGS, sizeof (SMBIOS_TABLE_TYPE11), 0 },
   1 // StringCount
 };
 CHAR8 *mOemStringsType11Strings[] = {
@@ -641,7 +648,7 @@ CHAR8 *mBootInfoType32Strings[] = {
    @param  Template    Fixed SMBIOS structure, required.
    @param  StringPack  Array of strings to convert to an SMBIOS string pack.
    NULL is OK.
-   @param  DataSmbiosHande  The new SMBIOS record handle .
+   @param  DataSmbiosHandle  The new SMBIOS record handle.
    NULL is OK.
 **/
 
@@ -650,7 +657,7 @@ EFIAPI
 LogSmbiosData (
   IN  EFI_SMBIOS_TABLE_HEADER *Template,
   IN  CHAR8                   **StringPack,
-  OUT EFI_SMBIOS_HANDLE       *DataSmbiosHande
+  OUT EFI_SMBIOS_HANDLE       *DataSmbiosHandle
   )
 {
   EFI_STATUS                Status;
@@ -716,8 +723,8 @@ LogSmbiosData (
                      Record
                    );
 
-  if ((Status == EFI_SUCCESS) && (DataSmbiosHande != NULL)) {
-    *DataSmbiosHande = SmbiosHandle;
+  if ((Status == EFI_SUCCESS) && (DataSmbiosHandle != NULL)) {
+    *DataSmbiosHandle = SmbiosHandle;
   }
 
   ASSERT_EFI_ERROR (Status);
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62862): https://edk2.groups.io/g/devel/message/62862
Mute This Topic: https://groups.io/mt/75687850/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list