From nobody Sun Nov 24 03:43:40 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+93927+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+93927+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1663554134752419.177518528106; Sun, 18 Sep 2022 19:22:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LaU4YY1788612xRKHpqj91ST; Sun, 18 Sep 2022 19:22:14 -0700 X-Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.107.96.107]) by mx.groups.io with SMTP id smtpd.web08.15779.1663554133247290766 for ; Sun, 18 Sep 2022 19:22:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gjwRjWxKsopVSyOzolOdvOryXsVIVE8c7WO02nHGCRx11oQPo9Y+WjNUfxqWOvFBxjW/33qqkkyKpgVSXJcDKOUIJTP90DwLyudlIabyl/RFgJoc+paJwQfaukr6NXWm7eXRvvpfJOHYVAiYn9i327druxQ7x3e7rHS4iJQqCdMFMIw6RIUIVRr0dPUxg+4v34BXhkcXXfFfW3mHvt8B806DzBddzBFjWeQY/6vQY+byGjry8LE04X9Ol3OFn4JXa2dFgyfVNKLsbusc5jR3NAV5fTlp0+lvG9HNRimFu8b/1DBz7500dcnxnaPrr69/LCBidVLPiLZB53z5Vl0p1A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=67JiAfOawA7iPm7dI40qwTP+eTdajboX8jueVFhGnNU=; b=ByB5AQcWs65Z6pLafBlLPuByosaPjQTI5qVJpv8bOP8XKzzjHgBFU1n9cu4ttuvGxlWXaWkHkHsVh7kesNr6pYTcaApbG6Y2H3dUoiYiVvtiPhaeGeKG0kL3sL9IEQ9Y7uKgzSx9Z+jMCqW5XBhv6Lx2cc7J5WwbjqQoEJDTvZOEL3r5ryXRmfMm6QRL8rzoovo6KTupjzIPgRKRoezb5eXumjkifnnNj6GAiS1FcPCeIiMzwJul2Sy5HTNMmWqjTf7inaSsGMUAntIoHRdCovSGPyQo3W2ddNRQ+VVpuHoYS2D/C1G/8iYcTEm9q/ZWIyv7+k7RxZ2QET20NSwPjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none X-Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by CO1PR01MB6791.prod.exchangelabs.com (2603:10b6:303:f7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Mon, 19 Sep 2022 02:22:11 +0000 X-Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::441a:930:ac15:1ce9]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::441a:930:ac15:1ce9%4]) with mapi id 15.20.5632.019; Mon, 19 Sep 2022 02:22:11 +0000 From: "Nhi Pham via groups.io" To: devel@edk2.groups.io, quic_llindhol@quicinc.com, ardb+tianocore@kernel.org, sami.mujawar@arm.com, quic_rcran@quicinc.com Cc: patches@amperecomputing.com, Minh Nguyen , Nhi Pham , Rebecca Cran , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib Date: Mon, 19 Sep 2022 09:19:45 +0700 Message-Id: <20220919021950.2110333-2-nhi@os.amperecomputing.com> In-Reply-To: <20220919021950.2110333-1-nhi@os.amperecomputing.com> References: <20220919021950.2110333-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: SG2PR02CA0071.apcprd02.prod.outlook.com (2603:1096:4:54::35) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7287:EE_|CO1PR01MB6791:EE_ X-MS-Office365-Filtering-Correlation-Id: 327e18c9-e7f7-443b-9742-08da99e5c217 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 9B0ouUJuIvTsBI2V1Wx62+SszVw9y5rqzVL2G15u6REFZ8oRxq6352PT7THiMhnVgg2LDn9oVBq66lqBzG+qKyIL4Y9MyaCSwmhClccLA7dxi7hwkPNRLgrG/QlFjje9Lc8gzbnRr3QahEj5kiKfXaNaZKwU9GHL8RI/mNgZhg9Q71FLeqeAc20ATiLPkF1Yt/SPCqUHf/DfHkdyfTfBQDt/JX5hG4KhCPXFb1EnBVyxR5Mayb7/uLNrT8aRUioEDDBITl7l4oZ1eivifWW+SWAp/UMBpxitN/WiI4ylQxp7AAunx4B6n8HJW8pdj8+bX1g4S6MmOkIPvwgatCuhRkZh6Tvnqfyse31yPUIqzPn0zPuhVXKFRISQi4zc+ZG/gx4wWu1Yf4mSd3TJ8R+dVr7O00JwnWzgRXISecbFAb9o4OUMHsP3TabhkFl+Mr/Y7t3rdokE9vrMdl4oJlwoAaTJDLAaM58I9IsD2ODEiBQ9q0bB4eZUOZk2sJsFGIpltCtFmH/C4Oj7zOaUyn5xeiDQpq1IKfZguPDzDixuDXaPGCkxJnvQGA5k2pMmDInc3VT7LWCbJGd/ZaoFknLM9KBWyFWH6XEyiwp6DTic8TO44Bs4rq3JRrbCauoxYN9a1tAChqA+dlG8if3lBWCnn8j2jAYacSx6Zxo6xUiWE/8Aqq/4cpo57QV+cT5Lf+YlIgAsluFByuorzvnbXwT+Ch+SjD4yrMQTpxKRLm3QO/CZhrrvf2JuxDSaEgL7WPtIRPJW88FtbY40s0PQ7TGPHg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PrCImn0MGLAuuyHqGciDO+pyaTVvfCyn8d1M3RmwVSQfBqlliWLZr+pYmZAz?= =?us-ascii?Q?wGFg73fv6RJY+KT6Ws+ZkBkW8Zf3sebk6oDjrYOuL+g6ISh56+xYu13kvdkV?= =?us-ascii?Q?u7FYF5xP1wehX/1JczvOP77wGP7tDjWznQ/O5IMfseDdNiUUfW8sHB3ea8RB?= =?us-ascii?Q?G3X5uIQJC6uPoYTSePEbwuKdckmautb6Pyu30PxPAOAcxp9sx7M8jTdQI71k?= =?us-ascii?Q?/6bWm+ULG7USAJi4Xwa3zmA1c2PduNYE+/2byeOcad0/WE389CvzzIhXz+Cd?= =?us-ascii?Q?tz1bY0uuy62iFIQPPNhVL5hI59o00hocT3keqoY01REY6SAgFBsDxUBHt+Qn?= =?us-ascii?Q?754qaCU25kKw982RkZ79qZ9DotN2R6B0LDqeHHJkmrOdi6TlEZ5lyT2KznBm?= =?us-ascii?Q?Ou4fhjXg0fJtjEC67NK0I+EBJX7uKsxYkqpi15B/WKIK1vofsKiTGXkRzssS?= =?us-ascii?Q?QMIo0XZWJwkjeuoa4tNw/NnXPXtstZy9+vYnZ4J8MeQel4Ri7soImWbodtWy?= =?us-ascii?Q?WUbcVL4kafixAGVw6BMGEC8aUfNYyFceafAqODwx257xWqfrjSwk4H6m7mav?= =?us-ascii?Q?bDLCkl3TPPVuToH4Qtepdgxd9bgU/MxomKgoXW+eFgAbhfI0O3TjeYXdV5as?= =?us-ascii?Q?txZleopdzHPt7NQT0fd6l6Kgn2lITJZTWp74bO3VyI28eFzmC9ilXjpOq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vFCsTATl1Jz9tIm3p3RtdoDNjNENK1FyPU0ppVF0VL?= =?us-ascii?Q?IeglZDSwfuYLKjZaYjnu6n8=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 327e18c9-e7f7-443b-9742-08da99e5c217 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2022 02:22:11.1732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HiYTHbzXABlgsV8beqk+hCtY9tqtEKnW4cLuUlrdtSF0vPP6BTjWgz4ELtWRZiuZNHaUr7Ob9Q2oMFCZ1F3QjxkXhXnwMS69qqaC8iSlwMQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB6791 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,nhi@os.amperecomputing.com X-Gm-Message-State: xP4E25jnH9XQpWFNtautvROpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663554134; bh=ij9ejFDO1ZK1NlDj3dbFYa66kXzCNTWYgLKzi2Rih8s=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=KLg+tvbLHjtbl3APNbcQ54I75jnYPBolKBfPYGGB62yzAl0E8TnsfBPlO7douaQLhY2 VQRcb/STV+L79l9DxjtRNMByg5sCQtEEeJZ6LZqReygm/hx95Jm1jPE0/cLZQrvpLUBS5 3RTvlT2nwtxeC9nC5UezMdQvJ6KU5hpjHOs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663554135195100001 Content-Type: text/plain; charset="utf-8" From: Minh Nguyen In some scenarios, the processor version may be updated dynamically from pre-UEFI firmware during booting. But the processor version is fixed with PCD (PcdProcessorVersion), so it can not be updated it dynamically. This patch will support setting that value both statically and dynamically. Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Leif Lindholm --- ArmPkg/Include/Library/OemMiscLib.h | 2 ++ ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 8 +++++= ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index 47cb30d84a62..330bb4b014de 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -1,5 +1,6 @@ /** @file * +* Copyright (c) 2022, Ampere Computing LLC. All rights reserved. * Copyright (c) 2021, NUVIA Inc. All rights reserved. * Copyright (c) 2015, Hisilicon Limited. All rights reserved. * Copyright (c) 2015, Linaro Limited. All rights reserved. @@ -58,6 +59,7 @@ typedef enum { SkuNumberType03, ProcessorPartNumType04, ProcessorSerialNumType04, + ProcessorVersionType04, SmbiosHiiStringFieldMax } OEM_MISC_SMBIOS_HII_STRING_FIELD; =20 diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass= .c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index 0b9af9bd7e1c..3b12e26abf6e 100644 --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -1,6 +1,7 @@ /** @file ProcessorSubClass.c =20 + Copyright (c) 2022, Ampere Computing LLC. All rights reserved. Copyright (c) 2021, NUVIA Inc. All rights reserved.
Copyright (c) 2015, Hisilicon Limited. All rights reserved. Copyright (c) 2015, Linaro Limited. All rights reserved. @@ -512,7 +513,6 @@ AllocateType4AndSetProcessorInformationStrings ( PartNumber =3D STRING_TOKEN (STR_PROCESSOR_PART_NUMBER); =20 SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer, ProcessorManu= ); - SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion, ProcessorVersion); SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag); =20 if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber)) > 0) { @@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings ( OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04); } =20 + if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) { + HiiSetString (mHiiHandle, ProcessorVersion, (CHAR16 *)FixedPcdGetPtr (= PcdProcessorVersion), NULL); + } else { + OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion, ProcessorVersionTyp= e04); + } + // Processor Designation StringBufferSize =3D sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH; ProcessorStr =3D AllocateZeroPool (StringBufferSize); --=20 2.25.1 -=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 (#93927): https://edk2.groups.io/g/devel/message/93927 Mute This Topic: https://groups.io/mt/93773958/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-