From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.42]) by mx.groups.io with SMTP id smtpd.web12.736.1610745003183744845 for ; Fri, 15 Jan 2021 13:10:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KOFDeVj0; spf=pass (domain: arm.com, ip: 40.107.13.42, 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=4qlpitHHmK4OsAfKk64qm3O4ySgUHzKhK4q8Z/AHSqg=; b=KOFDeVj0Vgnb/sMrSt0F3ieGr7oC9y/MPxEMxEAU7De0iH0Ny++QGl2WXuasSa56Ufw7NqIxcFgvtC7kmI7td+35E3BiO5P6uxkwL1yd9V49Q5+02ggl1ZnB2ECjOZlmuK7VrquWuxOTMiF7hrA4a/iLjdc1Hol8RFHQF/NRABc= Received: from AS8PR04CA0143.eurprd04.prod.outlook.com (2603:10a6:20b:127::28) by PA4PR08MB5920.eurprd08.prod.outlook.com (2603:10a6:102:ea::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Fri, 15 Jan 2021 21:09:59 +0000 Received: from VE1EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:127:cafe::49) by AS8PR04CA0143.outlook.office365.com (2603:10a6:20b:127::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9 via Frontend Transport; Fri, 15 Jan 2021 21:09:59 +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 VE1EUR03FT054.mail.protection.outlook.com (10.152.19.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.12 via Frontend Transport; Fri, 15 Jan 2021 21:09:59 +0000 Received: ("Tessian outbound 587c3d093005:v71"); Fri, 15 Jan 2021 21:09:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a58ef06f0c6e15c4 X-CR-MTA-TID: 64aa7808 Received: from c3966aa3fd6a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6A75920E-1CF3-4079-9C32-7BD84F5B18C6.1; Fri, 15 Jan 2021 21:09:53 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c3966aa3fd6a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 15 Jan 2021 21:09:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c4Ul4crJstRvK8+CSiJadJ+qbsaacCm6LO4h+IlYzpRuvHh9Bs+RIjiubJxqiPnYd+sF76EGGJzKRBy+qAsgAJOgwDKc/8pqTQevzVMiQSAnnWrzEfqw6u7tqQQYAOxf4Xmjk1UdReh7CvzgbE/rL5z9/6/uf6S/MfWfcPahq4JbKH0iFfDAIHLVlUmzwNp3LWA1F7MBqjg2FNFQ//VhjtU0PUudEFu0GUDWm3OK1qBt0dSmzthjw65F+qbXR7Ft38xnNLJo3FfMWKDNOI3OxxonmmW5Ty5vt75YBvfhd4ZbSWkZj77XkZTB7ddZww44rj5sPaY2kDqm30ghYb1GKw== 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=4qlpitHHmK4OsAfKk64qm3O4ySgUHzKhK4q8Z/AHSqg=; b=kB39IeEVoziI3TaZm/SFRgHKx4TBf3LC6kpeJXSZvtFECrLTedhPHG2h4E4nEEMxStSAifLbsDbVTSsxP8ZSWk0mbb3o6oz/fuNdMclw3ClgnvIXyLalrcdWBV5FICkikF2eQV+oKVO1l/KwUR556x0CJwaaMTFbllRwiTIUPlpHItImkQRMnTFRmW8gKXmVzr1ZIH13Zx4cm/BkrumD7jHTMr9QC1AoVxrjs7HQNWYasJo102zcPWj9oxSfxfVn5pTuOpGOVrVrIZ1BtA3NdQtQI0nGeER/J0KyN6mC7cB4K3k7Z3NaEAxgzqaPKsc+rITPDLLrLkG4BuIyatjqZA== 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=4qlpitHHmK4OsAfKk64qm3O4ySgUHzKhK4q8Z/AHSqg=; b=KOFDeVj0Vgnb/sMrSt0F3ieGr7oC9y/MPxEMxEAU7De0iH0Ny++QGl2WXuasSa56Ufw7NqIxcFgvtC7kmI7td+35E3BiO5P6uxkwL1yd9V49Q5+02ggl1ZnB2ECjOZlmuK7VrquWuxOTMiF7hrA4a/iLjdc1Hol8RFHQF/NRABc= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DB7PR08MB3259.eurprd08.prod.outlook.com (2603:10a6:5:1f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Fri, 15 Jan 2021 21:09:52 +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.3763.011; Fri, 15 Jan 2021 21:09:52 +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 , Samer El-Haj-Mahmoud Subject: Re: [edk2-devel] [PATCH v6 16/22] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type01 Thread-Topic: [edk2-devel] [PATCH v6 16/22] ArmPkg: Add Universal/Smbios/SmbiosMiscDxe/Type01 Thread-Index: AQHW6pTOjn+6gtqB9kS9GFfMcBeDZKopMFKg Date: Fri, 15 Jan 2021 21:09:52 +0000 Message-ID: References: <20210114163628.31952-1-rebecca@nuviainc.com> <20210114163628.31952-17-rebecca@nuviainc.com> In-Reply-To: <20210114163628.31952-17-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: e9179d97-e479-4495-152a-08d8b999ead2 x-ms-traffictypediagnostic: DB7PR08MB3259:|PA4PR08MB5920: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:989;OLM:989; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: /zUlnuBnF6o80CNubQP6wmf2mG03zSn/uaimk4ma2CnchFZ5FOkJOlft6yNl3aTT5JCvo59cUKQH12OGPdmEiQzJTnVirEoh/JD7loVheB61FnQFQcQuOdMj95yF7dK/HFMf2YNq0tns5ROGcfkXxiqoV0oL7+iHY1uM3DoWLwj9ccqcszrTlEVCDB1YwSZTDMLKT5y6NdBJ4kN0Jl07zt489xZFxo8mAYRhLadKZ6e8wAAM4dj3K7QXxMjBe4FYFeOzvJur82n0Dyntlu3TS/17QmG0dGd276a1qF5KSRhYuaoVIWeeYezmVa5XUwG0zP6LPPLiTy17QkljPpbT28G6AbIQYH5M164Y1LFx+zBSLBIlju5NJE/62/uvEw3DhxankTNfLcChf7jtSRi+YmT3e3OW+GiYtfpS5VUlxJsmKJugVc1px+LRjRqMmqTKwq5InGm0pYOCubYzJl/tiA== 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)(346002)(136003)(39860400002)(366004)(376002)(966005)(8936002)(4326008)(86362001)(71200400001)(55016002)(83380400001)(66556008)(478600001)(52536014)(7696005)(19627235002)(8676002)(5660300002)(2906002)(33656002)(54906003)(30864003)(26005)(6506007)(53546011)(186003)(64756008)(110136005)(66476007)(9686003)(66446008)(316002)(76116006)(66946007);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?1UcAsB4I/M1LWTOw8CnT7PHlZrR7RGwJDIcqcJzpz3/SK5MO7lg2306HZo29?= =?us-ascii?Q?lQIS4oZIZ6n9Q33ccecMAQSk0HqnFYI7+6x/YIWwlKKygCnnSQCGMTF+V5QR?= =?us-ascii?Q?Yi/RZNgNRf/9F9kczhz/ex7Y+VF6/Gc/FS9Yn+9a1er/Hd3GSyzgWzqkWMgJ?= =?us-ascii?Q?8hcQg0s8Q3m53+EfvxCz99EaaVo0KmUJ43AmiKaLYjyOSH/E2D3knW+xV38x?= =?us-ascii?Q?SRowXaLvSudMJkNqHey+cPRhFZ7TXiNEqBdz+XOwMq2xm/mEte32Ex/O+tM8?= =?us-ascii?Q?9cYOTTaRlb0DCHpnt510z0wF7wWL2f+143qyoqHLL75XaJJo2+T9EyrzFqs4?= =?us-ascii?Q?9zaZN2NDDIgZVbcyEDfbsHP1Es8GE0OSnWVeDSYownO3L9BQaKmm1nFsSUXi?= =?us-ascii?Q?W0UHBkBXSpoFocWj4ArF98qssQXy6kTJL9TL5pAipUDP+ZfQnrUyCI6xOp4y?= =?us-ascii?Q?H7RN0IWk+lIyXVHAl5qV7vJgAlOFe3TeuOHuCZ0cAOp54zQu/6ozU1Ydr9rU?= =?us-ascii?Q?1eASBiMrL3ouy9doy0ursH15345e1TOUGwdNqeA7ALOAD0+uNCdKQ7SJxDpr?= =?us-ascii?Q?kLxpgjL3RrVrLmPux8t5rpFXvx9DV+9RYKnakNdR0d40KQhL3Dtt+WjgiJ3L?= =?us-ascii?Q?2Z4EWbOsIPc3XIhWb/7jTGKZREsw2rs8EaDZ/Yf+bcGyY6GoQbsDO4gt3Pof?= =?us-ascii?Q?LvyPej9gFi14CsAAdCH8yeoS4y9RFUWkUlQEySkzp2T9rls/bB/4lcALc3CK?= =?us-ascii?Q?D9KSXiGFg07mjIlP0TL2B/szcMHoDZcaMshLFLsBKbN/+5bn5+pjwG2J8nfx?= =?us-ascii?Q?ZT0mPiOJXumicN2IgSxNeTEvMnV04lV0gFwybYxG67V2omzgqPW5wFJjTcFT?= =?us-ascii?Q?akL/GJKis1e/k9HT5MVX3J59WgpGmSzUeRkxHgA1M84mtR7FJiuWnYyMtMVw?= =?us-ascii?Q?IkaodO8k8LK0nRaJNXjfAMVNEZWKsKmJ5i6TY93OzhI=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3259 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: VE1EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 97ddd745-485d-4410-33ec-08d8b999e692 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gOegnebg3zlX0NjlSo/Ib3EqAxvlw9I8xgAeIYSLjFNYmLY/CxOpsbXpRSuYSXASaFoAmmRXLZdQg40OQ74Oi78xH8hDPyu7uxj45IeFlsxAMZw5J0kU8L9z1c4x98Tvb10vHE/fqr7AVsWbz1kDVKizpf8FbgqRu+IYggqacTzLLqkbT68+JshiZWHq88H+CQ2ghxtfxPO/tRmPO96Fym7yWsjMiGwo3TcHQrKs8GW+nWi/ft9o4vHdfiAjLP0j4TTx0bO/qVFCFU5DFfdlFYVD1dw4E9Ev4h641Gr4yWQhs6OdulpvMZO3zc+dog2sx3RqqyxOspd43XvAuZqZdnL89rRe2ImX+RNDkKPMhfnd93jk2RgOCtXPeGL5H8jM4fn16o8SjTFttlhlQX6vDcFn+4RrDUNxS0SVF6TSgfrAlJTgkeCtUM8v4elEu3fH1zPgvLZq4GrylkpGRL3PgisMZxnM/B9c+dY40+4hXwbeW2JwgtMGpG0d4f6ulGVoCJr+VBNJ6EJmhFr0MaimwA/JiBo9WaWa18t/bsQHb6X4I2TBnQmJAx9oiSKap8QT 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)(396003)(136003)(346002)(376002)(39860400002)(46966006)(9686003)(356005)(26005)(34020700004)(4326008)(316002)(6506007)(81166007)(53546011)(8936002)(7696005)(186003)(478600001)(82740400003)(83380400001)(110136005)(19627235002)(2906002)(336012)(86362001)(8676002)(5660300002)(30864003)(47076005)(82310400003)(33656002)(70586007)(52536014)(55016002)(70206006)(54906003)(966005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2021 21:09:59.1967 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9179d97-e479-4495-152a-08d8b999ead2 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: VE1EUR03FT054.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5920 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 16/22] ArmPkg: Add > Universal/Smbios/SmbiosMiscDxe/Type01 >=20 > This code provides information for the SMBIOS Type 1 table. >=20 > Signed-off-by: Rebecca Cran > --- >=20 > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerDa > ta.c | 36 ++++ >=20 > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFu > nction.c | 196 ++++++++++++++++++++ >=20 > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturer.un > i | 20 ++ > 3 files changed, 252 insertions(+) >=20 > diff --git > a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturer > Data.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturer > Data.c > new file mode 100644 > index 000000000000..c03b133690ce > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacture > +++ rData.c > @@ -0,0 +1,36 @@ > +/** @file > + This file provides Smbios Type1 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) System Manufacturer data. > +// > +SMBIOS_MISC_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/MiscSystemManufacturer > Function.c > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturer > Function.c > new file mode 100644 > index 000000000000..2c69c2593f5d > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacture > +++ rFunction.c > @@ -0,0 +1,196 @@ > +/** @file > + This driver parses the mMiscSubclassDataTable structure and reports > + any generated data to smbios. > + > + Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ > + > + Copyright (c) 2021, NUVIA Inc. All rights reserved.
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 > +#include > +#include > +#include #include > + #include #include > + > + > +#include "SmbiosMisc.h" > + > +/** > + This function makes boot time changes to the contents of the > + MiscSystemManufacturer (Type 1) 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(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; > + 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 (mSmbiosMiscHiiHandle, TokenToUpdate, Product, NULL); > + } > + > + pVersion =3D (CHAR16 *) PcdGetPtr (PcdSystemVersion); if (StrLen > + (pVersion) > 0) { > + TokenToUpdate =3D STRING_TOKEN (STR_MISC_SYSTEM_VERSION); > + HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, pVersion, NULL); > + } > + > + OemUpdateSmbiosInfo (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_SYSTEM_SERIAL_NUMBER), > + SerialNumType01); OemUpdateSmbiosInfo > + (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_SYSTEM_MANUFACTURER), > + SystemManufacturerType01); OemUpdateSmbiosInfo > + (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_SYSTEM_SKU_NUMBER), > + SkuNumberType01); OemUpdateSmbiosInfo > + (mSmbiosMiscHiiHandle, > + STRING_TOKEN (STR_MISC_SYSTEM_FAMILY), > + FamilyType01); > + > + 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 SmbiosMiscAddRecord ((UINT8*)SmbiosRecord, NULL); 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/MiscSystemManufacturer. > uni > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturer. > uni > new file mode 100644 > index 000000000000..8038f0e4b0bf > --- /dev/null > +++ > b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacture > +++ r.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_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_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" > -- > 2.26.2 >=20 >=20 >=20 >=20 >=20