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 3953F7803CF for ; Thu, 18 Apr 2024 07:57:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BpBviLSKkZjdyiX/0e7UqKfHZwPHrA+L2TJ85r9JPXo=; 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=1713427068; v=1; b=NJRE1LG8atk644pDNDyVQ66NXt5L+HZwPeVRmMveLRDBoxWL6mHfaJgReifsEtvowlbPCgIM zCJfDtxoWRbwF9gMWEdveETcBAmG5F11bWFCjpNboAM4EQy20LpIMtoMte+OUj4LlByaS5doR5b DRdozEuOj3zyZwjJ61pPMhyZLwQqyXkOHWGs9hhT5uHU8uxEHY/z8612bZ0/gSykK5ys0tiiTBk yISRJRN67eUY3mnxq7/K9Muv/RlzERU85BtvklKnXy+G9DBzeP6JPJnP+FzoaEr+EOZ3O7CbzHv JM4aSG5EbTXfXMemrYKkmgLJkBbQhB4SqOfyD0O7cqhgw== X-Received: by 127.0.0.2 with SMTP id i7VfYY7687511xbhC7GhdAHV; Thu, 18 Apr 2024 00:57:48 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web11.7622.1713427067900731697 for ; Thu, 18 Apr 2024 00:57:47 -0700 X-CSE-ConnectionGUID: MhCrX10hSrWIEBs9rbxJSw== X-CSE-MsgGUID: 3GSQpCf+Q+e7TPCTa8J/qQ== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="20349108" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208,217";a="20349108" X-Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 00:57:47 -0700 X-CSE-ConnectionGUID: QGAAk6dpSmq6WdTxx4nAJg== X-CSE-MsgGUID: 7/7xvVBKRWmthgN6gLk33Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208,217";a="22985030" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Apr 2024 00:57:47 -0700 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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.35; Thu, 18 Apr 2024 00:57:47 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2507.35 via Frontend Transport; Thu, 18 Apr 2024 00:57:47 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) 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.35; Thu, 18 Apr 2024 00:57:46 -0700 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by IA1PR11MB6076.namprd11.prod.outlook.com (2603:10b6:208:3d4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26; Thu, 18 Apr 2024 07:57:44 +0000 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::b0c8:dcaf:59ea:9e99]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::b0c8:dcaf:59ea:9e99%6]) with mapi id 15.20.7472.037; Thu, 18 Apr 2024 07:57:44 +0000 From: "Wu, Jiaxin" To: "Ni, Ray" , "devel@edk2.groups.io" CC: "Zeng, Star" , Gerd Hoffmann , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable Thread-Topic: [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable Thread-Index: AQHakV2InbWMfBDP/0iTmQflUWaSqrFtpnFbgAAC1IA= Date: Thu, 18 Apr 2024 07:57:44 +0000 Message-ID: References: <20240418065556.5696-1-jiaxin.wu@intel.com> <20240418065556.5696-6-jiaxin.wu@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR11MB6158:EE_|IA1PR11MB6076:EE_ x-ms-office365-filtering-correlation-id: 72ad0433-25ad-48c6-8040-08dc5f7d3b2a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: yyU4QyCtY6QTZU/4HxXyb6rdJiI3kkv3r1y5wFK1w+YXpD0j47iekkzNCmoPzvoEbRUUaq4Sg6Fc8RptUZOpi7qsOMK1aa0nHaTG6RIMg2Uh061BUZigBhJmjGTYjWBfWLNFmEbxtX/FOUK4I3K3YO37+jB8uR1K4DcNIty0Lll0AMGXnO4deG2S8Hm/2mbRtx/gLBk7AynYrH7gsG3vkH6et4Xp+GKDXYorFR6Ya0GWF+DRUcRQ2uqWeDBD2ir79v6DNArtzaHuUPpYtlZ3tgPzzHLVUBd/FxYe0XIVJ7k6mgAuYDrM5zE6KfSGX2ALyq8jwDCDNnBbBMfzMiJuZxvjb4CFSDY1PosZoSyqmOyBa4VCk8idYV9c9BhKSX5DBmk7uNuiUgqxjL6oWTvIawD1awzrAAeb5yzWh4dvXI29ifBDcCoyFehUcv/9SbhMhGjMN1JgGvOsrQxVNZXEcuQsPY3SKptCrdapvdSyea/75RwGbQrGPtDoG/pxLfmGkIL7B4tVMwYOa1YWjy1DKRVEn6z+G8fzVJL1r10E4rTJ6WoydbzJW6HdTZtpZPkYkIEs8YcpGPElaMGK9lCqqNIKCte+3XDuVMzDPd/BpeelgAMMeMTJtQHkni4+bWIJu0jp8tBggCFMpDsvKoVU2Bl7cnUgTcGjXhy8oJzWw626ioomQCCMinKrTv6CaQ4b9A6BCnZI6lAObQ4yNBBAq799tTavKpsg228AbJM1r6I= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XGgAAQvLYNGMzez9Q9ACQ0NPprSoQRzfAemFQCLhq7oiPOL9Oe06dxF3XHLD?= =?us-ascii?Q?GN9GCBe8qRfJbjqLVHrtF4DjJDzolnGYXcUmPodCQWCX6eqb8s6+UZ7OJxYE?= =?us-ascii?Q?tknECDTb8OV1KgM2U/VSnhNPZQAn8HFMbjxNx6W2V7c7vWu48lbF7tb8VBoA?= =?us-ascii?Q?d4D6g1OKgfbQ0u1g9qr65tYAXL/M2HRse6IZYz7gHbZhKrxCpsJj050gpZa1?= =?us-ascii?Q?hB4MnR43i3+TFgPgcPTiMukrrCPsNAoB++33tFB3vs6PjdyOQC5egbrf1lGr?= =?us-ascii?Q?QwsB0LlI1mQg9vYnm6GqUhY+apu3Np+Pa7A2n2XpttsiuQlCgZDRhCadzsxz?= =?us-ascii?Q?2Nf+3euVm9dxG10d3X6QSA4XOH4WGWH5JuQwYaXDD9Km7Lk9UcVyTk3JoKPb?= =?us-ascii?Q?nNSdIVl3/2hVWeGG67kTMTVlVspnT3Sy7W3ZLAEYT791lwlb69OzCdIdbnbI?= =?us-ascii?Q?5iTWsAZXen2Xpk8SRZ9IM9MVCjsLFcGuUvSRfJsDaPCzK0Z6Oy1YqYX7nR9j?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kNnnPNmWwnjsL187z8H1ZPNTBYbq?= =?us-ascii?Q?SzQ30byG0WPZ9g7hXrsb1AYAbJTyXgf5AaU7S6XORv7o2TuxgPhDEFmdu/hZ?= =?us-ascii?Q?o3wDKqkNWongO5pmcf4+ZNiYfsx+qsx7eNtiKGJB6tcJRZuZRdKiOxM8nc2L?= =?us-ascii?Q?0Ibyl1jZ2USH0TnbVuapjXZy+PUIHSBwKKbiUlHU?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72ad0433-25ad-48c6-8040-08dc5f7d3b2a X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 07:57:44.7777 (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: 90fBzDlJIaPMVl7mHJvLCtr5tJP4y0v/CxY4KSwurOyhP9tlx0XJb5ievhVI+A58pA/HBdsqoaTMH3avDK0/mA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6076 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, 18 Apr 2024 00:57:48 -0700 Resent-From: jiaxin.wu@intel.com Reply-To: devel@edk2.groups.io,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: jAAtWUxLz62M4i3hZGtOANiux7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN0PR11MB61581D539997F43F5217724BFE0E2MN0PR11MB6158namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=NJRE1LG8; 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_MN0PR11MB61581D539997F43F5217724BFE0E2MN0PR11MB6158namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sure, I will you split the removal of CpuIndex parameter in a new patch. Thanks, Jiaxin From: Ni, Ray Sent: Thursday, April 18, 2024 3:48 PM To: Wu, Jiaxin ; devel@edk2.groups.io Cc: Zeng, Star ; Gerd Hoffmann ; Ku= mar, Rahul R Subject: Re: [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessa= ry global variable UINT64 EFIAPI HookReturnFromSmm ( - IN UINTN CpuIndex, IN OUT SMRAM_SAVE_STATE_MAP *CpuState, IN UINT64 NewInstructionPointer32, IN UINT64 NewInstructionPointer ) { diff --git a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c b/UefiCpuP= kg/Library/SmmRelocationLib/X64/Semaphore.c index 53f3084363..cd6778e3fc 100644 --- a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c +++ b/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c @@ -26,18 +26,16 @@ SmmRelocationSemaphoreComplete32 ( /** Hook return address of SMM Save State so that semaphore code can be executed immediately after AP exits SMM to indicate to the BSP that an AP has exited SMM after SMBASE relocation. - @param[in] CpuIndex The processor index. @param[in] RebasedFlag A pointer to a flag that is set to TRUE immediately after AP exits SMM. **/ VOID SemaphoreHook ( - IN UINTN CpuIndex, IN volatile BOOLEAN *RebasedFlag ) { SMRAM_SAVE_STATE_MAP *CpuState; UINTN TempValue; @@ -49,11 +47,10 @@ SemaphoreHook ( 4 ); CpuState =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DE= FAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET); mSmmRelocationOriginalAddress =3D HookReturnFromSmm ( - CpuIndex, CpuState, (UINT64)(UINTN)&SmmRelocationSemaphore= Complete32, (UINT64)(UINTN)&SmmRelocationSemaphore= Complete ); [Ray] Can you split the removal of CpuIndex parameter in a new patch? Other= s look good to me. -- 2.16.2.windows.1 -=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 (#117963): https://edk2.groups.io/g/devel/message/117963 Mute This Topic: https://groups.io/mt/105593573/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_MN0PR11MB61581D539997F43F5217724BFE0E2MN0PR11MB6158namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Sure, I will you split the removal of CpuIndex parameter in a new patch.

 

Thanks,

Jiaxin

 

From: Ni, Ray <ray.ni@intel.com>
Sent: Thursday, April 18, 2024 3:48 PM
To: Wu, Jiaxin <jiaxin.wu@intel.com>; devel@edk2.groups.io
Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel= @redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>
Subject: Re: [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove un= necessary global variable

 

 UINT64
 EFIAPI
 HookReturnFromSmm (
-  IN     UINTN      = ;           CpuIndex,
   IN OUT SMRAM_SAVE_STATE_MAP  *CpuState,
   IN     UINT64     = ;           NewInstructio= nPointer32,
   IN     UINT64     = ;           NewInstructio= nPointer
   )
 {
diff --git a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c b/UefiCpuP= kg/Library/SmmRelocationLib/X64/Semaphore.c
index 53f3084363..cd6778e3fc 100644
--- a/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
+++ b/UefiCpuPkg/Library/SmmRelocationLib/X64/Semaphore.c
@@ -26,18 +26,16 @@ SmmRelocationSemaphoreComplete32 (
 /**
   Hook return address of SMM Save State so that semaphore code    can be executed immediately after AP exits SMM to indicate to<= br>    the BSP that an AP has exited SMM after SMBASE relocation.
 
-  @param[in] CpuIndex     The processor index.    @param[in] RebasedFlag  A pointer to a flag that is set t= o TRUE
            &nb= sp;            =   immediately after AP exits SMM.
 
 **/
 VOID
 SemaphoreHook (
-  IN UINTN          = ;   CpuIndex,
   IN volatile BOOLEAN  *RebasedFlag
   )
 {
   SMRAM_SAVE_STATE_MAP  *CpuState;
   UINTN         &nb= sp;       TempValue;
@@ -49,11 +47,10 @@ SemaphoreHook (
     4
     );
 
   CpuState         =              = =3D (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_M= AP_OFFSET);
   mSmmRelocationOriginalAddress =3D HookReturnFromSmm (
-            &n= bsp;            = ;           CpuIndex,
            &nb= sp;            =             CpuState= ,
            &nb= sp;            =             (UINT64)= (UINTN)&SmmRelocationSemaphoreComplete32,
            &nb= sp;            =             (UINT64)= (UINTN)&SmmRelocationSemaphoreComplete
            &nb= sp;            =             );
 

 

[Ray] Can you split the removal of CpuIndex parameter in a= new patch? Others look good to me.


--
2.16.2.windows.1

_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_MN0PR11MB61581D539997F43F5217724BFE0E2MN0PR11MB6158namp_--