mirror of https://github.com/acidanthera/audk.git
OvmfPkg: LockBoxLib: -D SMM_REQUIRE excludes our fake lockbox
When the user builds OVMF with -D SMM_REQUIRE, our LockBox implementation must not be used, since it doesn't actually protect data in the LockBox from the runtime guest OS. Add an according assert to LockBoxLibInitialize(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19046 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b7c14f1e43
commit
542534456b
|
@ -42,3 +42,6 @@
|
|||
[Pcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize
|
||||
|
||||
[FeaturePcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
||||
|
|
|
@ -43,3 +43,6 @@
|
|||
[Pcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize
|
||||
|
||||
[FeaturePcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
||||
|
|
|
@ -44,6 +44,8 @@ LockBoxLibInitialize (
|
|||
{
|
||||
UINTN NumEntries;
|
||||
|
||||
ASSERT (!FeaturePcdGet (PcdSmmSmramRequire));
|
||||
|
||||
if (PcdGet32 (PcdOvmfLockBoxStorageSize) < sizeof (LOCK_BOX_GLOBAL)) {
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue