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 E7376AC0C6B for ; Tue, 30 Apr 2024 06:00:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=CMwowWrw+KYtGxIEdXF3KxPNGtkw/LZDnAnZVHP3LAk=; 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=1714456837; v=1; b=qnNWDIlSNv12cz6zYEQ8cuqbSYleSAFthe0v81kEZH+Lj5VWNjBKOoe49YvGBYDdkLXL0y23 O02ti1PvZdeNqBcAoHACAtmIduZ5KinonRomv3t2EK2UFx4blar7e9DDqprP1/p4/LIvDUAYgRx 22r0zDK+V/rPRzeaZI45upKJC5ko7dPiBNCgKlJ9WEh0uOwA+cYG5KGY7j66VnaImWVYJvzyQl8 tRh6Fz5M9skGRHTFssd+n/MUH4272CnVB5yG/IxcrghP1GjixIhL224FmlUDsnFpulJGpv3+OdT hWD5mV5oHlTw6dx4jdvsICNpq41Un498dFMxW2koace0Q== X-Received: by 127.0.0.2 with SMTP id n87eYY7687511xuv10k3R4yG; Mon, 29 Apr 2024 23:00:37 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mx.groups.io with SMTP id smtpd.web11.8664.1714456836474392518 for ; Mon, 29 Apr 2024 23:00:36 -0700 X-CSE-ConnectionGUID: owlbLYT4SpCuuuQattrXbA== X-CSE-MsgGUID: INIztC0lSJaBKyzgzvMhpA== X-IronPort-AV: E=McAfee;i="6600,9927,11059"; a="10363377" X-IronPort-AV: E=Sophos;i="6.07,241,1708416000"; d="scan'208,217";a="10363377" X-Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2024 23:00:36 -0700 X-CSE-ConnectionGUID: DtIXeACKQMKhnJ5kGEFtWw== X-CSE-MsgGUID: MsfllYMUTJKnmO1SwC12sg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,241,1708416000"; d="scan'208,217";a="30823825" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Apr 2024 23:00:36 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 29 Apr 2024 23:00:35 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 29 Apr 2024 23:00:35 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 29 Apr 2024 23:00:35 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 29 Apr 2024 23:00:35 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SN7PR11MB7706.namprd11.prod.outlook.com (2603:10b6:806:32c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Tue, 30 Apr 2024 06:00:33 +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.7519.031; Tue, 30 Apr 2024 06:00:33 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , "devel@edk2.groups.io" CC: "Zeng, Star" , Gerd Hoffmann , "Kumar, Rahul R" , "Dong, Guo" , "Rhodes, Sean" , "Lu, James" , "Guo, Gua" , Ard Biesheuvel , "Yao, Jiewen" , Abdul Lateef Attar , Abner Chang , Tom Lendacky Subject: Re: [edk2-devel] [PATCH v4 00/14] Add SmmRelocationLib Thread-Topic: [PATCH v4 00/14] Add SmmRelocationLib Thread-Index: AQHal9PA9IGV4Fma0kKigj4l3IqtTrGAVyLR Date: Tue, 30 Apr 2024 06:00:32 +0000 Message-ID: References: <20240426121720.54308-1-jiaxin.wu@intel.com> In-Reply-To: <20240426121720.54308-1-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_|SN7PR11MB7706:EE_ x-ms-office365-filtering-correlation-id: 6200744b-6a4e-40ae-ffa0-08dc68dad8d2 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?AApVao35R0Bz238NLipOk0D2aJVI9tDz6f5sHQgjeL22IgvrGOGs7cGUNlIB?= =?us-ascii?Q?Be1tJlOU+jTbJxZCRuEtb8Yh24ekhb7eFrGUhpj5sbZTThkAUU9lh5kpfAEv?= =?us-ascii?Q?kTyDFGtg02tx0aB16U9bUjzCeM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cx2U8+tfXfDDomB2+GcncWNKiEuJiX4w9QdSTdDGZSC2ExEEL25ha2/?= =?us-ascii?Q?g+mYCmzh+47SS4VNoeTaWTMG20HT45g2rdjRfV+NsDpEvm7WyOnJqRQIq4dp?= =?us-ascii?Q?5HmBqRd1gDQkj8bDqJaKz4KqgyPgO0rWosl6NJ0nDmB/LqPPIDZX0lMgIENV?= =?us-ascii?Q?/c6nfz4tjgobo+zdYizU34MoT2ZgH6TNodeR3QuIOQOhF1QbyZHUvfxPWok8?= =?us-ascii?Q?C/K1Xm3zYA3e1eSlZKYe6fyHc+DqRd74/6jpiFoNlFDEoVRkoqcMomapu54t?= =?us-ascii?Q?u0Z1iNOYnhwcPOENSzV8UYgI2oBl4TKt63APB6nyu7oq1Q=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6URXYb5xdNfZopL1xHviovirFKKyu2xQls4bpDVQTCpjJVPgd8TG1/MiXpla?= =?us-ascii?Q?8XPRtX6WgctSZRDXuNgk99t9q9xM4HiBQHMp/tV+s9lH0hfqc1v1iKKUMH+j?= =?us-ascii?Q?Da0nCsDazhw4K6J/3H94HkYSza6tZ6FU4widBEqwFTTvIusdBz3ja3hS5JK+?= =?us-ascii?Q?wEBcYfGxtSIy3yJd7dElM1+b97drT6T6Z7W2YxjULHUZNu+cZ5EGYA9myDP+?= =?us-ascii?Q?mXZRY5Lv02IF7+PPjHkhvClryYBc+PG6u2ecl3hBXJOxTDaeHmZIjEG95EyD?= =?us-ascii?Q?T6NbUrfqmdXnuWVn2f8FDgaOrFIHjLkRK8NG5DG8NgCic8bm/H2v7jg9790l?= =?us-ascii?Q?7B1jirYsnlXkRMFzJ5BINpBxAkxhDpO9ouKEzUHqVvukJDawCi8BCD/U24Un?= =?us-ascii?Q?NnwpmkfxNv/kF4+G9v0qTzM9MkfWwNBjYsHLmB3cFfYtormO2csWWoJgEKhp?= =?us-ascii?Q?MaGMKWMtPm42yP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zyEfikSl?= =?us-ascii?Q?aARSCxVyqMzdZrFIP/18FGHz2w2oXa4/YjALKUzSVbsW4Ke2Q2tQLBwsofMy?= =?us-ascii?Q?sE0pHxKI9a3gUGV9XzlKH6dyuvAXPs9hgKRn/yYt10XHMJZtnOLdBRWT/HpI?= =?us-ascii?Q?Eo/6QW8S6rHL6XUP0u+sMHDQIR1fjH6qz4o8z2SZYWfNY12f8QVx64DVbtB8?= =?us-ascii?Q?lvJEl9jUckXTDzV8IiM=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: 6200744b-6a4e-40ae-ffa0-08dc68dad8d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2024 06:00:32.9611 (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: Hu+Oq7BEzPJUnNJlY/3hnP6rrIOyZtMFYRr2SYRdIaAPKZ1iqVy6T+LTpwAbOXzTOv+dE0FFZh56BpoIRjn2/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7706 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: Mon, 29 Apr 2024 23:00:36 -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: KFTn2U6VdigqdLeEQqYgf79wx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82441132A3DF5296676C0FEB8C1A2MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=qnNWDIlS; 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_MN6PR11MB82441132A3DF5296676C0FEB8C1A2MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jiaxin, You need to add the missing Reviewed-by for each patch if the patch doesn't= change in V4. Can you reply to this mail to list what patches have already got Reviewed-b= y from whom? Thanks, Ray ________________________________ From: Wu, Jiaxin Sent: Friday, April 26, 2024 20:17 To: devel@edk2.groups.io Cc: Ni, Ray ; Zeng, Star ; Gerd Hoff= mann ; Kumar, Rahul R ; Dong, G= uo ; Rhodes, Sean ; Lu, James ; Guo, Gua ; Ard Biesheuvel ; Yao, Jiewen ; Abdul Lateef Attar <= AbdulLateef.Attar@amd.com>; Abner Chang ; Tom Lendacky= Subject: [PATCH v4 00/14] Add SmmRelocationLib PR: https://github.com/tianocore/edk2/pull/5546 Intel plans to separate the smbase relocation logic from PiSmmCpuDxeSmm driver, and the related behavior will be moved to the new interface defined by the SmmRelocationLib class. The SmmRelocationLib class provides the SmmRelocationInit() interface for platform to do the smbase relocation, which shall provide below 2 functionalities: 1. Relocate smbases for each processor. 2. Create the gSmmBaseHobGuid HOB. With SmmRelocationLib, PiSmmCpuDxeSmm driver (which runs at a later phase) can be simplfied as below for SMM init: 1. Consume the gSmmBaseHobGuid HOB for the relocated smbases for each Processor. 2. Execute the early SMM Init. Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Abdul Lateef Attar Cc: Abner Chang Cc: Tom Lendacky Signed-off-by: Jiaxin Wu Jiaxin Wu (14): UefiCpuPkg: Add SmmRelocationLib class UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance UefiCpuPkg/SmmRelocationLib: Rename global variables UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex UefiCpuPkg/SmmRelocationLib: Add library instance for AMD OvmfPkg/SmmRelocationLib: Add library instance for OVMF OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid OvmfPkg: Refine SmmAccess implementation OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not OvmfPkg/PlatformPei: Relocate SmBases in PEI phase UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + OvmfPkg/CloudHv/CloudHvX64.dsc | 1 + OvmfPkg/Library/PlatformInitLib/MemDetect.c | 135 +++-- .../Library/PlatformInitLib/PlatformInitLib.inf | 6 +- .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 33 +- .../Library/SmmRelocationLib}/Ia32/Semaphore.c | 13 +- .../Library/SmmRelocationLib}/Ia32/SmmInit.nasm | 83 +++- .../SmmRelocationLib/InternalSmmRelocationLib.h | 127 +++++ .../Library/SmmRelocationLib/SmmRelocationLib.c | 549 +++++++++++++++++= ++++ .../Library/SmmRelocationLib/SmmRelocationLib.inf | 60 +++ .../SmmRelocationLib/SmramSaveStateConfig.c | 100 ++++ .../Library/SmmRelocationLib}/X64/Semaphore.c | 13 +- .../Library/SmmRelocationLib}/X64/SmmInit.nasm | 85 +++- OvmfPkg/Microvm/MicrovmX64.dsc | 1 + OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/PlatformPei/Platform.c | 3 + OvmfPkg/PlatformPei/Platform.h | 5 + OvmfPkg/PlatformPei/PlatformPei.inf | 5 +- OvmfPkg/PlatformPei/SmmRelocation.c | 80 +++ OvmfPkg/SmmAccess/SmmAccess2Dxe.c | 4 +- OvmfPkg/SmmAccess/SmmAccess2Dxe.inf | 5 + OvmfPkg/SmmAccess/SmmAccessPei.c | 116 ++--- OvmfPkg/SmmAccess/SmmAccessPei.inf | 11 +- OvmfPkg/SmmAccess/SmramInternal.c | 72 +-- OvmfPkg/SmmAccess/SmramInternal.h | 19 +- UefiCpuPkg/Include/Library/SmmRelocationLib.h | 42 ++ .../SmmRelocationLib/AmdSmmRelocationLib.inf | 60 +++ .../SmmRelocationLib/AmdSmramSaveStateConfig.c | 125 +++++ .../SmmRelocationLib}/Ia32/Semaphore.c | 13 +- .../SmmRelocationLib}/Ia32/SmmInit.nasm | 83 +++- .../SmmRelocationLib/InternalSmmRelocationLib.h | 127 +++++ .../Library/SmmRelocationLib/SmmRelocationLib.c | 549 +++++++++++++++++= ++++ .../Library/SmmRelocationLib/SmmRelocationLib.inf | 61 +++ .../SmmRelocationLib/SmramSaveStateConfig.c | 136 +++++ .../SmmRelocationLib}/X64/Semaphore.c | 13 +- .../SmmRelocationLib}/X64/SmmInit.nasm | 85 +++- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 21 +- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 +- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 334 ++----------- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 103 +--- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 4 - UefiCpuPkg/PiSmmCpuDxeSmm/SmmMpPerf.h | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 69 --- UefiCpuPkg/UefiCpuPkg.dec | 3 + UefiCpuPkg/UefiCpuPkg.dsc | 2 + UefiPayloadPkg/UefiPayloadPkg.dsc | 2 + 48 files changed, 2578 insertions(+), 796 deletions(-) copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/Ia3= 2/Semaphore.c (71%) copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/Ia3= 2/SmmInit.nasm (47%) create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationL= ib.h create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.c create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.inf create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/X64= /Semaphore.c (78%) copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocationLib}/X64= /SmmInit.nasm (59%) create mode 100644 OvmfPkg/PlatformPei/SmmRelocation.c create mode 100644 UefiCpuPkg/Include/Library/SmmRelocationLib.h create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/AmdSmmRelocationLib= .inf create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/AmdSmramSaveStateCo= nfig.c rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/Ia32/Sema= phore.c (71%) rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/Ia32/SmmI= nit.nasm (47%) create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocati= onLib.h create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.c create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.in= f create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmramSaveStateConfi= g.c rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/X64/Semap= hore.c (78%) rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/X64/SmmIn= it.nasm (59%) -- 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 (#118416): https://edk2.groups.io/g/devel/message/118416 Mute This Topic: https://groups.io/mt/105748911/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_MN6PR11MB82441132A3DF5296676C0FEB8C1A2MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Jiaxin,
You need to add the missing Reviewed-by for each patch if the patch doesn't= change in V4.

