From nobody Tue Feb 10 02:54:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75156+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75156+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1621157388; cv=none; d=zohomail.com; s=zohoarc; b=jOtLQK5OHBXvnQFg5n9+hFFCBPr+QURXYH6/b3NZ1GyuAGavHpgabMOfKEJQInpb5CCapHowgBJZ19JGFHTptcJFyqEvxZ5zPzoH/PlbVn/yhgbag/lADW1CrXWdvTbkMgwnT64Z7LrHfYMoxs7kBVILq6yyx+fHHCNIzDGh5To= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621157388; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=qZqV512EstP9o8jnF817erQsTZymzWHWfu6SB3PHAb4=; b=hPdACvOTDGxTfkriAoUjFu+TCZV43CciXPjO1Zw+FnBxBfZcrmSIHH+T3jWKSLYCcmWAq4yQmGz4bTGcTB/VwpOYJ7S8qOfkRzS2W3GC/BhiyS4nbk+nWCjsYUvoEUb56bRPv8EUXmNJTlWbiBx84qf5S2pWEODTZdSd64ZpYQM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75156+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1621157388404675.4060734741365; Sun, 16 May 2021 02:29:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id MGdRYY1788612xZclPihqAQS; Sun, 16 May 2021 02:29:48 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.4134.1621157382391238998 for ; Sun, 16 May 2021 02:29:42 -0700 X-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 0CC0B1042; Sun, 16 May 2021 02:29:42 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D61C73F73B; Sun, 16 May 2021 02:29:40 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH V2 11/11] Platform/Sgi: Add SMBIOS Type32 Table Date: Sun, 16 May 2021 14:59:17 +0530 Message-Id: <20210516092917.21124-12-pranav.madhu@arm.com> In-Reply-To: <20210516092917.21124-1-pranav.madhu@arm.com> References: <20210516092917.21124-1-pranav.madhu@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pranav.madhu@arm.com X-Gm-Message-State: qrDKfvxRpnQNvsRfdEQaTQOpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621157388; bh=cZIkV6cfUyp1RoVxjCtqyWuud00AjQwX9R0H+skiQ2Y=; h=Cc:Date:From:Reply-To:Subject:To; b=cN5w/pzxtRcxi8FYWou0ZosL5bOWUzilKutfilfIaW03bj3dEGQsrN/2uJ/9XMl9BwQ 28n0nPF5LhBlH+mBe3xMGAPTwAr8lsRFTm2nEvhmi1eO5xAioSxYef7U323RwJd5aB+4Q OSpKyPWWD1/khgB2SmZ+hYhKxj3vUfvTDnk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add the SMBIOS type 32 table (System Boot Information) that includes information about the System Boot Status. Signed-off-by: Pranav Madhu Reviewed-by: Sami Mujawar --- Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf = | 1 + Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h = | 6 ++ Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c = | 1 + Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type32SystemBootInformation.= c | 84 ++++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDx= e.inf b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf index f81494114188..4258eb9deadb 100644 --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf @@ -23,6 +23,7 @@ Type16PhysicalMemoryArray.c Type17MemoryDevice.c Type19MemoryArrayMappedAddress.c + Type32SystemBootInformation.c =20 [Packages] ArmPkg/ArmPkg.dec diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDx= e.h b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h index c6dd72cb6b99..0bbda4b4b45d 100644 --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.h @@ -59,6 +59,12 @@ InstallMemoryArrayMappedAddress ( IN EFI_SMBIOS_PROTOCOL *Smbios ); =20 +EFI_STATUS +EFIAPI +InstallSystemBootInformation ( + IN EFI_SMBIOS_PROTOCOL *Smbios + ); + enum SMBIOS_REFRENCE_HANDLES { SMBIOS_HANDLE_ENCLOSURE =3D 0x1000, SMBIOS_HANDLE_CLUSTER1, diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDx= e.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c index d5d1e6393184..77b22678f62a 100644 --- a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.c @@ -34,6 +34,7 @@ ARM_RD_SMBIOS_TABLE_INSTALL_FPTR mSmbiosTableList[] =3D { &InstallPhysicalMemoryArray, &InstallMemoryDevice, &InstallMemoryArrayMappedAddress, + &InstallSystemBootInformation, }; =20 /** diff --git a/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type32SystemBoot= Information.c b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type32SystemB= ootInformation.c new file mode 100644 index 000000000000..1d3eaab810eb --- /dev/null +++ b/Platform/ARM/SgiPkg/Drivers/SmbiosPlatformDxe/Type32SystemBootInforma= tion.c @@ -0,0 +1,84 @@ +/** @file + SMBIOS Type 32 (System Boot Information) table for ARM RD platforms. + + This file installs SMBIOS Type 32 (System Boot Information) table for Ar= m's + Reference Design platforms. It includes information about the System Boot + Status. + + Copyright (c) 2021, ARM Limited. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Specification Reference: + - SMBIOS Reference Specification 3.4.0, Chapter 7.33 +**/ + +#include +#include +#include + +#include "SmbiosPlatformDxe.h" + +#define TYPE32_STRINGS \ + "\0" /* Null string */ + +/* SMBIOS Type32 structure */ +#pragma pack(1) +struct ArmRdSmbiosType32 { + SMBIOS_TABLE_TYPE32 Base; + UINT8 Strings[sizeof (TYPE32_STRINGS)]; +}; +#pragma pack() + +/* System Boot Information */ +static struct ArmRdSmbiosType32 mArmRdSmbiosType32 =3D { + { + { + // SMBIOS header + EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, // Type 32 + sizeof (SMBIOS_TABLE_TYPE32), // Length + SMBIOS_HANDLE_PI_RESERVED + }, + {0}, // Reserved field + BootInformationStatusNoError // Boot status + }, + // Text strings (unformatted area) + TYPE32_STRINGS +}; + +/** + Install SMBIOS system boot information + + Install the SMBIOS system boot information (type 32) table for RD platfo= rms. + + @param[in] Smbios SMBIOS protocol. + + @retval EFI_SUCCESS Record was added. + @retval EFI_OUT_OF_RESOURCES Record was not added. + @retval EFI_ALREADY_STARTED The SmbiosHandle passed in is already in u= se. +**/ +EFI_STATUS +InstallSystemBootInformation ( + IN EFI_SMBIOS_PROTOCOL *Smbios + ) +{ + EFI_STATUS Status; + EFI_SMBIOS_HANDLE SmbiosHandle; + + SmbiosHandle =3D ((EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType32)->Handl= e; + + /* Install type 32 table */ + Status =3D Smbios->Add ( + Smbios, + NULL, + &SmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER *)&mArmRdSmbiosType32 + ); + if (Status !=3D EFI_SUCCESS) { + DEBUG (( + DEBUG_ERROR, + "SMBIOS: Failed to install Type32 SMBIOS table.\n" + )); + } + + return Status; +} --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75156): https://edk2.groups.io/g/devel/message/75156 Mute This Topic: https://groups.io/mt/82861608/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-