From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atlmailgw1.ami.com (atlmailgw1.ami.com [63.147.10.40]) by mx.groups.io with SMTP id smtpd.web12.7636.1589295644737390418 for ; Tue, 12 May 2020 08:00:44 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ami.com, ip: 63.147.10.40, mailfrom: oleksiyy@ami.com) X-AuditID: ac1060b2-0e1ff700000018d4-c9-5ebaba1bda5c 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 atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id C3.A2.06356.B1ABABE5; Tue, 12 May 2020 11:00:43 -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.0468.000; Tue, 12 May 2020 11:00:04 -0400 From: "Oleksiy Yakovlev" To: "Xu, Wei6" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Kinney, Michael D" , "Wang, Jian J" , "Wu, Hao A" , Felix Polyudov Subject: Re: [edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image Header extension Thread-Topic: [edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image Header extension Thread-Index: AQHWJ946PVrSX4oJAkyRP+4KcN/hgaikADoAgACJ/jA= Date: Tue, 12 May 2020 15:00:02 +0000 Message-ID: <6BD875C24FFE2A4E8D6EFC142C67836F03FFFFA072@atlms1.us.megatrends.com> References: <20200511215040.31780-1-oleksiyy@ami.com> <20200511215040.31780-6-oleksiyy@ami.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.97.158] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIKsWRmVeSWpSXmKPExsWyRiBhhq70rl1xBm//GFi0T5jNZnH11i8m i3nfZrBarLi3gd2io+Mfk8WuPQ+ZHdg8tn+/wOixeM9LpgCmqAZGm8S8vPySxJJUhZTU4mRb pYCizLLE5EolhcwUWyVDJYWCnMTk1NzUvBJbpcSCgtS8FCU7LgUMYANUlpmnkJqXnJ+SmZdu q+QZ7K9rYWFqqWuoZBeSkaqQmZeWX5SbWJKZn6eQnJ9XAlSdmgIUVUjo5szY/HYnW8FqlYpT /68xNzAulu9i5OSQEDCR2LvrP3MXIxeHkMAuJomvj/dBOYcZJZrXzGAHqWIT0JR4c+4FC4gt IhAs8eR3CyNIEbPASUaJlkONjCAJYYF4iUvL2xkhihIknu5dDmVbSWxaPg9sEIuAqsTjjlY2 EJtXIFDicesXNohtWxglZpx8DJbgFIiVWNW0hhnEZhQQk/h+ag0TiM0sIC5x68l8Joi7BSSW 7DnPDGGLSrx8/I8VwlaUePrhBTtEvY7Egt2f2CBsbYllC18zQywWlDg58wnLBEbRWUjGzkLS MgtJyywkLQsYWVYxCiWW5OQmZuaklxvqJeZm6iXn525ihKSPTTsYWy6aH2Jk4mA8xCjBwawk wtuSuTNOiDclsbIqtSg/vqg0J7X4EKMTMCQmMktxg+IIGOnxxgYGUqIwjqGJmYm5kbmhpYm5 sbGSOO/ktWvihATSgYknOzW1ILUIZggTB6dUA6PJF5OS9Uoua+us7kVeOSxxY9+RTSkSS8uk XRpsFviFajSZCNxpuvA85RLPNbMlf3u/r1b/JTvb+Uq4qRRTpar1/s4An8zJdxY35V4xCKqa kz9Hr31j/5pP860+e9QISqy/MmdqKIOfZaeQO6fWBl9Bp9dieccS9+V9O3aWO8fq9SPL+55p a5VYijMSDbWYi4oTAeGkTW80AwAA Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Wei. The intention of this patch series was to add headers to MdePkg, to make i= t possible start working on features implementation. Implementing all features in all affected files through all possible modul= e was not in my intentions at all. I agreed to change DxeCapsuleLib to speed up adoption of this series. We n= eed this headers ASAP to start implementing those features in our own produ= cts. So we need headers before soft freeze. Regards, Oleksiy. -----Original Message----- From: Xu, Wei6 [mailto:wei6.xu@intel.com] Sent: Monday, May 11, 2020 10:39 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Gao, Liming; Kinney, Michael D; Wang, Jian J; Wu, Hao A; Felix Polyudo= v Subject: RE: [edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Ima= ge Header extension Hi Oleksiy, Thanks a lot for the update. But besides it, there are several other place= s need to be updated as well: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Application/Cap= suleApp/CapsuleDump.c#L99 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCaps= uleLibFmp/DxeCapsuleLib.c#L522 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCaps= uleLibFmp/DxeCapsuleLib.c#L926 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCaps= uleLibFmp/DxeCapsuleLib.c#L946 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCaps= uleLibFmp/DxeCapsuleLib.c#L1242 https://github.com/tianocore/edk2/blob/master/SignedCapsulePkg/Universal/R= ecoveryModuleLoadPei/RecoveryModuleLoadPei.c#L331 https://github.com/tianocore/edk2/blob/master/SignedCapsulePkg/Universal/R= ecoveryModuleLoadPei/RecoveryModuleLoadPei.c#L637 BR, Wei -----Original Message----- From: devel@edk2.groups.io On Behalf Of Oleksiy Yak= ovlev Sent: Tuesday, May 12, 2020 5:51 AM To: devel@edk2.groups.io Cc: Gao, Liming ; Kinney, Michael D ; Wang, Jian J ; Wu, Hao A ; Felixp@ami.com; oleksiyy@ami.com Subject: [edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image H= eader extension Add bitmask to structure which gives a binary-inspectable mechanism to det= ermine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeMo= dulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..af80039 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHe= ader->Version)); return EFI_INVALID_PARAMETER; } - if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEAD= ER_INIT_VERSION) { + if (ImageHeader->Version =3D=3D 1) { FmpImageHeaderSize =3D OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IM= AGE_HEADER, UpdateHardwareInstance); + } else { + FmpImageHeaderSize =3D + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, + ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)= \n", FmpImageSize, FmpImageHeaderSize)); -- 2.9.0.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 (AMI). This communication is intended to be rea= d only by the individual or entity to whom it is addressed or by their desi= gnee. If the reader of this message is not the intended recipient, you are = on notice that any distribution of this message, in any form, is strictly p= rohibited. Please promptly notify the sender by reply e-mail or by telepho= ne at 770-246-8600, and then delete or destroy all copies of the transmissi= on. Please consider the environment before printing this email. The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be rea= d only by the individual or entity to whom it is addressed or by their desi= gnee. If the reader of this message is not the intended recipient, you are = on notice that any distribution of this message, in any form, is strictly p= rohibited. Please promptly notify the sender by reply e-mail or by telepho= ne at 770-246-8600, and then delete or destroy all copies of the transmissi= on.