From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.71]) by mx.groups.io with SMTP id smtpd.web10.422.1609883956163374500 for ; Tue, 05 Jan 2021 13:59:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YOeg3MI3; spf=pass (domain: arm.com, ip: 40.107.20.71, 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=2qeHYFLJ1y05wGOHxzTutKcz0eWKVew7d+S/YQ+A/cs=; b=YOeg3MI3a7bgnfRKX4Z0JcDCDkTmSlcfIezy1DCqwmHvIFj3BnpmUBY6/DriqH4bFT9V+KgwOaqZguwMTO2yqc4Z3/EwUnOlLFF2lwaVRL8jXLaxRQxEaG6PKds8a/KhjTo7xcK7C57kIgfzOeR0V+gmz5nbpokaxYiwKkb90DI= Received: from MRXP264CA0040.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:14::28) by AM8PR08MB5810.eurprd08.prod.outlook.com (2603:10a6:20b:1d2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.22; Tue, 5 Jan 2021 21:59:13 +0000 Received: from VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:14:cafe::3c) by MRXP264CA0040.outlook.office365.com (2603:10a6:500:14::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.23 via Frontend Transport; Tue, 5 Jan 2021 21:59:13 +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 VE1EUR03FT056.mail.protection.outlook.com (10.152.19.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21 via Frontend Transport; Tue, 5 Jan 2021 21:59:13 +0000 Received: ("Tessian outbound 8b6e0bb22f1c:v71"); Tue, 05 Jan 2021 21:59:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: be04e64e2a0794c5 X-CR-MTA-TID: 64aa7808 Received: from 032d701821b0.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0BAF4B67-604B-4E11-B919-5EA31FE55CF3.1; Tue, 05 Jan 2021 21:59:07 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 032d701821b0.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 Jan 2021 21:59:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mU2K2vaPr55YBzXlvnUAw/44+MOTrsj5DhabISpP7kJEjTEW+KeUkuIMI71U2q9soqy88PBiGjN5+CkxWbPlYdkJ6itKAaSGNpy7gUvm+upGnB5DPmjkRv0ysKIIuofTS2M5rEr1ysahbXk1uPu9M85dWACbBnULaHK+uRIMM+sy0VKx2GOgUXQfRkr7YL30nYN7aaCJozD0kGvAbzGRDcxcIYd8RcF5aDtoog11ittZYquUd/mubHtxyDMPeTpoyp3pfbnNFQmAyocOmujzo/wBuP3U7XOXecXd7GFF9z2DMmZrVdzhaV0hf3o5v5Ddum7CPSMa6z4NskyPREAh2A== 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=2qeHYFLJ1y05wGOHxzTutKcz0eWKVew7d+S/YQ+A/cs=; b=dKpzl/GzHlm+M5+ULBsJ1tt4Qc/vYArpN/+KLgoI+fE0vGZ1ZMusqBqExQb8qh9bVvuYPDGB1vyVpXsQtVA04mRJLJXgouucF/cgHWa3B34DPe7Pbx0yw6tj5bKAc870iBOnwBFwDAHl0Z8Jt7H0w7rUNhXMFKcf2h92SpMzADXUFm393IUX2CPXqsC3tIjg4F0TNRrATGqE387Hos/zv87GXfn0dck2up1sOMAKH/5g5VD/up7xZBVxAZphIEIZGCb0X84lrTRppLVHVvLShaUf53ky8orDuh3t91UipMcx1lMVkH7/a4gUOD0dYKfIjJKSm9aF9uJfGZ9qBtJyLw== 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=2qeHYFLJ1y05wGOHxzTutKcz0eWKVew7d+S/YQ+A/cs=; b=YOeg3MI3a7bgnfRKX4Z0JcDCDkTmSlcfIezy1DCqwmHvIFj3BnpmUBY6/DriqH4bFT9V+KgwOaqZguwMTO2yqc4Z3/EwUnOlLFF2lwaVRL8jXLaxRQxEaG6PKds8a/KhjTo7xcK7C57kIgfzOeR0V+gmz5nbpokaxYiwKkb90DI= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DB8PR08MB5324.eurprd08.prod.outlook.com (2603:10a6:10:11e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19; Tue, 5 Jan 2021 21:59:04 +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.3721.023; Tue, 5 Jan 2021 21:59:04 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , "rebecca@nuviainc.com" CC: Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Liming Gao , Michael D Kinney , Zhiguang Liu , Samer El-Haj-Mahmoud Subject: Re: [edk2-devel] [PATCH v5 14/23] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type02 Thread-Topic: [edk2-devel] [PATCH v5 14/23] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type02 Thread-Index: AQHW4u39BsZMFxKLJ0y9MW49ZmUIM6oZkuZw Date: Tue, 5 Jan 2021 21:59:03 +0000 Message-ID: References: <20210104225830.12606-1-rebecca@nuviainc.com> <20210104225830.12606-15-rebecca@nuviainc.com> In-Reply-To: <20210104225830.12606-15-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: 57a5f99f-fbeb-44c7-1935-08d8b1c5237c x-ms-traffictypediagnostic: DB8PR08MB5324:|AM8PR08MB5810: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:6790;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: HoopFJxJpvtv2dxcOhcaMZPT4TA7RO7TL44grqMr6HZO40oE/edERfifAOe7f73jPjxUQsTzBFX2Uxm+eRP8/nZaw0Xhc4u2c7xNUQ6xOFt7cYcKi+lvTVaFXG0HICd54gBg25vK7ESMJdRl7lJ0WC/uAX3x2htXuixnzDJ9kvWF2/4i4hieRdPQpnisouVGQHajPTXqZgtlggccwIn50EXsUUpBJPpfa88e13zbzjXNBo1pzlI9s0boGWcwZcDxPooMFFVKAXTCFF2BOzbm15ZX69NsbTPhv+L2MmJA9gZKmsL/rTHvuuWq6U1lDECjwRcCiUexlkUOgG9dRG1WXzHO8oxSdQSoldCVTHtONEjxi09kfyU2RiKtw+70jQYCTE72v2+ah0cDrvVZFPl7alMG1yJrlvinXH90LgRDeCv3BE4X3+5Fbx+W5BuBC9zj43ky4u4JGo07WTVlBlGqy91VDdPVcbdREzvGDZStgZT4edbeLNrL73DdnIoOWkY9tyOUO91WJ+e+sOce5Zh27w== 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)(396003)(39850400004)(346002)(376002)(366004)(136003)(53546011)(6506007)(4326008)(54906003)(316002)(19627235002)(66476007)(110136005)(8676002)(7696005)(30864003)(71200400001)(86362001)(2906002)(9686003)(55016002)(52536014)(66556008)(76116006)(5660300002)(64756008)(66446008)(186003)(66946007)(966005)(33656002)(8936002)(83380400001)(26005)(478600001)(44824005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?njnhGg4TctVjwtgeQ83YJAA/WFz17rAmXEAl9FM+cYJrMV9HYN7wLuRPFMBw?= =?us-ascii?Q?rLLBHnokQ6F13W4077k5U+LkBEujL9yKgA+1lOYWYAB99jcH9LpP08ZrYiuc?= =?us-ascii?Q?nBft+w7/ZuTreZXV+K6QNrATuvwj+tjnR5Sn0mo5IyMvUO5lzETLqMUQvcka?= =?us-ascii?Q?EMfCOE+7rgTlA3TqT1lRC1H6FS5SjtfjrYYn5SQYo00uNhi+Fxt2E1mkgsZF?= =?us-ascii?Q?4yniDcAYvU/tiorKxerVh47A3Ql7BdgEaQipekSnl5HMXC96JppXxlh6LAxc?= =?us-ascii?Q?StlcBRyCTuoBARN5lJItilpRqPFEew+gzrhDw0+fT3WL85eZKlEYZGPbKdxg?= =?us-ascii?Q?Udtn/CDivIb0iBZGCnDq+gImCeLDgubnqAf35MWJTV9jH7CnuiY0JKE2yIwN?= =?us-ascii?Q?Sx6Fj/y6IlBzE8TWeBtgWY+T3v4JCrcOFIqyseBTDEsLUOQ4090K3W1pCPBn?= =?us-ascii?Q?mxwfd7UXfAF2yCuD6y9GEAxD4dLVlffCt2g1O5DtQyqLueT749HCaim4aPP6?= =?us-ascii?Q?gd/E7AXwMZbCpO4+/BmnPBqhyOMzN1f2OTKFYac2WcGmeVRdIecd0A1nLQXW?= =?us-ascii?Q?YQM0CIKJwFTaJbZmuDV0Ml5Z4N3Qmg3cZlHumvVTrwR7gEWeeiteVxObLhXh?= =?us-ascii?Q?sUy/ipa1JfyLy80gQeD8xHTNd0U6ZILW0fzsYxp/CfmYY7ZJib6oikoez2fd?= =?us-ascii?Q?g6tguiZ39auwFUOFOhaFuV6QV4miN60/prHqdr7duIU7sr92uh4b4AjU+rZv?= =?us-ascii?Q?ShE1h394EIRDAEpsJisPUP7qVcZM9ck04pYmCZ4TvxrKyF+dr93N1qxMscsq?= =?us-ascii?Q?KgXUTY5xB92bJErHoGCQvM+DXNajp8NaIetm9PIH8jg2F1P01A+2dXsok1vp?= =?us-ascii?Q?jb306S/oHX6sJhC8iJDlq8T914IhZOpqY9d5le066rLv5PHkOhGQD8/UB/2J?= =?us-ascii?Q?qLHZh4DixchYtcvh+gwb1fDsy8PHFl0QYmiVI3/JcGU=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5324 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: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 1e81195a-baf5-473d-3aad-08d8b1c51de3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1Ymm/sBfdukB0Oj8LG57jSRDLF+ppLRg6O7bJySZPCuhy/+PKQQ5mV2MhxJz8WkmMY169vvDP3acvNnMMVeQ74mMm4LgTrdhLPDRSKKlGfsDlDUnwFMQv/rNW8F1TtSHqny6KdFQs5s3NOu0AjTbwjLUqWjuaq7aymCrVEJCB8F66590gdt5eI7a8zrwIgHXLhnTvOSj6JRBYNaLBAGVNf7fHDHJ/yP/nUfo+rkggiZ8ahNEElMdqd79ftODIHB0PiqErUk3r/y1Lo+pndjKFtCTzDCU/aWa7NsiVQUSd8mBngzQ8eqfsQtGS7dg5gynYeWUWql2emmL7I52U2dQDJbqDGvanmbp7H9xgO5U8Bs8u9x7BDy3uBEPYF+vRVqWARsLj2Gzn+0pUM0PdLfu7SEk4dEuAIGZuhwcLCcCbDvg8leeo9Wo3PIhvH+zSDKsodTCblU95qCoXj79TwhtXhbLqui5RW9AFYVRorXypusRG5y+0r7YuOI6OmtI1RQTjN2WkIY5Kj/ZEOoRKcwRe5udoBtLVqoR/rtzUZhlZbOulazQmGYeT6vdqkc0jY6O 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)(136003)(396003)(39850400004)(346002)(376002)(46966006)(7696005)(86362001)(966005)(82310400003)(8936002)(4326008)(55016002)(186003)(47076005)(2906002)(478600001)(81166007)(6506007)(53546011)(5660300002)(54906003)(30864003)(70206006)(110136005)(33656002)(336012)(19627235002)(83380400001)(52536014)(8676002)(356005)(70586007)(316002)(26005)(9686003)(82740400003)(44824005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2021 21:59:13.3257 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57a5f99f-fbeb-44c7-1935-08d8b1c5237c 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: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5810 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Rebecca > Cran via groups.io > Sent: Monday, January 4, 2021 5:58 PM > To: devel@edk2.groups.io > Cc: Rebecca Cran ; Leif Lindholm > ; Ard Biesheuvel ; Sami > Mujawar ; Liming Gao > ; Michael D Kinney > ; Zhiguang Liu > Subject: [edk2-devel] [PATCH v5 14/23] ArmPkg: Add > Universal/Smbios/SmbiosMiscDxe/Type02 > > This code provides information for the SMBIOS Type 2 table. > > Signed-off-by: Rebecca Cran > --- > > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture > rData.c | 45 +++++ > > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture > rFunction.c | 207 ++++++++++++++++++++ > > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture > r.uni | 20 ++ > 3 files changed, 272 insertions(+) > > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufactu > rerData.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufactu > rerData.c > new file mode 100644 > index 000000000000..f9122d5d8963 > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufact > +++ urerData.c > @@ -0,0 +1,45 @@ > +/** @file > + > + This file provide OEM to define Smbios Type2 Data > + > + 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) Chassis Manufacturer data. > +// > +MISC_SMBIOS_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 Not true for all platforms > + 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/MiscBaseBoardManufactu > rerFunction.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufactu > rerFunction.c > new file mode 100644 > index 000000000000..6c9bfa803ee5 > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufact > +++ urerFunction.c > @@ -0,0 +1,207 @@ > +/** @file > + This driver parses the mSmbiosMiscDataTable structure and reports > + any generated data using SMBIOS protocol. > + > + 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 basic board manufacturer to the contents of the > + Misc Base Board Manufacturer (Type 2). > + > + @param RecordData Pointer to copy of RecordData from= the 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(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; > + EFI_SMBIOS_HANDLE SmbiosHandle; > + 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 (mHiiHandle, TokenToUpdate, BaseBoardManufacturer, > + NULL); } > + > + BaseBoardProductName =3D (CHAR16 *) PcdGetPtr > + (PcdBaseBoardProductName); if (StrLen (BaseBoardProductName) > 0) { > + TokenToUpdate =3D STRING_TOKEN > (STR_MISC_BASE_BOARD_PRODUCT_NAME); > + HiiSetString (mHiiHandle, TokenToUpdate, BaseBoardProductName, > + NULL); } > + > + Version =3D (CHAR16 *) PcdGetPtr (PcdBaseBoardVersion); if (StrLen > + (Version) > 0) { > + TokenToUpdate =3D STRING_TOKEN (STR_MISC_BASE_BOARD_VERSION); > + HiiSetString (mHiiHandle, TokenToUpdate, Version, NULL); } > + > + UpdateSmbiosInfo (mHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG), > + AssertTagType02 > + ); > + UpdateSmbiosInfo (mHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER), > + SerialNumberType02 > + ); > + UpdateSmbiosInfo (mHiiHandle, > + STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER), > + BoardManufacturerType02 > + ); > + > + 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; GetLinkTypeHandl= e > + (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 LogSmbiosData ((UINT8 *)SmbiosRecord, &SmbiosHandle); 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/MiscBaseBoardManufactu > rer.uni > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufactu > rer.uni > new file mode 100644 > index 000000000000..47b6c71230fe > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufact > +++ urer.uni > @@ -0,0 +1,20 @@ > +/** @file > + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ > + > + 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_PRODUCT_NAME #language en-US "Not > Specified" > +#string STR_MISC_BASE_BOARD_VERSION #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" > -- Shouldn't all of these strings be customizable via platform dynamic HII PC= Ds? > 2.26.2 > > > >=20 > IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in= any medium. Thank you.