On 10/15/15 00:26, Laszlo Ersek wrote: > At this point we can enable building PiSmmCpuDxeSmm. > > The SmmLib dependency is resolved to MdePkg's SmmLibNull instance. First, > this matches the resolution in "UefiCpuPkg/UefiCpuPkg.dsc". Second, from > this library class, PiSmmCpuDxeSmm calls the ClearSmi() interface only, > and that API is a no-op on Q35 anyway.
I will drop this paragraph from the commit message, and the according DSC lines below: see <http://thread.gmane.org/gmane.comp.bios.edk2.devel/3307/focus=3315>. Thanks Laszlo > > CPU specific features, like SMRR detection, and functions that are used to > initialize SMM and process SMIs, are abstracted through the > SmmCpuFeaturesLib class for the PiSmmCpuDxeSmm module. Resolve it to our > own implementation under OvmfPkg -- it allows PiSmmCpuDxeSmm to work with > QEMU's and KVM's 64-bit state save map format, which follows the > definition from AMD's programmer manual. > > SmmCpuPlatformHookLib provides platform specific functions that are used > to initialize SMM and process SMIs. Resolve it to the one Null instance > provided by UefiCpuPkg, which is expected to work for most platforms. > > PiSmmCpuDxeSmm is not yet intended to function correctly with regard to > S3; the upcoming, trimmed down CpuMpDxe port (under the name CpuS3DataDxe) > will be necessary for that. > > Cc: Paolo Bonzini <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek <[email protected]> > [[email protected]: resolve the SmmCpuFeaturesLib class to OVMF's own > instance] > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Paolo Bonzini <[email protected]> > --- > > Notes: > v3: > - resolve SmmCpuFeaturesLib to OvmfPkg's own instance [Paolo] > > v2: > - The module builds now for X64 too, thanks to Intel for open sourcing > the X64 SMM entry vector (huge kudos). Update the commit message > accordingly. > - Thanks to Mike, PiSmmCpuDxeSmm and SmmCpuPlatformHookLibNull are now > under UefiCpuPkg; update pathnames in the DSC / FDF files accordingly. > - Version 2 of this patch also obviates "OvmfPkg: PiSmmCpuDxeSmm: > eliminate SmmLib dependency" from v1. > - Resolve SmmCpuFeaturesLib. This abstraction is new in Mike's > PiSmmCpuDxeSmm module; Quark used to have similar code in > "SmmFeatures.c" non-separably. > > OvmfPkg/OvmfPkgIa32.dsc | 6 ++++++ > OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++++++ > OvmfPkg/OvmfPkgX64.dsc | 6 ++++++ > OvmfPkg/OvmfPkgIa32.fdf | 1 + > OvmfPkg/OvmfPkgIa32X64.fdf | 1 + > OvmfPkg/OvmfPkgX64.fdf | 1 + > 6 files changed, 21 insertions(+) > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 263d4d0..292d3f8 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -734,4 +734,10 @@ [Components] > <LibraryClasses> > LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf > } > + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf { > + <LibraryClasses> > + > SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf > + SmmLib|MdePkg/Library/SmmLibNull/SmmLibNull.inf > + > SmmCpuFeaturesLib|OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf > + } > !endif > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 8101d91..85be5b9 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -741,4 +741,10 @@ [Components.X64] > <LibraryClasses> > LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf > } > + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf { > + <LibraryClasses> > + > SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf > + SmmLib|MdePkg/Library/SmmLibNull/SmmLibNull.inf > + > SmmCpuFeaturesLib|OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf > + } > !endif > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index 0482232..0dc2516 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -739,4 +739,10 @@ [Components] > <LibraryClasses> > LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf > } > + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf { > + <LibraryClasses> > + > SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf > + SmmLib|MdePkg/Library/SmmLibNull/SmmLibNull.inf > + > SmmCpuFeaturesLib|OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf > + } > !endif > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index 53ddae3..7f9e201 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -362,6 +362,7 @@ [FV.DXEFV] > INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf > INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf > INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf > +INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf > !endif > > > ################################################################################ > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index bb7ca6e..d70736e 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -362,6 +362,7 @@ [FV.DXEFV] > INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf > INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf > INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf > +INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf > !endif > > > ################################################################################ > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index bceab15..b9fee36 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -362,6 +362,7 @@ [FV.DXEFV] > INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf > INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf > INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf > +INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf > !endif > > > ################################################################################ > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

