From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.112]) by mx.groups.io with SMTP id smtpd.web12.29938.1661252518731396771 for ; Tue, 23 Aug 2022 04:01:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=o3ZOuD97; spf=pass (domain: os.amperecomputing.com, ip: 40.107.92.112, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VJYfA4GjTRhWT8B9goCkvBqBmtQUH5NGUMwsDGGHwhvO4qcXGThc+I+ySWkOMrSf5gTPmUxeuBw4klPMRxGeY/q0H+/X/n10FdBvAFOyvVx+6K7a5/hRC2nxItVaOniVwfDZYXzxGzmgXYh9CL5aeOk+YS0pNT2MBw/dq1sTV5pwMhu2BwMvQIt0Y5TLMrTM4q+4kGGLa/kEJvGRKotC2khkmeLqnqM8IkzZw29cWDf12kEpRcg+L3O67F7xrkrVwA6mW+Lc7Tz7MnMCe1B8eVBPfai0HI/b6fIoyj1VjHXleLpZ26ilK4RnYg/OaLwCXnkaYXary6W2ozNoiFiKRg== 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=EPVeuXcE3uFuF78yRIGGCfFGbxk/DvZwsPKJY8u/QHw=; b=fkJsMgjx28aJ53KnTmgVDQrhBe7DT1g8KWFcoGT0XfE69D+9dSqNeNtIYYczBz+nunYvxeIuYdLChgyYtCSa1X6RKbXoqLKLh3j+q3gHVw/4PfKZClA7A9Zt/D+ew9mlVhO0spzakTVB53wllQq7R9Z/gE1FB2wdSUH+2MjIivzuHk2nL5gu/ehPat1YhRgJUEzqn4Ywp5sLrauXdv5X0+22d1uQ8bz2hBB6nB6NApo99LclzShjCz6uPJLfP4S4v7t5xQsl/Xc31/D9LzMFWXsD/1ND8rscDkLJJ4XQcI+3t82y2nl2HAlXycSckaujH2Ee8e9NgdW9LNtnhrcpRQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EPVeuXcE3uFuF78yRIGGCfFGbxk/DvZwsPKJY8u/QHw=; b=o3ZOuD97yQggYxt/iu62lCUex0nbwRsVWQaj5wzquJPM2kBiE8c7m83kFyR2u6oz2CjXmbu7Nf73sSWOP2St5lepaSQ7WpcjYkLgeVvuCosKoIlJFSiZY4fzzOuBIHBDENW2FFuOLjjB6MxbF8eij9cL7lD5fRQged1eRa8ZiCc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by SJ0PR01MB6430.prod.exchangelabs.com (2603:10b6:a03:297::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.14; Tue, 23 Aug 2022 11:01:58 +0000 Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::bceb:a82f:b3ef:53b9]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::bceb:a82f:b3ef:53b9%5]) with mapi id 15.20.5546.022; Tue, 23 Aug 2022 11:01:58 +0000 From: "Nhi Pham" 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 Subject: [PATCH 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib Date: Tue, 23 Aug 2022 17:59:21 +0700 Message-Id: <20220823105926.1379824-2-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220823105926.1379824-1-nhi@os.amperecomputing.com> References: <20220823105926.1379824-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: SI2P153CA0028.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::9) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 335fe1c5-1cd2-4488-925b-08da84f6e601 X-MS-TrafficTypeDiagnostic: SJ0PR01MB6430:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nQ1hivnWF/b1kc+a1bK0RP9xeiwCyFWFmN3TDyT7BfnsnQMXkdGGdDFvTwRQOHLWW8hFBkIlOrecHnquIyq89bwiI9sdB99CESck8hZGmqYCd0SvS8pZkQUmpIzqalKVgyzfEWOfVF+XOqzvx2Ytkz4TkeKIC16Bh7BpVY7ty6yHdHkbuEKgEb1Dbea8pxZMxYJlByXUfMs0Lu5xX9z8gQ1Z2+xby3Xz2AJoSD4WgWg+kLGUcLTtGuufk70wZzRMAEBBoq75Xb359iAVRFm7NeP+flxUR0m5roB4oiqA7Z9DzRdh1I/w9HSHxXTifGVCV5cB8CIjoNNQOr7WddfD+BIwjUEc3CIqfzxjXF2OzfVh9VauWhFHe2ymxFScEtf/KN6TkYrRAyXHStQooZHqBPbn/7wg8dQJuJsLZj2zrbKZDB+7ZrVRHJJu/NOcY+tT3g791ld73lIpjmLbw6AoMQ53jsO9cvnKQbaoc9A0wFYliMmPpPE239IoIljSWsezMpCbTCpR9r0f1WmAMX6AY3qyBQbOwHu608bVlBQ6OOawx5JcZ9R4xQptC5eV+5CFERyQAdYPta8uIP2FiGWCdAhAotyXnbzxAhJwU6LNhY9dg5rc9yenfQhbg49zxL1CFLBuklVq1osko+KzygDNM6rk+mgCFMkSWEZ3J172DoZEla0WHuJqY/JIsFjbmfqa3NEy711l4faXOAUJh6LhlY+9oC8MKSx5fKs/ySJrtmXZXQ+ZxbbvfPfZ+d3ibO9p7CYHPTWrDUKB3shY3RS1AQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7287.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(346002)(39850400004)(136003)(396003)(366004)(2906002)(38100700002)(83380400001)(2616005)(186003)(1076003)(38350700002)(8936002)(5660300002)(26005)(4326008)(6512007)(8676002)(66476007)(66556008)(66946007)(6506007)(52116002)(6666004)(6486002)(316002)(41300700001)(54906003)(107886003)(86362001)(478600001)(19627235002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zSDUyMbLcYKEWN6vVTioNY4J6AaJW3cDj9LBmF8lkAWbK4XVbk+JFZHxGR90?= =?us-ascii?Q?Ees3gi+JUALSA+MkhbLfpyiA0QjqZLgpS22G0xCY2v6AVqud0IU0MXDwmi6j?= =?us-ascii?Q?lN6DACNPtpyA2wtTJsEhsU5vzfsXkxPRgNW9y/UTfELBmdSMvlRX30r7esCR?= =?us-ascii?Q?aeRJ/7VBybreg5WN9EGXsfWwJ8ixpSlBWOCFSp2me/0FYb0aPX87AmFr8Cqo?= =?us-ascii?Q?mzyMHC749kFtwyLZFolB1VjmYKnHQ/RW5pd4aE+FKP197gWTC3RcLSwI2gRu?= =?us-ascii?Q?XovAENbnu4UlyTtBSUgXtXJyO3JoQ02xOgFhLAYfuRRN8USIIHlwx+vTs5WF?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JGW0OkWvbBynuwKEPK?= =?us-ascii?Q?WI2xD2lTwWMxa9nLtYDwjyyDqE+rX7aleEnPfHt0gWB0P9sEzwSQcxBtyQcs?= =?us-ascii?Q?8ouzRvI7OcJrLUrbUZgGNUoPqBu0rlEHWhSx6R5SniZMc0rY2Hqs5jaFm+Rz?= =?us-ascii?Q?vvZ6ewF/7Gyj+64CCkCWPpZQhtKZvuzGc92VFU5qSoBwkTipPbJmwXgMjht3?= =?us-ascii?Q?bdYBJ4k8FV7eMFmGsMn3jNVfysmjyWri85Cwc3qLrXHXSl0todOwJghuS8wT?= =?us-ascii?Q?Qi/RlCIED72bXk/jUw384w60tTrmBKJMSGpbSOye8C3TkP63q+mMHTBSU2Kk?= =?us-ascii?Q?aFTQ8VQeDc+hF8+ssvWM/JxLhaIYbNi25T0Ms1U/+W4QYauQb9adgcccVT07?= =?us-ascii?Q?RvyV1EVFNEq8QXy18l2THes=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 335fe1c5-1cd2-4488-925b-08da84f6e601 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 11:01:58.4060 (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: DD8N1J/41b38s84JHXzT7x9V+GsfuYPgcdKXApSmo6vRD+JdQOnJjqrXa2rF0JrcoUepaA8WkaKSBELgYGTKLXmsCynyXwh4x/bF53nPmUE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR01MB6430 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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 --- 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=0D *=0D +* Copyright (c) 2022, Ampere Computing LLC. All rights reserved.=0D * Copyright (c) 2021, NUVIA Inc. All rights reserved.=0D * Copyright (c) 2015, Hisilicon Limited. All rights reserved.=0D * Copyright (c) 2015, Linaro Limited. All rights reserved.=0D @@ -58,6 +59,7 @@ typedef enum { SkuNumberType03,=0D ProcessorPartNumType04,=0D ProcessorSerialNumType04,=0D + ProcessorVersionType04,=0D SmbiosHiiStringFieldMax=0D } OEM_MISC_SMBIOS_HII_STRING_FIELD;=0D =0D diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass= .c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index 0b9af9bd7e1c..524b37b10479 100644 --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -1,6 +1,7 @@ /** @file=0D ProcessorSubClass.c=0D =0D + Copyright (c) 2022, Ampere Computing LLC. All rights reserved.=0D Copyright (c) 2021, NUVIA Inc. All rights reserved.
=0D Copyright (c) 2015, Hisilicon Limited. All rights reserved.=0D Copyright (c) 2015, Linaro Limited. All rights reserved.=0D @@ -512,7 +513,6 @@ AllocateType4AndSetProcessorInformationStrings ( PartNumber =3D STRING_TOKEN (STR_PROCESSOR_PART_NUMBER);=0D =0D SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer, ProcessorManu= );=0D - SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion, ProcessorVersion);= =0D SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag);=0D =0D if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber)) > 0) {= =0D @@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings ( OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04);= =0D }=0D =0D + if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) {=0D + HiiSetString (mHiiHandle, PartNumber, (CHAR16 *)FixedPcdGetPtr (PcdPro= cessorVersion), NULL);=0D + } else {=0D + OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion, ProcessorVersionTyp= e04);=0D + }=0D +=0D // Processor Designation=0D StringBufferSize =3D sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH;=0D ProcessorStr =3D AllocateZeroPool (StringBufferSize);=0D --=20 2.25.1