diff options
author | Wei6 Xu <wei6.xu@intel.com> | 2024-09-02 10:06:18 +0800 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2024-09-02 12:43:49 +0800 |
commit | 91853ca6a5497c1b6e8ff356b6fffd977f7f5b38 (patch) | |
tree | ab605cc537ec60aeb4a4dc5397f8afa58d30b202 /MdeModulePkg | |
parent | af15e4535dcd4b2bfd0799ab36f0a3622687bdd3 (diff) | |
download | edk2-91853ca6a5497c1b6e8ff356b6fffd977f7f5b38.tar.gz edk2-91853ca6a5497c1b6e8ff356b6fffd977f7f5b38.tar.bz2 edk2-91853ca6a5497c1b6e8ff356b6fffd977f7f5b38.zip |
MdeModulePkg/VariableStandaloneMm: Notify variable write ready in MM
In Standalone MM, there is no notification to MM drivers that variable
write is ready. Install gSmmVariableWriteGuid into MM handle database
for the notification.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c | 13 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c index f3daca3eba..10578226c6 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c @@ -7,6 +7,8 @@ Copyright (c) 2018, Linaro, Ltd. All rights reserved. <BR> SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+
+#include <Library/MmServicesTableLib.h>
#include <Library/StandaloneMmMemLib.h>
#include "Variable.h"
@@ -67,6 +69,17 @@ VariableNotifySmmWriteReady ( VOID
)
{
+ EFI_STATUS Status;
+ EFI_HANDLE Handle;
+
+ Handle = NULL;
+ Status = gMmst->MmInstallProtocolInterface (
+ &Handle,
+ &gSmmVariableWriteGuid,
+ EFI_NATIVE_INTERFACE,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
}
/**
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf index c4185718aa..2d651c3c3d 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf @@ -115,6 +115,7 @@ gEfiMemoryOverwriteControlDataGuid ## SOMETIMES_CONSUMES ## Variable:L"MemoryOverwriteRequestControl"
gEfiMemoryOverwriteRequestControlLockGuid ## SOMETIMES_PRODUCES ## Variable:L"MemoryOverwriteRequestControlLock"
+ gSmmVariableWriteGuid ## PRODUCES ## GUID # Install protocol
gEfiSystemNvDataFvGuid ## CONSUMES ## GUID
gEdkiiFaultTolerantWriteGuid ## SOMETIMES_CONSUMES ## HOB
|