Gerd, I think comments from patch #1 explains: # The default SMBASE for the x86 processor is 0x30000. When SMI happens, CPU + runs the SMI handler at SMBASE+0x8000. Also, the SMM save state area is within + SMBASE+0x10000. + + One of the SMM initialization from CPU perspective is to relocate and program + the new SMBASE (in TSEG range) for each CPU thread. When the SMBASE relocation + happens in a PEI module, the PEI module shall produce the SMM_BASE_HOB in HOB + database which tells the PiSmmCpuDxeSmm driver (which runs at a later phase) + about the new SMBASE for each CPU thread. PiSmmCpuDxeSmm driver installs the + SMI handler at the SMM_BASE_HOB.SmBase[Index]+0x8000 for CPU thread Index. + When the HOB doesn't exist, PiSmmCpuDxeSmm driver shall relocate and program + the new SMBASE itself.
> -----Original Message----- > From: Gerd Hoffmann <kra...@redhat.com> > Sent: Wednesday, January 18, 2023 8:20 PM > To: Wu, Jiaxin <jiaxin...@intel.com> > Cc: devel@edk2.groups.io; Dong, Eric <eric.d...@intel.com>; Ni, Ray > <ray...@intel.com>; Zeng, Star <star.z...@intel.com>; Laszlo Ersek > <ler...@redhat.com>; Kumar, Rahul R <rahul.r.ku...@intel.com> > Subject: Re: [PATCH v3 5/5] OvmfPkg/SmmCpuFeaturesLib: Skip SMBASE > configuration > > On Wed, Jan 18, 2023 at 05:56:20PM +0800, Jiaxin Wu wrote: > > This patch is to avoid configure SMBASE if SmBase relocation has been > > done. If gSmmBaseHobGuid found, means SmBase info has been relocated > > and recorded in the SmBase array. No need to do the relocation in > > SmmCpuFeaturesInitializeProcessor(). > > Still not answered: Who produces the gSmmBaseHobGuid? > > If you intend to submit the producer code to edk2 please do so as part > of this patch series, so it is possible to see the whole picture instead > of only some pieces of the puzzle when reviewing the code. > > If you don't submit the producer code it is pointless to touch OVMF. > You are only adding dead code. That would be a rather questionable > decision though and add a big question mark to intels open source > commitment. > > take care, > Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98811): https://edk2.groups.io/g/devel/message/98811 Mute This Topic: https://groups.io/mt/96350764/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-