[edk2-devel] [PATCH v4 13/15] MdeModulePkg/CapsuleLib: Transfer reset data

Gao, Zhichao zhichao.gao at intel.com
Mon Aug 12 03:07:56 UTC 2019


From: Bret Barkelew <Bret.Barkelew at microsoft.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1772

Transfer reset data start with a null sting and followed by
gEdkiiCapsuleUpdateCompleteResetGuid for DoResetSystem
function.

Cc: Jian J Wang <jian.j.wang at intel.com>
Cc: Hao Wu <hao.a.wu at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Star Zeng <star.zeng at intel.com>
Cc: Liming Gao <liming.gao at intel.com>
Cc: Sean Brogan <sean.brogan at microsoft.com>
Cc: Michael Turner <Michael.Turner at microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
---
 MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf      | 2 ++
 MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
index 05de4299fba9..5fd7e1764b0b 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
@@ -51,6 +51,7 @@ [LibraryClasses]
   DisplayUpdateProgressLib
   FileHandleLib
   UefiBootManagerLib
+  ResetUtilityLib
 
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleMax                               ## CONSUMES
@@ -93,6 +94,7 @@ [Guids]
   ## SOMETIMES_PRODUCES ## Variable:L"BootNext"
   gEfiGlobalVariableGuid
   gEdkiiCapsuleOnDiskNameGuid             ## SOMETIMES_CONSUMES ## GUID
+  gEdkiiCapsuleUpdateCompleteResetGuid    ## SOMETIMES_CONSUMES
 
 [Depex]
   gEfiVariableWriteArchProtocolGuid
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
index 2cecc87385b3..2802962ed1b6 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
@@ -30,6 +30,7 @@
 #include <Library/ReportStatusCodeLib.h>
 #include <Library/CapsuleLib.h>
 #include <Library/DisplayUpdateProgressLib.h>
+#include <Library/ResetUtilityLib.h>
 
 #include <IndustryStandard/WindowsUxCapsule.h>
 
@@ -623,7 +624,7 @@ DoResetSystem (
 
   REPORT_STATUS_CODE(EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32(PcdStatusCodeSubClassCapsule) | PcdGet32(PcdCapsuleStatusCodeResettingSystem)));
 
-  gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
+  ResetSystemWithSubtype (EfiResetCold, &gEdkiiCapsuleUpdateCompleteResetGuid);
 
   CpuDeadLoop();
 }
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45386): https://edk2.groups.io/g/devel/message/45386
Mute This Topic: https://groups.io/mt/32836907/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list