From nobody Mon Feb 9 05:19:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+40172+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40172+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1557291038; cv=none; d=zoho.com; s=zohoarc; b=HXk7BAFovVnEUtdi/g3mxVLSTEsy089C/gys/YPvy8LqpoQwScPEnACy5VTUfflHGwz5pjsGVLOf/2bZurHeV1/cpYGtGiZPFEq1PnF1Q0CEFFZ2vnfZrWCwwmmvbiWlHlDCm3aLB3PMJzIlif2uaNA10SPbA0xOfYkfUdcitD8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557291038; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Xl++eP5FEk58VqCDJF2GsHpWF6RB5JQ25oExOlGz/CI=; b=KCoRz9z/OUqo52Y/0+XKTNm8yWk4+PYcQfrUvPcbZYaPs/FfYKn/UgyD2sNWSi5Y/3tJbhdk3/PbqWCtMp0J7TpKayBp9Pvhck8eVfdyMwj164jRDsyaDvV+Z3zsdMPd4Y0KxNekmJMO3qbK2Y3bedtCQa+d5k4tl6aY9GYR8Qw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40172+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1557291038830703.7207883107997; Tue, 7 May 2019 21:50:38 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Tue, 07 May 2019 21:50:37 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2019 21:50:37 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by orsmga002.jf.intel.com with ESMTP; 07 May 2019 21:50:35 -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: [edk2-devel] [PATCH V2 2/6] MdeModulePkg/CapsuleRuntimeDxe: Transfer reset data Date: Wed, 8 May 2019 12:49:35 +0800 Message-Id: <20190508044939.15744-3-zhichao.gao@intel.com> In-Reply-To: <20190508044939.15744-1-zhichao.gao@intel.com> References: <20190508044939.15744-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1557291038; bh=vHLj7ATvMBnFZuTXkQdKZHqTLulgfLl6rocS/ijrgC4=; h=Cc:Date:From:Reply-To:Subject:To; b=FfPS8im4dNE9D1AkfNgCnlctmjJuuA6yV5lLWf4KgGe/L5dTWY62ZZFJ91gdpuh1GC6 tpIsIZ9RzWb3ImL3PgBdA5e9LoFObFZ7BkTuwPRHuVMxSRA0VVVACqXw4FC0MHY4XAvmW dlCh++jFzqX9iOHzyxCqhJ1D2myM51sK7Mo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1772 Transfer reset data start with a null sting and followed by gEdkiiCapsuleArmedResetGuid 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 --- .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 2 ++ .../CapsuleRuntimeDxe/CapsuleService.c | 24 ++++++++++++------- .../CapsuleRuntimeDxe/CapsuleService.h | 3 ++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf= b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf index 338577e293..43d295f5cf 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf @@ -62,6 +62,7 @@ PrintLib BaseMemoryLib CacheMaintenanceLib + ResetSystemLib =20 [LibraryClasses.X64] UefiLib @@ -72,6 +73,7 @@ ## SOMETIMES_PRODUCES ## Variable:L"CapsuleLongModeBuffer" # The long = mode buffer used by IA32 Capsule PEIM to call X64 CapsuleCoalesce code to h= andle >4GB capsule blocks gEfiCapsuleVendorGuid gEfiFmpCapsuleGuid ## SOMETIMES_CONSUMES ##= GUID # FMP capsule GUID + gEdkiiCapsuleArmedResetGuid ## SOMETIMES_CONSUMES =20 [Protocols] gEfiCapsuleArchProtocolGuid ## PRODUCES diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/Md= eModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c index aaf819c4c6..77cfe11e00 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c @@ -4,7 +4,7 @@ It installs the Capsule Architectural Protocol defined in PI1.0a to sign= ify the capsule runtime services are ready. =20 -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -63,13 +63,14 @@ UpdateCapsule ( IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL ) { - UINTN ArrayNumber; - EFI_STATUS Status; - EFI_CAPSULE_HEADER *CapsuleHeader; - BOOLEAN NeedReset; - BOOLEAN InitiateReset; - CHAR16 CapsuleVarName[30]; - CHAR16 *TempVarName; + UINTN ArrayNumber; + EFI_STATUS Status; + EFI_CAPSULE_HEADER *CapsuleHeader; + BOOLEAN NeedReset; + BOOLEAN InitiateReset; + CHAR16 CapsuleVarName[30]; + CHAR16 *TempVarName; + RESET_DATA_WITH_NULL_STRING ResetData; =20 // // Capsule Count can't be less than one. @@ -210,7 +211,12 @@ UpdateCapsule ( // will initiate a reset of the platform which is compatible with t= he passed-in capsule request and will // not return back to the caller. // - EfiResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL); + ResetData.NullString =3D CHAR_NULL; + CopyGuid ( + (GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_DATA_WITH_NULL_S= TRING, ResetGuid)), + &gEdkiiCapsuleArmedResetGuid + ); + EfiResetSystem (EfiResetWarm, EFI_SUCCESS, sizeof (RESET_DATA_WITH_= NULL_STRING), &ResetData); } } return Status; diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h b/Md= eModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h index 069df3c750..6790810cf4 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h @@ -4,7 +4,7 @@ It installs the Capsule Architectural Protocol defined in PI1.0a to sign= ify the capsule runtime services are ready. =20 - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
Copyright (c) 2018, Linaro, Ltd. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent @@ -30,6 +30,7 @@ #include #include #include +#include =20 /** Create the variable to save the base address of page table and stack --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40172): https://edk2.groups.io/g/devel/message/40172 Mute This Topic: https://groups.io/mt/31540323/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-