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 90C4A74003D for ; Fri, 19 Apr 2024 03:35:30 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ke0S92eAtGHb8BjgFe4m8Lm2ttS+yXEmxxcFGrlHyk0=; 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=1713497729; v=1; b=nWVU4+ZHoC9tI0WJ2hMLI2I6NxBsbX+F74KbmslkK3hP9LRdcmTs5XIlLGa07Z23QaXZBYYD /HsTYrmJo96pEkYrQf6DaBrtP7nKo3bEgBSa+FvYY1xtOAB8LKmIeJ6LSansA6ImRvFPfshVBdB Ls9P4yxknR98y0eOCNC/WByPySFwrr7YuABhqy99v9gBXJX7Uc6j/mixJlL216LEY9qocAJHjnW PzObkE7bCB4W+tTfNIQU2KFDftoNp22NehFK9ZRiCNlPRoaJSiWiBGdOKL4bsX08EEkRmV6tUQN upwfwOrc23bNenhNhCQsL4uYjc+fjQAfo4Kh63ZYb+QMQ== X-Received: by 127.0.0.2 with SMTP id 2ZAgYY7687511xSMbrAaWDg3; Thu, 18 Apr 2024 20:35:29 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mx.groups.io with SMTP id smtpd.web10.12123.1713497727611971798 for ; Thu, 18 Apr 2024 20:35:27 -0700 X-CSE-ConnectionGUID: 34cuBygUSRG+DbguY4yNFg== X-CSE-MsgGUID: CD4TrsalQ4mTuV8ULGIwIA== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="9200451" X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208,217";a="9200451" X-Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 20:35:27 -0700 X-CSE-ConnectionGUID: LFWyM8hWTvOhBa23yoWKug== X-CSE-MsgGUID: Ch+UEIzJThKibKjt6om8mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208,217";a="23818965" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Apr 2024 20:35:26 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 20:35:26 -0700 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 20:35:25 -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 20:35:25 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) 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 20:35:25 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SJ0PR11MB4861.namprd11.prod.outlook.com (2603:10b6:a03:2ac::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.14; Fri, 19 Apr 2024 03:35:17 +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; Fri, 19 Apr 2024 03:35:17 +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 v3 00/13] Add SmmRelocationLib Thread-Topic: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Thread-Index: AQHakV2GkVjeKzZueEqpL2F3/efgwrFtqtmAgAFHVDA= Date: Fri, 19 Apr 2024 03:35:17 +0000 Message-ID: References: <17C74D78B0B952AD.15491@groups.io> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SJ0PR11MB4861:EE_ x-ms-office365-filtering-correlation-id: 31ef9fba-498c-40ea-1477-08dc6021bb87 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: PmBPg/8vphkja3wc+p+056hf+HrMDBCJi07hKckbOsv7h+F6uHZEOHAO3WRt1v4pLKMtN3NkKatDurKDGUCxzkeoWKaZ0eLPwWg0Ceu9J2Oq6WE9uTW9KkAQB7DCOn8sYzyFIWng0brQ+q3khEYiU5nUqzSMDgX9Ly5QPP4RM4lhvA0gFK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9ricfTelqpD9qrFhioQJLGOVEdFMA3Fdydss/?= =?us-ascii?Q?qCTnky6ReoWP/GMkaUl25XPoNW/LsNirZk4bSB3xy6WQ0+oQBoMf/idURwVc?= =?us-ascii?Q?IGAVaOejuwA5VPCBWedIarVv6B6PYqkqLDGtebufvB97Pn+OgGWc7m4dVieD?= =?us-ascii?Q?+F+Cuejg8wYPNnn3TdheMe96NfpVmI1PlRPEVsuxHyWztKZNIV+6Asig27sy?= =?us-ascii?Q?MPjVivqrB3KlN0BK/43Cn0H5VhET7gcfsm9iCTgJX+xlew6Gh4vD9cO3OrS4?= =?us-ascii?Q?G0lM3jp/YbxuFPd46OMp/YPfw2r4nobRgIRQxlM5rjMHe5BcQCG/pp1900o9?= =?us-ascii?Q?3RrC8q6iwxhsEjAY0UU=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: 31ef9fba-498c-40ea-1477-08dc6021bb87 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2024 03:35:17.5563 (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: eydK+IFF3/HgqAbD2yyblT4rFj234T6nJ/NSL/8cjcCl6Z6JsB9f/vpKR4HJt1XHMh8im1DORxiO7+TZtLAl0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4861 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 20:35:27 -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: eJlvcO469jpROitVfrtncZoMx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244ADEE4EB0C877CF19B8C98C0D2MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=nWVU4+ZH; 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_MN6PR11MB8244ADEE4EB0C877CF19B8C98C0D2MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jiaxin, I see Abdul from AMD has given R-B. I assume that's sufficient for merging = this patch. Thanks, Ray ________________________________ From: Wu, Jiaxin Sent: Thursday, April 18, 2024 16:03 To: devel@edk2.groups.io ; Wu, Jiaxin 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: RE: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Hi Tom & Abner, Could you help check & review AMD related patch? > UefiCpuPkg/SmmRelocationLib: Add library instance for AMD Thanks, Jiaxin > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, > Jiaxin > Sent: Thursday, April 18, 2024 2:56 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; 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: [edk2-devel] [PATCH v3 00/13] 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 (13): > 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: 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 | 104 ++-- > .../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 | 88 +--- > OvmfPkg/SmmAccess/SmmAccessPei.inf | 7 +- > OvmfPkg/SmmAccess/SmramInternal.c | 73 +-- > OvmfPkg/SmmAccess/SmramInternal.h | 18 +- > 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 | 331 ++----------- > 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, 2514 insertions(+), 794 deletions(-) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> > OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> > OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%) > create mode 100644 > OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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/AmdSmramSaveStateConfig.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/Ia32/Semaphore.c (71%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%) > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.c > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.inf > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/X64/Semaphore.c (78%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/X64/SmmInit.nasm (59%) > > -- > 2.16.2.windows.1 > > > >=20 > -=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 (#118003): https://edk2.groups.io/g/devel/message/118003 Mute This Topic: https://groups.io/mt/105593568/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_MN6PR11MB8244ADEE4EB0C877CF19B8C98C0D2MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Jiaxin,
I see Abdul from AMD has given R-B. I assume that's sufficient for merging = this patch.

Thanks,
Ray

From: Wu, Jiaxin <jiaxin= .wu@intel.com>
Sent: Thursday, April 18, 2024 16:03
To: devel@edk2.groups.io <devel@edk2.groups.io>; Wu, Jiaxin &l= t;jiaxin.wu@intel.com>
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: RE: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib
 
Hi Tom & Abner,

Could you help check & review AMD related patch?
 >   UefiCpuPkg/SmmRelocationLib: Add library instance fo= r AMD

Thanks,
Jiaxin

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of W= u,
> Jiaxin
> Sent: Thursday, April 18, 2024 2:56 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.c= om>; Gerd
> Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@i= ntel.com>;
> Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.s= ystems>;
> Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com&g= t;; Ard
> Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen
> <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar= @amd.com>;
> Abner Chang <abner.chang@amd.com>; Tom Lendacky
> <thomas.lendacky@amd.com>
> Subject: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib
>
> PR: https://gi= thub.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 (13):
>   UefiCpuPkg: Add SmmRelocationLib class
>   UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library = instance
>   UefiCpuPkg/SmmRelocationLib: Rename global variables
>   UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allo= cation
>   UefiCpuPkg/SmmRelocationLib: Remove unnecessary global var= iable
>   UefiCpuPkg/SmmRelocationLib: Add library instance for AMD<= br> >   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 SmmRelocationLi= b
>   UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic=
>
>  OvmfPkg/AmdSev/AmdSevX64.dsc      =             &nb= sp;    |   1 +
>  OvmfPkg/CloudHv/CloudHvX64.dsc     &nbs= p;            &= nbsp;  |   1 +
>  OvmfPkg/Library/PlatformInitLib/MemDetect.c   &nb= sp;    | 104 ++--
>  .../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   &nb= sp;    | 100 ++++
>  .../Library/SmmRelocationLib}/X64/Semaphore.c   &= nbsp;  |  13 +-
>  .../Library/SmmRelocationLib}/X64/SmmInit.nasm   =   |  85 +++-
>  OvmfPkg/Microvm/MicrovmX64.dsc     &nbs= p;            &= nbsp;  |   1 +
>  OvmfPkg/OvmfPkgIa32.dsc       = ;            &n= bsp;        |   1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc      &n= bsp;            = ;      |   1 +
>  OvmfPkg/OvmfPkgX64.dsc       =             &nb= sp;         |   1 +
>  OvmfPkg/PlatformPei/Platform.c     &nbs= p;            &= nbsp;  |   3 +
>  OvmfPkg/PlatformPei/Platform.h     &nbs= p;            &= nbsp;  |   5 +
>  OvmfPkg/PlatformPei/PlatformPei.inf     = ;           |  = 5 +-
>  OvmfPkg/PlatformPei/SmmRelocation.c     = ;           |  80 ++= +
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.c     &= nbsp;            |&n= bsp;  4 +-
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf     = ;           |  = 5 +
>  OvmfPkg/SmmAccess/SmmAccessPei.c     &n= bsp;            = ; |  88 +---
>  OvmfPkg/SmmAccess/SmmAccessPei.inf     =             | &= nbsp; 7 +-
>  OvmfPkg/SmmAccess/SmramInternal.c     &= nbsp;            |&n= bsp; 73 +--
>  OvmfPkg/SmmAccess/SmramInternal.h     &= nbsp;            |&n= bsp; 18 +-
>  UefiCpuPkg/Include/Library/SmmRelocationLib.h   &= nbsp;  |  42 ++
>  .../SmmRelocationLib/AmdSmmRelocationLib.inf   &n= bsp;   |  60 +++
>  .../SmmRelocationLib/AmdSmramSaveStateConfig.c   =   | 125 +++++
>  .../SmmRelocationLib}/Ia32/Semaphore.c    &n= bsp;        |  13 +-
>  .../SmmRelocationLib}/Ia32/SmmInit.nasm    &= nbsp;       |  83 +++-
>  .../SmmRelocationLib/InternalSmmRelocationLib.h   = ; | 127 +++++
>  .../Library/SmmRelocationLib/SmmRelocationLib.c   = ; | 549
> +++++++++++++++++++++
>  .../Library/SmmRelocationLib/SmmRelocationLib.inf  |  = 61 +++
>  .../SmmRelocationLib/SmramSaveStateConfig.c   &nb= sp;    | 136 +++++
>  .../SmmRelocationLib}/X64/Semaphore.c    &nb= sp;         |  13 +-
>  .../SmmRelocationLib}/X64/SmmInit.nasm    &n= bsp;        |  85 +++-
>  UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c     &= nbsp;            |&n= bsp; 21 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c    &nb= sp;         |  10 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c   &nbs= p;     | 331 ++-----------
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h   &nbs= p;     | 103 +---
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf   &n= bsp;   |   4 -
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmMpPerf.h    &nb= sp;         |   2 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c   &nbs= p;     |  69 ---
>  UefiCpuPkg/UefiCpuPkg.dec      &nb= sp;            =        |   3 +
>  UefiCpuPkg/UefiCpuPkg.dsc      &nb= sp;            =        |   2 +
>  UefiPayloadPkg/UefiPayloadPkg.dsc     &= nbsp;            |&n= bsp;  2 +
>  48 files changed, 2514 insertions(+), 794 deletions(-)
>  copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D>
> OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
>  copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D>
> OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
>  create mode 100644
> OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.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/AmdSmramSaveStateConfig.c
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.c
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.inf
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/X64/Semaphore.c (78%)
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/X64/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 (#118003) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244ADEE4EB0C877CF19B8C98C0D2MN6PR11MB8244namp_--