From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com []) by mx.groups.io with SMTP id smtpd.web12.1505.1595269017479440490 for ; Mon, 20 Jul 2020 11:16:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: arm.com, ip: , mailfrom: samer.el-haj-mahmoud@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B4C0E113E; Mon, 20 Jul 2020 11:16:57 -0700 (PDT) Received: from U203705.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D7583F66F; Mon, 20 Jul 2020 11:16:57 -0700 (PDT) From: "Samer El-Haj-Mahmoud" To: devel@edk2.groups.io Cc: Leif Lindholm , Pete Batard , Andrei Warkentin , Ard Biesheuvel Subject: [edk2-platform][PATCH v1 7/7] Platforms/RaspberryPi: SMBIOS minor cleanup Date: Mon, 20 Jul 2020 14:16:46 -0400 Message-Id: <20200720181646.2891-8-Samer.El-Haj-Mahmoud@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720181646.2891-1-Samer.El-Haj-Mahmoud@arm.com> References: <20200720181646.2891-1-Samer.El-Haj-Mahmoud@arm.com> 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 Cc: Pete Batard Cc: Andrei Warkentin Cc: Ard Biesheuvel Signed-off-by: Samer El-Haj-Mahmoud --- 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 * 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