From nobody Mon Feb 9 01:20:30 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+42784+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+42784+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561445658; cv=none; d=zoho.com; s=zohoarc; b=Ht8LGvzvdGqIJXBZtztn9J9/riSQDtHk/lbkMl2T+ZnPAj4T5Qh+9pOvnZ0Cg1E9rKQmZmTKi1JU3aVLI1nY3t1BCdZAq1C8er1RxZkqWDG/a1I7SiIRNDiDQaOwxo/2dpBLQaPcp2Ay1igt/2EW07iF5wNBysfVzInWycXNf1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561445658; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=PM+aHoc9IIpQRjQvuMRhjgm73dno67Aum9EOOcReZoM=; b=bnXW6KWveeyQvN0WK7nA3wICOj5xX7xpZMJ0i1hWdB7d2EdgCVyJbF4Wccq0t014fnDEXLZtkHgdDO7EcPs0wBg6gl5vrgxb3nDwaoiLKXY8vv6cdUTIqe0UW5ZE6Uid1AJTkcXBYFgf/LhfaaYOxP9TLWOOFeV6MrrAt0tL+78= 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+42784+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 156144565841913.098052415235088; Mon, 24 Jun 2019 23:54:18 -0700 (PDT) Return-Path: X-Received: from mga02.intel.com (mga02.intel.com []) by groups.io with SMTP; Mon, 24 Jun 2019 23:54:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 23:54:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,415,1557212400"; d="scan'208";a="336749692" X-Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.39]) by orsmga005.jf.intel.com with ESMTP; 24 Jun 2019 23:54:15 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Chao B Zhang Subject: [edk2-devel][Patch 4/6] MdeModulePkg/DxeIpl: Support Capsule On Disk. Date: Tue, 25 Jun 2019 14:54:00 +0800 Message-Id: <20190625065402.19296-5-wei6.xu@intel.com> In-Reply-To: <20190625065402.19296-1-wei6.xu@intel.com> References: <20190625065402.19296-1-wei6.xu@intel.com> 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,wei6.xu@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561445657; bh=oHlGDwf+G6Ed66coHCPG4Q+FPORSTGrMSwkzHlDfsv8=; h=Cc:Date:From:Reply-To:Subject:To; b=Oyb6w/JDMm7Maf6CvFRtRUpnCkGsbMGCwRmqHPxogWPyDpwUX1lwLGUvTMPQHEdV2Kn KE5Hz4GYAjALCt0GcaY3x7y+HqBtvV4cXdGSCl5jxSW83wDJehuQHfMZkuUY6bXJoWUAT gQHWhVzPFMoiRZkXHrxyZ44tF0i8x83vVy0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF: https://github.com/tianocore/tianocore.github.io/wiki/ UEFI-Capsule-on-Disk-Introducation If Capsule On Disk mode, call Capsule On Disk Load PPI to load capsules. When it fails, still goes to Firmware Update boot path. BDS will clear corresponding indicator and reboot later on. Cc: Jian J Wang Cc: Hao A Wu Cc: Chao B Zhang Signed-off-by: Wei6 Xu --- MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 3 ++- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 20 +++++++++++--------- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 30 +++++++++++++++++++++++++++++- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeI= plPeim/DxeIpl.h index 063fefb414..90b5b5b211 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h @@ -1,10 +1,10 @@ /** @file Master header file for DxeIpl PEIM. All source files in this module shou= ld include this file for common definitions. =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 **/ =20 #ifndef __PEI_DXEIPL_H__ @@ -19,10 +19,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include #include #include +#include #include =20 #include #include #include diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/Dx= eIplPeim/DxeIpl.inf index 62bb3f3077..abc3217b01 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -3,11 +3,11 @@ # # This module produces a special PPI named the DXE Initial Program Load (= IPL) # PPI to discover and dispatch the DXE Foundation and components that are # needed to run the DXE Foundation. # -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -74,21 +74,23 @@ =20 [LibraryClasses.ARM, LibraryClasses.AARCH64] ArmMmuLib =20 [Ppis] - gEfiDxeIplPpiGuid ## PRODUCES - gEfiPeiDecompressPpiGuid ## PRODUCES - gEfiEndOfPeiSignalPpiGuid ## SOMETIMES_PRODUCES # Not produced o= n S3 boot path - gEfiPeiReadOnlyVariable2PpiGuid ## SOMETIMES_CONSUMES - gEfiPeiLoadFilePpiGuid ## SOMETIMES_CONSUMES - gEfiPeiS3Resume2PpiGuid ## SOMETIMES_CONSUMES # Consumed on S3= boot path - gEfiPeiRecoveryModulePpiGuid ## SOMETIMES_CONSUMES # Consumed on re= covery boot path + gEfiDxeIplPpiGuid ## PRODUCES + gEfiPeiDecompressPpiGuid ## PRODUCES + gEfiEndOfPeiSignalPpiGuid ## SOMETIMES_PRODUCES # Not produ= ced on S3 boot path + gEfiPeiReadOnlyVariable2PpiGuid ## SOMETIMES_CONSUMES + gEfiPeiLoadFilePpiGuid ## SOMETIMES_CONSUMES + gEfiPeiS3Resume2PpiGuid ## SOMETIMES_CONSUMES # Consumed = on S3 boot path + gEfiPeiRecoveryModulePpiGuid ## SOMETIMES_CONSUMES # Consumed = on recovery boot path ## SOMETIMES_CONSUMES ## UNDEFINED # HOB gEfiVectorHandoffInfoPpiGuid - gEfiPeiMemoryDiscoveredPpiGuid ## SOMETIMES_CONSUMES + gEfiPeiMemoryDiscoveredPpiGuid ## SOMETIMES_CONSUMES + gEdkiiPeiBootInCapsuleOnDiskModePpiGuid ## SOMETIMES_CONSUMES + gEdkiiPeiCapsuleOnDiskPpiGuid ## SOMETIMES_CONSUMES # Consume= d on firmware update boot path =20 [Guids] ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation" ## SOMETIMES_PRODUCES ## HOB gEfiMemoryTypeInformationGuid diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/Dxe= IplPeim/DxeLoad.c index c6e5b83309..d48028cea0 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -1,11 +1,11 @@ /** @file Last PEIM. Responsibility of this module is to load the DXE Core from a Firmware Vo= lume. =20 Copyright (c) 2016 HP Development Company, L.P. -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 **/ =20 #include "DxeIpl.h" @@ -263,11 +263,13 @@ DxeLoadCore ( UINTN Instance; UINT32 AuthenticationState; UINTN DataSize; EFI_PEI_S3_RESUME2_PPI *S3Resume; EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery; + EDKII_PEI_CAPSULE_ON_DISK_PPI *PeiCapsuleOnDisk; EFI_MEMORY_TYPE_INFORMATION MemoryData[EfiMaxMemoryType + = 1]; + VOID *CapsuleOnDiskModePpi; =20 // // if in S3 Resume, restore configure // BootMode =3D GetBootModeHob (); @@ -328,10 +330,36 @@ DxeLoadCore ( } REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_MODULE | EFI_= SW_PEI_PC_CAPSULE_START)); // // Now should have a HOB with the DXE core // + } else if (BootMode =3D=3D BOOT_ON_FLASH_UPDATE) { + // + // If Capsule On Disk mode, call storage stack to read Capsule Relocat= ion file + // IoMmmu is highly recommmended to enable before reading + // + Status =3D PeiServicesLocatePpi ( + &gEdkiiPeiBootInCapsuleOnDiskModePpiGuid, + 0, + NULL, + &CapsuleOnDiskModePpi + ); + if (!EFI_ERROR(Status)) { + Status =3D PeiServicesLocatePpi ( + &gEdkiiPeiCapsuleOnDiskPpiGuid, + 0, + NULL, + (VOID **) &PeiCapsuleOnDisk + ); + + // + // Whether failed, still goes to Firmware Update boot path. BDS will= clear corresponding indicator and reboot later on + // + if (!EFI_ERROR (Status)) { + Status =3D PeiCapsuleOnDisk->LoadCapsuleOnDisk (PeiServices, PeiCa= psuleOnDisk); + } + } } =20 if (GetFirstGuidHob ((CONST EFI_GUID *)&gEfiMemoryTypeInformationGuid) = =3D=3D NULL) { // // Don't build GuidHob if GuidHob has been installed. --=20 2.16.2.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 (#42784): https://edk2.groups.io/g/devel/message/42784 Mute This Topic: https://groups.io/mt/32201009/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-