From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id EA3DA7803E5 for ; Thu, 23 May 2024 07:31:56 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=85wALWRC7KeKyt40euZLNUidcj4Yyb95wvhiSjfEPVM=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1716449515; v=1; b=XJPhvPhRTXgrnMb8NZEJF/ppDGz37M+wHxJcvO6v+haW7xeTDLQ3GmT5G2kSTJqgtqJIwEro Jcl0gKR6ld3TWHb2mwh9K5yAtnjfPqX8Cbmv4vDZwlfW/hnj0+zNCdirkLCOZ1dUJEXzEj/haVQ 5mG4Zb5M8fzB7ymp52TYA5jIEFtux6GMV0y2DiJXg57uBl+3b8txAdwgUefjAlfGH4m0cYTLnTa lL++BNOYFXqveUcdXaqfbXMgU7dD1mZQeLP2b2nl06b+PGOiaf85qnaBC/jaTcFj2z6bfU0Jvns JwpEAe7pCiqYuAQf6a9UtsbCAWsRoE0R+NqJ7Q66hmJig== X-Received: by 127.0.0.2 with SMTP id Mkc2YY7687511x4ykwnJFt6v; Thu, 23 May 2024 00:31:55 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web11.11382.1716449514495015632 for ; Thu, 23 May 2024 00:31:54 -0700 X-CSE-ConnectionGUID: 2dspB5/HRUm084sZTvFIyw== X-CSE-MsgGUID: /k6Fl0vtTcadEVWbmzov5g== X-IronPort-AV: E=McAfee;i="6600,9927,11080"; a="23320842" X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208,217";a="23320842" X-Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2024 00:31:50 -0700 X-CSE-ConnectionGUID: GCv7GbJAQayxrTZsL3EGeg== X-CSE-MsgGUID: +LAZshviQWmuGw3V0sBkcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208,217";a="33471344" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 23 May 2024 00:31:49 -0700 X-Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.39; Thu, 23 May 2024 00:31:48 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 23 May 2024 00:31:48 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 23 May 2024 00:31:48 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 23 May 2024 00:31:48 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SA1PR11MB7037.namprd11.prod.outlook.com (2603:10b6:806:2ba::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Thu, 23 May 2024 07:31:45 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::41a4:c775:32e6:76a8]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::41a4:c775:32e6:76a8%4]) with mapi id 15.20.7587.035; Thu, 23 May 2024 07:31:45 +0000 From: "Ni, Ray" To: "Feng, Ning" , "devel@edk2.groups.io" CC: "Wu, Jiaxin" Subject: Re: [edk2-devel] [PATCH] Pkg-Module:UefiCpuPkg/MpLib Thread-Topic: [PATCH] Pkg-Module:UefiCpuPkg/MpLib Thread-Index: AQHarLuzYralCt7JV0Cj2+JNbau5ibGkaMxP Date: Thu, 23 May 2024 07:31:45 +0000 Message-ID: References: <20240523111303.2929615-1-ning.feng@intel.com> In-Reply-To: <20240523111303.2929615-1-ning.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SA1PR11MB7037:EE_ x-ms-office365-filtering-correlation-id: 9e26bf8e-579e-4ff3-476e-08dc7afa662f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?iso-8859-1?Q?gtfzaSitJKrM3ysMEIu/9An4Yh04dlVX10aLrJLNfYfTGOceSZWKrYWIrH?= =?iso-8859-1?Q?fL9HZk03n3HhU/FkOq3ci3eXUonIiXENmG2rxgcDcu2YyTwLlMpb27obCs?= =?iso-8859-1?Q?B7N//JNxRn5FNmQO0hLkWU4oDtqXn72aHpgQDbTie4nqVJXPdc4HGCA1+W?= =?iso-8859-1?Q?6bkD4oPn4kwh7g/EwQHCkdEQO9oep8E0Q1XMsruNJ827LcYwgq+TUpKuKl?= =?iso-8859-1?Q?mTh+E1Rq/S5vglotbRw9pV6jXjAVikd9ndmieePOUp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JWk6Hu/n3B0hJ8tN4yrQu2zR1VMv9vIEdllsh1dHyQIFQfie?= =?iso-8859-1?Q?rxfx6iAGaZabBN2iLihLDDH0Nxpv/XCPys8NjoZIkfXYNWLk2pRwbFHAAD?= =?iso-8859-1?Q?Bf9HN1vy0nqlT82M5OscxZTfyqe61GyJzS+MuYhmnXYeNovvXKRO0e9X7Q?= =?iso-8859-1?Q?r1ayUVGndeWFdWbVUFuqoGtZ3w=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?GdYJ5D0q5tiE3m26GSMct4ox9DCYMu0Q3D3juf7C/EReEQMNaMjO0qqu0D?= =?iso-8859-1?Q?iZtXCwtbDQPN4ibHzL7Rq0pKKff3cUmjh3O8OgRcyLM6o9rTgVrxXsQef1?= =?iso-8859-1?Q?ppj6c/3SLgaLNh5ZcwjV7xUePZDsiFOg8qyYzUnU+kHCO3OKw/0Eq9U6qj?= =?iso-8859-1?Q?iP0b4/cXlPp3SIxDEK0WBUiqDkaB4JdUXkoD/ClZ+KUs2kJQGoFVs70iOy?= =?iso-8859-1?Q?PjnDI7LGvm4saumirtfcSvHuCIgO8+bfgZ+c99i81JMLgcxI5fVMYmOwRB?= =?iso-8859-1?Q?DxxqBqZtgxLrcoFhRu+V39BvG/P/dRLfoeNSax5ESJ4vMn3dblQg5j1905?= =?iso-8859-1?Q?e5YwDSKD2otWY/5JH9+wQ9oMyBOY38OgRswH7m6Un0ssE/hrxo+2G0R23a?= =?iso-8859-1?Q?VoTwiCeJZg+UIQ5sHchzOb6h4ZsAZmh/eXaFbyShxYadaanAYD1Qj1Fy0R?= =?iso-8859-1?Q?M3LMZd6xMMTbZX6amWg95/26b6DhBlsLDH/lEJALyA7S4dHzOclswiA6L6?= =?iso-8859-1?Q?3YfbPwwsz50HWMm10UWoTqzwaZoHpPrNZ6MeaizKzOrlx828l3jUrl6IdP?= =?iso-8859-1?Q?Oqr9oPxCnG9wue0rJS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= =?iso-8859-1?Q?uGhCwfDG2qbl6tDnkPUpdmEPmNpCQ78zvr/fm1D2RYcAVzBzi8F7mOwT0B?= =?iso-8859-1?Q?ZSUFP1CpauIICoGix/CQsmkQVmNdFLWxPGqZlY8w0c/5bi2Ji8I5YfwhG2?= =?iso-8859-1?Q?3iJ09ZVplUOK8=3D?= 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: 9e26bf8e-579e-4ff3-476e-08dc7afa662f X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2024 07:31:45.4121 (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: gCVWGmurRUhDz0+yWVvzk526Pylm29w/PiKkBz0fyFIhY96v6ILESox85aq1xIca8LU+B7kzfuEae9sn8LoB5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB7037 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 23 May 2024 00:31:54 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: AqPB98qqYHaP7TGITcUSvRjox7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82444EAF46771A1993C718648CF42MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=XJPhvPhR; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB82444EAF46771A1993C718648CF42MN6PR11MB8244namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ning, I tried to run uncrustify locally and still saw additional changes. It migh= t mean the code style doesn't follow the uncrustify. more comments embedded in the patch mail starting with [Ray.]. Thanks, Ray ________________________________ From: Feng, Ning Sent: Thursday, May 23, 2024 19:13 To: devel@edk2.groups.io Cc: Feng, Ning ; Ni, Ray ; Wu, Jiaxi= n Subject: [PATCH] Pkg-Module:UefiCpuPkg/MpLib [Ray.1] The subject should be more specific. E.g.: UefiCpuPkg/MpInitLib: Do= not assume BSP is #0 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4778 MPlib have wrong expectation that bsp id should always be 0 in [Ray.1] MPlib should be MpInitLib. "bsp id" -> "BSP index". MpInitLibInitialize(), SwitchBsp(),ApWakeupFunction(). That will caused the data mismatch, if the beginning bsp is not 0. [Ray.2] "will caused" -> "will cause", "beginning bsp" -> "initial bsp". Use CpuMpData->NewBspNumber insted of index 0 to avoid the issue. [Ray.3] "NewBspNumber" is only used in SwitchBsp() but not other places. I = would just delete this from commit message. + // Restore VolatileReg saved in CpuMpData->CpuData [Ray.4] "Restore VolatileRegisters saved in CpuMpData->CpuData". // - InitializeApData (CpuMpData, 0, 0, CpuMpData->Buffer + ApStackSize); + InitializeApData (CpuMpData, CpuMpData->BspNumber, 0, CpuMpData->Buffer = + ApStackSize * (CpuMpData->BspNumber+1)); [Ray.5] "BspNumber+1" -> "BspNumber + 1". (spaces before and after "+") -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119133): https://edk2.groups.io/g/devel/message/119133 Mute This Topic: https://groups.io/mt/106256300/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB82444EAF46771A1993C718648CF42MN6PR11MB8244namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Ning,
I tried to run uncrustify locally and still saw additional changes. It migh= t mean the code style doesn't follow the uncrustify.
more comments embedded in the patch mail starting with [Ray.].

