From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.44]) by mx.groups.io with SMTP id smtpd.web11.33533.1661271721964794308 for ; Tue, 23 Aug 2022 09:22:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=RZsMPRDc; spf=pass (domain: arm.com, ip: 40.107.21.44, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=NOAM7WmQ/1GKuu9TGFmB2Ni1uHNmVDe1zlQDP/0Z6mAt1IJWsgCNwCkZaT4kx55WCOKYn+nLhvbVFvKF18Z0juq3yqqYzuTdrHYrC/pdaLxLbkh+IPpwLjjzWK8wOeDRrH/IQqJLCl/18upUGO7uPKKLW2y1xTHMx2203aSrkibAqe/D5sHxDD8Rd2H8Mx54tCeNs9bXng+jicuQSmv00ZBLtnbgB49yq6MiVsFhHIy3nJFG96pBR6u8mFugroE/H3J/6f9iCe+Oy546ueijWNL57H5ifDCGvuH+PqOD0tD+2TXW8EVle2UCoqt1pveALrZyn5LGmMniTBkopGnxkQ== ARC-Message-Signature: i=2; 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=NhuxWzjtUNZmC+Y1W9FijW18npLac1WDvfEoZJWF2LE=; b=PcrbMHDf5NCar8G+qNd7+x7jk8qnxehQdRwz4/cB836XrL29dKL1PbWbFhMvk/TlzWX2tkOMTA2YS0Ui0a2yn7OfxvJeHXxmZYStPWRXtUzNWwduX1eS81Oc+D5tgUGXYeQmboCYKPoah71Yt+VO82DXBwS6Kku3z1JNMJJP7spU93c0+qA7+phJ0O5TbbipMtVSpU9bKQdaojDccAbx33Jz/IV9FbI3DH9IhL4HYZaWxqSW9QJtCMqxmijUfvlAqSVjRZ0zvZna0G35Pour01LGmPeAjb3CZnqVmaJJd8x3IOVwheQh7sRh+f1HE1VNu/bJGuU2s/QkrvLMYlYijQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=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=NhuxWzjtUNZmC+Y1W9FijW18npLac1WDvfEoZJWF2LE=; b=RZsMPRDcQeBM/lLt+9urR7phP0e/MysYeIk16sVeTX0Wuq804Ui0jybPZrNhn9qMQWMi87zL4PNHLL1IiYzEmBxuLRKvZ5kpW3NX8xxfsbNCod9PJ86huBBiwf8vKk5SqkmVhme4Fpdkz6xrLzgT3dEt8oWZLB2HQnoPgm6A4ok= Received: from AS9PR07CA0018.eurprd07.prod.outlook.com (2603:10a6:20b:46c::24) by AM6PR08MB5176.eurprd08.prod.outlook.com (2603:10a6:20b:ec::30) 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 16:21:56 +0000 Received: from VE1EUR03FT021.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46c:cafe::fd) by AS9PR07CA0018.outlook.office365.com (2603:10a6:20b:46c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.14 via Frontend Transport; Tue, 23 Aug 2022 16:21:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT021.mail.protection.outlook.com (10.152.18.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.15 via Frontend Transport; Tue, 23 Aug 2022 16:21:56 +0000 Received: ("Tessian outbound cc6a8ab50b6b:v123"); Tue, 23 Aug 2022 16:21:55 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0eecfc06d816a910 X-CR-MTA-TID: 64aa7808 Received: from a0fe6de5748d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A14FF2E9-B765-4261-987B-CC31AE014492.1; Tue, 23 Aug 2022 16:21:48 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a0fe6de5748d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 23 Aug 2022 16:21:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfnlqvXllnwfaQ7xLzA/bf252AwlaGB+NaFP1tir9HX/6d+2M6ayDSWSIklLHfeIBkFzassZ2w56aK4eyAGJ6mXIZ93Uez8Sh6jud/92hrpr5ttRRxIPRLpVltqlIyJYKvIGP+4BgbEF8rfOwzpY0Y1D6woEQUova5RfGLJJ2gOQ4a0kv1RgB1MNFnCz+IgBX/MalHLBnoB8PTdXwxZSDeGvRdXHUko5tA2GXNk1CrBwlzmcwwOlVIyH846V5ruTC0Lk3t+BeSr8Rdx+JK21w19TVTdgIwN34xJ6ScTWYpAUtw8VcCJ8rvWRdb2vDibyQ9rKfX8Pdz5te/yHn0xlpw== 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=NhuxWzjtUNZmC+Y1W9FijW18npLac1WDvfEoZJWF2LE=; b=H9fWdoukYcf9ufb/KMSSS+xYHgy3txLWlZ4ZH64/5uZS6DyPJdiJAxXkPLasF8vBpFpEcc9Nuc4rv+UtnejqC0esG/4SHNwln8NyDqIN3Jg88nS77iu8nXKpRPJGi9Xs9aTUrcfSqGyl9TlVLFoZpjADNgkNf+pEZQglDtZ8VBN79Os2319R0PGpANie85fRqUepVAHqu5QLm6mjTKs4ybkWc1rNl5A2g/sD+KgDYJlE5f6AO8oh7PfIQjmFxeXWBgeTo+kP86RMSudqh8XR3Z2iFGj9DpyRalTWqsThgCxkmx2ZaOnCIYPON8bcjdkoHCx9beUc0SSM2rkAMXvHjA== 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=NhuxWzjtUNZmC+Y1W9FijW18npLac1WDvfEoZJWF2LE=; b=RZsMPRDcQeBM/lLt+9urR7phP0e/MysYeIk16sVeTX0Wuq804Ui0jybPZrNhn9qMQWMi87zL4PNHLL1IiYzEmBxuLRKvZ5kpW3NX8xxfsbNCod9PJ86huBBiwf8vKk5SqkmVhme4Fpdkz6xrLzgT3dEt8oWZLB2HQnoPgm6A4ok= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by PA4PR08MB6239.eurprd08.prod.outlook.com (2603:10a6:102:ef::22) 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 16:21:46 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::b480:677a:ac9b:8f24]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::b480:677a:ac9b:8f24%6]) with mapi id 15.20.5546.022; Tue, 23 Aug 2022 16:21:46 +0000 Message-ID: Date: Tue, 23 Aug 2022 17:21:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib To: 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: "Sami Mujawar" In-Reply-To: <20220823105926.1379824-2-nhi@os.amperecomputing.com> X-ClientProxiedBy: LNXP123CA0015.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::27) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 9c1d4b34-4bb8-408e-2873-08da852398e0 X-MS-TrafficTypeDiagnostic: PA4PR08MB6239:EE_|VE1EUR03FT021:EE_|AM6PR08MB5176:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: LEqk4h/s+hvPyR8iFkHDB+K5iaUcLthrs9StItvWdE38Uh387URqVXsp2DP4/+p7UYwfz/MnFzisQE3cr1id5w6cFVZuzRyiRbBjUAndLIzfWFGpQGd9lqM30kPlOa436N68NE9t3cGx+j96Ogl+eKmywq37pOdSYYH91BhA1wrA1yrcxC2LEJ7xegjF2lPS5sF8MpZlNh9La1pE8uTE0i7ZIPtKXmszQmcCgRJ4y7Bq5ocN1eP1glXDBjp8ChuyEcaS55bolBVwAjEeMn8smmRJGXPBJsxDo0goOSuqzm4JA6mdXK9HgOLPpVEzOxJigjCPe2751RZV6HgM3rQhllUmEE643okM4bV6OrtEfvHct17L6HxM+QowAYPrv3qooM05ktcen5pnNJjh+Cfyp4m8IM5uCc/MSkSd6+DfeM76FkAwfRpXFFvqgWumnbU3PbShif+0GZlLuaas0t/CkVY/XosMjAMLp7I0ZLbUI7rG2LY0aI2i8uTrjOdmvW2CmU1C2WzDd9XgN2A+2v20cUmPIC57d0Ikk2VC8ewlIbHiC5OlBiqOJMxL8sa6PCUnzBbfkyg1v1bDs/iaWn82VswqwJZ9e7Al18ILyIV7MTVYPSwKFrgf62QHD+Dqjc0tptHFUTxmBiN8YHRr5DxRpXJK5MTHT3RqyOMe8cnc07R4pvmtVUSIL9p5tIk7Y3Bwd2u/hh/9pXGKy9pA52NI95XPw/BTsbO/TtX9T+N/r5JbiVVm+zge/eGt2l1YhxJGvOO6spbRyO7V9435/tay1+vv7EjuhjB2iCAFPX5gRTg= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(376002)(136003)(366004)(39860400002)(346002)(2906002)(36756003)(44832011)(8676002)(19627235002)(66556008)(66946007)(66476007)(31686004)(6506007)(53546011)(6666004)(26005)(41300700001)(6486002)(54906003)(6512007)(478600001)(38100700002)(186003)(316002)(83380400001)(4326008)(31696002)(86362001)(2616005)(5660300002)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6239 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT021.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: edf7db9c-c808-44e3-7eaa-08da85239306 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sLt+oa0uuJqiO2oYlUWMaimQ0Su0ivMCvJd4miZylQYFmYJsCK0EfVIE7u9kvObBYtmKgBuAS34IH7LKaNxXNnrj955axyFiLpjzYJOYTXhCtvfwjYj560gi9r4Qj/ZBKTXs2uX71cdxqU1KLX0C2Ybh8l3XkBWKXwlTLYGKeIKqk/wKg+goja8c9vzKiUwaevZz4tTZnMKlAzHlVEs8kxc/5jJzraFhKvboV+NB8OxEva5AIlyv4q0F8aSQu4a3W+FH5sRO9jyqUN4UuxkhObFmSdm2bU0eHDINymA4G2M3e+C6iY0VAA8mobqRrDv7E2pzB2p27L1Qu4Rpoodk4KcTicMIqsfAtJeLaeHT9No99pAhTm1/tD13pTDA9ZYIHqbWpy4Dywtc+rzscdHc2kucntvBDLNfBNC38NkdYdLrZe2vF0cj9ANj/uswNrWYbr6+98S9GJyx8Axc6UFfCx7v+dAhPK6aIb34sn1d8MDn0t8cZLbtL2QfizGthipJIb+md6i61A60t/dmOWlELfIZ0OcPhMhkPdi76Ev8qAZWMFnmt/6B+aL6Hh3HKvjehOsQy2QZ/CpFhywgIWKGmbU5nS07MY9S72WzFbsauo3z6gNpmx7y9q4zl/70Z3C6eZcaVH28abWU2Wv0VNJrkF3fjedEzYfuutVsEkJkNfCXQ3TdYl3Iblhju4XqmIGFtmqwgo5i0DQFPJS5El+3zK/AlVfSGWnogLknDPDBFe/Z2u5uaMH0JjCuV7VR9L9dY7W2mNMt2PNQuccs82YtWOHzuRQZqUHvqZRPNofWsH4= 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:(13230016)(4636009)(39860400002)(136003)(396003)(376002)(346002)(36840700001)(46966006)(40470700004)(186003)(336012)(356005)(2616005)(81166007)(36860700001)(8936002)(47076005)(40460700003)(70206006)(70586007)(5660300002)(83380400001)(4326008)(8676002)(82310400005)(40480700001)(44832011)(2906002)(6666004)(82740400003)(53546011)(41300700001)(26005)(6512007)(316002)(54906003)(19627235002)(6486002)(6506007)(478600001)(31686004)(86362001)(36756003)(31696002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 16:21:56.0429 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c1d4b34-4bb8-408e-2873-08da852398e0 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: VE1EUR03FT021.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5176 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 +++++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/ArmPkg/Include/Library/OemMiscLib.h 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 @@ > /** @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; > > > > 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 > > ProcessorSubClass.c > > > > + 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 = STRING_TOKEN (STR_PROCESSOR_PART_NUMBER); > > > > 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); > > > > if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber)) > 0) { > > @@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings ( > OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04); > > } > > > > + if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) { > > + HiiSetString (mHiiHandle, PartNumber, (CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion), NULL); [SAMI] Should the second parameter be ProcessorVersion? > > + } else { > > + OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion, ProcessorVersionType04); > > + } > > + > > // Processor Designation > > StringBufferSize = sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH; > > ProcessorStr = AllocateZeroPool (StringBufferSize); >