From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.8816.1678171307631357616 for ; Mon, 06 Mar 2023 22:41:48 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=BSV1Yl8f; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678171307; x=1709707307; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lOR+43CBdKsVvYm7yfAWs6BopL0xsWONvEJUavDMPsA=; b=BSV1Yl8fenKT6ewDRUR6U6pvzF62Cjl89sI26I1wtXxzQ66Zx9hI0KBk gxAlz01/RTYY/PkxDlwkKKKB6J6KS8tBL3gjxQji/heXlMMv8LhRDSdGp Cn57GO8puHl9it3W5iLUOn/MPTR3iQauzMzkj5QAPMYZ94QeoWobCo3QA qzopmAXsGDxpNtW/vEOollxTMEHEJJKgA/4wNT5un3uTOcWwtpf1UoDUu K5es7EUWSFR0yEDHp2qEkmV8BiKeEFZ9pFQnW+ChsFnDCUGooTYevl+7o T3EZ8+lIFOO9GhDxFqn3xuwIDNxUtlgptxBHvpaYMTdjGrA2Qzu5h4qVo A==; X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="324082790" X-IronPort-AV: E=Sophos;i="5.98,240,1673942400"; d="scan'208";a="324082790" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 22:41:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="626433422" X-IronPort-AV: E=Sophos;i="5.98,240,1673942400"; d="scan'208";a="626433422" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 06 Mar 2023 22:41:46 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 6 Mar 2023 22:41:46 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 6 Mar 2023 22:41:46 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 6 Mar 2023 22:41:46 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Mon, 6 Mar 2023 22:41:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PebV4x55eXvf2mm6U24DfF0LJApOV8Y/ketPTukAH5Zlqs9GWop6TJqnyuXRBGSq33BAKWnkQnxqrQXobaWljrakQNrEfcLopN2RmdtvSnU0ifw9nerOOWs1HCHETIMxus+56ecicsS8w7BkWpr/CZaAAwAIhGdaC6K7yMxN1fQCmyitwiopPXnO1CnDsWoyyoAbmhTwF2lKo7j6Yi8qHt+L5pb55fhs7pQs6wJFnlJGd3bRVY24h1GxkmC49S+42zKQLRpOfa8p++E0a3GmJqn11UuKJytep5JQuvfaoQqjbToFRFvAq4iNue3brGRvds5W1PTI9Z/4WzT4YldMtw== 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=3KNpvqPa4r9nbwx+2iRaIpizEIAOLf6ane0ZqYz9WI0=; b=YYYZw5Uvx3if8YyW6tt0DwrMw6XxqZTNaNP25iGsPFYjFgp/4Lj7PH5ga6HOG2vvxJs/W0QJWyGqO/jkdFgvretDY0cYqTA4Frho5jNA0DhgfBCTVSy0Q6zZZ7P/9sObzRBqbHAtG/oCFz9g1tdMO54a77sIfXOl6/cLdw32GXCjYNYKs1x+cTJbsXoXq9uTwtwMV7RdckAh3Oc4uFY7N1YjxbRBUooXYCsmSvUAmvABQCNUxUlpvubN/RLKhbTxX/LiGrzzpcDAAaibWgbD5VH54dv/IVg8XNlyszRJhLiPwMxTxg0fuslCZGDzOS5TwAZ1gXUwf0TefeYz07nDhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DS7PR11MB6269.namprd11.prod.outlook.com (2603:10b6:8:97::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.29; Tue, 7 Mar 2023 06:41:43 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::e342:cbf5:6c57:e8d6]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::e342:cbf5:6c57:e8d6%9]) with mapi id 15.20.6156.029; Tue, 7 Mar 2023 06:41:43 +0000 From: "Ni, Ray" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann , "Zeng, Star" , Mike Maslenkin Subject: Re: [PATCH v2] UefiCpuPkg: Calculate DisplayFamily correctly Thread-Topic: [PATCH v2] UefiCpuPkg: Calculate DisplayFamily correctly Thread-Index: AQHZUL6BrFlYPGMcbkSIRqUOKtXyg67u3kdA Date: Tue, 7 Mar 2023 06:41:43 +0000 Message-ID: References: <20230307063136.1615-1-zhiguang.liu@intel.com> In-Reply-To: <20230307063136.1615-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DS7PR11MB6269:EE_ x-ms-office365-filtering-correlation-id: 4956fb6f-9ec9-4729-abac-08db1ed703eb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: m5FYrwa05L0YGug9AnUglUIfQhMmyOPQB9pU3cR6Ev7OAftFB/UpxyHu/xxjgn/9fArnVA25Tav/JcvXoTnUT259d0ni+3CKZepAWszlVQvMV0aFB3NKaOcq6tnSRLYjv839P2001nCjccyE8ftnCQjpd1+mNVH+b1ePBJiiBrP7aFzL9RfZgcoUoRazTdWTNdoOGf2YUa/vaGeeca7ewvKOTsmZo+KZC2uYWnxsMN5iiEokJXAAwgTWaFkutlAesJVIlyrunO6832nVQ+LR7xfi6WcNwYnRufvzrnFbKGB42tyxhQ+uxwtLtJgtGPjb3DHNFBGT1mdC5Gyt7Pl2Vb+3MGdILaGlxAwkau0TNSQ40iJN/okBImwFjFWO21Z2DvCksqq5fEFetHqNbitzhDnumvh0S96RkRK8r7HdsAGbnAPIlhhGV1ks+rs4hIKNCV+GnF3niaELry1vDK456K4FZEq8uIWPQZRyd9RkRo0hlXY3BYGkZqQ5sGUap4CBroUGSsLpSiAaF+4THql016y2to5gGFCNvCq3j3cUNFO4U+pENByE+iaBeZYz6KvGZv4+3oR+Xfpf3QABJjHmUXCTQWr0w7zZfBSwVQk9LOOrbDVTdLa/jI74H/9tt9OxrRYTEk2bvDCIvqi68VpihMvyoHqYXEH4+uQsH0+fR3UG6SR52UPAy65couOggrpc x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(396003)(39860400002)(376002)(136003)(346002)(366004)(451199018)(52536014)(8936002)(76116006)(5660300002)(66946007)(8676002)(64756008)(66446008)(66476007)(66556008)(2906002)(4326008)(41300700001)(54906003)(110136005)(478600001)(316002)(71200400001)(7696005)(26005)(6506007)(33656002)(966005)(53546011)(55016003)(86362001)(122000001)(82960400001)(83380400001)(38070700005)(38100700002)(186003)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XeZN75SUqL0lIfrj5FTFt6819ZNM7oBUmPFrXVFEw1shm4UbqAHfP8IVwi29?= =?us-ascii?Q?627q9EKrJ0T1zfUYALUwaHGqum5K3B1v3n4kvefKp4wWYJErJ7tHlIC9zfP3?= =?us-ascii?Q?Z3ePY06J5Y5cXiTuedhzaqX2emOSWxxd7WNEuoM7QV8imR7Onp7rgFeISox0?= =?us-ascii?Q?R1JhlGZF0L13DsQbrUonvdneC3y8X2qxc+SzdRljbd9EkUlHhJOej+QD/PEb?= =?us-ascii?Q?tx7KN9Dxi23j/H6fOwKv6KDC4lgQMd5DHBqhFvlvpDrPrJnIzzF9pEaMzmKN?= =?us-ascii?Q?hG2tqV3A/HJsSjzxpZu+veDoAA3jq5EgmZ+Lkr6Y/5MQ839nc1eyqtuyrNhE?= =?us-ascii?Q?7pwlYWrca1A3Igup4QXWirJGUM2FvFV0SmIs0f6vHbo6tv40/0jq282IwiSI?= =?us-ascii?Q?fZ9MILeJVXExMOHADOhmdgrdSKo7XSO4g8fUCmI/llNfcWbilfAf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An1pya+/v3sV+WwlpO+7BD7Hj6squ+WrPrHXOAhxpTxa1Y+X?= =?us-ascii?Q?Xet9H+X/16OGyFrPKXXhvhKpBaAeE+hu/Z7bvsHmvw2d+17EcXvMSncZwdxX?= =?us-ascii?Q?5KEJI+8fZFA8bVVj9nqYAO9dmSJCT1LAZdxRkRwV0utu5hAJ2UIIjqlYiKZf?= =?us-ascii?Q?1iAu+6UW6jNwS4loz1xPaQIVkAunmqsSdfr7Lhd/Vl/XQUVLdOM+psdIw2M/?= =?us-ascii?Q?/j8hMch9qas7naWM+7qHnzOw0fHE9LhXlOUhk8hW?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4956fb6f-9ec9-4729-abac-08db1ed703eb X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2023 06:41:43.5479 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5V+Ck7UkMfozCaxdqQtkmr4b8WkEcETnhUqXWB8aqm3rRpc86OYK1VQvI73YhtwZ2ui+MgztRsHKgPUVEl5bkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6269 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Liu, Zhiguang > Sent: Tuesday, March 7, 2023 2:32 PM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Dong, Eric > ; Ni, Ray ; Kumar, Rahul R > ; Gerd Hoffmann ; Zeng, > Star ; Mike Maslenkin > Subject: [PATCH v2] UefiCpuPkg: Calculate DisplayFamily correctly >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4348 >=20 > Per SDM: > DisplayFamily =3D Extended_Family_ID + Family_ID. > DisplayModelID =3D (Extended_Model_ID << 4) + Family_ID. > Correct the related code. >=20 > Cc: Eric Dong > Reviewed-by: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > Reviewed-by: Star Zeng > Cc: Mike Maslenkin > Signed-off-by: Zhiguang Liu > --- > UefiCpuPkg/Application/Cpuid/Cpuid.c | 6 +++--- > .../Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/UefiCpuPkg/Application/Cpuid/Cpuid.c > b/UefiCpuPkg/Application/Cpuid/Cpuid.c > index 372c6ef87d..172476a275 100644 > --- a/UefiCpuPkg/Application/Cpuid/Cpuid.c > +++ b/UefiCpuPkg/Application/Cpuid/Cpuid.c > @@ -1,7 +1,7 @@ > /** @file > UEFI Application to display CPUID leaf information. >=20 > - Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
> + Copyright (c) 2016 - 2023, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -217,12 +217,12 @@ CpuidVersionInfo ( >=20 > DisplayFamily =3D Eax.Bits.FamilyId; > if (Eax.Bits.FamilyId =3D=3D 0x0F) { > - DisplayFamily |=3D (Eax.Bits.ExtendedFamilyId << 4); > + DisplayFamily +=3D Eax.Bits.ExtendedFamilyId; > } >=20 > DisplayModel =3D Eax.Bits.Model; > if ((Eax.Bits.FamilyId =3D=3D 0x06) || (Eax.Bits.FamilyId =3D=3D 0x0f)= ) { > - DisplayModel |=3D (Eax.Bits.ExtendedModelId << 4); > + DisplayModel +=3D (Eax.Bits.ExtendedModelId << 4); > } >=20 > Print (L" Family =3D %x Model =3D %x Stepping =3D %x\n", DisplayFam= ily, > DisplayModel, Eax.Bits.SteppingId); > diff --git > a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c > b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c > index a8e4f920fc..552fdab417 100644 > --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c > +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c > @@ -1,7 +1,7 @@ > /** @file > CPU Features Initialize functions. >=20 > - Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
> + Copyright (c) 2017 - 2023, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -67,12 +67,12 @@ FillProcessorInfo ( >=20 > DisplayedFamily =3D Eax.Bits.FamilyId; > if (Eax.Bits.FamilyId =3D=3D 0x0F) { > - DisplayedFamily |=3D (Eax.Bits.ExtendedFamilyId << 4); > + DisplayedFamily +=3D Eax.Bits.ExtendedFamilyId; > } >=20 > DisplayedModel =3D Eax.Bits.Model; > if ((Eax.Bits.FamilyId =3D=3D 0x06) || (Eax.Bits.FamilyId =3D=3D 0x0f)= ) { > - DisplayedModel |=3D (Eax.Bits.ExtendedModelId << 4); > + DisplayedModel +=3D (Eax.Bits.ExtendedModelId << 4); > } >=20 > CpuInfo->DisplayFamily =3D DisplayedFamily; > -- > 2.31.1.windows.1