From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.10307.1622621910326332962 for ; Wed, 02 Jun 2021 01:18:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=GFgVP0Kz; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: ray.ni@intel.com) IronPort-SDR: mp+ihPfnilzPRJLHB/ESV+rTxhUAOetihOk35gyM9GwTm5kDjFVe155QeH+AxIJokHUNdMd+1X L4KIOSfPsXUg== X-IronPort-AV: E=McAfee;i="6200,9189,10002"; a="203550038" X-IronPort-AV: E=Sophos;i="5.83,241,1616482800"; d="scan'208";a="203550038" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2021 01:18:27 -0700 IronPort-SDR: oMS0OgN+zvgoSuxVm9AxEQAYWJwTmBlbqL0tlbALOLAvz/s18QOS20lVM6qp2LwXdbTSWYxaAD c/44VFDj1VbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,241,1616482800"; d="scan'208";a="633153080" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga006.fm.intel.com with ESMTP; 02 Jun 2021 01:18:26 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 2 Jun 2021 01:18:26 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Wed, 2 Jun 2021 01:18:26 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Wed, 2 Jun 2021 01:18:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aQAPHwAwkk9uc7ESaaoA9o3hvlH+zNReEzlZaSTztFoMBSBs3xnt36dHnZBmcqWxmU7zRQA8EGduUqoeLgwPm0Ny3+OE3M+9QRbEEF+R616fjHLQKfh4r+NwfE9danzsxIvnNbiLuEMQmHHVZHVjjWWESd5JD0j5BBRLmVbj+RsMD6FCfCKN4TDCBbHwmc/DLBhpYk5s7Y/2PStpQx9B8ZKFw+of8/icH+NAjZsZswivwWLuGPRCeuCL9fEUw3CEK6VYPHwFle42YEyIT/3BVx9iM8LIqpENBNOdOxCe0J9nUNbcwRAkMPAyPd7jSIC6nV7z0dy0yV3vOQGYF6EE9A== 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-SenderADCheck; bh=SU5sBUgSv1vmGX9CXWjZrAo6Rzz44XgpFO9RRi2VETQ=; b=ADmIozI3WAc/C5FQZmOBK/VxCKSozZ8nIJUVXZA2K3yO1LxDsWrMnvbp5OOg4kWq8JlFm411jW9yyEbqhM8YRcDVURfsM4jo/MRYPP8brwF9+VaGdbZgWnPZ0h5GDYRyJhQxdvYcbVnxYn5/BbYFSu5rL2vdWE9h1xhJA2elqNzaIAr6N8WbVKa4qHmHjmR2lx3tKdDdJ+VM6GxL87BN5Omsv+R+FLsLv1PusG7YLru8czA2RmYYNtbtgR+O2YHcj8KJIsryWtbsr6zDBUM0ogm128D7M5QOjoTiKEVHZOY6eul3yBzE8bYzMX/wd5VnA0W7Y+FGa37I+4gVXGLb6g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SU5sBUgSv1vmGX9CXWjZrAo6Rzz44XgpFO9RRi2VETQ=; b=GFgVP0Kz16kgkvgNG1Oqwe0tct03q+fPWw7VWwY2RugW2C14wU00GbSN4BQ9Dr6a42YENgx22o6z4l9S2emAr1CmdNH6IS7qK4RGMb0aRkqU3bsHyHwzl/fzQx0B40dbjwMMZQRKNjGG+A9DeCPdvdbgknBYgnsaGd8BknOPSaI= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MWHPR11MB2016.namprd11.prod.outlook.com (2603:10b6:300:26::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.20; Wed, 2 Jun 2021 08:18:18 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::59d6:8b94:55bf:36e7]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::59d6:8b94:55bf:36e7%5]) with mapi id 15.20.4173.030; Wed, 2 Jun 2021 08:18:18 +0000 From: "Ni, Ray" To: "Li, Daoxiang" , "devel@edk2.groups.io" CC: "Dong, Eric" , Laszlo Ersek , "Kumar, Rahul1" Subject: Re: [PATCH v4 1/1] UefiCpuPkg/CpuCommonFeaturesLib: Correct the CPU location check Thread-Topic: [PATCH v4 1/1] UefiCpuPkg/CpuCommonFeaturesLib: Correct the CPU location check Thread-Index: AQHXV1uY/x7uAIZB1Ue2iCN1YDi0CasAYMkw Date: Wed, 2 Jun 2021 08:18:18 +0000 Message-ID: References: <20210602030113.152-1-daoxiang.li@intel.com> In-Reply-To: <20210602030113.152-1-daoxiang.li@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.143.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 56e0506d-0526-4b6d-c196-08d9259efa9c x-ms-traffictypediagnostic: MWHPR11MB2016: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0Q8hWBurtaAVE0GlOn1z93zoqYga0NglWBIMYZ8a2wRxNPivnetOELWeYnh7lRvHg2UcEUe7YW9S8ZpanruxMGYdUvJI/wsTsjzUPdrPDs7P5lebs98EC4x/DQ+6AiUduhkIlh1wFYoM4tmnEwMc3LKaSP02f9BzCWEVfERhYrzfniBMUhX/u504b/1wx7IEDmS5eX6PdO/+QsfiL7YcJUO206BSJ9Rz0sGy0rVI18K1VXsOKjhr2+vaNsjr/dcNTiGXPOMLZwuNLJvBN5uUy77oEmGrKCHu3EzzmdYQlFfF6DKMR+s50h1XH76/RxP/fyzG/dga50hQjVzvcM0slv2gDZcWkBKwXGkyhJBf5ugzLAR1w0SK4B+aNjrUOxlQsoQLSAmQr2tIPixI7gEcY6d4FMK9DDmF50hQyPgudht9cw9wgP2vkpmX5bLwjgAtdW+T6fheJGgNCivLlEECw9f1vc24xPeIFK2chnRoK2X7+6v9GrJPy6Qn3VOS+pICQXvRhRUUKB7/CnJxy5VV81uuMVMRVw7F6pwU+cER7cPD/z+htEYd64wAqyfr1BZAg8wSgYqF1bPknKxCBh5rl+nyRS4Obm4wM7VaTZsLz3KHzBVKA1KEy9Ruj8QlvXufk90gMURCGbvt8ZTJVgiFhTilgEYv+KQXXQq52jTwfcJGTc0ezkbATnlSNrolTfPTg6Xb9y5gRwLQIwasdi2bzA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(396003)(366004)(136003)(39860400002)(376002)(2906002)(316002)(76116006)(26005)(186003)(4326008)(66476007)(64756008)(66556008)(66446008)(107886003)(33656002)(110136005)(66946007)(54906003)(83380400001)(6506007)(9686003)(55016002)(122000001)(966005)(52536014)(38100700002)(86362001)(5660300002)(53546011)(7696005)(71200400001)(8676002)(478600001)(8936002)(19627235002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?SJ4w+iu16s1Ew7Na/GP8ZeGh42H5GdO6MEkht0tnwD7RzCZPEi40RKFXH6i0?= =?us-ascii?Q?FPwZQCem3D11eK5ZkPC12b8ImMZ2sbZj8ytFuT0fWcS0cRv2st5Pjc6HViUP?= =?us-ascii?Q?7xoqs7w8gG+suogtkje0so1vBwF3ZVLXvT7bRC4XSiRHTmHXA0rpRkpSCGJf?= =?us-ascii?Q?tUvZj1pZJLDeEMVgVAx6mZ9r3JA5Q9q5dEySXqBymh+O7xiYoRIRIWFjBGGX?= =?us-ascii?Q?xfEpeEUO2NGS7kXnSxDtTiQIaGknscKYNURIY4fInaEU3SbNp40qVzzQ3KuF?= =?us-ascii?Q?4ioFBwA98zZPeg/ZLkLFJAxKzOBITOeoV3XFpPngd1/eff1JF2Xnh4niNQW9?= =?us-ascii?Q?XKG2TKwFDO6mIsAT2wb02cAtAed1Px/hSzbmIikAfUtEZH8iX0FxZTrqVXYn?= =?us-ascii?Q?M+FeGAm3QoFv2cujB2CMZgIte1TY0nzv198w49ZL9Tu5sH4T2AUJFsiV4qLj?= =?us-ascii?Q?IFJh49RPF7vmt5HEybMddSxcZd/OSeCjK7AGjF2VXKE57+lrQWLkhOvmA8xZ?= =?us-ascii?Q?vH+5NyWUdECXsZhgQde0fsXS4GnkS1vo8KWsNXADb2was4yyc7m27A/SrNg5?= =?us-ascii?Q?Eb5LIjWJZ5Z/FqS2OLo0GxL2z35KMEyDmQXytqPmf/S4//Ay4WK6jE4Ll7zx?= =?us-ascii?Q?A0WrCtecWOQ3W0rzu/3BrdA3r3OGY2Ygw/f/3L2KH0DTsGwkVMs4QKPN5rNC?= =?us-ascii?Q?GsE9rJ7q35bUO0XPobzD+WLaqpV6tmRWcSxX/UzZtsRQhShQv54u1FvpaT45?= =?us-ascii?Q?NNRwPqHCWmevmGmrle+RorKn1q65nxAflCGC/d+z9Rer8SFrkbLIrPy92/jq?= =?us-ascii?Q?u8Vm8VeRpzkZIn2aKsTa/YsXY/yooLTtmiHUBzAtaq43hsDdRLIi+5ZE5FQe?= =?us-ascii?Q?0mOPchJ9rWCxTLFiavBXLYaiwVbfZD8FZzzCG9q3dls9o0q0ZQ4prH2FAeSw?= =?us-ascii?Q?7FD+LirmwTYXu8Tav7rXXXTnz3htluOL/JsqOGD0ZozFuiHauFH1MX+xlWPR?= =?us-ascii?Q?Xf//7ZIHo5Awqi6nlV20NYSoCKE7gZS9OEJzhLlkgZ+nztBfVa6mF6t9PgV3?= =?us-ascii?Q?mqbgyE8hwp9d3WpwpwCiMdeJDyBXrJbB57j08Eqa7pYxIQY+coE73X2l3aP5?= =?us-ascii?Q?jWNf3MExVm8pUYmYwrfGeuK+js/h2gOzoOM41QaVQiXZvLxDNrqlThqPT5FI?= =?us-ascii?Q?TzpYspLxvnXFJ6pfMeAkBJY8TvJCXLHj4NgaDnpKIxOwhY4KUxd8lfyH4qgy?= =?us-ascii?Q?dGAaHk6/WT3EglHGPiyBk+oDUAyGu9nCRjBTL67Gj7elef8DEaTSj2Y9/Svd?= =?us-ascii?Q?UDTS/eX/nwVBBODV9yDafGXU?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56e0506d-0526-4b6d-c196-08d9259efa9c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2021 08:18:18.8467 (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: ee8RFjFV3SUam4cQBn4jnFag0KWoOAyyhO2ffsoH3yOmIOEm7zR9mHJb9xFB3A9xDTq+9SRP/efZXAaOffQ1Gg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB2016 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: Li, Daoxiang > Sent: Wednesday, June 2, 2021 11:01 AM > To: devel@edk2.groups.io > Cc: Li, Daoxiang ; Dong, Eric ; > Ni, Ray ; Laszlo Ersek ; Kumar, > Rahul1 > Subject: [PATCH v4 1/1] UefiCpuPkg/CpuCommonFeaturesLib: Correct the > CPU location check >=20 > From: Daoxiang Li >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3424 >=20 > Processor location information check needs to updated > When Core 0 is disabled. >=20 > In C1e.c, change MSR_FEATURE_CONFIG to MSR_NEHALEM_POWER_CTL in > comments > to match the correct MSR name. >=20 > Signed-off-by: Daoxiang Li > Cc: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > Cc: Rahul Kumar > --- > UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c | 4 ++-- > UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 4 ++-- > UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > index e6e5db75917c..6f9685733202 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/C1e.c > @@ -63,9 +63,9 @@ C1eInitialize ( > { >=20 > // >=20 > // The scope of C1EEnable bit in the MSR_NEHALEM_POWER_CTL is > Package, only program >=20 > - // MSR_FEATURE_CONFIG for thread 0 core 0 in each package. >=20 > + // MSR_NEHALEM_POWER_CTL once for each package. >=20 > // >=20 > - if ((CpuInfo->ProcessorInfo.Location.Thread !=3D 0) || (CpuInfo- > >ProcessorInfo.Location.Core !=3D 0)) { >=20 > + if ((CpuInfo->First.Thread =3D=3D 0) || (CpuInfo->First.Core =3D=3D 0)= ) { >=20 > return RETURN_SUCCESS; >=20 > } >=20 >=20 >=20 > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > index bb5d983d1f4b..a3a2861cee5b 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c > @@ -152,10 +152,10 @@ McaInitialize ( >=20 >=20 > // >=20 > // The scope of MSR_IA32_MC*_CTL/MSR_IA32_MC*_STATUS is package > for below processor type, only program >=20 > - // MSR_IA32_MC*_CTL/MSR_IA32_MC*_STATUS for thread 0 core 0 in > each package. >=20 > + // MSR_IA32_MC*_CTL/MSR_IA32_MC*_STATUS once for each package. >=20 > // >=20 > if (IS_NEHALEM_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo- > >DisplayModel)) { >=20 > - if ((CpuInfo->ProcessorInfo.Location.Thread !=3D 0) || (CpuInfo- > >ProcessorInfo.Location.Core !=3D 0)) { >=20 > + if ((CpuInfo->First.Thread =3D=3D 0) || (CpuInfo->First.Core =3D=3D = 0)) { >=20 > return RETURN_SUCCESS; >=20 > } >=20 > } >=20 > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > index 8450c7ea3eaf..3c4c1bc706ba 100644 > --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/Ppin.c > @@ -130,10 +130,10 @@ PpinInitialize ( > // Support function already check the processor which support PPIN > feature, so this function not need >=20 > // to check the processor again. >=20 > // >=20 > - // The scope of the MSR_IVY_BRIDGE_PPIN_CTL is package level, only > program MSR_IVY_BRIDGE_PPIN_CTL for >=20 > - // thread 0 core 0 in each package. >=20 > + // The scope of the MSR_IVY_BRIDGE_PPIN_CTL is package level, only > program MSR_IVY_BRIDGE_PPIN_CTL >=20 > + // once for each package. >=20 > // >=20 > - if ((CpuInfo->ProcessorInfo.Location.Thread !=3D 0) || (CpuInfo- > >ProcessorInfo.Location.Core !=3D 0)) { >=20 > + if ((CpuInfo->First.Thread =3D=3D 0) || (CpuInfo->First.Core =3D=3D 0)= ) { >=20 > return RETURN_SUCCESS; >=20 > } >=20 >=20 >=20 > -- > 2.28.0.windows.1