<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 1 6 1 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p style="margin:0in"><span style="font-size:12.0pt">Reviewed</span>-by: <span style="font-size:10.5pt">
Chasel Chiu <</span><a href="mailto:chasel.chiu@intel.com"><span style="font-size:10.5pt">chasel.chiu@intel.com</span></a><span style="font-size:10.5pt;color:#1F497D">></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Chasel<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt">From:</span></b><span style="font-size:11.0pt"> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
<br>
<b>Sent:</b> Tuesday, May 23, 2023 5:59 PM<br>
<b>To:</b> Shindo, Miki <miki.shindo@intel.com>; devel@edk2.groups.io<br>
<b>Cc:</b> Chiu, Chasel <chasel.chiu@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>; Zhang, Xiaoqiang <xiaoqiang.zhang@intel.com><br>
<b>Subject:</b> Re: [edk2-platforms:PATCH v2] MinPlatformPkg: Fix SetLargeVariable fail issue<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thank you, Miki, and Xiaoqiang!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Reviewed-by: Nate DeSimone <<a href="mailto:nathaniel.l.desimone@intel.com">nathaniel.l.desimone@intel.com</a>><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Shindo, Miki <<a href="mailto:miki.shindo@intel.com">miki.shindo@intel.com</a>><br>
<b>Date: </b>Tuesday, May 23, 2023 at 5:44 PM<br>
<b>To: </b><a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>><br>
<b>Cc: </b>Chiu, Chasel <<a href="mailto:chasel.chiu@intel.com">chasel.chiu@intel.com</a>>, Desimone, Nathaniel L <<a href="mailto:nathaniel.l.desimone@intel.com">nathaniel.l.desimone@intel.com</a>>, Gao, Liming <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>>,
 Dong, Eric <<a href="mailto:eric.dong@intel.com">eric.dong@intel.com</a>>, Zhang, Xiaoqiang <<a href="mailto:xiaoqiang.zhang@intel.com">xiaoqiang.zhang@intel.com</a>><br>
<b>Subject: </b>[edk2-platforms:PATCH v2] MinPlatformPkg: Fix SetLargeVariable fail issue<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">REF:
<a href="https://bugzilla.tianocore.org/show_bug.cgi?id=4454">https://bugzilla.tianocore.org/show_bug.cgi?id=4454</a><br>
<br>
On Server platform, when the large variable "FspNvsBuffer" is already in the UEFI variable store and the remaining variable storage space is less than the large variable size, and also not in OS runtime, then we need to add the size of the current data that
 will end up being replaced by the new data to the remaining space before we decide that there is not enough space to store the large variable.<br>
<br>
Cc: Chasel Chiu <<a href="mailto:chasel.chiu@intel.com">chasel.chiu@intel.com</a>><br>
Cc: Nate DeSimone <<a href="mailto:nathaniel.l.desimone@intel.com">nathaniel.l.desimone@intel.com</a>><br>
Cc: Liming Gao <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>><br>
Cc: Eric Dong <<a href="mailto:eric.dong@intel.com">eric.dong@intel.com</a>><br>
Co-authored-by: Xiaoqiang Zhang <<a href="mailto:xiaoqiang.zhang@intel.com">xiaoqiang.zhang@intel.com</a>><br>
Signed-off-by: Miki Shindo <<a href="mailto:miki.shindo@intel.com">miki.shindo@intel.com</a>><br>
---<br>
 Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c                   | 10 +++++++++-<br>
 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c        | 15 +++++++++++++++<br>
 Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWriteCommon.c                   | 16 ++++++++++++++++<br>
 Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLibConstructor.c  | 30 ++++++++++++++++++++++++++++++<br>
 Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLibConstructor.c | 30 ++++++++++++++++++++++++++++++<br>
 Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h                                     | 12 ++++++++++++<br>
 Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf             |  1 +<br>
 Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLib.inf           |  3 ++-<br>
 Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf          |  3 ++-<br>
 9 files changed, 117 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c<br>
index de23ae6160..4bf9a6994f 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/LargeVariableWriteLib.c<br>
@@ -22,7 +22,7 @@<br>
 #include <Library/PrintLib.h><br>
<br>
 #include <Library/VariableReadLib.h><br>
<br>
 #include <Library/VariableWriteLib.h><br>
