Oh, sorry, I missed the that email. If so, that's great! Thanks Ray & Abner & Abdul.
From: Chang, Abner <abner.ch...@amd.com> Sent: Friday, April 19, 2024 11:47 AM To: Ni, Ray <ray...@intel.com>; Wu, Jiaxin <jiaxin...@intel.com>; devel@edk2.groups.io Cc: Zeng, Star <star.z...@intel.com>; Gerd Hoffmann <kra...@redhat.com>; Kumar, Rahul R <rahul.r.ku...@intel.com>; Dong, Guo <guo.d...@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james...@intel.com>; Guo, Gua <gua....@intel.com>; Ard Biesheuvel <ardb+tianoc...@kernel.org>; Yao, Jiewen <jiewen....@intel.com>; Attar, AbdulLateef (Abdul Lateef) <abdullateef.at...@amd.com>; Lendacky, Thomas <thomas.lenda...@amd.com> Subject: Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib [AMD Official Use Only - General] Right, Abdul's RB is sufficient! Thanks Abner ________________________________ From: Ni, Ray <ray...@intel.com<mailto:ray...@intel.com>> Sent: Friday, April 19, 2024 11:35:17 AM To: Wu, Jiaxin <jiaxin...@intel.com<mailto:jiaxin...@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> Cc: Zeng, Star <star.z...@intel.com<mailto:star.z...@intel.com>>; Gerd Hoffmann <kra...@redhat.com<mailto:kra...@redhat.com>>; Kumar, Rahul R <rahul.r.ku...@intel.com<mailto:rahul.r.ku...@intel.com>>; Dong, Guo <guo.d...@intel.com<mailto:guo.d...@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james...@intel.com<mailto:james...@intel.com>>; Guo, Gua <gua....@intel.com<mailto:gua....@intel.com>>; Ard Biesheuvel <ardb+tianoc...@kernel.org<mailto:ardb+tianoc...@kernel.org>>; Yao, Jiewen <jiewen....@intel.com<mailto:jiewen....@intel.com>>; Attar, AbdulLateef (Abdul Lateef) <abdullateef.at...@amd.com<mailto:abdullateef.at...@amd.com>>; Chang, Abner <abner.ch...@amd.com<mailto:abner.ch...@amd.com>>; Lendacky, Thomas <thomas.lenda...@amd.com<mailto:thomas.lenda...@amd.com>> Subject: Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. 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...@intel.com<mailto:jiaxin...@intel.com>> Sent: Thursday, April 18, 2024 16:03 To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Wu, Jiaxin <jiaxin...@intel.com<mailto:jiaxin...@intel.com>> Cc: Ni, Ray <ray...@intel.com<mailto:ray...@intel.com>>; Zeng, Star <star.z...@intel.com<mailto:star.z...@intel.com>>; Gerd Hoffmann <kra...@redhat.com<mailto:kra...@redhat.com>>; Kumar, Rahul R <rahul.r.ku...@intel.com<mailto:rahul.r.ku...@intel.com>>; Dong, Guo <guo.d...@intel.com<mailto:guo.d...@intel.com>>; Rhodes, Sean <sean@starlabs.systems<mailto:sean@starlabs.systems>>; Lu, James <james...@intel.com<mailto:james...@intel.com>>; Guo, Gua <gua....@intel.com<mailto:gua....@intel.com>>; Ard Biesheuvel <ardb+tianoc...@kernel.org<mailto:ardb+tianoc...@kernel.org>>; Yao, Jiewen <jiewen....@intel.com<mailto:jiewen....@intel.com>>; Abdul Lateef Attar <abdullateef.at...@amd.com<mailto:abdullateef.at...@amd.com>>; Abner Chang <abner.ch...@amd.com<mailto:abner.ch...@amd.com>>; Tom Lendacky <thomas.lenda...@amd.com<mailto:thomas.lenda...@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 for AMD Thanks, Jiaxin > -----Original Message----- > From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> > <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Wu, > Jiaxin > Sent: Thursday, April 18, 2024 2:56 PM > To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> > Cc: Ni, Ray <ray...@intel.com<mailto:ray...@intel.com>>; Zeng, Star > <star.z...@intel.com<mailto:star.z...@intel.com>>; Gerd > Hoffmann <kra...@redhat.com<mailto:kra...@redhat.com>>; Kumar, Rahul R > <rahul.r.ku...@intel.com<mailto:rahul.r.ku...@intel.com>>; > Dong, Guo <guo.d...@intel.com<mailto:guo.d...@intel.com>>; Rhodes, Sean > <sean@starlabs.systems<mailto:sean@starlabs.systems>>; > Lu, James <james...@intel.com<mailto:james...@intel.com>>; Guo, Gua > <gua....@intel.com<mailto:gua....@intel.com>>; Ard > Biesheuvel <ardb+tianoc...@kernel.org<mailto:ardb+tianoc...@kernel.org>>; > Yao, Jiewen > <jiewen....@intel.com<mailto:jiewen....@intel.com>>; Abdul Lateef Attar > <abdullateef.at...@amd.com<mailto:abdullateef.at...@amd.com>>; > Abner Chang <abner.ch...@amd.com<mailto:abner.ch...@amd.com>>; Tom Lendacky > <thomas.lenda...@amd.com<mailto:thomas.lenda...@amd.com>> > 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 <ray...@intel.com<mailto:ray...@intel.com>> > Cc: Zeng Star <star.z...@intel.com<mailto:star.z...@intel.com>> > Cc: Gerd Hoffmann <kra...@redhat.com<mailto:kra...@redhat.com>> > Cc: Rahul Kumar <rahul1.ku...@intel.com<mailto:rahul1.ku...@intel.com>> > Cc: Guo Dong <guo.d...@intel.com<mailto:guo.d...@intel.com>> > Cc: Sean Rhodes <sean@starlabs.systems<mailto:sean@starlabs.systems>> > Cc: James Lu <james...@intel.com<mailto:james...@intel.com>> > Cc: Gua Guo <gua....@intel.com<mailto:gua....@intel.com>> > Cc: Ard Biesheuvel > <ardb+tianoc...@kernel.org<mailto:ardb+tianoc...@kernel.org>> > Cc: Jiewen Yao <jiewen....@intel.com<mailto:jiewen....@intel.com>> > Cc: Abdul Lateef Attar > <abdullateef.at...@amd.com<mailto:abdullateef.at...@amd.com>> > Cc: Abner Chang <abner.ch...@amd.com<mailto:abner.ch...@amd.com>> > Cc: Tom Lendacky <thomas.lenda...@amd.com<mailto:thomas.lenda...@amd.com>> > Signed-off-by: Jiaxin Wu <jiaxin...@intel.com<mailto:jiaxin...@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 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 => > OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%) > copy {UefiCpuPkg/PiSmmCpuDxeSmm => > 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 => > OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%) > copy {UefiCpuPkg/PiSmmCpuDxeSmm => > 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 => > Library/SmmRelocationLib}/Ia32/Semaphore.c (71%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm => > 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 => > Library/SmmRelocationLib}/X64/Semaphore.c (78%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm => > Library/SmmRelocationLib}/X64/SmmInit.nasm (59%) > > -- > 2.16.2.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118005): https://edk2.groups.io/g/devel/message/118005 Mute This Topic: https://groups.io/mt/105593568/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-