[edk2-devel] [PATCH v3 5/5] OvmfPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

Ni, Ray ray.ni at intel.com
Wed Jan 18 14:37:11 UTC 2023


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 <kraxel at redhat.com>
> Sent: Wednesday, January 18, 2023 8:20 PM
> To: Wu, Jiaxin <jiaxin.wu at intel.com>
> Cc: devel at edk2.groups.io; Dong, Eric <eric.dong at intel.com>; Ni, Ray
> <ray.ni at intel.com>; Zeng, Star <star.zeng at intel.com>; Laszlo Ersek
> <lersek at redhat.com>; Kumar, Rahul R <rahul.r.kumar at 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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list