Can you reply to this mail to list what patches have already got Reviewed-b= y from whom?



Thanks,
Ray

From: Wu, Jiaxin <jiaxin= .wu@intel.com>
Sent: Friday, April 26, 2024 20:17
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel= .com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul= .r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean = <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.or= g>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <Abd= ulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Le= ndacky <thomas.lendacky@amd.com>
Subject: [PATCH v4 00/14] Add SmmRelocationLib
 
PR: https://github.com/tianocore/edk2/pull/5546

Intel plans to separate the smbase relocation logic from
PiSmmCpuDxeSmm driver, and the related behavior will be
moved to the new interface defined by the SmmRelocationLib
class.

The SmmRelocationLib class provides the SmmRelocationInit()
interface for platform to do the smbase relocation, which
shall provide below 2 functionalities:
1. Relocate smbases for each processor.
2. Create the gSmmBaseHobGuid HOB.

With SmmRelocationLib, PiSmmCpuDxeSmm driver (which runs at
a later phase) can be simplfied as below for SMM init:
1. Consume the gSmmBaseHobGuid HOB for the relocated smbases
for each Processor.
2. Execute the early SMM Init.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zeng Star <star.zeng@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>

Jiaxin Wu (14):
  UefiCpuPkg: Add SmmRelocationLib class
  UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance   UefiCpuPkg/SmmRelocationLib: Rename global variables
  UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation
  UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable
  UefiCpuPkg/SmmRelocationLib: Remove unnecessary CpuIndex
  UefiCpuPkg/SmmRelocationLib: Add library instance for AMD
  OvmfPkg/SmmRelocationLib: Add library instance for OVMF
  OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid
  OvmfPkg: Refine SmmAccess implementation
  OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not   OvmfPkg/PlatformPei: Relocate SmBases in PEI phase
  UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib
  UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic

 OvmfPkg/AmdSev/AmdSevX64.dsc       = ;            &n= bsp;   |   1 +
 OvmfPkg/CloudHv/CloudHvX64.dsc      &nb= sp;            =   |   1 +
 OvmfPkg/Library/PlatformInitLib/MemDetect.c    &n= bsp;   | 135 +++--
 .../Library/PlatformInitLib/PlatformInitLib.inf    |&n= bsp;  6 +-
 .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c  |  33 +-=
 .../Library/SmmRelocationLib}/Ia32/Semaphore.c    = ; |  13 +-
 .../Library/SmmRelocationLib}/Ia32/SmmInit.nasm    |&n= bsp; 83 +++-
 .../SmmRelocationLib/InternalSmmRelocationLib.h    | 1= 27 +++++
 .../Library/SmmRelocationLib/SmmRelocationLib.c    | 5= 49 +++++++++++++++++++++
 .../Library/SmmRelocationLib/SmmRelocationLib.inf  |  60 ++= +
 .../SmmRelocationLib/SmramSaveStateConfig.c    &n= bsp;   | 100 ++++
 .../Library/SmmRelocationLib}/X64/Semaphore.c    =   |  13 +-
 .../Library/SmmRelocationLib}/X64/SmmInit.nasm    = ; |  85 +++-
 OvmfPkg/Microvm/MicrovmX64.dsc      &nb= sp;            =   |   1 +
 OvmfPkg/OvmfPkgIa32.dsc       &nbs= p;            &= nbsp;       |   1 +
 OvmfPkg/OvmfPkgIa32X64.dsc       &= nbsp;           &nbs= p;     |   1 +
 OvmfPkg/OvmfPkgX64.dsc        = ;            &n= bsp;        |   1 +
 OvmfPkg/PlatformPei/Platform.c      &nb= sp;            =   |   3 +
 OvmfPkg/PlatformPei/Platform.h      &nb= sp;            =   |   5 +
 OvmfPkg/PlatformPei/PlatformPei.inf     &nbs= p;          |   5 +-=
 OvmfPkg/PlatformPei/SmmRelocation.c     &nbs= p;          |  80 +++
 OvmfPkg/SmmAccess/SmmAccess2Dxe.c      =             | &= nbsp; 4 +-
 OvmfPkg/SmmAccess/SmmAccess2Dxe.inf     &nbs= p;          |   5 +<= br>  OvmfPkg/SmmAccess/SmmAccessPei.c      &= nbsp;            | 1= 16 ++---
 OvmfPkg/SmmAccess/SmmAccessPei.inf      = ;           |  11 +-=
 OvmfPkg/SmmAccess/SmramInternal.c      =             |  = 72 +--
 OvmfPkg/SmmAccess/SmramInternal.h      =             |  = 19 +-
 UefiCpuPkg/Include/Library/SmmRelocationLib.h    =   |  42 ++
 .../SmmRelocationLib/AmdSmmRelocationLib.inf    &= nbsp;  |  60 +++
 .../SmmRelocationLib/AmdSmramSaveStateConfig.c    = ; | 125 +++++
 .../SmmRelocationLib}/Ia32/Semaphore.c     &= nbsp;       |  13 +-
 .../SmmRelocationLib}/Ia32/SmmInit.nasm     =        |  83 +++-
 .../SmmRelocationLib/InternalSmmRelocationLib.h    | 1= 27 +++++
 .../Library/SmmRelocationLib/SmmRelocationLib.c    | 5= 49 +++++++++++++++++++++
 .../Library/SmmRelocationLib/SmmRelocationLib.inf  |  61 ++= +
 .../SmmRelocationLib/SmramSaveStateConfig.c    &n= bsp;   | 136 +++++
 .../SmmRelocationLib}/X64/Semaphore.c     &n= bsp;        |  13 +-
 .../SmmRelocationLib}/X64/SmmInit.nasm     &= nbsp;       |  85 +++-
 UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c      =             |  = 21 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c     &n= bsp;        |  10 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c    &nb= sp;    | 334 ++-----------
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h    &nb= sp;    | 103 +---
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf    &= nbsp;  |   4 -
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmMpPerf.h     &n= bsp;        |   2 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c    &nb= sp;    |  69 ---
 UefiCpuPkg/UefiCpuPkg.dec       &n= bsp;            = ;      |   3 +
 UefiCpuPkg/UefiCpuPkg.dsc       &n= bsp;            = ;      |   2 +
 UefiPayloadPkg/UefiPayloadPkg.dsc      =             | &= nbsp; 2 +
 48 files changed, 2578 insertions(+), 796 deletions(-)
 copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocation= Lib}/Ia32/Semaphore.c (71%)
 copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocation= Lib}/Ia32/SmmInit.nasm (47%)
 create mode 100644 OvmfPkg/Library/SmmRelocationLib/InternalSmmReloca= tionLib.h
 create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.= c
 create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.= inf
 create mode 100644 OvmfPkg/Library/SmmRelocationLib/SmramSaveStateCon= fig.c
 copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocation= Lib}/X64/Semaphore.c (78%)
 copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> OvmfPkg/Library/SmmRelocation= Lib}/X64/SmmInit.nasm (59%)
 create mode 100644 OvmfPkg/PlatformPei/SmmRelocation.c
 create mode 100644 UefiCpuPkg/Include/Library/SmmRelocationLib.h
 create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/AmdSmmRelocati= onLib.inf
 create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/AmdSmramSaveSt= ateConfig.c
 rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/I= a32/Semaphore.c (71%)
 rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/I= a32/SmmInit.nasm (47%)
 create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRel= ocationLib.h
 create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationL= ib.c
 create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationL= ib.inf
 create mode 100644 UefiCpuPkg/Library/SmmRelocationLib/SmramSaveState= Config.c
 rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/X= 64/Semaphore.c (78%)
 rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> Library/SmmRelocationLib}/X= 64/SmmInit.nasm (59%)

--
2.16.2.windows.1

_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_MN6PR11MB82441132A3DF5296676C0FEB8C1A2MN6PR11MB8244namp_--