Thanks,
Ray


From: Feng, = Ning <ning.feng@intel.com>
Sent: Thursday, May 23, 2024 19:13
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Feng, Ning <ning.feng@intel.com>; Ni, Ray <ray.ni@= intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [PATCH] Pkg-Module:UefiCpuPkg/MpLib
[Ray.1] The subject should be more specific. E.g.: UefiCpuPkg/MpInitLib: Do= not assume BSP is #0


 
REF:https://bugzil= la.tianocore.org/show_bug.cgi?id=3D4778

MPlib have wrong expectation that bsp id should always be 0 in
[Ray.1] MPlib shou= ld be MpInitLib. "bsp id" -> "BSP index".

MpInitLibInitialize(), SwitchBsp(),ApWakeupFunction().

That will caused the data mismatch, if the beginning bsp is not 0.
[Ray.2] "will= caused" -> "will cause", "beginning bsp" ->= "initial bsp".

Use CpuMpData->NewBspNumber insted of index 0 to avoid the issue.
[Ray.3] "NewB= spNumber" is only used in SwitchBsp() but not other places. I would ju= st delete this from
commit message.



+  // Restore VolatileReg saved in CpuMpData->CpuData
[Ray.4] "Restore VolatileRegisters saved in CpuMpData->CpuData&q= uot;.




   //

-  InitializeApData (CpuMpData, 0, 0, CpuMpData->Buffer + ApStackSi= ze);

+  InitializeApData (CpuMpData, CpuMpData->BspNumber, 0, CpuMpData-= >Buffer + ApStackSize * (CpuMpData->BspNumber+1));
[Ray.5] "BspN= umber+1" -> "BspNumber + 1". (spaces before and after &qu= ot;+")


_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#119133) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB82444EAF46771A1993C718648CF42MN6PR11MB8244namp_--