<br>
-<br>
<br>
+#include <Library/LargeVariableReadLib.h><br>
<br>
 #include "LargeVariableCommon.h"<br>
<br>
 <br>
<br>
 /**<br>
<br>
@@ -270,6 +270,7 @@ SetLargeVariable (<br>
   UINT8         *OffsetPtr;<br>
<br>
   UINTN         BytesRemaining;<br>
<br>
   UINTN         SizeToSave;<br>
<br>
+  UINTN         BufferSize = 0;<br>
<br>
 <br>
<br>
   //<br>
<br>
   // Check input parameters.<br>
<br>
@@ -365,6 +366,13 @@ SetLargeVariable (<br>
     // Non-Volatile storage to store the data.<br>
<br>
     //<br>
<br>
     RemainingVariableStorage = GetRemainingVariableStorageSpace ();<br>
<br>
+    //<br>
<br>
+    // Check if current variable already existed in NV storage variable space<br>
<br>
+    //<br>
<br>
+    Status = GetLargeVariable (VariableName, VendorGuid, &BufferSize, NULL);<br>
<br>
+    if ((Status == EFI_BUFFER_TOO_SMALL) && (BufferSize != 0) && !VarLibAtOsRuntime ()) {<br>
<br>
+      RemainingVariableStorage = RemainingVariableStorage + BufferSize;<br>
<br>
+    }<br>
<br>
     if (DataSize > RemainingVariableStorage) {<br>
<br>
       DEBUG ((DEBUG_ERROR, "SetLargeVariable: Not enough NV storage space to store the data\n"));<br>
<br>
       Status = EFI_OUT_OF_RESOURCES;<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c b/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c<br>
index 28730f858b..9ca4734f24 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.c<br>
@@ -195,6 +195,21 @@ VarLibVariableRequestToLock (<br>
   return Status;<br>
<br>
 }<br>
<br>
 <br>
<br>
+/**<br>
<br>
+  Indicator of whether it is runtime or not.<br>
<br>
+<br>
<br>
+  @retval TRUE        It is Runtime.<br>
<br>
+  @retval FALSE       It is not Runtime.<br>
<br>
+**/<br>
<br>
+BOOLEAN<br>
<br>
+EFIAPI<br>
<br>
+VarLibAtOsRuntime (<br>
<br>
+  VOID<br>
<br>
+  )<br>
<br>
+{<br>
<br>
+  return (mVariableWriteLibVariablePolicy == NULL) ? TRUE : FALSE;<br>
<br>
+}<br>
<br>
+<br>
<br>
 /**<br>
<br>
   Close events when driver unloaded.<br>
<br>
 <br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWriteCommon.c b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWriteCommon.c<br>
index 50ebb544b8..cd7118d1fb 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWriteCommon.c<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWriteCommon.c<br>
@@ -18,6 +18,7 @@<br>
 #include <Protocol/SmmVariable.h><br>
<br>
 <br>
<br>
 EFI_SMM_VARIABLE_PROTOCOL  *mVariableWriteLibSmmVariable = NULL;<br>
<br>
+BOOLEAN                    mEfiAtRuntime = FALSE;<br>
<br>
 <br>
<br>
 /**<br>
<br>
   Sets the value of a variable.<br>
<br>
@@ -169,3 +170,18 @@ VarLibVariableRequestToLock (<br>
   //<br>
<br>
   return EFI_UNSUPPORTED;<br>
<br>
 }<br>
<br>
+<br>
<br>
+/**<br>
<br>
+  Indicator of whether it is runtime or not.<br>
<br>
+<br>
<br>
+  @retval TRUE        It is Runtime.<br>
<br>
+  @retval FALSE       It is not Runtime.<br>
<br>
+**/<br>
<br>
+BOOLEAN<br>
<br>
+EFIAPI<br>
<br>
+VarLibAtOsRuntime (<br>
<br>
+  VOID<br>
<br>
+  )<br>
<br>
+{<br>
<br>
+  return mEfiAtRuntime;<br>
<br>
+}<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLibConstructor.c b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLibConstructor.c<br>
index d39418abd2..8c2b7d18f5 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLibConstructor.c<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLibConstructor.c<br>
@@ -20,6 +20,28 @@<br>
 #include <Library/MmServicesTableLib.h><br>
