From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: zhichao.gao@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Sun, 05 May 2019 00:52:39 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 May 2019 00:52:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,433,1549958400"; d="scan'208";a="155041589" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by FMSMGA003.fm.intel.com with ESMTP; 05 May 2019 00:52:24 -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 3/4] MdeModulePkg/CapsuleLib: Transfer reset data Date: Sun, 5 May 2019 15:50:45 +0800 Message-Id: <20190505075046.14464-4-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190505075046.14464-1-zhichao.gao@intel.com> References: <20190505075046.14464-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 gCapsuleUpdateCompleteResetGuid for capsule update. 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 | 3 ++- .../Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf index 14c3d19bc3..78e4958995 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf @@ -3,7 +3,7 @@ # # Capsule library instance for DXE_DRIVER module types. # -# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -74,6 +74,7 @@ gEfiCapsuleReportGuid gEfiCapsuleVendorGuid ## SOMETIMES_CONSUMES ## Variable:L"CapsuleUpdateData" gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event + gCapsuleUpdateCompleteResetGuid ## SOMETIMES_CONSUMES [Depex] gEfiVariableWriteArchProtocolGuid diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c index 5e2d2b87a8..dbc4287bfa 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c @@ -9,7 +9,7 @@ ProcessCapsules(), ProcessTheseCapsules() will receive untrusted input and do basic validation. - Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -33,6 +33,8 @@ #include +#include + extern EDKII_FIRMWARE_MANAGEMENT_PROGRESS_PROTOCOL *mFmpProgress; /** @@ -518,7 +520,7 @@ DoResetSystem ( REPORT_STATUS_CODE(EFI_PROGRESS_CODE, (EFI_SOFTWARE | PcdGet32(PcdStatusCodeSubClassCapsule) | PcdGet32(PcdCapsuleStatusCodeResettingSystem))); - gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); + gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, sizeof (RESET_DATA_WITH_NULL_STRING), &gCapsuleUpdateCompleteResetGuid); CpuDeadLoop(); } -- 2.21.0.windows.1