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.73]) by mx.groups.io with SMTP id smtpd.web11.403.1609884051197333913 for ; Tue, 05 Jan 2021 14:00:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=PnYUF6rv; spf=pass (domain: arm.com, ip: 40.107.20.73, 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=c+0z5VPA5vW4dZ3SZlkrL9AWlJbncYouOn9+aNrnLXQ=; b=PnYUF6rvBv6XB7RV4oS7kB+aii2q7OcEDKw2N9AZFMJm+q1vxP9D6a2Ud+dLykYe4d8dvRKMsFKHGoSuvb+ZSs/E3wYur+poT2uQHrFa1kWSN9NIFY2wUGsMkV3X/SEXkaoJyt5qsivQ5+yn6yjcZXtdRj+PVUn0nCPGVDyuNAA= Received: from DB6PR07CA0174.eurprd07.prod.outlook.com (2603:10a6:6:43::28) by AM0PR08MB3971.eurprd08.prod.outlook.com (2603:10a6:208:132::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 5 Jan 2021 22:00:47 +0000 Received: from DB5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:43:cafe::f4) by DB6PR07CA0174.outlook.office365.com (2603:10a6:6:43::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.2 via Frontend Transport; Tue, 5 Jan 2021 22:00:47 +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 DB5EUR03FT054.mail.protection.outlook.com (10.152.20.248) 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 22:00:47 +0000 Received: ("Tessian outbound fc5cc0046d61:v71"); Tue, 05 Jan 2021 22:00:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 64d5f672a6c3a94e X-CR-MTA-TID: 64aa7808 Received: from 25331c8aa17c.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 298977CD-F165-4F98-B1A4-41C13249916F.1; Tue, 05 Jan 2021 22:00:41 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 25331c8aa17c.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 Jan 2021 22:00:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=She949XQiR+rAeJQ0rpysjJlnj3cx6x9hqrku28ozeBMRKbU6naMCVy+GVT3sxOaX80Z7GxCpXtgyGEUzCzrv07xKlmMgehAxqE9P6Eet1sgKrPIzvxztv3hA5NzdQHV7hI/f+xBlInSaGVpXPopbzKRzqazSNIF2YrUSqSBrnDZfQ3JHr0K0GpYAOboUkNplHdBSfhuDfYKJQUwEVpQ6drkL/PH5K2D9/XNgESj7+cJrc4DB37QT1/TBrKXQzxTZM4/GmIgdNLYRFAUZa6ViUGl7XEEunozQKyqWG+8e5n6hAxfrxuwQ8yM5ygfPxdBYp175eFnQRoHIH7YrjUfVA== 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=c+0z5VPA5vW4dZ3SZlkrL9AWlJbncYouOn9+aNrnLXQ=; b=NcnOwXAeTB+u9hcWt/kuAzzYfXujyrN8/eZIc4GpIvDvOKfKD/GvjHM+XUksAI0iv136LFtjoO61HpZGbmceRfDu3bTon/adbtxhmsuQckG8KIiXbRXbGJ4NhqQsa1r6Qg1a4VRIiMeyNyY2xNIS1/GM8cYrBpWBR4uBozeY6QFTC7RweY/77+4T0OLw6dLCcLlyqQhu88o5dBuxwxVEjJ03tKqQ08oZu+AflQSFoD1r0bb1soxVbPmTcdp+738+muLJ4wp4d4yzpFfIe1iRnUMm04CnkDroP15HRmKN/vKrwdkSGh5pxvq9/pljQGhHOg72JSOfHCuwUYQH+wJADw== 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=c+0z5VPA5vW4dZ3SZlkrL9AWlJbncYouOn9+aNrnLXQ=; b=PnYUF6rvBv6XB7RV4oS7kB+aii2q7OcEDKw2N9AZFMJm+q1vxP9D6a2Ud+dLykYe4d8dvRKMsFKHGoSuvb+ZSs/E3wYur+poT2uQHrFa1kWSN9NIFY2wUGsMkV3X/SEXkaoJyt5qsivQ5+yn6yjcZXtdRj+PVUn0nCPGVDyuNAA= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DB6PR08MB2870.eurprd08.prod.outlook.com (2603:10a6:6:20::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21; Tue, 5 Jan 2021 22:00:36 +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 22:00:36 +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 13/23] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type01 Thread-Topic: [edk2-devel] [PATCH v5 13/23] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type01 Thread-Index: AQHW4u3e7Z7OiKBa902qQHAtrDieN6oZljZg Date: Tue, 5 Jan 2021 22:00:36 +0000 Message-ID: References: <20210104225830.12606-1-rebecca@nuviainc.com> <20210104225830.12606-14-rebecca@nuviainc.com> In-Reply-To: <20210104225830.12606-14-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: 15651a45-7981-4bea-64b2-08d8b1c55b71 x-ms-traffictypediagnostic: DB6PR08MB2870:|AM0PR08MB3971: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:4125;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wpFvtXBokSuhxW33j3P+VIDnwMzMSZK88kkHas/+ehNfxwf3CepFJBI7z2gqK0WvzvcmP3oNw3ZVvWUvPxerc+nGToU6iReD95lfx6HJc+77edJ+hRUtzqaOAMrHsy2DZ4K4zT9z9sbsbPCLCt0v7rhArXzm1KbysPRDBFlCKctlC4o9f6C5XN/NULYfqITig47Jzugul7FaxttclZY3ZlpfL8mCGMndamhYVOryMb9PsWA10e+/riFjkwXEIWlThUh3saIUJYVkWAl50xLoH4TU8FRJRUzaXU7OHUeP46kIBRrBVz0gp4KrbxiTVWVE9Jl5YksBvE8vl76hRK+aNfYidW8tANlqXxlwSmD0E1LcqqEna6AEgIm5OYK4j/GjA1W8tiYRfD2Q8FYZvXiAQd0LAD+gI9l3hVk0j7Z3ZAuZJObuaiD0VBg7eS7rYKvlPE/mnAtABbyByqMQpKbivA== 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)(376002)(366004)(396003)(39850400004)(346002)(136003)(4326008)(5660300002)(76116006)(2906002)(186003)(66946007)(64756008)(66446008)(966005)(26005)(30864003)(83380400001)(66556008)(19627235002)(71200400001)(478600001)(110136005)(316002)(8676002)(54906003)(6506007)(66476007)(53546011)(33656002)(86362001)(9686003)(55016002)(8936002)(7696005)(52536014);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?e9Wz+eONg3H8CM3EtomDNKk+XvydYnBouNPe09RylZxt4Ak8EANy0uYgAARc?= =?us-ascii?Q?VBHVDDcv+gJKHprr6bZbRb/2tRhWW+HRZULQbYu82qIC2jw987RfRD07Si8P?= =?us-ascii?Q?wmZosFpg01pd3UMiQA3JCgMCNJ1eFYlBGDXgCN+Q8qz3tClWI9gQbTLEFqTy?= =?us-ascii?Q?nbvfN1GAk+y2S4nMHCMQ3IB5waMq4En1QM4Ha7Wttm4XNGk3ByybNSTLbhhj?= =?us-ascii?Q?s51RsYUtKhOE1A3s+3hTqNp5meu/7OZTSraGlkFxFlvc88u3WKZjr6PrITbN?= =?us-ascii?Q?W0Ws2OktMhdw0zgj4iK+xsaFoVdA3gM1GnbFN61PcfTpdV7WrPWLMe1kxYuY?= =?us-ascii?Q?GIkj0RlNulJapIXsP7EFe6byS6arTGaL0qlU/WPF+Qf8GswaaqZR9b58FoY0?= =?us-ascii?Q?PXauyWUPzx5yMRLaDKXaeRTL8oXF7tNS7FiWVb62uX7TiXqfRpJtPpYI57Tr?= =?us-ascii?Q?niQNIgmCPQI2/4vMVPtFcktPnKVWFKkIgU4/jHVIFj4xRV345pTwORoxB/nw?= =?us-ascii?Q?p2H4K5nWiiOsdsQESjO4ZmxgtspKJ/Dqwumje4/VC1AqX1Ta8dQyedl8KBWm?= =?us-ascii?Q?0jCmPm8qw36kN8+mjyArsMDUqZoMaSEmDrfGdTYHuz8KX3MjwJ4potbMRJJ2?= =?us-ascii?Q?eiEd/YZwCLPQwoYwvKioi++I+PaTocp1EFqYvx8mvCMlp/4ocUvEkA1mVz9E?= =?us-ascii?Q?oY8noNoKeppufS7Eikg/VIV9xK3/z/ZU/+s0usOalbEmorBtFyXs94pwABkA?= =?us-ascii?Q?v24d76b/Ti+50emQNdppJI3BL1r8frOF5Hg007g2jjxIbUahJRHrmJJTdL/P?= =?us-ascii?Q?rVGhNysQIbhpByj98W9emxMOxu4H6P3hE03k/TDyrGZzFV0cHv/wW/QsQpFf?= =?us-ascii?Q?FRc0eVQOHFRCPPHVQVFmOeBG8KqhpywIKNrvB1PvPGOB5BVMkd9hZGZLW4kP?= =?us-ascii?Q?YmnOpGrqYDm4MkpHMvMea0TdvNEdQrCS0ZYsDVSd22c=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2870 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: DB5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 519c83d3-065b-4693-f811-08d8b1c554f2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6i/nAm7UmTY6KVn8ia5k5aTCklbKZ7HlH0VnP2S40+tVSKJpUvRZfIHA4deullu0q/lUDFlIxxkHAdgGSKsQG2fg+ML/pTYlyGYctP9WSF2iIFTOFLi5DbHs1g4uXlyD43xuVNQxeRqImK9AutRzqrV0MdctF9IH094NAa1I1eu0pf549IY57QhV+in841q3PSmBQ6xGjvKlO6lNX0jqvmyW8/g67bCBoAj2Vo/Jp4MoTskE7vHTieK0pwpfHFaPb8NmFCQpP2xkK33VCpQHDhnd42/Mynt/0U6UQzZHptqsDFvDN+aaYl6nRzqSt6veN5nkQvsovJzM7BMoR+6Qb/ed/xyT6FO3hZim1PmPMCS1B+uB6oJMbd/+iNQlVElH37dWbgZ8NyZjZUdgRf5wUAG2333s4SNYbdaS9MYMT0zTqW4olyTm1S0T9jDMz8YPhN0yA1UDHEfdcxOSAUdiVQyh/n4Vwhg4IuiRWxGk8TZTNgWAnu64SZQ72+24ZGGyiRrLKya819zTX675qCCrPRrxGRqciSTX8BUl3BjCOl0= 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)(346002)(376002)(136003)(39850400004)(396003)(46966006)(86362001)(55016002)(9686003)(52536014)(54906003)(110136005)(966005)(7696005)(30864003)(5660300002)(8936002)(2906002)(53546011)(6506007)(8676002)(19627235002)(4326008)(70586007)(70206006)(186003)(47076005)(478600001)(33656002)(356005)(81166007)(82740400003)(82310400003)(26005)(83380400001)(336012)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2021 22:00:47.3667 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15651a45-7981-4bea-64b2-08d8b1c55b71 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: DB5EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3971 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 13/23] ArmPkg: Add > Universal/Smbios/SmbiosMiscDxe/Type01 > > This code provides information for the SMBIOS Type 1 table. > > Signed-off-by: Rebecca Cran > --- > > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufactur > erData.c | 35 ++++ > > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufactur > erFunction.c | 178 ++++++++++++++++++++ > > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufactur > er.uni | 20 +++ > 3 files changed, 233 insertions(+) > > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > urerData.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > urerData.c > new file mode 100644 > index 000000000000..908ab9164b63 > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > ure > +++ rData.c > @@ -0,0 +1,35 @@ > +/** @file > + This file provides Smbios Type1 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) System Manufacturer data. > +// > +MISC_SMBIOS_TABLE_DATA(SMBIOS_TABLE_TYPE1, > MiscSystemManufacturer) =3D { > + { // Hdr > + EFI_SMBIOS_TYPE_SYSTEM_INFORMATION, // Type, > + 0, // Length, > + 0 // Handle > + }, > + 1, // Manufacturer > + 2, // ProductName > + 3, // Version > + 4, // SerialNumber > + { // Uuid > + 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > +0x00, 0x00} > + }, > + SystemWakeupTypePowerSwitch, // SystemWakeupType > + 5, // SKUNumber, > + 6 // Family > +}; > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > urerFunction.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > urerFunction.c > new file mode 100644 > index 000000000000..56f55f98b0d0 > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > ure > +++ rFunction.c > @@ -0,0 +1,178 @@ > +/** @file > + This driver parses the mMiscSubclassDataTable structure and reports > + any generated data to smbios. > + > + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ > + > + Copyright (c) 2006 - 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 "SmbiosMisc.h" > + > +/** > + This function makes boot time changes to the contents of the > + MiscSystemManufacturer (Type 1). > + > + @param RecordData Pointer to copy of RecordData from= the Data > Table. > + @param Smbios SMBIOS Protocol > + > + @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(MiscSystemManufacturer) > +{ > + CHAR8 *OptionalStrStart; > + CHAR8 *StrStart; > + UINTN ManuStrLen; > + UINTN VerStrLen; > + UINTN PdNameStrLen; > + UINTN SerialNumStrLen; > + UINTN SKUNumStrLen; > + UINTN FamilyStrLen; > + UINTN RecordLength; > + EFI_STRING Manufacturer; > + EFI_STRING ProductName; > + EFI_STRING Version; > + EFI_STRING SerialNumber; > + EFI_STRING SKUNumber; > + EFI_STRING Family; > + EFI_STRING_ID TokenToGet; > + EFI_SMBIOS_HANDLE SmbiosHandle; > + SMBIOS_TABLE_TYPE1 *SmbiosRecord; > + SMBIOS_TABLE_TYPE1 *InputData; > + EFI_STATUS Status; > + EFI_STRING_ID TokenToUpdate; > + CHAR16 *Product; > + CHAR16 *pVersion; > + > + Status =3D EFI_SUCCESS; > + > + // > + // First check for invalid parameters. > + // > + if (RecordData =3D=3D NULL) { > + return EFI_INVALID_PARAMETER; > + } > + > + InputData =3D (SMBIOS_TABLE_TYPE1 *)RecordData; > + > + Product =3D (CHAR16 *) PcdGetPtr (PcdSystemProductName); if (StrLen > + (Product) > 0) { > + TokenToUpdate =3D STRING_TOKEN > (STR_MISC_SYSTEM_PRODUCT_NAME); > + HiiSetString (mHiiHandle, TokenToUpdate, Product, NULL); } > + > + pVersion =3D (CHAR16 *) PcdGetPtr (PcdSystemVersion); if (StrLen > + (pVersion) > 0) { > + TokenToUpdate =3D STRING_TOKEN (STR_MISC_SYSTEM_VERSION); > + HiiSetString (mHiiHandle, TokenToUpdate, pVersion, NULL); } > + UpdateSmbiosInfo (mHiiHandle, STRING_TOKEN > + (STR_MISC_SYSTEM_SERIAL_NUMBER), SerialNumType01); > UpdateSmbiosInfo > + (mHiiHandle, STRING_TOKEN (STR_MISC_SYSTEM_MANUFACTURER), > + SystemManufacturerType01); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_SYSTEM_MANUFACTURER); > + Manufacturer =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, > NULL); > + ManuStrLen =3D StrLen (Manufacturer); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_SYSTEM_PRODUCT_NAME); > + ProductName =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, > + NULL); PdNameStrLen =3D StrLen (ProductName); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_SYSTEM_VERSION); > + Version =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, NU= LL); > + VerStrLen =3D StrLen (Version); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_SYSTEM_SERIAL_NUMBER); > + SerialNumber =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGe= t, > NULL); > + SerialNumStrLen =3D StrLen (SerialNumber); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_SYSTEM_SKU_NUMBER); > + SKUNumber =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, > NULL); > + SKUNumStrLen =3D StrLen (SKUNumber); > + > + TokenToGet =3D STRING_TOKEN (STR_MISC_SYSTEM_FAMILY); > + Family =3D HiiGetPackageString (&gEfiCallerIdGuid, TokenToGet, = NULL); > + FamilyStrLen =3D StrLen (Family); > + > + // > + // Two zeros following the last string. > + // > + RecordLength =3D sizeof (SMBIOS_TABLE_TYPE1) + > + ManuStrLen + 1 + > + PdNameStrLen + 1 + > + VerStrLen + 1 + > + SerialNumStrLen + 1 + > + SKUNumStrLen + 1 + > + FamilyStrLen + 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_TYPE1)); > + > + SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE1); > + > + CopyGuid(&SmbiosRecord->Uuid, &InputData->Uuid); > + > + OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); > + UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + > + 1); StrStart =3D OptionalStrStart + ManuStrLen + 1; > + UnicodeStrToAsciiStrS (ProductName, StrStart, PdNameStrLen + 1); > + StrStart +=3D PdNameStrLen + 1; UnicodeStrToAsciiStrS (Version, > + StrStart, VerStrLen + 1); StrStart +=3D VerStrLen + 1; > + UnicodeStrToAsciiStrS (SerialNumber, StrStart, SerialNumStrLen + 1); > + StrStart +=3D SerialNumStrLen + 1; UnicodeStrToAsciiStrS (SKUNumber, > + StrStart, SKUNumStrLen + 1); StrStart +=3D SKUNumStrLen + 1; > + UnicodeStrToAsciiStrS (Family, StrStart, FamilyStrLen + 1); > + > + // > + // Now we have got the full smbios record, call smbios protocol to ad= d this > record. > + // > + Status =3D LogSmbiosData ((UINT8*)SmbiosRecord, &SmbiosHandle); if > + (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "[%a]:[%dL] Smbios Type01 Table Log Failed! %r > \n", > + __FUNCTION__, __LINE__, Status)); } > + > + FreePool (SmbiosRecord); > + > +Exit: > + if (Manufacturer !=3D NULL) { > + FreePool (Manufacturer); > + } > + > + if (ProductName !=3D NULL) { > + FreePool (ProductName); > + } > + > + if (Version !=3D NULL) { > + FreePool (Version); > + } > + > + if (SerialNumber !=3D NULL) { > + FreePool (SerialNumber); > + } > + > + if (SKUNumber !=3D NULL) { > + FreePool (SKUNumber); > + } > + > + if (Family !=3D NULL) { > + FreePool (Family); > + } > + > + return Status; > +} > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > urer.uni > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > urer.uni > new file mode 100644 > index 000000000000..9d723ba684b8 > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufact > ure > +++ r.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_SYSTEM_MANUFACTURER #language en-US "Not > Specified" > +#string STR_MISC_SYSTEM_PRODUCT_NAME #language en-US "Not > Specified" > +#string STR_MISC_SYSTEM_PRODUCT_NAME #language en-US "Not > Specified" > +#string STR_MISC_SYSTEM_VERSION #language en-US "Not Specified" > +#string STR_MISC_SYSTEM_VERSION #language en-US "Not Specified" > +#string STR_MISC_SYSTEM_SERIAL_NUMBER #language en-US "Not > Specified" > +#string STR_MISC_SYSTEM_SKU_NUMBER #language en-US "Not > Specified" > +#string STR_MISC_SYSTEM_FAMILY #language en-US "Not Specified" > -- Can platforms customize these (using dynamic HII PCDs for instance?) > 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.