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 70452D802E7 for ; Thu, 18 Apr 2024 07:48:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=K7VnPMij3H63EcztXUJ/lvYxVqD2NxJAzUYFe6BGvNg=; 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=1713426514; v=1; b=JLZjRmwiC1719SV0C4cQy3ozCb6YOgtk7FLAhaFgSEurBW/EXCvmiOtyVfQd1vNZIt3/ZP3n 4lG+jI5UFn1ygBhi/pudFJW/W+xT6LAmRXQiMEqydhRQPA5xn1jr+rH+favPJ9EZGTGabHNwEvs ln/dJaOv4rzFRcankPD5PqGiwVNOG+A3DVfvUKinqTG0CoA2j4gmaFcgprXdlfjyLtd7MWZCbNk sysQOLj83rlgg9AaDD7KsO5MPh3kvdOxKmyMQ6MparP6gYRx9VvxOZn8G74/tXveCX2qj1BCUbN pFjtOuoJ53iQvifwPj0IOjOpP6e3V+fY2sywVtI1frHYg== X-Received: by 127.0.0.2 with SMTP id ph7IYY7687511xcGQIiq4J0b; Thu, 18 Apr 2024 00:48:34 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mx.groups.io with SMTP id smtpd.web11.7542.1713426513951607459 for ; Thu, 18 Apr 2024 00:48:34 -0700 X-CSE-ConnectionGUID: vOatiJ51SG2PZl/YRFbdIQ== X-CSE-MsgGUID: PNmxaCxKScuuF8f2/H0YDA== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="9176752" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208,217";a="9176752" X-Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 00:48:19 -0700 X-CSE-ConnectionGUID: LuKBMSBrTuORydh3O71MYQ== X-CSE-MsgGUID: 7/RgnK51TgCaNkqm9iChxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208,217";a="23409142" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Apr 2024 00:48:19 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Thu, 18 Apr 2024 00:48:18 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.35; Thu, 18 Apr 2024 00:48:17 -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.35 via Frontend Transport; Thu, 18 Apr 2024 00:48:17 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.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.35; Thu, 18 Apr 2024 00:48:17 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CH3PR11MB8209.namprd11.prod.outlook.com (2603:10b6:610:15d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.31; Thu, 18 Apr 2024 07:48:08 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c%7]) with mapi id 15.20.7472.037; Thu, 18 Apr 2024 07:48:08 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , "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/0iTmQflUWaSqrFtpnFb Date: Thu, 18 Apr 2024 07:48:08 +0000 Message-ID: References: <20240418065556.5696-1-jiaxin.wu@intel.com> <20240418065556.5696-6-jiaxin.wu@intel.com> In-Reply-To: <20240418065556.5696-6-jiaxin.wu@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_|CH3PR11MB8209:EE_ x-ms-office365-filtering-correlation-id: 58e36ea8-143e-4f51-87c9-08dc5f7be3d2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: +cOShz/Q2EjVkll8mwgOlHvjjQv/PjWQDM6Z6WNT/KKsvIX6aqmCnE1J+hFe0fqB6qXsykt4rfQE3IwlLdYCK/ZQpz82f0vxS1/GsmTX4GLaQ1Xu9ytNxx3UtvYNDTJm69r58e/c6uEuGelqHbuRtos1vZSe0kzKntHg4vZN0/oeDJX8fQlvczQj4QsbUjoTAN47BQFXcjJLOvwZ+1+ybeCo3dhd93GmRaFySK/OY0gGaHTfpAiVx/aUEa/2zxGS9EwJjU+xRnCa9MhtiSUxo54PAxWT3mKRQompRTdi07tfIUBBiGG+7OHJ86t/yDNkE2aJX8Z2XOurqizn0qWH1+F3C27JldyJkxfF2o/6FowxWUGY0Krhk7eBZZTB27lTsj6MStXww7fZnKiEUHlx1DkodcnrBwo07GtNFavdYSr51r8owogUqLzMydF/fE2l3UAwHkj4afNac9wW7pulo1TwyEsWDrFY6qIkZ7ToDOAvAU4XnnOhoDqoDJNvBqe48e5lhBdHlSEQTmbb9cVSGDZZPSPaHuL0spqJhm8r53WMacNA2BU6CIScbu2/4Yy7o6H9UHeS1ijF+wjF9AG165isNeNG48hm15q0gh8bAQwT6GuV4ZXr7NKfAh64XJLbUyEm/9dNZQK3GVMWNfPkK3g8ntxg88YSF4vKxGOiBfkU9ag5qV2sM+aG6mqnjOUYnuD6Xin74UkPi++cUIsFjNwsxij10x3STR1UPvjYPZE= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?Q0gBpQrndJXb1wq1P71wiB7q4h9hIlP67hredttfv++EQ+AbUpwoL2gpFL?= =?iso-8859-1?Q?r8CJVT/2aReqJmY9H9nBxqA0LOd8kPFdJO/2u8HrSkWtTKRijrwbxDyeq0?= =?iso-8859-1?Q?2jQPGtP26Np50y3JHhQbumUt8e8vPIJCd/lqKUX0nxyttplzEwtdDsXhuf?= =?iso-8859-1?Q?1o1EZi7+NyCKtyGGA9tdFGYYMbpAglzFZ0MgekfWzbzNHzriEtgVmKrdqn?= =?iso-8859-1?Q?1kN+/hQ/UOES5ieiC5f07cOYA4tw7KZodAj1dpvnZ/HLoEyOv9mdscZp9B?= =?iso-8859-1?Q?AFX0EjiksLlT0VaJ6/i0GYj2w4Kxf6Skxj6TjRDR1k8hrlgPeaslypYJSK?= =?iso-8859-1?Q?vObj1wdO8WRBkZ7a+MKImSSJ0BiOcc+B0hDeY5JqNUxvFiAnSfSosrSmxs?= =?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yhFuUc0jHR7fX4tmT67iF2wNZlmx+f1lrjI?= =?iso-8859-1?Q?OqLM8GKPH3CntMXZCaFFmNm/VCNc7ppwGahyiYMLeabTliUYNWYpbPGFEz?= =?iso-8859-1?Q?CmCbFIe4bMGD455deQG3FvhEpvMO18ht4JewvO9r+T3gPOG7qgl4aSpahZ?= =?iso-8859-1?Q?b/Pr3Phe53Uyj+mXZK8kF9Cq2+UXmwmUdXHQaOTZgcVe99ImmT354eZlaL?= =?iso-8859-1?Q?aGiymTO2M8O8r2CxWcHIMJsx+BbR/9WIAlJStAMeo5KtIU5+acthK+yXEL?= =?iso-8859-1?Q?4y6zy10T+AcDBDIG+YC+UrSpyAza0zgGtfy7uyZQQStLXHJcqueW+O87A5?= =?iso-8859-1?Q?HGpTNsNQmh2fU=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: 58e36ea8-143e-4f51-87c9-08dc5f7be3d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2024 07:48:08.7230 (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: kFtgVaxIfJm/8Ur5DMkFSCgevliRmwobOBcFUhVP/pQQ6vj9hh/rxPZVyWdnqxwMlEJSi7s8JbS7NCYOC6me+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8209 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:48:34 -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: OpnKNDL2TLTNFzuEppgj6txBx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244D06ADD52B4D33DA0DB7A8C0E2MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=JLZjRmwi; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) --_000_MN6PR11MB8244D06ADD52B4D33DA0DB7A8C0E2MN6PR11MB8244namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 (#117962): https://edk2.groups.io/g/devel/message/117962 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_MN6PR11MB8244D06ADD52B4D33DA0DB7A8C0E2MN6PR11MB8244namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 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? Other= s 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 (#117962) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244D06ADD52B4D33DA0DB7A8C0E2MN6PR11MB8244namp_--