From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 50CDA203B991D for ; Wed, 30 May 2018 08:15:09 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2018 08:15:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,460,1520924400"; d="scan'208";a="53457752" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by FMSMGA003.fm.intel.com with ESMTP; 30 May 2018 08:15:07 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.88]) by ORSMSX102.amr.corp.intel.com ([169.254.3.125]) with mapi id 14.03.0319.002; Wed, 30 May 2018 08:15:05 -0700 From: "Kinney, Michael D" To: Ard Biesheuvel , "Kinney, Michael D" CC: "edk2-devel@lists.01.org" , "Yao, Jiewen" Thread-Topic: [edk2] [RFC v3 0/4] Add FmpDevicePkg Thread-Index: AQHT952gwoYFbSwZTU2nZgZhSjTdIaRIUAwAgAAKfNA= Date: Wed, 30 May 2018 15:15:04 +0000 Message-ID: References: <20180529223715.23896-1-michael.d.kinney@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Subject: Re: [RFC v3 0/4] Add FmpDevicePkg X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 15:15:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Add, The FmpDevicePkg is a different way to produce FMP and the recommendation will be to use this one instead of the existing one. The concept is to provide a simpler way to produce an FMP with a library instance and a few PCD settings. It has greater flexibility in managing public keys, supports multiple public keys per FMP, and it also enables a platform to produce multiple FMP instances to support the update of different regions of a FW storage device or update different devices that have support FW updates. I have put FmpDevicePkg and the new tools=20 to support building capsules as RFCs to get some initial feedback. My next step is to add an edk2-staging branch with this content along with a set of complete examples around the MinnowMax platform that demonstrate the capabilities and usage. I will also create a set of Wiki pages on how to integrate this feature into a platform. Thanks, Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel- > bounces@lists.01.org] On Behalf Of Ard Biesheuvel > Sent: Wednesday, May 30, 2018 12:08 AM > To: Kinney, Michael D > Cc: edk2-devel@lists.01.org; Yao, Jiewen > > Subject: Re: [edk2] [RFC v3 0/4] Add FmpDevicePkg >=20 > On 30 May 2018 at 00:37, Michael D Kinney > wrote: > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D922 > > > > Changes in V3 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > * Change CheckLowestSupportedVersion() to > LowestSupportedVersionCheckRequired() > > * Change LockFmpDeviceAtLockEventGuid() to > LockFmpDeviceAtLockEventGuidRequired() > > * Set EDKII_FIRMWARE_MANAGEMENT_PROGRESS_PROTOCOL > Version field to 1 > > * Fix description of return values in > LowestSupportedVersionCheckRequired() > > * Fix description of return values in > LockFmpDeviceAtLockEventGuidRequired() > > > > Changes in V2 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > * FmpDevicePkg DEC file > > + Change PcdFmpDeviceSystemResetRequired from > FeatureFlag > > to FixedAtBuild > > + Add PcdFmpDeviceTestKeySha256Digest for test key > detection. > > Set to {0} to disable test key detection. > > * FmpDevicePkg DSC file > > + Fix ARM and AARCH64 build issues > > + Update DisplayUpdateProgressLib mappings to match > patches in > > Bug_801_DisplayUpdateProgressLib_V2 > > * FmpDeviceLib Class and Instance > > + Update FmpDeviceGetSize() to return EFI_STATUS > > + Update FmpDeviceGetAttributes() to return > EFI_STATUS > > + Update FmpDeviceGetVersionString() to return > EFI_STATUS > > * FmpDxe > > + Set depex to Variable Arch Write Protocol and > Variable Lock Protocol > > + Break out test key detection in FmpDxe into > DetectTestKey.c > > + Change LockAllVars() to LockAllFmpVariables() > > + Update LockAllFmpVariables() to lock each of the > UEFI variables used. > > + Always lock UEFI variables when > PcdFmpDeviceLockEventGuid is signaled > > + Remove ComputeVersionName(). FmpDeviceLib must > provide version string > > > > Based on content from the following branch: > > > > > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsul > eSupport/MsCapsuleUpdatePkg > > > > Branch for review: > > > > > https://github.com/mdkinney/edk2/tree/Bug_922_FmpDeviceP > kg_V2 > > > > This package provides an implementation of a Firmware > Management Protocol > > instance that supports the update of firmware storage > devices using UEFI > > Capsules. The behavior of the Firmware Management > Protocol instance is > > customized using libraries and PCDs. > > >=20 > Let me ask again: how does this code relate to the > already existing > FMP implementation we have in the edk2 tree? >=20 >=20 > > Cc: Sean Brogan > > Cc: Jiewen Yao > > Contributed-under: TianoCore Contribution Agreement > 1.1 > > Signed-off-by: Michael D Kinney > > > > > Kinney, Michael D (4): > > FmpDevicePkg: Add package, library classes, and PCDs > > FmpDevicePkg: Add library instances > > FmpDevicePkg: Add FmpDxe module > > FmpDevicePkg: Add DSC file to build all package > components > > > > FmpDevicePkg/FmpDevicePkg.dec | > 132 ++ > > FmpDevicePkg/FmpDevicePkg.dsc | > 134 ++ > > FmpDevicePkg/FmpDevicePkg.uni | > 80 ++ > > FmpDevicePkg/FmpDevicePkgExtra.uni | > 18 + > > FmpDevicePkg/FmpDxe/DetectTestKey.c | > 166 +++ > > FmpDevicePkg/FmpDxe/FmpDxe.c | > 1452 ++++++++++++++++++++ > > FmpDevicePkg/FmpDxe/FmpDxe.inf | > 93 ++ > > FmpDevicePkg/FmpDxe/FmpDxe.uni | > 20 + > > FmpDevicePkg/FmpDxe/FmpDxeExtra.uni | > 18 + > > FmpDevicePkg/FmpDxe/FmpDxeLib.inf | > 90 ++ > > FmpDevicePkg/FmpDxe/VariableSupport.c | > 461 +++++++ > > FmpDevicePkg/FmpDxe/VariableSupport.h | > 180 +++ > > .../Include/Library/CapsuleUpdatePolicyLib.h | > 120 ++ > > FmpDevicePkg/Include/Library/FmpDeviceLib.h | > 405 ++++++ > > FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h | > 100 ++ > > .../CapsuleUpdatePolicyLibNull.c | > 136 ++ > > .../CapsuleUpdatePolicyLibNull.inf | > 45 + > > .../CapsuleUpdatePolicyLibNull.uni | > 17 + > > .../Library/FmpDeviceLibNull/FmpDeviceLib.c | > 427 ++++++ > > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.inf | > 48 + > > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.uni | > 18 + > > .../FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c | > 188 +++ > > .../FmpPayloadHeaderLibV1.inf | > 48 + > > .../FmpPayloadHeaderLibV1.uni | > 21 + > > 24 files changed, 4417 insertions(+) > > create mode 100644 FmpDevicePkg/FmpDevicePkg.dec > > create mode 100644 FmpDevicePkg/FmpDevicePkg.dsc > > create mode 100644 FmpDevicePkg/FmpDevicePkg.uni > > create mode 100644 FmpDevicePkg/FmpDevicePkgExtra.uni > > create mode 100644 > FmpDevicePkg/FmpDxe/DetectTestKey.c > > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.c > > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.inf > > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.uni > > create mode 100644 > FmpDevicePkg/FmpDxe/FmpDxeExtra.uni > > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxeLib.inf > > create mode 100644 > FmpDevicePkg/FmpDxe/VariableSupport.c > > create mode 100644 > FmpDevicePkg/FmpDxe/VariableSupport.h > > create mode 100644 > FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h > > create mode 100644 > FmpDevicePkg/Include/Library/FmpDeviceLib.h > > create mode 100644 > FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h > > create mode 100644 > FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleU > pdatePolicyLibNull.c > > create mode 100644 > FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleU > pdatePolicyLibNull.inf > > create mode 100644 > FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleU > pdatePolicyLibNull.uni > > create mode 100644 > FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c > > create mode 100644 > FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.i > nf > > create mode 100644 > FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.u > ni > > create mode 100644 > FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHea > derLib.c > > create mode 100644 > FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHea > derLibV1.inf > > create mode 100644 > FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHea > derLibV1.uni > > > > -- > > 2.14.2.windows.3 > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel