From nobody Tue Feb 10 13:37:27 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+71421+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+71421+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1612745621; cv=none; d=zohomail.com; s=zohoarc; b=C8trnglfEmM5wfpJe3M6ZcOtie3cz0245odw+EIojY3JPAzBl8zO/fAJ8gCkz63NHNdK6+8SaWc509LWNURgoJQuB8+bzor8fINz+6CAhrX0hb950pm7ZV7YAXSQ974I5KN96QMDFJyW8K4R6syVQP+lK1F41GZlyylLVzh0S/s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612745621; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=L119QJMjsJAjX/4RPO1MdMPIqKqGgunJ2sBORN/+3UQ=; b=DOarmgFz5SMiGb+ioHkDZqpZG+sMkY8U+7xe+KumSzfV/eDt1sMPtvNl0CSiX+LRXlTWRqSO50DMPds66DrBd+VPRDs5ERKsGViRnDrRjx41nxmWbSWiEaIVVUa5Jw4ZE6ZwOyw96XDTQEuj9Mt4hcQ64kF/9E9liYYBLeL4Qhc= 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+71421+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1612745621862920.0174251198141; Sun, 7 Feb 2021 16:53:41 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id U9C4YY1788612xi47ye8ouV4; Sun, 07 Feb 2021 16:53:41 -0800 X-Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web12.29057.1612745621094030437 for ; Sun, 07 Feb 2021 16:53:41 -0800 X-Received: by mail-pj1-f52.google.com with SMTP id fa16so6858012pjb.1 for ; Sun, 07 Feb 2021 16:53:41 -0800 (PST) X-Gm-Message-State: uWgq1RpzZWOmt8mUlGN39PiNx1787277AA= X-Google-Smtp-Source: ABdhPJxp1PZ6MstAcStOpLlPS1TZ+8Fk//VX99eIAvR/N+NL+ASSEjgbBMhQOgPi5Xguq6wfxVXXTA== X-Received: by 2002:a17:902:f688:b029:da:a817:1753 with SMTP id l8-20020a170902f688b02900daa8171753mr13952920plg.76.1612745620291; Sun, 07 Feb 2021 16:53:40 -0800 (PST) X-Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id c6sm11095883pjd.21.2021.02.07.16.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 16:53:39 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , leif@nuviainc.com, Ard Biesheuvel , nd@arm.com, Sami Mujawar , Liming Gao , Michael D Kinney , Zhiguang Liu , Samer El-Haj-Mahmoud , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [edk2-devel] [PATCH v8 19/21] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type32 Date: Sun, 7 Feb 2021 17:52:52 -0700 Message-Id: <20210208005254.12176-20-rebecca@nuviainc.com> In-Reply-To: <20210208005254.12176-1-rebecca@nuviainc.com> References: <20210208005254.12176-1-rebecca@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,rebecca@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1612745621; bh=f1Xj1BHwiDgHijsr+Sh0a1wWKrFCxyrlN3MVqe2cYFQ=; h=Cc:Date:From:Reply-To:Subject:To; b=dPnB4TejWiEreDQBjmoe+QGfQVVLUXzUoABx/61MCbRnZGuAs0rcr6QVRupmBmBrJrY A+6djdI2TcDmuDtMAZKZ3IDQ76R8IVHPeusmTk2ENNSnjxjaHU13Gw/LoLoEywOG65SIq S0frizFYslVaRO/8w+EOBfKQlCgoaZla5bI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This code provides information for the SMBIOS Type 32 table. Signed-off-by: Rebecca Cran Reviewed-by: Leif Lindholm Reviewed-by: Samer El-Haj-Mahmoud --- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c = | 32 +++++++++ ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c= | 73 ++++++++++++++++++++ 2 files changed, 105 insertions(+) diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformati= onData.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformation= Data.c new file mode 100644 index 000000000000..ebe4ad941c5f --- /dev/null +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c @@ -0,0 +1,32 @@ +/** @file + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ + + Copyright (c) 2021, NUVIA Inc. All rights reserved.
+ Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2015, Hisilicon Limited. All rights reserved.
+ Copyright (c) 2015, Linaro Limited. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "SmbiosMisc.h" + +// +// Static (possibly build generated) Bios Vendor data. +// +SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE32, MiscBootInformation) =3D { + { // Hdr + EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION, // Type, + 0, // Length, + 0 // Handle + }, + { // Reserved[6] + 0, + 0, + 0, + 0, + 0, + 0 + }, + BootInformationStatusNoError // BootInformation= Status +}; diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformati= onFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInforma= tionFunction.c new file mode 100644 index 000000000000..733615bbcf1a --- /dev/null +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunct= ion.c @@ -0,0 +1,73 @@ +/** @file + boot information boot time changes. + SMBIOS type 32. + + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ + + Copyright (c) 2021, NUVIA Inc. All rights reserved.
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2015, Hisilicon Limited. All rights reserved.
+ Copyright (c) 2015, Linaro Limited. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include + +#include "SmbiosMisc.h" + +/** + This function makes boot time changes to the contents of the + MiscBootInformation (Type 32) record. + + @param RecordData Pointer to SMBIOS table with default = values. + @param Smbios SMBIOS protocol. + + @retval EFI_SUCCESS The SMBIOS table was successfully add= ed. + @retval EFI_INVALID_PARAMETER Invalid parameter was found. + @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; + + // + // First check for invalid parameters. + // + if (RecordData =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + InputData =3D (SMBIOS_TABLE_TYPE32 *)RecordData; + + // + // Two zeros following the last string. + // + SmbiosRecord =3D AllocateZeroPool (sizeof (SMBIOS_TABLE_TYPE32) + 1 + 1); + if (SmbiosRecord =3D=3D NULL) { + return EFI_OUT_OF_RESOURCES; + } + + (VOID)CopyMem (SmbiosRecord, InputData, sizeof (SMBIOS_TABLE_TYPE32)); + + SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE32); + + // + // Now we have got the full smbios record, call smbios protocol to add t= his record. + // + Status =3D SmbiosMiscAddRecord ((UINT8*)SmbiosRecord, NULL); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type32 Table Log Failed! %r \n= ", + __FUNCTION__, __LINE__, Status)); + } + + FreePool (SmbiosRecord); + return Status; +} --=20 2.26.2 -=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 (#71421): https://edk2.groups.io/g/devel/message/71421 Mute This Topic: https://groups.io/mt/80467491/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-