On 2015/8/26 18:57, Laszlo Ersek wrote:
On 08/26/15 12:27, Laszlo Ersek wrote:
Star,
On 08/17/15 10:24, Star Zeng wrote:
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Cc: Laszlo Ersek <ler...@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.z...@intel.com>
---
OvmfPkg/OvmfPkgIa32.dsc | 5 ++++-
OvmfPkg/OvmfPkgIa32X64.dsc | 5 ++++-
OvmfPkg/OvmfPkgX64.dsc | 5 ++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index df00011..e55f0db 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -461,7 +461,10 @@ [Components]
PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf
}
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
+ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
+ <LibraryClasses>
+ NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+ }
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
should we use the same library instance with
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
as well?
That driver is not part of the OVMF build just yet, but I'm rebasing my
SMM series on current master, and I'm thinking that the same library
should *probably* be hooked into the non-privileged part of the
SMM-flavored variable driver, ie. VariableSmmRuntimeDxe. Can you please
confirm?
.... actually I think it should be hooked into the privileged half:
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
The theoretical part of the reason is that variable checking should
occur in the protected part of the driver.
The practical part of the reason is that the constructor of the
VarCheckUefiLib "plugin", VarCheckUefiLibNullClassConstructor(), calls
VarCheckLibRegisterSetVariableCheckHandler(), which is defined in
"MdeModulePkg/Library/VarCheckLib/VarCheckLib.c", ie. an implementation
of the VarCheckLib class. Ie. the "plugin" requires the receiving module
to link against VarCheckLib in the first place.
And, VariableSmmRuntimeDxe does not use that library class, only
VariableSmm.inf does.
Yes, you are right.
VariableSmmRuntimeDxe is a wrapper based on VariableSmm, it does not do
real variable check/get/set work.
Vlv2TbltDevicePkg/PlatformPkgX64.dsc has the example.
Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel