public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: devel@edk2.groups.io
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>,
	Jian J Wang <jian.j.wang@intel.com>, Hao Wu <hao.a.wu@intel.com>,
	Ray Ni <ray.ni@intel.com>, Star Zeng <star.zeng@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Sean Brogan <sean.brogan@microsoft.com>,
	Michael Turner <Michael.Turner@microsoft.com>
Subject: [PATCH v4 13/15] MdeModulePkg/CapsuleLib: Transfer reset data
Date: Mon, 12 Aug 2019 11:07:56 +0800	[thread overview]
Message-ID: <20190812030758.10324-14-zhichao.gao@intel.com> (raw)
In-Reply-To: <20190812030758.10324-1-zhichao.gao@intel.com>

From: Bret Barkelew <Bret.Barkelew@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@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@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


  parent reply	other threads:[~2019-08-12  3:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12  3:07 [PATCH v4 00/15] MdeModulePkg: Transfer reset data Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 01/15] MdeModulePkg: Add guids for capsule update Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 02/15] MdeModulePkg: Add ResetUtilityLib to dsc file Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 03/15] ArmVirtPkg/ArmVirtQemu.dsc: " Gao, Zhichao
2019-08-12 13:49   ` Laszlo Ersek
2019-08-12 13:54     ` Laszlo Ersek
2019-08-12  3:07 ` [PATCH v4 04/15] ArmVritPkg/ArmVirtQemuKernel.dsc: " Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 05/15] ArmVirtPkg/ArmVirtXen.dsc: " Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 06/15] EmulatorPkg/EmulatorPkg.dsc: " Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 07/15] OvmfPkg/OvmfPkgIa32.dsc: " Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 08/15] OvmfPkg/OvmfPkgIa32X64.dsc: " Gao, Zhichao
2019-08-12 13:56   ` Laszlo Ersek
2019-08-12  3:07 ` [PATCH v4 09/15] OvmfPkg/OvmfPkgX64.dsc: " Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 10/15] UefiPayloadPkg/UefiPayloadPkgIa32.dsc: " Gao, Zhichao
2019-08-12 15:27   ` Guo Dong
2019-08-12  3:07 ` [PATCH v4 11/15] UefiPayloadPkg: Add ResetUtilityLib to UefiPayloadPkgIa32X64.dsc Gao, Zhichao
2019-08-12 15:28   ` Guo Dong
2019-08-12  3:07 ` [PATCH v4 12/15] MdeModulePkg/CapsuleRuntimeDxe: Transfer reset data Gao, Zhichao
2019-08-12  3:07 ` Gao, Zhichao [this message]
2019-08-12  3:07 ` [PATCH v4 14/15] MdePkg/UefiRuntimeLib.h: Change the comment Gao, Zhichao
2019-08-12  3:07 ` [PATCH v4 15/15] MdePkg/UefiRuntimeLib: " Gao, Zhichao
2019-08-12 14:01   ` [edk2-devel] " Laszlo Ersek
2019-08-12  5:10 ` [edk2-devel] [PATCH v4 00/15] MdeModulePkg: Transfer reset data Liming Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190812030758.10324-14-zhichao.gao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox