From nobody Fri Mar 29 12:13:38 2024 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+69655+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+69655+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1609801148; cv=none; d=zohomail.com; s=zohoarc; b=YIxNhp3shccD+FLNIa8UrBiorD4OVVQnyMm6uBqRMeVbS5Xh+b0mXvIIPi+nMqCPWbie+0hrwBCcZ/cnF3id3PHN9m8kxPudXBabndtLUPYBwUBe/+jOGulmMibMbkQ8cEclqYVXGKXfsD/QeGhqIFnZ6dD6GQlDa1IsAKII920= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609801148; 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=6EHQexRgGpVwNmtiowxOvUn2IL11VyZK91xIPj3x6BI=; b=kAyR6SV5Yf3ksB2N+GIx4UoO6+J/lpZ11wLiCsPwDg1LwNODcgbbudo2XlN949x1uCECH601IGUc7TUVMFFYfBq9x6PGYk/bDdpaFt366v7fdWH9tAwwya6oT2Er4axlKrP2UhEUfpusNNDxi6tftvBbge0JROaSGymTjwfMMiI= 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+69655+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1609801148816148.26547379828924; Mon, 4 Jan 2021 14:59:08 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1JGNYY1788612xhbyUxDz0hN; Mon, 04 Jan 2021 14:59:08 -0800 X-Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mx.groups.io with SMTP id smtpd.web11.85.1609801148026470221 for ; Mon, 04 Jan 2021 14:59:08 -0800 X-Received: by mail-pg1-f175.google.com with SMTP id n7so20049527pgg.2 for ; Mon, 04 Jan 2021 14:59:07 -0800 (PST) X-Gm-Message-State: Cm8nrnZHmhUVmdOYwhS9zkeAx1787277AA= X-Google-Smtp-Source: ABdhPJxXXmMEcKqKeRgdSOrWqjeDA9tDBouFWLou7KbgpzDeMhcCSDK4pthoJBoT5L9GzGo/mRdiiQ== X-Received: by 2002:a05:6a00:8c7:b029:19d:afa5:34e5 with SMTP id s7-20020a056a0008c7b029019dafa534e5mr67888333pfu.30.1609801147096; Mon, 04 Jan 2021 14:59:07 -0800 (PST) X-Received: from cube.nuviainc.com (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id x143sm64185289pgx.66.2021.01.04.14.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 14:59:06 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel , "nd @ arm . com . Sami Mujawar" , Liming Gao , Michael D Kinney , Zhiguang Liu Subject: [edk2-devel] [PATCH v5 17/23] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type32 Date: Mon, 4 Jan 2021 15:58:24 -0700 Message-Id: <20210104225830.12606-18-rebecca@nuviainc.com> In-Reply-To: <20210104225830.12606-1-rebecca@nuviainc.com> References: <20210104225830.12606-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=1609801148; bh=sOEj9KTYlXPMoczi4UWCNi3G9/lNrUn695UfXNPBaNQ=; h=Cc:Date:From:Reply-To:Subject:To; b=XJeHHpSjlluPkhvyE0HjTKgWIqd2iR1ccSGIoDwfiLpC1PzIkzY2f6o4lonBWK8YMUs /2j2q1990gIPjR/2wff/kPjEnLmOwr2sJMcDd4P+xO6TWEuqmz0jTHoqfzmim5qS4vBs6 fZ35K1ISM0GG/Q60Rxb3ORa8v/8ofRSX+GM= 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 --- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c = | 34 ++++++++++ ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c= | 66 ++++++++++++++++++++ 2 files changed, 100 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..e72656d3b002 --- /dev/null +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationData.c @@ -0,0 +1,34 @@ +/** @file + This driver parses the mMiscSubclassDataTable structure and reports + any generated data to the DataHub. + + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ + + 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. +// +MISC_SMBIOS_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..dabecbbd3a64 --- /dev/null +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunct= ion.c @@ -0,0 +1,66 @@ +/** @file + boot information boot time changes. + SMBIOS type 32. + + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ + + 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 "SmbiosMisc.h" + +/** + This function makes boot time changes to the contents of the + MiscBootInformation (Type 32). + + @param RecordData Pointer to copy of RecordData from th= e Data Table. + + @retval EFI_SUCCESS All parameters were valid. + @retval EFI_UNSUPPORTED Unexpected RecordType value. + @retval EFI_INVALID_PARAMETER Invalid parameter was found. + +**/ +MISC_SMBIOS_TABLE_FUNCTION(MiscBootInformation) +{ + EFI_STATUS Status; + EFI_SMBIOS_HANDLE SmbiosHandle; + 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 LogSmbiosData ((UINT8*)SmbiosRecord, &SmbiosHandle); + 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 (#69655): https://edk2.groups.io/g/devel/message/69655 Mute This Topic: https://groups.io/mt/79438422/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-