From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) Received: from mga02.intel.com (mga02.intel.com []) by groups.io with SMTP; Sun, 11 Aug 2019 20:08:35 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Aug 2019 20:08:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,375,1559545200"; d="scan'208";a="193859746" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 11 Aug 2019 20:08:18 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao Wu , Ray Ni , Star Zeng , Liming Gao , Sean Brogan , Michael Turner Subject: [PATCH v4 13/15] MdeModulePkg/CapsuleLib: Transfer reset data Date: Mon, 12 Aug 2019 11:07:56 +0800 Message-Id: <20190812030758.10324-14-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190812030758.10324-1-zhichao.gao@intel.com> References: <20190812030758.10324-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bret Barkelew 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 Cc: Hao Wu Cc: Ray Ni Cc: Star Zeng Cc: Liming Gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Signed-off-by: Zhichao Gao --- 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 #include #include +#include #include @@ -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