public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"oleksiyy@ami.com" <oleksiyy@ami.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"Zhang, Chao B" <chao.b.zhang@intel.com>,
	"Felix Polyudov" <Felixp@ami.com>, "Xu, Wei6" <wei6.xu@intel.com>
Subject: Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Date: Wed, 20 May 2020 14:22:24 +0000	[thread overview]
Message-ID: <DM6PR11MB3195572DD4DF691A04C8251780B60@DM6PR11MB3195.namprd11.prod.outlook.com> (raw)
In-Reply-To: <6BD875C24FFE2A4E8D6EFC142C67836F03FFFFA722@atlms1.us.megatrends.com>

PR https://github.com/tianocore/edk2/pull/635 has been created for UEFI28a.

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oleksiy Yakovlev
> Sent: Wednesday, May 20, 2020 9:57 PM
> To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Yao,
> Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Felix Polyudov <Felixp@ami.com>; Xu, Wei6
> <wei6.xu@intel.com>
> Subject: Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
> 
> 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 Image Header extension
> 
> Oleksiy:
>   Wei has sent the updated patches for the changes in MdeModulePkg and SignedCapsulePkg.
> 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 <devel@edk2.groups.io> On Behalf Of Oleksiy Yakovlev
> > Sent: Tuesday, May 19, 2020 6:10 AM
> > To: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Yao,
> > Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Felix Polyudov <Felixp@ami.com>; Xu, Wei6
> > <wei6.xu@intel.com>
> > Subject: Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
> >
> > Hi Liming.
> >
> > From Your comment here I understand that you are waiting for somebody else here.
> > But looking through your comments - I agree with comment 1, but think other 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 extension
> >
> > Oleksiy:
> >   When create PR, I find some issue in this patch. The same issue is also 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 <oleksiyy@ami.com>
> > > Sent: Friday, May 15, 2020 4:52 AM
> > > To: devel@edk2.groups.io
> > > Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> > Wu,
> > > Hao A <hao.a.wu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Felixp@ami.com;
> > > oleksiyy@ami.com
> > > Subject: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
> > >
> > > Add bitmask to structure which gives a binary-inspectable mechanism to
> > > determine if a capsule contains an authentication section or depex section.
> > > (UEFI 2.8 errata a, mantis 2026)
> > >
> > > Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
> > >
> > > Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
> > > ---
> > >  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/MdeModulePkg/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->UpdateImageIndex);
> > >      Print(L"  UpdateImageSize        - 0x%x\n", FmpImageHeader->UpdateImageSize);
> > >      Print(L"  UpdateVendorCodeSize   - 0x%x\n", FmpImageHeader->UpdateVendorCodeSize);
> > > -    if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> > > -      Print(L"  UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateHardwareInstance);
> > > +    if (ImageHeader->Version >= 1) {
> > > +    DEBUG((DEBUG_VERBOSE, "    UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance));
> > > +      if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> > > +         DEBUG((DEBUG_VERBOSE, "    ImageCapsuleSupport - 0x%lx\n", ImageHeader->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", ImageHeader->Version));
> > >        return EFI_INVALID_PARAMETER;
> > >      }
> > > -    if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> > > +    if (ImageHeader->Version == 1) {
> > >        FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance);
> > > +    } else {
> > > +      FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport);
> > >      }
> >
> > [Liming] Here should have one condition for ImageHeader->Version == 2.
> >
> > >      if (FmpImageSize < FmpImageHeaderSize) {
> > >        DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize));
> > > @@ -519,8 +521,11 @@ DumpFmpCapsule (
> > >      DEBUG((DEBUG_VERBOSE, "    UpdateImageIndex       - 0x%x\n", ImageHeader->UpdateImageIndex));
> > >      DEBUG((DEBUG_VERBOSE, "    UpdateImageSize        - 0x%x\n", ImageHeader->UpdateImageSize));
> > >      DEBUG((DEBUG_VERBOSE, "    UpdateVendorCodeSize   - 0x%x\n", ImageHeader->UpdateVendorCodeSize));
> > > -    if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> > > -      DEBUG((DEBUG_VERBOSE, "    UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance));
> > > +    if (ImageHeader->Version >= 1) {
> > [Liming] Here should be ImageHeader->Version >= 2.
> >
> > Thanks
> > Liming
> > > +      DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance));
> > > +      if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> > > +        DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)",  ImageHeader->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 = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
> > > UpdateHardwareInstance);
> > > +    if (ImageHeader->Version == 1) {
> > > +      Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
> > > UpdateHardwareInstance);
> > > +    } else {
> > > +      Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER,
> > ImageCapsuleSupport);
> > > +    }
> > >    }
> > >
> > >    if (ImageHeader->UpdateVendorCodeSize == 0) {
> > > @@ -945,6 +955,7 @@ SetFmpImageData (
> > >    DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex));
> > >    if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> > >      DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance));
> > > +    DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport));
> > >    }
> > >    DEBUG((DEBUG_INFO, "\n"));
> > >
> > > @@ -1239,7 +1250,10 @@ ProcessFmpCapsuleImage (
> > >      ImageHeader  = (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UINT8 *)FmpCapsuleHeader +
> > > ItemOffsetList[Index]);
> > >
> > >      UpdateHardwareInstance = 0;
> > > -    if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) {
> > > +    ///
> > > +    /// UpdateHardwareInstance field was added in Version 2
> > > +    ///
> > > +    if (ImageHeader->Version >= 2) {
> > >        UpdateHardwareInstance = 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 proprietary 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 proprietary 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 proprietary 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.
> 
> 


  reply	other threads:[~2020-05-20 14:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 20:51 [PATCH V7 0/6] Add definitions introduced in UEFI 2.8a Oleksiy Yakovlev
2020-05-14 20:51 ` [PATCH V7 1/6] MdePkg: Add new CPER Notification types Oleksiy Yakovlev
2020-05-14 20:51 ` [PATCH V7 2/6] MdePkg: Fix OUT parameters marked as IN OUT Oleksiy Yakovlev
2020-05-14 20:51 ` [PATCH V7 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE Oleksiy Yakovlev
2020-05-14 20:51 ` [PATCH V7 4/6] MdePkg: Add FMP Capsule Image Header extension Oleksiy Yakovlev
2020-05-14 20:51 ` [PATCH V7 5/6] MdeModulePkg: " Oleksiy Yakovlev
2020-05-15  6:13   ` Liming Gao
2020-05-18 22:09     ` Oleksiy Yakovlev
2020-05-19  0:39       ` [edk2-devel] " Liming Gao
2020-05-19 15:42         ` Oleksiy Yakovlev
2020-05-20 13:57         ` Oleksiy Yakovlev
2020-05-20 14:22           ` Liming Gao [this message]
     [not found]   ` <160F1EEE36EFCBA2.23170@groups.io>
2020-05-15  8:33     ` Liming Gao
2020-05-14 20:51 ` [PATCH V7 6/6] SignedCapsulePkg: " Oleksiy Yakovlev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB3195572DD4DF691A04C8251780B60@DM6PR11MB3195.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox