From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.61]) by mx.groups.io with SMTP id smtpd.web12.838.1611602594193397985 for ; Mon, 25 Jan 2021 11:23:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=wfkTj/PE; spf=pass (domain: arm.com, ip: 40.107.3.61, mailfrom: samer.el-haj-mahmoud@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=29ddh8HNWd5gkADgubeX7zE7uaZtbLVtkv9RlZG3hx8=; b=wfkTj/PEbPM9Nh7PATZdQrkAQlH0QOxbftFc6FRAM71AYDl9TbEYHB3Sxe8Ohr+kA4SYOexWxBdwf9K0jW96XjpkjlGKV9dKrJ487UCcgcwzpSj8RN/xEVw4uiA4bLPKY9kK719rSe46sexw92kZ4dIMHIUO3wQ7HyA5/21BJwo= Received: from MR2P264CA0131.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:30::23) by DB8PR08MB5323.eurprd08.prod.outlook.com (2603:10a6:10:fa::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Mon, 25 Jan 2021 19:23:10 +0000 Received: from VE1EUR03FT022.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:30:cafe::c9) by MR2P264CA0131.outlook.office365.com (2603:10a6:500:30::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.16 via Frontend Transport; Mon, 25 Jan 2021 19:23:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT022.mail.protection.outlook.com (10.152.18.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Mon, 25 Jan 2021 19:23:09 +0000 Received: ("Tessian outbound f362b81824dc:v71"); Mon, 25 Jan 2021 19:23:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 54e28d037bd3283a X-CR-MTA-TID: 64aa7808 Received: from e48c3ef507b0.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 04E58FFA-CDA8-484B-822A-28B3C927D14B.1; Mon, 25 Jan 2021 19:23:03 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e48c3ef507b0.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 25 Jan 2021 19:23:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MGKM3MUCFpXNm2Pi+hvreXMvWgVZtd5iCK6kF7ct6xQBbrqnYqa7Nl7W8KD4QbE247apF9jcZMFIPIfRd37rrr6PX+2+6urCX09c0mU7zpGFbV8l99e6Oqq75A3F/HU9SJd3KHGfN0kvHxGPFd5wQEpeI1Cezwd1v9PE0MTp2AYobYbyqlVtw7FmIrVXv2fVTG1C7woAwcBVgTFS72NFvVWmWVtM3q46NAJdxBzDKxM+bK98elrYzMGwtwjJNIofgdUyRakftpNdzNHR5Ei3x0n/2bNQtb685DEGevHGyBDWipmN3r0t6D601fN6IhLaXnoPwYD/NggdJWtW76BvkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=29ddh8HNWd5gkADgubeX7zE7uaZtbLVtkv9RlZG3hx8=; b=gzRZHJPpXnx7q/2CQ4HyxZqRru2v2+Z85mMnREbdYWEvh0eplRPJ2NlIxnW4jMSj/YtTpnJ/wsMCaKAE8yUynxwTtucI7x5nitbohC5djfnjNAwH5MqmufP7bdMc9pLWuCT5dwjJ97/Oxx7C9uVLtDpsJl4li/SlFXY9LPFpl6YJAr4ekJvoZCT7P2aZpdxyoUH7bmQgun7xYF7A42vG/yqZqPkjUugGpzILlGPVWgMX1eNwfmawsVxsxapU96SOnNxZfMZVnEk1CVRduGi3aLU8zkz66EO/t3f/Rz9DlojXyM4C3KTb/09uNVOGtj3cRX4wiwJGa3joh3OqUJcgnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=29ddh8HNWd5gkADgubeX7zE7uaZtbLVtkv9RlZG3hx8=; b=wfkTj/PEbPM9Nh7PATZdQrkAQlH0QOxbftFc6FRAM71AYDl9TbEYHB3Sxe8Ohr+kA4SYOexWxBdwf9K0jW96XjpkjlGKV9dKrJ487UCcgcwzpSj8RN/xEVw4uiA4bLPKY9kK719rSe46sexw92kZ4dIMHIUO3wQ7HyA5/21BJwo= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DB8PR08MB5369.eurprd08.prod.outlook.com (2603:10a6:10:11c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12; Mon, 25 Jan 2021 19:23:02 +0000 Received: from DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::a1f1:ccfd:b17f:a490]) by DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::a1f1:ccfd:b17f:a490%5]) with mapi id 15.20.3784.016; Mon, 25 Jan 2021 19:23:02 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , "rebecca@nuviainc.com" CC: Leif Lindholm , Ard Biesheuvel , nd , Sami Mujawar , Liming Gao , Michael D Kinney , Zhiguang Liu Subject: Re: [edk2-devel] [PATCH v6 17/22] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type02 Thread-Topic: [edk2-devel] [PATCH v6 17/22] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type02 Thread-Index: AQHW6pTTP7QU/RtIH0uw5U/zVbzz06o4yc9Q Date: Mon, 25 Jan 2021 19:23:01 +0000 Message-ID: References: <20210114163628.31952-1-rebecca@nuviainc.com> <20210114163628.31952-18-rebecca@nuviainc.com> In-Reply-To: <20210114163628.31952-18-rebecca@nuviainc.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; x-originating-ip: [99.132.126.10] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5cf905ca-0f5e-4a5e-41b8-08d8c166a693 x-ms-traffictypediagnostic: DB8PR08MB5369:|DB8PR08MB5323: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2803;OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 6Hcdn3wTI7FXPVPuTAk019XaKb1bF7pZC5juItGpkKKGiFZZX0mk24sgo0pZ/BGK/Pr+iiNcwfVcuR0iFTxKCJ/SxovNE7IJK9pW0C/ptnLaEXCtebtV+QF3G6QUw3iTpbFk0y24pBD1iljqLkLzeYSRygST3uNdPTjrtCRl/2ucQ9JEES4c0h8iJc+F5xhYVySKhOU/d9ArYRmjPb/oUZyF3V7rxHBwiCTneiqxbWLPMb4vlEVLYHeSipCRiTLb2lK2ViL1ixCQQ1CRBSZSMx5sj452huqrr7L/Ma56/2ho8M+pJzUWLbeTcHhCO33mD0uHFr1qooXofupENrouFVzZP4ZypprqyIzcXk1Ubh8w0lZPMZGeaOAuGwT2jELOWMcD5fWbVztJCucY8gmyDdMC0H9cOdWWvF7MZulN6ol7+BpXtCy4YUA5l7m8PqAjXYNg6rocNsmwP3r1xQAMvHfWKnq0b5wqwOqzxd0O3QnGYdrr9cYhfmuoLuvC5p5y9rArsDT0egQtK1msqb0vwKBzKvP1HxS+BL7Y5wkZmlogktvxTKoLSOKSBV3TEv5WVINt8jI63ydG/VfzgSXkHrrCE3V1pq4xdvLdshpCO5eVOI3pBheof5uw8n89851BMnlKzFPr9FCGIWmamsHp3Q== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3260.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(346002)(136003)(376002)(396003)(39860400002)(53546011)(6506007)(54906003)(52536014)(110136005)(316002)(7696005)(33656002)(9686003)(64756008)(76116006)(66946007)(66446008)(66556008)(66476007)(71200400001)(4326008)(966005)(26005)(2906002)(86362001)(186003)(30864003)(83380400001)(5660300002)(478600001)(55016002)(8676002)(19627235002)(8936002)(44824005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?/y7nDh/8/jcTYnR2O7OFAhqmoZ1j//s/PFJG69FV+7bUHB0jVFv9f3dNM8TS?= =?us-ascii?Q?GGUJQhRIdTofQ8tOYbT0g++2p7S3gb8UoiEV5fICM6XO06DJ/pqJCRJu32ky?= =?us-ascii?Q?i59hSlqSJBUExpYclciehfkDhu4NGtbveUPh6/4OzNt60wvhYeEjpC280+og?= =?us-ascii?Q?mmtw4byWCMC4RqId6pQ1r+Tfp7yMw7Q77opkkfDeLmxAWV1gNCF+KGTXY2CX?= =?us-ascii?Q?PNlAWOCHLiaHJ/VjZCSFGE1AEXmeZFfEmpNsvSxDdTk1hbDloHPJRScFn9lZ?= =?us-ascii?Q?Hs4SslfmefKgm7bit4ncRU4Ly3BFeMwV1PmJCCgNXv21jXwBwWZ2p72nmm1w?= =?us-ascii?Q?TJqIPKn+imSodbUaXPfU/hkddxtkgwKN5/lCfI/ihUDCtGZMzzzOti/1gjBj?= =?us-ascii?Q?5/RJRRGvonXghlkI5KGpY4GCKQf56ZXsZRVOeLOXxcL6lBh/E/mcOzwGN1k9?= =?us-ascii?Q?psDt4nWbvRhfBdjK/BGfOizlxAqoxzhMtaTCk/62YIhNGmbCdcWHwPIcLKJK?= =?us-ascii?Q?HQqGs3cHXicj4H25Alh8bPu71mCUWjXjE29UgRfB8AVkkyI/9u41M9FjyJP6?= =?us-ascii?Q?oqbrY0JULEctXJWrL6SiMKYzL4P53db2I9lH8dIVBtfZGXC+hwXd+eBxPqBi?= =?us-ascii?Q?3Pu5wdhYjuirBAzDy5H7rSFPlQHfQdYslcJcqonDeNilsf6c2Dua3LmJl8lR?= =?us-ascii?Q?ltNZD6ZblTpzMJHzgIlMEdvXi3EXBlVLrV9YChPN6KVALDMDtHdscxddaI0c?= =?us-ascii?Q?+kpAU5tr0rcV0nrrmFAzwiVGDW/cBtrANrODxS9oPwAn8YData92ZIdHEINT?= =?us-ascii?Q?ztw7JO41oiJqJYj5u7p8P/umScNb0Cpy3bZXMgLKCLZfFKpyq49Ptm+hQujd?= =?us-ascii?Q?28GkWDR2q9qM1Yd1QNVksc+pubdkC39scxhlds5J4AF789p8CpBpku1p65F0?= =?us-ascii?Q?Hk/PBYTebphS7KWXejj5UvUV1wNwQHvMMq2nf7QCiyJEcsq4bK7R2Ankp5NU?= =?us-ascii?Q?3S82tm2aKgronJzhhPCpvLz+tEwD4QlzelwzMY3eGwNxxnYoL1tvEskiUmJK?= =?us-ascii?Q?st/izA6q?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5369 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; Return-Path: Samer.El-Haj-Mahmoud@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 02ba787d-c4d8-4c6c-b6b5-08d8c166a209 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Fx/kv2BFAvfNzWP/aUqao9BMHEmJ52XZLoET/Ja6RqwEpmZ935pRXJHiYYQnM+ED6ewHZ5/2F1yefMdAlWXnhRY04w0tZERGntbZPx/Ouo53Tj9JJpfuBfsYw2q7CmH0PXVYQ6EmFMwVUr56kISL/3S/emYV+UVUm8kdMAA8tEw2fDi5KfzG1eD61ykhVE4NS3s0gg33H4TiIg2rIV6VWKf3DTZHpQlp/TBcVASOwIYpp4KqnxTLZJs2YUG9LSLCY0lbJFunVzz+XSW9wOGj+zF/U5R2buh+UsF53Qg2n7gVjHyQ8+8rOHtqJ1kIX5+Ml3mtPwFtadjnr6HAH/Vu8tk7CnUPrFH1S9QJq6Y5I4DQRc0MJNQVrhlyLv0w6COxe+oNRxoRWPgep59TCvVCUdQD4bkbHVMm5OpV8EVj7KcnINj+xeaHIKONaifJ1aXBKMabi8cS1EZ27K8FJ6hydNWs65eN+v7BAS16uNdNhAkKD3PAQSe4+NZ4HFH66F9t7J7M5erPrLWPouSdESb/tWINYwXIg+VBgoQxxI0mz0ELpEh9VwSsCc2zAAecM7E X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(39860400002)(136003)(396003)(376002)(346002)(46966006)(47076005)(19627235002)(186003)(70586007)(478600001)(33656002)(86362001)(70206006)(9686003)(82740400003)(83380400001)(30864003)(52536014)(26005)(53546011)(6506007)(336012)(82310400003)(5660300002)(356005)(8936002)(4326008)(107886003)(316002)(8676002)(55016002)(110136005)(966005)(2906002)(54906003)(81166007)(7696005)(44824005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2021 19:23:09.6769 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5cf905ca-0f5e-4a5e-41b8-08d8c166a693 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5323 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Samer El-Haj-Mahmoud > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Rebecca > Cran via groups.io > Sent: Thursday, January 14, 2021 11:36 AM > To: devel@edk2.groups.io > Cc: Rebecca Cran ; Leif Lindholm > ; Ard Biesheuvel ; nd > ; Sami Mujawar ; Liming Gao > ; Michael D Kinney > ; Zhiguang Liu > Subject: [edk2-devel] [PATCH v6 17/22] ArmPkg: Add > Universal/Smbios/SmbiosMiscDxe/Type02 >=20 > This code provides information for the SMBIOS Type 2 table. >=20 > Signed-off-by: Rebecca Cran > --- >=20 > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufac > turerData.c | 46 ++++ >=20 > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufac > turerFunction.c | 230 ++++++++++++++++++++ >=20 > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufac > turer.uni | 20 ++ > 3 files changed, 296 insertions(+) >=20 > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > acturerData.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > acturerData.c > new file mode 100644 > index 000000000000..dfe1f2d45b92 > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > act > +++ urerData.c > @@ -0,0 +1,46 @@ > +/** @file > + > + This file provide OEM to define Smbios Type2 Data > + > + 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) Chassis Manufacturer data. > +// > +SMBIOS_MISC_TABLE_DATA(SMBIOS_TABLE_TYPE2, > MiscBaseBoardManufacturer) =3D { > + { // Hdr > + EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION, // Type, > + 0, // Length, > + 0 // Handle > + }, > + 1, // BaseBoardM= anufacturer > + 2, // BaseBoardP= roductName > + 3, // BaseBoardV= ersion > + 4, // BaseBoardS= erialNumber > + 5, // BaseBoardA= ssetTag > + { // FeatureFla= g > + 1, // Motherboar= d :1 > + 0, // RequiresDa= ughterCard :1 > + 0, // Removable = :1 > + 1, // Replaceabl= e :1 > + 0, // HotSwappab= le :1 > + 0 // Reserved = :3 > + }, > + 6, // BaseBoardC= hassisLocation > + 0, // ChassisHan= dle; > + BaseBoardTypeMotherBoard, // BoardType; > + 0, // NumberOfCo= ntainedObjectHandles; > + { > + 0 > + } // ContainedO= bjectHandles[1]; > +}; > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > acturerFunction.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > acturerFunction.c > new file mode 100644 > index 000000000000..097777a23904 > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > act > +++ urerFunction.c > @@ -0,0 +1,230 @@ > +/** @file > + This driver parses the mSmbiosMiscDataTable structure and reports > + any generated data using SMBIOS protocol. > + > + 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 > + #include #include > + > + > +#include "SmbiosMisc.h" > + > + > +/** > + This function makes boot time changes to the contents of the > + MiscBaseBoardManufacturer (Type 2) record. > + > + @param RecordData Pointer to SMBIOS table with defau= lt values. > + @param Smbios SMBIOS protocol. > + > + @retval EFI_SUCCESS The SMBIOS table was successfully = added. > + @retval EFI_INVALID_PARAMETER Invalid parameter was found. > + @retval EFI_OUT_OF_RESOURCES Failed to allocate required memory= . > + > +**/ > +SMBIOS_MISC_TABLE_FUNCTION(MiscBaseBoardManufacturer) > +{ > + CHAR8 *OptionalStrStart; > + CHAR8 *StrStart; > + UINTN RecordLength; > + UINTN ManuStrLen; > + UINTN ProductNameStrLen; > + UINTN VerStrLen; > + UINTN SerialNumStrLen; > + UINTN AssetTagStrLen; > + UINTN ChassisLocaStrLen; > + UINTN HandleCount; > + UINT16 *HandleArray; > + CHAR16 *BaseBoardManufacturer; > + CHAR16 *BaseBoardProductName; > + CHAR16 *Version; > + EFI_STRING SerialNumber; > + EFI_STRING AssetTag; > + EFI_STRING ChassisLocation; > + EFI_STRING_ID TokenToGet; > + SMBIOS_TABLE_TYPE2 *SmbiosRecord; > + SMBIOS_TABLE_TYPE2 *InputData; > + EFI_STATUS Status; > + > + EFI_STRING_ID TokenToUpdate; > + > + HandleCount =3D 0; > + HandleArray =3D NULL; > + InputData =3D NULL; > + > + // > + // First check for invalid parameters. > + // > + if (RecordData =3D=3D NULL) { > + return EFI_INVALID_PARAMETER; > + } > + > + InputData =3D (SMBIOS_TABLE_TYPE2*)RecordData; > + > + BaseBoardManufacturer =3D (CHAR16 *) PcdGetPtr > + (PcdBaseBoardManufacturer); if (StrLen (BaseBoardManufacturer) > 0) { > + TokenToUpdate =3D STRING_TOKEN > (STR_MISC_BASE_BOARD_MANUFACTURER); > + HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, > + BaseBoardManufacturer, NULL); } > + > + BaseBoardProductName =3D (CHAR16 *) PcdGetPtr > + (PcdBaseBoardProductName); if (StrLen (BaseBoardProductName) > 0) { > + TokenToUpdate =3D STRING_TOKEN > (STR_MISC_BASE_BOARD_PRODUCT_NAME); > + HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, > + BaseBoardProductName, NULL); } > + > + Version =3D (CHAR16 *) PcdGetPtr (PcdBaseBoardVersion); if (StrLen > + (Version) > 0) { > + TokenToUpdate =3D STRING_TOKEN (STR_MISC_BASE_BOARD_VERSION); > + HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL); > + } > + > + OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG), > + AssertTagType02 > + ); > + OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER), > + SerialNumberType02 > + ); > + OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER), > + BoardManufacturerType02 > + ); > + OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER), > + SerialNumberType02 > + ); > + OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_SKU_NUMBER), > + SerialNumberType02 > + ); > + OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_CHASSIS_LOCATION), > + ChassisLocationType02 > + ); > + > + TokenToGet =3D STRING_TOKEN > (STR_MISC_BASE_BOARD_MANUFACTURER); > + BaseBoardManufacturer =3D HiiGetPackageString (&gEfiCallerIdGuid, > + TokenToGet, NULL); ManuStrLen =3D StrLen (BaseBoardManufacturer); > + > + TokenToGet =3D STRING_TOKEN > (STR_MISC_BASE_BOARD_PRODUCT_NAME); > + BaseBoardProductName =3D HiiGetPackageString (&gEfiCallerIdGuid, > + TokenToGet, NULL); ProductNameStrLen =3D StrLen > (BaseBoardProductName); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_BASE_BOARD_VERSION); > Version =3D > + HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL); VerStrLen > + =3D StrLen (Version); > + > + TokenToGet =3D STRING_TOKEN > (STR_MISC_BASE_BOARD_SERIAL_NUMBER); > + SerialNumber =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, > + NULL); SerialNumStrLen =3D StrLen (SerialNumber); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG); > AssetTag > + =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NULL); > + AssetTagStrLen =3D StrLen (AssetTag); > + > + TokenToGet =3D STRING_TOKEN > (STR_MISC_BASE_BOARD_CHASSIS_LOCATION); > + ChassisLocation =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGe= t, > + NULL); ChassisLocaStrLen =3D StrLen (ChassisLocation); > + > + // > + // Two zeros following the last string. > + // > + RecordLength =3D sizeof (SMBIOS_TABLE_TYPE2) + > + ManuStrLen + 1 + > + ProductNameStrLen + 1 + > + VerStrLen + 1 + > + SerialNumStrLen + 1 + > + AssetTagStrLen + 1 + > + ChassisLocaStrLen + 1 + 1; SmbiosRecord =3D > + AllocateZeroPool (RecordLength); if (SmbiosRecord =3D=3D NULL) { > + Status =3D EFI_OUT_OF_RESOURCES; > + goto Exit; > + } > + > + (VOID)CopyMem (SmbiosRecord, InputData, sizeof > (SMBIOS_TABLE_TYPE2)); > + SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE2); > + > + // > + // Update Contained objects Handle > + // > + SmbiosRecord->NumberOfContainedObjectHandles =3D 0; > + SmbiosMiscGetLinkTypeHandle (EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE, > &HandleArray, > + &HandleCount); // It's assumed there's > + at most a single chassis ASSERT (HandleCount < 2); if (HandleCount > > + 0) { > + SmbiosRecord->ChassisHandle =3D HandleArray[0]; } > + > + FreePool (HandleArray); > + > + OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); > + UnicodeStrToAsciiStrS (BaseBoardManufacturer, OptionalStrStart, > + ManuStrLen + 1); > + > + StrStart =3D OptionalStrStart + ManuStrLen + 1; UnicodeStrToAsciiStr= S > + (BaseBoardProductName, StrStart, ProductNameStrLen + 1); > + > + StrStart +=3D ProductNameStrLen + 1; > + UnicodeStrToAsciiStrS (Version, StrStart, VerStrLen + 1); > + > + StrStart +=3D VerStrLen + 1; > + UnicodeStrToAsciiStrS (SerialNumber, StrStart, SerialNumStrLen + 1); > + > + StrStart +=3D SerialNumStrLen + 1; > + UnicodeStrToAsciiStrS (AssetTag, StrStart, AssetTagStrLen + 1); > + > + StrStart +=3D AssetTagStrLen + 1; > + UnicodeStrToAsciiStrS (ChassisLocation, StrStart, ChassisLocaStrLen + > + 1); > + > + Status =3D SmbiosMiscAddRecord ((UINT8 *)SmbiosRecord, NULL); if > + (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type02 Table Log Failed! %r > \n", > + __FUNCTION__, __LINE__, Status)); } > + > + FreePool (SmbiosRecord); > + > +Exit: > + if (BaseBoardManufacturer !=3D NULL) { > + FreePool (BaseBoardManufacturer); > + } > + > + if (BaseBoardProductName !=3D NULL) { > + FreePool (BaseBoardProductName); > + } > + > + if (Version !=3D NULL) { > + FreePool (Version); > + } > + > + if (SerialNumber !=3D NULL) { > + FreePool (SerialNumber); > + } > + > + if (AssetTag !=3D NULL) { > + FreePool (AssetTag); > + } > + > + if (ChassisLocation !=3D NULL) { > + FreePool (ChassisLocation); > + } > + > + return 0; > +} > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > acturer.uni > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > acturer.uni > new file mode 100644 > index 000000000000..0f0fb1f93bbb > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManuf > act > +++ urer.uni > @@ -0,0 +1,20 @@ > +/** @file > + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ > + > + Copyright (c) 2021, NUVIA Inc. All rights reserved.
Copyright > + (c) 2006 - 2010, 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 > + > +**/ > + > +/=3D# > + > +#string STR_MISC_BASE_BOARD_MANUFACTURER #language en-US > "Not Specified" > +#string STR_MISC_BASE_BOARD_PRODUCT_NAME #language en-US > "Not Specified" > +#string STR_MISC_BASE_BOARD_VERSION #language en-US "Not > Specified" > +#string STR_MISC_BASE_BOARD_SERIAL_NUMBER #language en-US "Not > Specified" > +#string STR_MISC_BASE_BOARD_ASSET_TAG #language en-US "Not > Specified" > +#string STR_MISC_BASE_BOARD_CHASSIS_LOCATION #language en-US > "Not Specified" > +#string STR_MISC_BASE_BOARD_SKU_NUMBER #language en-US "Not > Specified" > -- > 2.26.2 >=20 >=20 >=20 >=20 >=20