<br>
 <br>
<br>
 extern EFI_SMM_VARIABLE_PROTOCOL  *mVariableWriteLibSmmVariable;<br>
<br>
+extern BOOLEAN                    mEfiAtRuntime;<br>
<br>
+<br>
<br>
+/**<br>
<br>
+  Callback for ExitBootService, which is registered at the constructor.<br>
<br>
+  This callback sets a global variable mEfiAtRuntime to indicate whether<br>
<br>
+  it is after ExitBootService.<br>
<br>
+<br>
<br>
+  @param[in] Protocol        Protocol unique ID.<br>
<br>
+  @param[in] Interface       Interface instance.<br>
<br>
+  @param[in] Handle          The handle on which the interface is installed.<br>
<br>
+**/<br>
<br>
+EFI_STATUS<br>
<br>
+EFIAPI<br>
<br>
+VarLibExitBootServicesCallback (<br>
<br>
+  IN      CONST EFI_GUID   *Protocol,<br>
<br>
+  IN      VOID             *Interface,<br>
<br>
+  IN      EFI_HANDLE        Handle<br>
<br>
+  )<br>
<br>
+{<br>
<br>
+  mEfiAtRuntime = TRUE;<br>
<br>
+  return EFI_SUCCESS;<br>
<br>
+}<br>
<br>
 <br>
<br>
 /**<br>
<br>
   The constructor function acquires the EFI SMM Variable Services<br>
<br>
@@ -41,11 +63,19 @@ StandaloneMmVariableWriteLibConstructor (<br>
   )<br>
<br>
 {<br>
<br>
   EFI_STATUS    Status;<br>
<br>
+  VOID          *Registration = NULL;<br>
<br>
 <br>
<br>
   //<br>
<br>
   // Locate SmmVariableProtocol.<br>
<br>
   //<br>
<br>
   Status = gMmst->MmLocateProtocol (&gEfiSmmVariableProtocolGuid, NULL, (VOID **) &mVariableWriteLibSmmVariable);<br>
<br>
   ASSERT_EFI_ERROR (Status);<br>
<br>
+<br>
<br>
+  //<br>
<br>
+  // Register VarLibExitBootServicesCallback for gEdkiiSmmExitBootServicesProtocolGuid.<br>
<br>
+  //<br>
<br>
+  Status = SmmRegisterProtocolNotify (&gEdkiiSmmExitBootServicesProtocolGuid, VarLibExitBootServicesCallback, &Registration);<br>
<br>
+  ASSERT_EFI_ERROR (Status);<br>
<br>
+<br>
<br>
   return Status;<br>
<br>
 }<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLibConstructor.c b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLibConstructor.c<br>
index d142527e17..abc1e25cde 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLibConstructor.c<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLibConstructor.c<br>
@@ -20,6 +20,28 @@<br>
 #include <Library/SmmServicesTableLib.h><br>
<br>
 <br>
<br>
 extern EFI_SMM_VARIABLE_PROTOCOL  *mVariableWriteLibSmmVariable;<br>
<br>
+extern BOOLEAN                    mEfiAtRuntime;<br>
<br>
+<br>
<br>
+/**<br>
<br>
+  Callback for ExitBootService, which is registered at the constructor.<br>
<br>
+  This callback sets a global variable mEfiAtRuntime to indicate whether<br>
<br>
+  it is after ExitBootService.<br>
<br>
+<br>
<br>
+  @param[in] Protocol        Protocol unique ID.<br>
<br>
+  @param[in] Interface       Interface instance.<br>
<br>
+  @param[in] Handle          The handle on which the interface is installed.<br>
<br>
+**/<br>
<br>
+EFI_STATUS<br>
<br>
+EFIAPI<br>
<br>
+VarLibExitBootServicesCallback (<br>
<br>
+  IN      CONST EFI_GUID   *Protocol,<br>
<br>
+  IN      VOID             *Interface,<br>
<br>
+  IN      EFI_HANDLE        Handle<br>
<br>
+  )<br>
<br>
+{<br>
<br>
+  mEfiAtRuntime = TRUE;<br>
<br>
+  return EFI_SUCCESS;<br>
<br>
+}<br>
<br>
 <br>
