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.13190.1589983112265346315 for ; Wed, 20 May 2020 06:58:32 -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-00-5ec53785d09f 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 4C.40.06356.68735CE5; Wed, 20 May 2020 09:58:30 -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; Wed, 20 May 2020 09:57:25 -0400 From: "Oleksiy Yakovlev" To: "Gao, Liming" , "devel@edk2.groups.io" CC: "Kinney, Michael D" , "Wang, Jian J" , "Wu, Hao A" , "Yao, Jiewen" , "Zhang, Chao B" , "Felix Polyudov" , "Xu, Wei6" Subject: Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension Thread-Topic: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension Thread-Index: AQHWKjF/dqilD20i5USi/pEqUgh6BKio7oUAgAV9s2CAAG5xgIACLbmw Date: Wed, 20 May 2020 13:57:24 +0000 Message-ID: <6BD875C24FFE2A4E8D6EFC142C67836F03FFFFA722@atlms1.us.megatrends.com> References: <20200514205145.36956-1-oleksiyy@ami.com> <20200514205145.36956-6-oleksiyy@ami.com> <6BD875C24FFE2A4E8D6EFC142C67836F03FFFFA5E6@atlms1.us.megatrends.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+NgFlrGKsWRmVeSWpSXmKPExsWyRiBhhm6b+dE4g1PrNC3mv622aJ8wm83i 6q1fTBbzvs1gtVj30cNixb0N7BYdHf+YLHbtecjswOGx/fsFRo/Fe14yBTBFNTDaJObl5Zck lqQqpKQWJ9sqBRRlliUmVyopZKbYKhkqKRTkJCan5qbmldgqJRYUpOalKNlxKWAAG6CyzDyF 1Lzk/JTMvHRbJc9gf10LC1NLXUMlu5CMVIXMvLT8otzEksz8PIXk/LwSoOrUFKCoQkI3Z8as b4oFd4Mq/k/5y9bAON25i5GTQ0LAROLJkgtsXYxcHEICu5gkpnfNhHIOM0psvdrDBFLFJqAp 8ebcCxYQW0QgUmLB52NsIDazwHQmiVfrKrsYOTiEBeIlOu5ZQJQkSGyd3coKYbtJfL04A2wM i4CqxPpN69hBbF6BQInfl3exQuw6zyTRdmceM0iCUyBWYvr+C2BFjAJiEt9PrWGC2CUucevJ fCaIqwUkluw5zwxhi0q8fPyPFcJWlHj64QU7RL2OxILdn6Du1JZYtvA1M8RiQYmTM5+wTGAU nYVk7CwkLbOQtMxC0rKAkWUVo1BiSU5uYmZOermhXmJupl5yfu4mRkgi2bSDseWi+SFGJg7G Q4wSHMxKIrwL+Y/GCfGmJFZWpRblxxeV5qQWH2J0AobERGYpblAEAWM83tjAQEoUxjE0MTMx NzI3tDQxNzZWEuedvHZNnJBAOjDlZKemFqQWwQxh4uCUamA8pWizfkrxhuSyqxP7OTaUVRo9 iw09sSj9QxOT+967MxYeceDmivhZPifgvn3m/eUb/0r18n5823DBVnYHX+bvb3w7/B5cyXnh xxB8b4XgmpbHbYISonNk/V3mWh1t7L37K95N99aqdnZh51crfHf6no6xTA2/pH/nUsjuN8Xf 92W1sTm22TkosRRnJBpqMRcVJwIAgud9gzkDAAA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Lining, Wei. Can you speed up pushing of 2.8a patches? Regards, Oleksiy. -----Original Message----- From: Gao, Liming [mailto:liming.gao@intel.com] Sent: Monday, May 18, 2020 8:40 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Kinney, Michael D; Wang, Jian J; Wu, Hao A; Yao, Jiewen; Zhang, Chao B= ; Felix Polyudov; Xu, Wei6 Subject: RE: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Ima= ge Header extension Oleksiy: Wei has sent the updated patches for the changes in MdeModulePkg and Sig= nedCapsulePkg. https://edk2.groups.io/g/devel/message/59652 He bases on your patch and does some updated. Please help review whether= it is ok to you. You don't need to submit this patch set again. Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Oleksiy Y= akovlev > Sent: Tuesday, May 19, 2020 6:10 AM > To: Gao, Liming ; devel@edk2.groups.io > Cc: Kinney, Michael D ; Wang, Jian J ; Wu, Hao A ; Yao, > Jiewen ; Zhang, Chao B ; F= elix Polyudov ; Xu, Wei6 > > Subject: Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule I= mage Header extension > > Hi Liming. > > From Your comment here I understand that you are waiting for somebody el= se here. > But looking through your comments - I agree with comment 1, but think ot= her two are incorrect. > So do I need to resubmit 2.8a series? > > Regards, Oleksiy. > > > > -----Original Message----- > From: Gao, Liming [mailto:liming.gao@intel.com] > Sent: Friday, May 15, 2020 2:13 AM > To: Oleksiy Yakovlev; devel@edk2.groups.io > Cc: Kinney, Michael D; Wang, Jian J; Wu, Hao A; Yao, Jiewen; Zhang, Chao= B; Felix Polyudov; Xu, Wei6 > Subject: RE: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header e= xtension > > Oleksiy: > When create PR, I find some issue in this patch. The same issue is als= o in SignedCapsulePkg. Because original comments from Xu > Wei6, I would like Wei to provide the updated patch for MdeModulePkg and= SignedCapsulePkg. > > Thanks > Liming > > -----Original Message----- > > From: Oleksiy Yakovlev > > Sent: Friday, May 15, 2020 4:52 AM > > To: devel@edk2.groups.io > > Cc: Gao, Liming ; Kinney, Michael D ; Wang, Jian J ; > Wu, > > Hao A ; Yao, Jiewen ; Zhang,= Chao B ; Felixp@ami.com; > > oleksiyy@ami.com > > Subject: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header ext= ension > > > > Add bitmask to structure which gives a binary-inspectable mechanism to > > determine if a capsule contains an authentication section or depex sec= tion. > > (UEFI 2.8 errata a, mantis 2026) > > > > Signed-off-by: Oleksiy Yakovlev > > > > Reviewed-by: Wei6 Xu > > --- > > MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 ++++-- > > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 +++++++++++++= ++++----- > > 2 files changed, 25 insertions(+), 8 deletions(-) > > > > diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeMo= dulePkg/Application/CapsuleApp/CapsuleDump.c > > index 7e3e072..057bfa8 100644 > > --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > @@ -96,8 +96,11 @@ DumpFmpCapsule ( > > Print(L" UpdateImageIndex - 0x%x\n", FmpImageHeader->Updat= eImageIndex); > > Print(L" UpdateImageSize - 0x%x\n", FmpImageHeader->Updat= eImageSize); > > Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->Updat= eVendorCodeSize); > > - if (FmpImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_= IMAGE_HEADER_INIT_VERSION) { > > - Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->Up= dateHardwareInstance); > > + if (ImageHeader->Version >=3D 1) { > > + DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", Ima= geHeader->UpdateHardwareInstance)); > > + if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_I= MAGE_HEADER_INIT_VERSION) { > > + DEBUG((DEBUG_VERBOSE, " ImageCapsuleSupport - 0x%lx\n", I= mageHeader->ImageCapsuleSupport)); > > + } > > } > > } > [Liming] Here should be FmpImageHeader > > > } > > diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > > index 5dda561..68cece6 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", Ima= geHeader->Version)); > > return EFI_INVALID_PARAMETER; > > } > > - if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_= HEADER_INIT_VERSION) { > > + if (ImageHeader->Version =3D=3D 1) { > > FmpImageHeaderSize =3D OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSUL= E_IMAGE_HEADER, UpdateHardwareInstance); > > + } else { > > + FmpImageHeaderSize =3D OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSUL= E_IMAGE_HEADER, ImageCapsuleSupport); > > } > > [Liming] Here should have one condition for ImageHeader->Version =3D=3D = 2. > > > if (FmpImageSize < FmpImageHeaderSize) { > > DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0= x%x)\n", FmpImageSize, FmpImageHeaderSize)); > > @@ -519,8 +521,11 @@ DumpFmpCapsule ( > > DEBUG((DEBUG_VERBOSE, " UpdateImageIndex - 0x%x\n", Imag= eHeader->UpdateImageIndex)); > > DEBUG((DEBUG_VERBOSE, " UpdateImageSize - 0x%x\n", Imag= eHeader->UpdateImageSize)); > > DEBUG((DEBUG_VERBOSE, " UpdateVendorCodeSize - 0x%x\n", Imag= eHeader->UpdateVendorCodeSize)); > > - if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMA= GE_HEADER_INIT_VERSION) { > > - DEBUG((DEBUG_VERBOSE, " UpdateHardwareInstance - 0x%lx\n", I= mageHeader->UpdateHardwareInstance)); > > + if (ImageHeader->Version >=3D 1) { > [Liming] Here should be ImageHeader->Version >=3D 2. > > Thanks > Liming > > + DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHead= er->UpdateHardwareInstance)); > > + if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_I= MAGE_HEADER_INIT_VERSION) { > > + DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHead= er->ImageCapsuleSupport)); > > + } > > } > > } > > } > > @@ -928,9 +933,14 @@ SetFmpImageData ( > > } else { > > // > > // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version= 1, > > - // Header should exclude UpdateHardwareInstance field > > + // Header should exclude UpdateHardwareInstance field, and > > + // ImageCapsuleSupport field if version is 2. > > // > > - Image =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMEN= T_CAPSULE_IMAGE_HEADER, > > UpdateHardwareInstance); > > + if (ImageHeader->Version =3D=3D 1) { > > + Image =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEM= ENT_CAPSULE_IMAGE_HEADER, > > UpdateHardwareInstance); > > + } else { > > + Image =3D (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEM= ENT_CAPSULE_IMAGE_HEADER, > ImageCapsuleSupport); > > + } > > } > > > > if (ImageHeader->UpdateVendorCodeSize =3D=3D 0) { > > @@ -945,6 +955,7 @@ SetFmpImageData ( > > DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIn= dex)); > > if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE= _HEADER_INIT_VERSION) { > > DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader= ->UpdateHardwareInstance)); > > + DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->I= mageCapsuleSupport)); > > } > > DEBUG((DEBUG_INFO, "\n")); > > > > @@ -1239,7 +1250,10 @@ ProcessFmpCapsuleImage ( > > ImageHeader =3D (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)= ((UINT8 *)FmpCapsuleHeader + > > ItemOffsetList[Index]); > > > > UpdateHardwareInstance =3D 0; > > - if (ImageHeader->Version >=3D EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMA= GE_HEADER_INIT_VERSION) { > > + /// > > + /// UpdateHardwareInstance field was added in Version 2 > > + /// > > + if (ImageHeader->Version >=3D 2) { > > UpdateHardwareInstance =3D ImageHeader->UpdateHardwareInstance; > > } > > > > -- > > 2.9.0.windows.1 > > > > > > Please consider the environment before printing this email. > > > > The information contained in this message may be confidential and prop= rietary to American Megatrends (AMI). This > communication > > is intended to be read only by the individual or entity to whom it is = addressed or by their designee. 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 prohibited. Please > > promptly notify the sender by reply e-mail or by telephone at 770-246-= 8600, and then delete or destroy all copies of the > transmission. > > Please consider the environment before printing this email. > > The information contained in this message may be confidential and propri= etary to American Megatrends (AMI). This communication > is intended to be read only by the individual or entity to whom it is ad= dressed or by their designee. If the reader of this message is > not the intended recipient, you are on notice that any distribution of t= his message, in any form, is strictly prohibited. Please > promptly notify the sender by reply e-mail or by telephone at 770-246-86= 00, and then delete or destroy all copies of the transmission. > >=20 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.