Add TPM2 implementation.
signed off by: jiewen.yao@intel.com reviewed by: guo.dong@intel.com git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14687 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -57,6 +57,20 @@ UINTN mVariableBufferPayloadSize;
|
||||
EFI_LOCK mVariableServicesLock;
|
||||
EDKII_VARIABLE_LOCK_PROTOCOL mVariableLock;
|
||||
|
||||
/**
|
||||
SecureBoot Hook for SetVariable.
|
||||
|
||||
@param[in] VariableName Name of Variable to be found.
|
||||
@param[in] VendorGuid Variable vendor GUID.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
SecureBootHook (
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_GUID *VendorGuid
|
||||
);
|
||||
|
||||
/**
|
||||
Acquires lock only at boot time. Simply returns at runtime.
|
||||
|
||||
@@ -545,6 +559,15 @@ RuntimeServiceSetVariable (
|
||||
|
||||
Done:
|
||||
ReleaseLockOnlyAtBootTime (&mVariableServicesLock);
|
||||
|
||||
if (!EfiAtRuntime ()) {
|
||||
if (!EFI_ERROR (Status)) {
|
||||
SecureBootHook (
|
||||
VariableName,
|
||||
VendorGuid
|
||||
);
|
||||
}
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user