diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h index e7bd4c9706..969a4f7e9d 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h @@ -156,17 +156,13 @@ VariableSmmIsNonPrimaryBufferValid ( ); /** - Whether the TCG or TCG2 protocols are installed in the UEFI protocol database. - This information is used by the MorLock code to infer whether an existing - MOR variable is legitimate or not. + Whether the MOR variable is legitimate or not. - @retval TRUE Either the TCG or TCG2 protocol is installed in the UEFI - protocol database - @retval FALSE Neither the TCG nor the TCG2 protocol is installed in the UEFI - protocol database + @retval TRUE MOR Variable is legitimate. + @retval FALSE MOR Variable in not legitimate. **/ BOOLEAN -VariableHaveTcgProtocols ( +VariableIsMorVariableLegitimate ( VOID ); diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c index 28e8cc55d9..7f8b2a7776 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c @@ -475,7 +475,7 @@ MorLockInitAtEndOfDxe ( // can be deduced from the absence of the TCG / TCG2 protocols, as edk2's // MOR implementation depends on (one of) those protocols. // - if (VariableHaveTcgProtocols ()) { + if (VariableIsMorVariableLegitimate ()) { // // The MOR variable originates from the platform firmware; set the MOR // Control Lock variable to report the locking capability to the OS. diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c index 1b9cf6dfd9..f3daca3eba 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c @@ -89,19 +89,15 @@ VariableServiceInitialize ( } /** - Whether the TCG or TCG2 protocols are installed in the UEFI protocol database. - This information is used by the MorLock code to infer whether an existing - MOR variable is legitimate or not. + Whether the MOR variable is legitimate or not. - @retval TRUE Either the TCG or TCG2 protocol is installed in the UEFI - protocol database - @retval FALSE Neither the TCG nor the TCG2 protocol is installed in the UEFI - protocol database + @retval TRUE MOR Variable is legitimate. + @retval FALSE MOR Variable in not legitimate. **/ BOOLEAN -VariableHaveTcgProtocols ( +VariableIsMorVariableLegitimate ( VOID ) { - return FALSE; + return TRUE; } diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTraditionalMm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTraditionalMm.c index 7247f7574d..cd82bb5675 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTraditionalMm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableTraditionalMm.c @@ -118,12 +118,12 @@ VariableServiceInitialize ( MOR variable is legitimate or not. @retval TRUE Either the TCG or TCG2 protocol is installed in the UEFI - protocol database + protocol database. MOR variable is legitimate. @retval FALSE Neither the TCG nor the TCG2 protocol is installed in the UEFI - protocol database + protocol database. MOR variable is not legitimate. **/ BOOLEAN -VariableHaveTcgProtocols ( +VariableIsMorVariableLegitimate ( VOID ) {