<br>
 /**<br>
<br>
   The constructor function acquires the EFI SMM Variable Services<br>
<br>
@@ -41,11 +63,19 @@ TraditionalMmVariableWriteLibConstructor (<br>
   )<br>
<br>
 {<br>
<br>
   EFI_STATUS    Status;<br>
<br>
+  VOID          *Registration = NULL;<br>
<br>
 <br>
<br>
   //<br>
<br>
   // Locate SmmVariableProtocol.<br>
<br>
   //<br>
<br>
   Status = gSmst->SmmLocateProtocol (&gEfiSmmVariableProtocolGuid, NULL, (VOID **) &mVariableWriteLibSmmVariable);<br>
<br>
   ASSERT_EFI_ERROR (Status);<br>
<br>
+<br>
<br>
+  //<br>
<br>
+  // Register VarLibExitBootServicesCallback for gEdkiiSmmExitBootServicesProtocolGuid.<br>
<br>
+  //<br>
<br>
+  Status = SmmRegisterProtocolNotify (&gEdkiiSmmExitBootServicesProtocolGuid, VarLibExitBootServicesCallback, &Registration);<br>
<br>
+  ASSERT_EFI_ERROR (Status);<br>
<br>
+<br>
<br>
   return Status;<br>
<br>
 }<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h<br>
index fab87f2e48..bc0b52d782 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h<br>
+++ b/Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h<br>
@@ -135,4 +135,16 @@ VarLibVariableRequestToLock (<br>
   IN  EFI_GUID                     *VendorGuid<br>
<br>
   );<br>
<br>
 <br>
<br>
+/**<br>
<br>
+  Indicator of whether it is runtime or not.<br>
<br>
+<br>
<br>
+  @retval TRUE        It is Runtime.<br>
<br>
+  @retval FALSE       It is not Runtime.<br>
<br>
+**/<br>
<br>
+BOOLEAN<br>
<br>
+EFIAPI<br>
<br>
+VarLibAtOsRuntime (<br>
<br>
+  VOID<br>
<br>
+  );<br>
<br>
+<br>
<br>
 #endif  // _VARIABLE_WRITE_LIB_H_<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf<br>
index 2493a94596..cbc2a5d93a 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf<br>
@@ -49,3 +49,4 @@<br>
   PrintLib<br>
<br>
   VariableReadLib<br>
<br>
   VariableWriteLib<br>
<br>
+  LargeVariableReadLib<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLib.inf b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLib.inf<br>
index 0d1c63a297..868be49630 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLib.inf<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVariableWriteLib.inf<br>
@@ -39,7 +39,8 @@<br>
   MmServicesTableLib<br>
<br>
 <br>
<br>
 [Protocols]<br>
<br>
-  gEfiSmmVariableProtocolGuid   ## CONSUMES<br>
<br>
+  gEfiSmmVariableProtocolGuid             ## CONSUMES<br>
<br>
+  gEdkiiSmmExitBootServicesProtocolGuid   ## CONSUMES<br>
<br>
 <br>
<br>
 [Depex]<br>
<br>
   gEfiSmmVariableProtocolGuid<br>
<br>
diff --git a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf<br>
index 5d833b7e0f..4aaab069ab 100644<br>
--- a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf<br>
+++ b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf<br>
@@ -38,7 +38,8 @@<br>
   SmmServicesTableLib<br>
<br>
 <br>
<br>
 [Protocols]<br>
<br>
-  gEfiSmmVariableProtocolGuid   ## CONSUMES<br>
<br>
+  gEfiSmmVariableProtocolGuid             ## CONSUMES<br>
<br>
+  gEdkiiSmmExitBootServicesProtocolGuid   ## CONSUMES<br>
<br>
 <br>
<br>
 [Depex]<br>
<br>
   gEfiSmmVariableProtocolGuid<br>
<br>
-- <br>
2.39.1.windows.1<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>


<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>


Groups.io Links:<p>


  
    You receive all messages sent to this group.
  
  


<p>
<a target="_blank" href="https://edk2.groups.io/g/devel/message/105211">View/Reply Online (#105211)</a> |


  

|

  <a target="_blank" href="https://groups.io/mt/99099949/1813853">Mute This Topic</a>

| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>




<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>