From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ami.com, ip: 63.147.10.42, mailfrom: felixp@ami.com) Received: from atlmailgw2.ami.com (atlmailgw2.ami.com [63.147.10.42]) by groups.io with SMTP; Wed, 05 Jun 2019 14:53:15 -0700 X-AuditID: ac10606f-bd5ff70000003de9-84-5cf839ca0619 Received: from atlms2.us.megatrends.com (atlms2.us.megatrends.com [172.16.96.152]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id 6D.A8.15849.AC938FC5; Wed, 5 Jun 2019 17:53:14 -0400 (EDT) Received: from ATLMS1.us.megatrends.com ([fe80::8c55:daf0:ef05:5605]) by atlms2.us.megatrends.com ([fe80::29dc:a91e:ea0c:cdeb%12]) with mapi id 14.03.0415.000; Wed, 5 Jun 2019 17:53:13 -0400 From: "Felix Polyudov" To: "devel@edk2.groups.io" , "'wei6.xu@intel.com'" CC: Jian J Wang , Hao A Wu , Michael D Kinney , Liming Gao , Chao B Zhang Subject: Re: [edk2-devel][Patch v2 0/7] Implement Capsule On Disk. Thread-Topic: [edk2-devel][Patch v2 0/7] Implement Capsule On Disk. Thread-Index: AQHVG7VG/EDslAYYxkW3T1E7Xr9Mp6aNmL0Q Date: Wed, 5 Jun 2019 21:53:12 +0000 Message-ID: <9333E191E0D52B4999CE63A99BA663A00302C9234C@atlms1.us.megatrends.com> References: <20190605154203.11012-1-wei6.xu@intel.com> In-Reply-To: <20190605154203.11012-1-wei6.xu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.99.93] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRmVeSWpSXmKPExsWyRiBhhu4pyx8xBquOilnMf1tt0T5hNpvF 1Vu/mCzmfZvBarHi3gZ2i46Of0wWu/Y8ZHZg99j+/QKjx+I9L5kCmKIaGG0S8/LySxJLUhVS UouTbZUCijLLEpMrlRQyU2yVDJUUCnISk1NzU/NKbJUSCwpS81KU7LgUMIANUFlmnkJqXnJ+ SmZeuq2SZ7C/roWFqaWuoZJdSEaqQmZeWn5RbmJJZn6eQnJ+XglQdWoKUFQhoYszY/GjdewF P9Uq5p9dy9TAuFm+i5GTQ0LAROLdtc3MXYxcHEICu5gkJvW9hnIOMUrMevyYHaSKTUBV4vjq ZhYQW0QgTuLQ3h2MIEXMAocZJV5/OQeWEBZwknh3ZQsTRJGzxNoLPewQtpHEziOnmEFsFgEV ibcvd4HV8woESix98JENxBYSMJOYfvIPWD2ngLnEz0tLWEFsRgExie+n1oDNZBYQl7j1ZD4T xNkCEkv2nGeGsEUlXj7+xwphK0hsed/JDlGvI7Fg9yc2CFtbYtnC18wQewUlTs58wjKBUXQW krGzkLTMQtIyC0nLAkaWVYxCiSU5uYmZOenlRnqJuZl6yfm5mxghSSR/B+PHj+aHGJk4GIGh x8GsJMKbePtLjBBvSmJlVWpRfnxRaU5q8SFGJ2BATGSW4gZFETDO440NDKREYRxDEzMTcyNz Q0sTc2NjJXHeVWu+xQgJpAPTTnZqakFqEcwQJg5OqQZG7/+tLTtbP/85qan86636g+WsJRfK DDasOh3/6cKObbo3uebbnhY0LPvo3VWl8d97qU5xvA/jnETJJKvviyyCAyrk9OKOv1vvcrPN xW0i0+X2e0azb0TIXV3fuaqFLcgvWoN175FHwQeP/9R68j/GPKV2yZLcsyyc1zdViHXwMRxg O77A9xGzEktxRqKhFnNRcSIAtr/EdTcDAAA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 1. It looks like the implementation processes capsule files in PEI. According to UEFI specification capsule files are stored on the active ESP= . Not every UEFI boot device can be accessed in PEI. For example, RAID connected to the PCI plug in card cannot be accessed in = PEI. 2. Solution B) below relocates capsule to "a temp file which will be store= d in root directory". I think it is cleaner to reuse UEFI capsule-on-disk i= nfrastructure and keep capsule file in the dedicated \EFI\UpdateCapsule fo= lder (refer to "Delivery of Capsules via file on Mass Storage device" secti= on of the UEFI specification). -----Original Message----- From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Xu, = Wei6 Sent: Wednesday, June 05, 2019 11:42 AM To: devel@edk2.groups.io Cc: Jian J Wang; Hao A Wu; Michael D Kinney; Liming Gao; Chao B Zhang Subject: [edk2-devel][Patch v2 0/7] Implement Capsule On Disk. V2: Fix Ecc check failure. V1: BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1852 This patch set implements Capsule On Disk. Depends on whether platform supports Capsule-In-Ram, Capsule On Disk featu= re is composed of 2 solutions: Solution A): Load capsules out of TCB, rely on UpdateCapsule() runtime ser= vice to deliver Capsule-On-Disk. Solution B): Relocate capsules into a temp file which will be stored in ro= ot directory on a platform specific storage device. Leverage existing storage stack in PEI to load all capsule on disk images = and create capsule hobs for the capsules. This solution has bigger TCB, but can work without Capsule-In-RAM support. Cc: Jian J Wang Cc: Hao A Wu Cc: Michael D Kinney Cc: Liming Gao Cc: Chao B Zhang xuwei6 (7): MdePkg: Add Pei Boot In CapsuleOnDisk Mode Ppi definition. MdeModulePkg: Add Capsule On Disk related definition. MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM. MdeModulePkg/BdsDxe: Support Capsule On Disk. MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature. MdeModulePkg/DxeIpl: Support Capsule On Disk. MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib. MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 3 +- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 20 +- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 37 +- MdeModulePkg/Include/Library/CapsuleLib.h | 94 +- MdeModulePkg/Include/Ppi/CapsuleOnDisk.h | 48 + .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 1983 +++++++++++++++= +++++ .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.h | 63 + .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 56 +- .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf | 21 +- .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c | 121 +- .../Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c | 67 +- .../DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf | 3 +- .../Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c | 85 +- MdeModulePkg/MdeModulePkg.dec | 43 + MdeModulePkg/MdeModulePkg.dsc | 4 + MdeModulePkg/MdeModulePkg.uni | 32 + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 3 +- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 6 +- .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c | 442 +++++ .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf | 64 + .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.uni | 15 + .../CapsuleOnDiskLoadPeiExtra.uni | 14 + .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 1 + .../Universal/CapsuleRuntimeDxe/CapsuleService.c | 10 +- MdePkg/Include/Ppi/BootInRecoveryMode.h | 9 +- MdePkg/MdePkg.dec | 3 + 26 files changed, 3205 insertions(+), 42 deletions(-) create mode 100644 MdeModulePkg/Include/Ppi/CapsuleOnDisk.h create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.h create mode 100644 MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnD= iskLoadPei.c create mode 100644 MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnD= iskLoadPei.inf create mode 100644 MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnD= iskLoadPei.uni create mode 100644 MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnD= iskLoadPeiExtra.uni -- 2.16.2.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and propriet= ary to American Megatrends, Inc. This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n.