From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.3570.1589848799218865767 for ; Mon, 18 May 2020 17:39:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=rUmKzN9J; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: liming.gao@intel.com) IronPort-SDR: bXo9vYZZMkPa0TDKbt7IsUXeTcvhvy5qMGWmSOiQ+kIl2os7PKYAhYPz7iD1UHTNjqPahyERjC mDZJ0cgqKJSg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 17:39:58 -0700 IronPort-SDR: DydnXviTuBf0q4Da0d2ncE9be2EWkmCrBzbyNa/jfjHTWORu2EnWW3gZHO/45ZNHhW8FsqVusx 9n7YL8o53tBQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,408,1583222400"; d="scan'208";a="288771589" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga004.fm.intel.com with ESMTP; 18 May 2020 17:39:58 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 17:39:58 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 18 May 2020 17:39:57 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 18 May 2020 17:39:57 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 17:39:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nAn62bzITIczAAwoclF1ZMzrrCxpoyD6H3bxup2XSuWBB+X3xB8cdPABCBUDy0bodwmFjQrXzvi2/XR71UppVgCDEdv6uld78tXUegqz+kjvsGir2slAnEYGExOVoq2fkEx36s2m+K8xb8WUqLLmh8P7QoRUHv29ItrsIIlFHqDnEyhIvYjfRfAn8MMKVyuZCIWCWptRYwLwwqtf5brAsK/W/TsBE0qtrFcIvHVlelQ1loQVmf60AoaP5/Wr/O3he3SVi2JyWUJa2adkEzkxBmvCUyLS1CfvAvUWhA/65bkkUbnlgNgq8ljmmqbMz2F53BbxeXwq/I1Z1RMBqYBHZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nn5PEDFo9ZBNeayCVvAPYdatS4XRwGPna0amQyyllFo=; b=G7rpsqN+TnJtjZ/Dpue4rwJ29lpXQ1iI6YiEvQfFLX/q/2qNty6TAWICY1b/O5OIXhpbpDaVP15LziWVclzGLxj0S+BsqlduBfieZb9CiMGglPfLLJ4H1fjsvmLvHlzZqKb0Y/4AnbcV1EIYCBpV6RlkMTO3baCNPcGoZXKKeS8ie1UkZ1tZfhuGkN8mqe1k1ZXzZis0WLkXsHWcV4H9vaJSDjmFKSjRPporLrepozfIJVQUmgDc8az5Rg3V7nlqfFK0OtoPmWeSIxvOZhr5bUt15Pgr2YBPDzfXvg8/JqjU5Pi1jSLo6Zn2KMC9FP4HJNuo2GVhPv0PrJZ34QrD3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nn5PEDFo9ZBNeayCVvAPYdatS4XRwGPna0amQyyllFo=; b=rUmKzN9J0S6wwynMJJxNfeFOotJBnPVRhsiI4o5T2PBrzfXrmYO6/hsZ3zcdmZdRrpnPjC+4ugBHBhCjCHdMYPR6ObY/9/PghVz67g6Y0+O7F2YB5bc8oRHBU+v2aeB3drsldvrQO9zgmVFJ2UYgoJVs5s/ir/ddI/vhZgHMrv8= Received: from BN6PR11MB3972.namprd11.prod.outlook.com (2603:10b6:405:7f::11) by BN6PR11MB1729.namprd11.prod.outlook.com (2603:10b6:404:101::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.27; Tue, 19 May 2020 00:39:47 +0000 Received: from BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::3c03:da06:5345:bfa0]) by BN6PR11MB3972.namprd11.prod.outlook.com ([fe80::3c03:da06:5345:bfa0%7]) with mapi id 15.20.3000.034; Tue, 19 May 2020 00:39:47 +0000 From: "Liming Gao" To: "devel@edk2.groups.io" , "oleksiyy@ami.com" 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: AQHWKjGuApjYXW0ffEakQn6+iPmvr6ioqmYQgAXDNwCAACmVsA== Date: Tue, 19 May 2020 00:39:47 +0000 Message-ID: References: <20200514205145.36956-1-oleksiyy@ami.com> <20200514205145.36956-6-oleksiyy@ami.com> <6BD875C24FFE2A4E8D6EFC142C67836F03FFFFA5E6@atlms1.us.megatrends.com> In-Reply-To: <6BD875C24FFE2A4E8D6EFC142C67836F03FFFFA5E6@atlms1.us.megatrends.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b1668f05-122c-4156-20a8-08d7fb8d21ef x-ms-traffictypediagnostic: BN6PR11MB1729: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 040866B734 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jCGBGs52npmE3mqVtX9P9pqI8lafZt5UU5VCZ0x3ciRqzsDHzkd2zqjM7jBBnkIAfi8rXn4/f3dKhdb5GVLcSKuS6mkieNJB9Wf6SeDEnzC7V+vl2PXt2zMYowZEgEI6flZC6o7Jq9UTgpgpK/RxonGYO84XIRtunOS63A0i8Hs1tAb4h/jHiDMmnOPIkVg8BS5JXB9+MnQ5RX2k2k8E8k5uN9DdmZRl/Vk1WaHYViHAwFqeA2JXce+GGpES+DuHV9uL3SRZsOF32RdgYq6u5JsX16xuKl+qr6WMOCB/UHGfpZpT7j81jdAk3IWzKlTbW3Z9FUOUua9+1H3YCiafRFuz0SVrxOzyYi48IjIGwE6tjay56oaJk7Z3aTXEc0u3g3v1nqACjDivNm+PNmD/1fgYB7oTvt3WoKikCqt+5w4/eC6akVCmTxzTNdMMOfimyq2p7IbGFbygo+JzSpIChlU7pC5pmFO6hdO9M0msKKunSiF+s8qAdNDcUXN231LD+NKx17GsfHoLGZdevF+MvQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB3972.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(136003)(366004)(346002)(39860400002)(396003)(376002)(55016002)(9686003)(478600001)(966005)(33656002)(53546011)(6506007)(7696005)(8936002)(186003)(52536014)(86362001)(8676002)(4326008)(5660300002)(26005)(71200400001)(66476007)(66556008)(66946007)(76116006)(66446008)(64756008)(54906003)(316002)(107886003)(110136005)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: qkTxveILPpZ0JJdbDWhISNiVwyK9WFmNYCpcqIpOS/omdIkkIeCnKaPyHn67KdDp0fLj7fUX4KoH4ZyWFlTeo8XoDb7oF8XjWE0Msoko8QmPyeUn5r87+iDlas/RG2AQQVahkGGHCkI561PcexNgXONvQaxal4HljPivRlazwk9LRbbbasoNsvViRhNX4bZPcYK/BbawMnrxhbkErlLoVPiiMzXjo+2YbTT5V04jycwi/toQghfvdL+jU4FE9xMn7VS+4l8J5/iDO++8inU0OIuPD5OaJwgajZrcCn2YR8jxfwK3YOWMP4ma/RjxxDRdU4GNdUWSWd9ferJOC094cxAMsPPViJi/L8ZLuE0+Gi66nNguyDX9t58sHVJuWNVqTy6avyuYg4Hu4CmzRU6HvEiSUOtxejzxmsdtcHX0/lO3Bmho012y81xEGhHtsF64vrZii9pkKV30Qe3IisQpA4yW/9ToQa3UrriW0dWaNJ7cgdQMlj0UBlUx7KPXhH1Q MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b1668f05-122c-4156-20a8-08d7fb8d21ef X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2020 00:39:47.3705 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fuix3T+BL+AGbZM3qvOK1LWmft1dybnOHZgDg7oghKBj9e0EWYnP4G0u6NEfbTTU2MWp9+YShvSB0PrBFgMfvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1729 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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.=20 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 >=20 > Hi Liming. >=20 > 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? >=20 > Regards, Oleksiy. >=20 >=20 >=20 > -----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 >=20 > 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. >=20 > 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 >=20 > > } > > 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); > > } >=20 > [Liming] Here should have one condition for ImageHeader->Version =3D=3D = 2. >=20 > > 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. >=20 > 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. >=20 > Please consider the environment before printing this email. >=20 > 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 >=20