From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.119]) by mx.groups.io with SMTP id smtpd.web12.12832.1661357470713890103 for ; Wed, 24 Aug 2022 09:11:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=hX2ZalKO; spf=pass (domain: os.amperecomputing.com, ip: 40.107.243.119, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CYnltgufdaPLjPwl6jgLcY0GL2VSJgCg5HypJxrinxFYmcffW8zzBYyHH4DvZ24m78wt/8rPQ0xaGRo8JE/y4xDszdFcMNKmr+8wQ4LtidrFxj3AASEewtJi1nqyTCbSf1/ZraBhKL6EKjUPnpUCY1i/GlUra4J9zJCW/u8ZFpGdT01CmqkQWGLQO4HI0BZ7uwLJ4jkDquPQ3I80kHZ+Klg6E0vZZfgutMFWL8vIUZK7+WeXurvKZENe8doMOV3tdsp+BZObZxLEntnX7b8TbsGY+OqPY61psX1ygaq4INYR2yktGuVrQvoGf/kKHTCK30mfUSD4bm1araZRjyqINQ== 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=lV+uXZZS7/I2EQr7dkUBItjUFCm3sIHIwekyt1cXaJk=; b=OorIeLEexcYBa7ZSRzTlc3l7rNytzfN1YtSMGsHvv0wOmZHEJ3sY4QyYTck7Vp4BB2PLXqJGtlwH+PUchZ3OXBjZSo1oyPL0xuhmbjL04BFskoYiIxDLvaUIoyPe/tUMZAZUWXNnOFpagM20ymW9f3Vb2S5+5JcsieEHP1FZeUITm7oUulgjq/WBXxQMk0FcaFFOK/WU3c8uVNyPyVslCxY1ppCife0xwRO6QQeVtWd8hVr+fzkvvYUh0uc8XTrOoYwEqLFqTHJiIKj7sqQlIzt8RKZFNaUa5HhIy2Vec/mxagMxrfmB+f6XMs/cjyUw00oKxZvhnpmkfxemZLxxhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=amperemail.onmicrosoft.com; dkim=pass header.d=amperemail.onmicrosoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperemail.onmicrosoft.com; s=selector1-amperemail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lV+uXZZS7/I2EQr7dkUBItjUFCm3sIHIwekyt1cXaJk=; b=hX2ZalKOiR780WA47hpK2XTbPFTaof1YHoEtbb9YZV1XkC3kcgDMpI3IqZpajXXvE3kpRwAqVKi46kXax6IwyElAfoGBozyanrLqcZpdN4cHy6zADgId5aEp+pfv4itc9xDObwlKYakdAhGJhk7SPG7u8dTWSv7uXazpXYDTS3Q= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amperemail.onmicrosoft.com; Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by SN6PR01MB3997.prod.exchangelabs.com (2603:10b6:805:27::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.18; Wed, 24 Aug 2022 16:11:07 +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.024; Wed, 24 Aug 2022 16:11:06 +0000 Message-ID: <4f666bfb-f72f-9232-5b17-26ce3ebf7cd2@amperemail.onmicrosoft.com> Date: Wed, 24 Aug 2022 23:10:51 +0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib To: Sami Mujawar , Nhi Pham , devel@edk2.groups.io, quic_llindhol@quicinc.com, ardb+tianocore@kernel.org, quic_rcran@quicinc.com CC: patches@amperecomputing.com, Minh Nguyen , "nd@arm.com" References: <20220823105926.1379824-1-nhi@os.amperecomputing.com> <20220823105926.1379824-2-nhi@os.amperecomputing.com> From: "Nhi Pham" In-Reply-To: X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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: 0f604e12-3d68-4471-7ef9-08da85eb3ff6 X-MS-TrafficTypeDiagnostic: SN6PR01MB3997:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M9QlGUC8d5a0mKqo3Cy/rc/TVW4GyM4w9YdYl3XT1/1K/mOkNxLe4OvbLqiKcDBfnYu80zm+1jI0c+zYXDZhlcNUa6GW+qqo9nWV58uFiFXngdaukyl2V8bq7w+OTd2n2X/nbco3OC8HQwHeC64n4s7jLyC0J23BiZupC0J4jYiqO/RSco2a+AlIyBrSwEK3e9lWHymu07G/p51pBmpr7MiooNpZvSRc03CSriLxRwaQ/Y8U3U5mNyMteQWvh8C8gfVMV7bai/PtkrUq0U7CB46AEHJQp8+kIG3oXnDmx82e+BCpdQ+hxgf00Kfhdhb2plzyMpthl35uUArVG55E1UaAP+auQHW07Ks/lXx1zAJvs7jnQNnM7Qz6+dkyErUxbZ9KDDto8uHc/+qWy4hyDHaGZb1909k/cx4OHKZ6dTMbga2ig55KHZ1llsXbY+446S3Isqgh3yKj0LhR3Z7NSpQC9jwH5/hypBX5OX4V5xmhISRCEW2hecF72ZRsIWdO6GB8Rp9jDnKRh3vh+9vk6OH52sKmtK3eKh4obduVKtjGtNI3+GJ4EmzLXNG8ObewOLVB0kg/Go4fkZZxNb6Q1ZJ9S/bguS2QLy6xy9V5k/Fm5FcdlWW3F0wl2bZubv/0xWT2a33nVY8t3rxgpKDqxhrM53HgZyOv74mHypMt4QBtUFByv56M2y18/6rpn96Z6mFkViADRUKUfZ7o34RW+k7qbIiURs71cD1lzWi5zeDqK+l02htjVvJLF0/MhXAWNSI2zbHaRedAAhy8QYqLlO8XbpBVnkS1QYJuQcXIf4M= 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)(396003)(366004)(136003)(376002)(39850400004)(346002)(8936002)(110136005)(2616005)(5660300002)(54906003)(42882007)(186003)(41300700001)(316002)(19627235002)(31696002)(83170400001)(38350700002)(38100700002)(66946007)(66556008)(66476007)(4326008)(8676002)(83380400001)(478600001)(6486002)(6506007)(6512007)(31686004)(26005)(52116002)(2906002)(6666004)(53546011)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?YRYT1DD1IDB0ZwNaZ9yhnnsFGrpx5Rsn0mF6UIlaSnkrlvWcntzY+MMtHQn/?= =?us-ascii?Q?ZnYYPMJzzM96JsfKaNukvIcJod2fpl+d3RnUsswtZc1LHlwZvRkbG0VvBZzf?= =?us-ascii?Q?GC15KqVF5ilMcfuM6/lMfHhzYhInHbpclfR6QrvUoZbNdYp5XYifdN88cqUr?= =?us-ascii?Q?TRhFBrLJaFFCfwUmmdaDXfUxOmeRo0CdQoHZUBnody/3lGM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yvwJPqBiaJjTyukRamx4nTbqeELiIZKOmHn3nknFBOB?= =?us-ascii?Q?v3+slBHK/6AcR1hd4qxkiNLmB88o1c4Ud59xY7ia3VDKS/XZAFbHJlEUHW2M?= =?us-ascii?Q?0x/fMtpeW+26aCHKfHF/jOrKi/daQhE3SXpZkcZtmwwlBaPcdB7SLyg1+MJI?= =?us-ascii?Q?jMBK/SOoyumDrHsspt5s4msCznQL4EOPHAfUmpAFuj0uADzvMp+vU2T0rbWF?= =?us-ascii?Q?j117BT7eMm4UCkJmq+FGd5Slly/F67GHApKTdB/aFBRpzmYki5ZEOQc/8io5?= =?us-ascii?Q?VzB3gd8lx5Zqg3Pi6cBWkxaT7mcvdfjHnpbrjC5ZtfVQcoN47MkO2b5WUbkk?= =?us-ascii?Q?Skl4+PPzIH2g33s+terEyxg0Jnu+qm4QyR1z6itZsf0r6Re7noWZDBLvUyuf?= =?us-ascii?Q?siCxWiSn7BQmabB/Pfadyn7JS9VaN59psGLJSK2GrYJbe2B1w8Iy+y979kpV?= =?us-ascii?Q?x3HmCyCvGVZZAZ8mfje33KBtAEwlnEWMqFPv2aa3cHIFGn4k6v83SWM/aLCL?= =?us-ascii?Q?l1Z2AsbhAw8vPMw7dOoZxAA=3D?= X-OriginatorOrg: amperemail.onmicrosoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f604e12-3d68-4471-7ef9-08da85eb3ff6 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2022 16:11:06.6085 (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: KDO+Yibt6BkVZjQPhCNoAyrPu+2YfGdYsGmNnj/NbkCsJyRmGaJCIqF/d91F3A98On7IXErNw19uKlHsaWl4cFVpOBahCirTHsZ+/1IHfCA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR01MB3997 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Sami, On 8/23/2022 11:21 PM, Sami Mujawar wrote: > Hi Nhi, > > Thank you for this patch. > > Please find my response inline marked [SAMI]. > > Regards, > > Sami Mujawar > > On 23/08/2022 11:59 am, Nhi Pham wrote: >> 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=20 >> +++++++- >> =C2=A0 2 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/ArmPkg/Include/Library/OemMiscLib.h=20 >> b/ArmPkg/Include/Library/OemMiscLib.h >> index 47cb30d84a62..330bb4b014de 100644 >> --- a/ArmPkg/Include/Library/OemMiscLib.h >> +++ b/ArmPkg/Include/Library/OemMiscLib.h >> @@ -1,5 +1,6 @@ >> =C2=A0 /** @file >> >> =C2=A0 * >> >> +*=C2=A0 Copyright (c) 2022, Ampere Computing LLC. All rights reserved. >> >> =C2=A0 *=C2=A0 Copyright (c) 2021, NUVIA Inc. All rights reserved. >> >> =C2=A0 *=C2=A0 Copyright (c) 2015, Hisilicon Limited. All rights reserve= d. >> >> =C2=A0 *=C2=A0 Copyright (c) 2015, Linaro Limited. All rights reserved. >> >> @@ -58,6 +59,7 @@ typedef enum { >> =C2=A0=C2=A0=C2=A0 SkuNumberType03, >> >> =C2=A0=C2=A0=C2=A0 ProcessorPartNumType04, >> >> =C2=A0=C2=A0=C2=A0 ProcessorSerialNumType04, >> >> +=C2=A0 ProcessorVersionType04, >> >> =C2=A0=C2=A0=C2=A0 SmbiosHiiStringFieldMax >> >> =C2=A0 } OEM_MISC_SMBIOS_HII_STRING_FIELD; >> >> >> diff --git=20 >> a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c=20 >> 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 @@ >> =C2=A0 /** @file >> >> =C2=A0=C2=A0=C2=A0 ProcessorSubClass.c >> >> >> +=C2=A0 Copyright (c) 2022, Ampere Computing LLC. All rights reserved. >> >> =C2=A0=C2=A0=C2=A0 Copyright (c) 2021, NUVIA Inc. All rights reserved. >> >> =C2=A0=C2=A0=C2=A0 Copyright (c) 2015, Hisilicon Limited. All rights res= erved. >> >> =C2=A0=C2=A0=C2=A0 Copyright (c) 2015, Linaro Limited. All rights reserv= ed. >> >> @@ -512,7 +513,6 @@ AllocateType4AndSetProcessorInformationStrings ( >> =C2=A0=C2=A0=C2=A0 PartNumber=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D ST= RING_TOKEN (STR_PROCESSOR_PART_NUMBER); >> >> >> =C2=A0=C2=A0=C2=A0 SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufact= urer,=20 >> ProcessorManu); >> >> -=C2=A0 SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion,=20 >> ProcessorVersion); >> >> =C2=A0=C2=A0=C2=A0 SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag= , AssetTag); >> >> >> =C2=A0=C2=A0=C2=A0 if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSer= ialNumber))=20 >> > 0) { >> >> @@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings ( >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 OemUpdateSmbiosInfo (mHiiHandle, PartNumb= er,=20 >> ProcessorPartNumType04); >> >> =C2=A0=C2=A0=C2=A0 } >> >> >> +=C2=A0 if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0)= { >> >> +=C2=A0=C2=A0=C2=A0 HiiSetString (mHiiHandle, PartNumber, (CHAR16 *)Fixe= dPcdGetPtr=20 >> (PcdProcessorVersion), NULL); > [SAMI] Should the second parameter be ProcessorVersion? Good catch. Will fix it. Thanks, Nhi >> >> +=C2=A0 } else { >> >> +=C2=A0=C2=A0=C2=A0 OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion,=20 >> ProcessorVersionType04); >> >> +=C2=A0 } >> >> + >> >> =C2=A0=C2=A0=C2=A0 // Processor Designation >> >> =C2=A0=C2=A0=C2=A0 StringBufferSize =3D sizeof (CHAR16) * SMBIOS_STRING_= MAX_LENGTH; >> >> =C2=A0=C2=A0=C2=A0 ProcessorStr=C2=A0=C2=A0=C2=A0=C2=A0 =3D AllocateZero= Pool (StringBufferSize); >>