From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 19A0178003C for ; Fri, 9 Feb 2024 21:35:31 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ci5mHTOZ2Gi691veBJGl0o/yaav3iNoXfLcuISGcSPg=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707514530; v=1; b=eFVhqjlrLJd85/6NhHcztJ9bWVODCpIMCzEchYlGPJtbZgixexndXQdhbw8D8HpvCaob3iFx m0gMz932X3s5wL02Av7zAds5+rZu+moB4DjdMygWHaeIQSAQh2f1oF93JrtIOOvTPtHeLU7M1k+ GJ3NQ5PhJ3T+bZ79OsRmechM= X-Received: by 127.0.0.2 with SMTP id p727YY7687511xrJ5NV3GOQR; Fri, 09 Feb 2024 13:35:30 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web10.25333.1707514530251670682 for ; Fri, 09 Feb 2024 13:35:30 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="19009773" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="19009773" X-Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 13:35:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="32823930" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Feb 2024 13:35:30 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 9 Feb 2024 13:35:29 -0800 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 9 Feb 2024 13:35:28 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 9 Feb 2024 13:35:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cNL3LrIVbaxCLHyDgjkfogTjadLwnuFRBeVaeyzZ6S2PchufKJg6xGge9jCZRrfGeXJ3b7otFUaUDNVw6EKoBBNvXszoYrhzDj+0jkEw14VMOyCMOdeOr17HQvDUi64J/c15mjYFL78Ai8pBNJbc4vey3yG4eb8Xlcm/xDmdMaqj88cnsZD9BeBH+ivQbAyxnbGtogysniL/k4dCd+mu6aQrqUQyiyqtWM74OmAwCTO2gqzCVCcVa2WwhcAIHMsO329htDGVD/PkMt5lAZNCRuy6Md0PWExOOkD4MnZrfKBgyxPHL8rjJAsy1RDCYxgt0v05foQFTxHhHrQU0VE8sg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Swu+Vx1lYyRmffLKYdanANVF19uyyK8XPkujV4Yviik=; b=b3FHJoNjaRzEML1MTw3D0wC8DW+NmmN8+XLKs38+4toWYIjTlL6E6bZdBnXt1ejTDIpEQeiMjGzYI9Bs3AvNOctssScbEkX/AbnL05J32+03+XL3UEt/HCRrt1AWtlfWYxt9sjbuUa+mBOaL6aPipacf0up9j6wWiaLc3Dw+Z4uKG0j3u9MI7t6wZ3oe5ox+kmab1GcNB+K93eoBwDHYrO4TsWryibQCJ5tFlwiUWAap0xF73tqqtVRooRjDPcuqJ9XMqteywFkcNrus79U8p07pUPQlAgC3IyFaou6Lgei7Q82GafR6cEHctGVk5iWsRJWB0W79aNB/UQyZOmmq0A== 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 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by PH0PR11MB4999.namprd11.prod.outlook.com (2603:10b6:510:37::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.27; Fri, 9 Feb 2024 21:35:26 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::7e42:1633:d0a6:9c00%6]) with mapi id 15.20.7249.037; Fri, 9 Feb 2024 21:35:26 +0000 From: "Michael D Kinney" To: "Pethaiyan, Madhan" , "devel@edk2.groups.io" CC: Liming Gao , "Liu, Zhiguang" , "Li, Yi1" , "Xu, GuoX" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH V3] FmpDevicePkg: GetImageInfo Add missing conditions Thread-Topic: [PATCH V3] FmpDevicePkg: GetImageInfo Add missing conditions Thread-Index: AQHaVb7FTZkGndFY20q3TGd/kQZSUbD7duWAgAcc6CA= Date: Fri, 9 Feb 2024 21:35:26 +0000 Message-ID: References: <20240202100048.1935-1-madhan.pethaiyan@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|PH0PR11MB4999:EE_ x-ms-office365-filtering-correlation-id: 415bbf4a-a38c-4fb8-e3dd-08dc29b707b0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 2xwxm6sbn//CqBB5dZag1psvD3Jg/3UjFoN/88nRv/dTimHmLkl3uKglDtHCtfepCPfCgVKdSLYVKsZ92FqXtknHxtFG7sqo2ZywNLYgvvrd/ouT1lwwXkpl8i5IY2L3pLMhQh1Ygx+ihXZtAAMEhKOwpJ1GSwjU0hZaWN4Dr8RXUPxzCWR8Zo9kwRjkUMzAflLcFR+PGX61ycBj7b/djp30QJ5LprjEJf/MtzrnnyzFtaNGU1PssOy1wOgcIa8Z0QUFIea/hPJZBcfnPhOZY0C3XNWcuxUTPWSzJeVdSlAE1RYi0/x+2Z2aqBWqqdw2oCrtOpu33/JTk+MguSGY6wlnBPs4I7YFlGYR6rGEGWp7roPqXMG+u8bvZBU+2dSdtm9/xmAOKfoDFcnb4hoRwl9DJ03grWHM0MNCIiWBrRv3mGwDt76AKbtqBpK0V+b03hLnKA2ebh6+bE7UBIJKrf8jz/Nx707IhsLBiwXNz+pYQ6THs+z9j0azEdzlOCE/faavMqjQkR6boZ6HqDiQKNJqQTCXx/Ejgq/TDgn6N+sc37zsuEIBVvZ3xVCqMHURpPihaKSDtxE9PKtq9+MVsSqnxpc/+6py1SF1DiYswK57RDRCdLi9m1ECVTSegX3m x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/+A24rtmqNf9Y+IcyEfXbg3VJgKjG9upg75FQ1QlrIGmCT+9ggxILDJcMcQQ?= =?us-ascii?Q?AMT7xOBtdvWBy+m5oCAGm2hAg/zYxoYTITAWOw/Oo+x2dKSGn/AjYh9zhOIB?= =?us-ascii?Q?Vsx9482rLsUHB2UNe+OI2xLI2F1yQl3gkyXViEeRfXQ7NCW6avd7tRVo8DwA?= =?us-ascii?Q?dLBCklSImytauf54cPfqCy2LgDFRxOf1Hk9SCVKabxma1aAWSP6OSEqDYHpH?= =?us-ascii?Q?6R6s+7RuIQgL1TA6xk9DdRvpJJ19fnDC2SOf4CTI78bDZsjv0jfyAo0n9yEv?= =?us-ascii?Q?tn++B+rdBoV3Qt3D4qEc+7PANX/6nglRXWWjE31niqtw+CHUddHpQL7ljjBn?= =?us-ascii?Q?6zFP/6eK6no6Pb/cNQ7yy1wO9N0aB1asSbQwDfecGB3c38cUcK8iSffC1aB3?= =?us-ascii?Q?1N2VrbKeV5RMu6Jb9hsujk4hd6pefaXVUGFd5xT5sOpAwS6KqNMGAKZJ5NVc?= =?us-ascii?Q?5kGgFVRLXgKn+KuLDhXn+vDaih/vxO2PrCuYY18K/Tdbu4KfqGUGx7z8jA2H?= =?us-ascii?Q?XpxdJ3lIcymIP7iVdOOJEwXUpEdQ1s6sBQIzbGnT1y4iN5HNw5pjuLhd7hb8?= =?us-ascii?Q?XGQECuSOOUNy53zaI37mMo68Gtz1jxl8DpR7dcGduO/NIYrIjmsYXnXeW7xx?= =?us-ascii?Q?+0k0KDFB4O2xKnZ5+f0eMSGb3mLCopyK3w/qtAvrdET6Pr0puiN/eqGuuFhs?= =?us-ascii?Q?qKLRePllO95sKJqGR0SBgLv2T5HNEKd8gd3hbcITn2jfIDl5IfCtlC2nOxID?= =?us-ascii?Q?XkJeEAb73ohSemrjsZ2km/fo4kfq3BSRiZSpt9pGHCJzd58X1d6DZJ37EG+Z?= =?us-ascii?Q?lCrrXU6WVvJN1ChsscimfQpoGhqU+rs4mKb43lKkoHFdLwU5FsJTlX7NDkOi?= =?us-ascii?Q?0F8omNbJUUzM9u0O60cTPwQQlrg6+UXKqzX6MWA2AXNvcgLU4yY+N5JT8TgT?= =?us-ascii?Q?iQ87Ofw0E7rge1pLSwiU8ae4qgSROwWgFzv+2oVkFJWNCgq14XDHD10TVf9Y?= =?us-ascii?Q?sSXcq8pP5bNnig7I/JGmUPSy7fbvDWI2X/oMk9lM/8rIrnvhXJ/4faIP4EUu?= =?us-ascii?Q?ClL0cyYrt/163S61eoRd0FSNfC4wRA7GGQkWCuSQms15Z/m9K0A+KChLXGT5?= =?us-ascii?Q?p20mCtgJAHSEkp5eJEqi0xYb0ubSiE7JDTzUKw1fCXA39w0RRPmJ24KS1dbg?= =?us-ascii?Q?4qVmXyL6KdMkuALxCo3nInI2B/6iAn84xe7rs3AKLPG812TR/zwH4XaAwL/W?= =?us-ascii?Q?OKLigw9GQ5vtBpf8/Fo2HsVtNTJvoxOlvl93Vh05C7ICoLYADhCat6tMxsdx?= =?us-ascii?Q?D6fjYwIwFtiP6Kfb3u8z3orBENb91y6vOBvbh8lFsZD7rxSx4LVRQU4jMf1W?= =?us-ascii?Q?yclOgmutLu8o15qKeyCBefNyGRkNyQ7KFnLo112BSmDin/MwrRbnbvDzm+nv?= =?us-ascii?Q?mXW0GphVyv8hHG739uvt4GZHk7gaCc/sAcJgSXJ2zuiG95zJdxzLOszaRUm5?= =?us-ascii?Q?ek2YkXpt8BJg356LM1mPqdxZoJjY7nrGvI9zI/BiWwzyva3gJODTQtdl/Wgw?= =?us-ascii?Q?9Pw3gJ52N7oeIFKRQgu+RfMVoSYwY3x36kMU54Ylokd6WE73k1aUcTqatPL4?= =?us-ascii?Q?BA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 415bbf4a-a38c-4fb8-e3dd-08dc29b707b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2024 21:35:26.4231 (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: rt6TzNzX1eTThFQkBaAcGPy+rfdmgTO4lh3dEkENo/kDuGOeVYYXy+8P5zTvZVFYv2QqaO+tV2hrdINgz9j4btzN7QKpqpw2P5VNhQOkuDE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4999 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: uxpXjYRVOzhfb0XqIwesCXFax7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=eFVhqjlr; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Madhan, This single patch changes code in 3 different packages. Please split into 3 patches with one patch per package. Thanks, Mike > -----Original Message----- > From: Pethaiyan, Madhan > Sent: Monday, February 5, 2024 12:56 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Liming Gao > ; Liu, Zhiguang ; Li, > Yi1 ; Xu, GuoX > Subject: RE: [PATCH V3] FmpDevicePkg: GetImageInfo Add missing > conditions >=20 > Hi all , >=20 > Request everyone to review and provide feedback >=20 > Thanks, > P. Madhan >=20 > -----Original Message----- > From: Pethaiyan, Madhan > Sent: Friday, February 2, 2024 3:31 PM > To: devel@edk2.groups.io > Cc: Pethaiyan, Madhan ; Kinney, Michael D > ; Liming Gao ; > Liu, Zhiguang ; Li, Yi1 ; Xu, > GuoX > Subject: [PATCH V3] FmpDevicePkg: GetImageInfo Add missing conditions >=20 > 1.For EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage(): > Add the following sentence at the end of the Image parameter > description. "May be NULL with a zero ImageSize in order to determine > the size of the buffer needed". >=20 > Modify the description of "EFI_INVALID_PARAMETER" return code as "The > ImageSize is not too small and Image is NULL." >=20 > 2.For EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo(): > Add the following sentence at the end of the ImageInfo parameter > description."May be NULL with a zero ImageInfoSize in order to > determine the size of the buffer needed". >=20 > Modify the description of "EFI_INVALID_PARAMETER" return code as "The > ImageInfoSize is not too small and Image is NULL." and add new > descriptions for "EFI_INVALID_PARAMETER" return code. >=20 > REF: UEFI spec v2.10 23.1.2 >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Yi Li > Cc: GuoX Xu > Signed-off-by: Pethaiyan Madhan > --- > FmpDevicePkg/FmpDxe/FmpDxe.c | 20 ++++++++++++++----- > FmpDevicePkg/FmpDxe/FmpDxe.h | 15 +++++++++++--- > MdePkg/Include/Protocol/FirmwareManagement.h | 14 +++++++++++-- > .../SystemFirmwareCommonDxe.c | 13 ++++++++++-- > .../SystemFirmwareUpdate/SystemFirmwareDxe.h | 13 ++++++++++-- > 5 files changed, 61 insertions(+), 14 deletions(-) >=20 > diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c > b/FmpDevicePkg/FmpDxe/FmpDxe.c index 1e7ec4a09e..1d580c9f69 100644 > --- a/FmpDevicePkg/FmpDxe/FmpDxe.c > +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c > @@ -43,7 +43,7 @@ const FIRMWARE_MANAGEMENT_PRIVATE_DATA > mFirmwareManagementPrivateDataTemplate =3D > FIRMWARE_MANAGEMENT_PRIVATE_DATA_SIGNATURE, // Signature > NULL, // Handle > { // Fmp > - GetTheImageInfo, > + GetImageInfo, > GetTheImage, > SetTheImage, > CheckTheImage, > @@ -417,6 +417,8 @@ PopulateDescriptor ( > to contain the image(s) > information if the buffer was too small. > @param[in, out] ImageInfo A pointer to the buffer in which > firmware places the current image(s) > information. The information is > an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs. > + May be NULL with a zero > ImageInfoSize in order to determine the size of the > + buffer needed. > @param[out] DescriptorVersion A pointer to the location in > which firmware returns the version number > associated with the > EFI_FIRMWARE_IMAGE_DESCRIPTOR. > @param[out] DescriptorCount A pointer to the location in > which firmware returns the number of > @@ -437,13 +439,18 @@ PopulateDescriptor ( > @retval EFI_SUCCESS The device was successfully > updated with the new image. > @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too > small. The current buffer size > needed to hold the image(s) > information is returned in ImageInfoSize. > - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small > and ImageInfo is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorCount is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersionName is NULL. > @retval EFI_DEVICE_ERROR Valid information could not be > returned. Possible corrupted image. >=20 > **/ > EFI_STATUS > EFIAPI > -GetTheImageInfo ( > +GetImageInfo ( > IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, > IN OUT UINTN *ImageInfoSize, > IN OUT EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo, > @@ -495,7 +502,7 @@ GetTheImageInfo ( > // Confirm that buffer isn't null > // > if ( (ImageInfo =3D=3D NULL) || (DescriptorVersion =3D=3D NULL) || > (DescriptorCount =3D=3D NULL) || (DescriptorSize =3D=3D NULL) > - || (PackageVersion =3D=3D NULL)) > + || (PackageVersion =3D=3D NULL) || (PackageVersionName =3D=3D NULL)= ) > { > DEBUG ((DEBUG_ERROR, "FmpDxe(%s): GetImageInfo() - Pointer > Parameter is NULL.\n", mImageIdName)); > Status =3D EFI_INVALID_PARAMETER; > @@ -544,6 +551,9 @@ cleanup: > @param[in] ImageIndex A unique number identifying the > firmware image(s) within the device. > The number is between 1 and > DescriptorCount. > @param[in, out] Image Points to the buffer where the > current image is copied to. > + May be NULL with a zero ImageSize in > order to determine the size of the > + buffer needed. > + > @param[in, out] ImageSize On entry, points to the size of the > buffer pointed to by Image, in bytes. > On return, points to the length of > the image, in bytes. >=20 > @@ -551,7 +561,7 @@ cleanup: > @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is > too small to hold the > image. The current buffer size needed > to hold the image is returned > in ImageSize. > - @retval EFI_INVALID_PARAMETER The Image was NULL. > + @retval EFI_INVALID_PARAMETER The ImageSize is not too small and > + Image is NULL > @retval EFI_NOT_FOUND The current image is not copied to > the buffer. > @retval EFI_UNSUPPORTED The operation is not supported. > @retval EFI_SECURITY_VIOLATION The operation could not be performed > due to an authentication failure. > diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.h > b/FmpDevicePkg/FmpDxe/FmpDxe.h index 7baf730e69..d2ade143bd 100644 > --- a/FmpDevicePkg/FmpDxe/FmpDxe.h > +++ b/FmpDevicePkg/FmpDxe/FmpDxe.h > @@ -114,6 +114,8 @@ DetectTestKey ( > to contain the image(s) > information if the buffer was too small. > @param[in, out] ImageInfo A pointer to the buffer in which > firmware places the current image(s) > information. The information is > an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs. > + May be NULL with a zero > ImageInfoSize in order to determine the size of the > + buffer needed. > @param[out] DescriptorVersion A pointer to the location in > which firmware returns the version number > associated with the > EFI_FIRMWARE_IMAGE_DESCRIPTOR. > @param[out] DescriptorCount A pointer to the location in > which firmware returns the number of > @@ -134,13 +136,18 @@ DetectTestKey ( > @retval EFI_SUCCESS The device was successfully > updated with the new image. > @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too > small. The current buffer size > needed to hold the image(s) > information is returned in ImageInfoSize. > - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small > and ImageInfo is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorCount is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersionName is NULL. > @retval EFI_DEVICE_ERROR Valid information could not be > returned. Possible corrupted image. >=20 > **/ > EFI_STATUS > EFIAPI > -GetTheImageInfo ( > +GetImageInfo ( > IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, > IN OUT UINTN *ImageInfoSize, > IN OUT EFI_FIRMWARE_IMAGE_DESCRIPTOR *ImageInfo, > @@ -161,6 +168,8 @@ GetTheImageInfo ( > @param[in] ImageIndex A unique number identifying the > firmware image(s) within the device. > The number is between 1 and > DescriptorCount. > @param[in, out] Image Points to the buffer where the > current image is copied to. > + May be NULL with a zero ImageSize in > order to determine the size of the > + buffer needed. > @param[in, out] ImageSize On entry, points to the size of the > buffer pointed to by Image, in bytes. > On return, points to the length of > the image, in bytes. >=20 > @@ -168,7 +177,7 @@ GetTheImageInfo ( > @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is > too small to hold the > image. The current buffer size needed > to hold the image is returned > in ImageSize. > - @retval EFI_INVALID_PARAMETER The Image was NULL. > + @retval EFI_INVALID_PARAMETER The ImageSize is not too small and > + Image is NULL > @retval EFI_NOT_FOUND The current image is not copied to > the buffer. > @retval EFI_UNSUPPORTED The operation is not supported. > @retval EFI_SECURITY_VIOLATION The operation could not be performed > due to an authentication failure. > diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h > b/MdePkg/Include/Protocol/FirmwareManagement.h > index e535bb697d..90b7d83c8f 100644 > --- a/MdePkg/Include/Protocol/FirmwareManagement.h > +++ b/MdePkg/Include/Protocol/FirmwareManagement.h > @@ -294,6 +294,8 @@ EFI_STATUS > to contain the image(s) > information if the buffer was too small. > @param[in, out] ImageInfo A pointer to the buffer in which > firmware places the current image(s) > information. The information is > an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs. > + May be NULL with a zero > ImageInfoSize in order to determine the size of the > + buffer needed. > @param[out] DescriptorVersion A pointer to the location in > which firmware returns the version number > associated with the > EFI_FIRMWARE_IMAGE_DESCRIPTOR. > @param[out] DescriptorCount A pointer to the location in > which firmware returns the number of > @@ -314,7 +316,12 @@ EFI_STATUS > @retval EFI_SUCCESS The device was successfully > updated with the new image. > @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too > small. The current buffer size > needed to hold the image(s) > information is returned in ImageInfoSize. > - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small > and ImageInfo is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorCount is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersionName is NULL. > @retval EFI_DEVICE_ERROR Valid information could not be > returned. Possible corrupted image. >=20 > **/ > @@ -341,6 +348,9 @@ EFI_STATUS > @param[in] ImageIndex A unique number identifying the > firmware image(s) within the device. > The number is between 1 and > DescriptorCount. > @param[out] Image Points to the buffer where the > current image is copied to. > + May be NULL with a zero ImageSize in > order to determine the size of the > + buffer needed. > + > @param[in, out] ImageSize On entry, points to the size of the > buffer pointed to by Image, in bytes. > On return, points to the length of > the image, in bytes. >=20 > @@ -348,7 +358,7 @@ EFI_STATUS > @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is > too small to hold the > image. The current buffer size needed > to hold the image is returned > in ImageSize. > - @retval EFI_INVALID_PARAMETER The Image was NULL. > + @retval EFI_INVALID_PARAMETER The ImageSize is not too small and > Image is NULL. > @retval EFI_NOT_FOUND The current image is not copied to > the buffer. > @retval EFI_UNSUPPORTED The operation is not supported. > @retval EFI_SECURITY_VIOLATION The operation could not be performed > due to an authentication failure. > diff --git > a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonD > xe.c > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonD > xe.c > index 077bd0cb31..6e394d85d4 100644 > --- > a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonD > xe.c > +++ > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareComm > +++ onDxe.c > @@ -34,6 +34,8 @@ EFI_FIRMWARE_MANAGEMENT_PROTOCOL > mFirmwareManagementProtocol =3D { > to contain the image(s) > information if the buffer was too small. > @param[in, out] ImageInfo A pointer to the buffer in which > firmware places the current image(s) > information. The information is > an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs. > + May be NULL with a zero > ImageInfoSize in order to determine the size of the > + buffer needed. > @param[out] DescriptorVersion A pointer to the location in > which firmware returns the version number > associated with the > EFI_FIRMWARE_IMAGE_DESCRIPTOR. > @param[out] DescriptorCount A pointer to the location in > which firmware returns the number of > @@ -54,7 +56,12 @@ EFI_FIRMWARE_MANAGEMENT_PROTOCOL > mFirmwareManagementProtocol =3D { > @retval EFI_SUCCESS The device was successfully > updated with the new image. > @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too > small. The current buffer size > needed to hold the image(s) > information is returned in ImageInfoSize. > - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small > and ImageInfo is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorCount is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersionName is NULL. > @retval EFI_DEVICE_ERROR Valid information could not be > returned. Possible corrupted image. >=20 > **/ > @@ -153,6 +160,8 @@ FmpGetImageInfo ( > @param[in] ImageIndex A unique number identifying the > firmware image(s) within the device. > The number is between 1 and > DescriptorCount. > @param[in,out] Image Points to the buffer where the > current image is copied to. > + May be NULL with a zero ImageSize in > order to determine the size of the > + buffer needed. > @param[in,out] ImageSize On entry, points to the size of the > buffer pointed to by Image, in bytes. > On return, points to the length of > the image, in bytes. >=20 > @@ -160,7 +169,7 @@ FmpGetImageInfo ( > @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is > too small to hold the > image. The current buffer size needed > to hold the image is returned > in ImageSize. > - @retval EFI_INVALID_PARAMETER The Image was NULL. > + @retval EFI_INVALID_PARAMETER The ImageSize is not too small and > + Image is NULL > @retval EFI_NOT_FOUND The current image is not copied to > the buffer. > @retval EFI_UNSUPPORTED The operation is not supported. > @retval EFI_SECURITY_VIOLATION The operation could not be performed > due to an authentication failure. > diff --git > a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe.h > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe.h > index c8443865cb..b2b2c78318 100644 > --- > a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe.h > +++ > b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe. > +++ h > @@ -137,6 +137,8 @@ typedef struct { > to contain the image(s) > information if the buffer was too small. > @param[in, out] ImageInfo A pointer to the buffer in which > firmware places the current image(s) > information. The information is > an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs. > + May be NULL with a zero > ImageInfoSize in order to determine the size of the > + buffer needed. > @param[out] DescriptorVersion A pointer to the location in > which firmware returns the version number > associated with the > EFI_FIRMWARE_IMAGE_DESCRIPTOR. > @param[out] DescriptorCount A pointer to the location in > which firmware returns the number of > @@ -157,7 +159,12 @@ typedef struct { > @retval EFI_SUCCESS The device was successfully > updated with the new image. > @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too > small. The current buffer size > needed to hold the image(s) > information is returned in ImageInfoSize. > - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small > and ImageInfo is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorCount is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > DescriptorSize is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersion is NULL. > + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and > PackageVersionName is NULL. > @retval EFI_DEVICE_ERROR Valid information could not be > returned. Possible corrupted image. >=20 > **/ > @@ -184,6 +191,8 @@ FmpGetImageInfo ( > @param[in] ImageIndex A unique number identifying the > firmware image(s) within the device. > The number is between 1 and > DescriptorCount. > @param[in,out] Image Points to the buffer where the > current image is copied to. > + May be NULL with a zero ImageSize in > order to determine the size of the > + buffer needed. > @param[in,out] ImageSize On entry, points to the size of the > buffer pointed to by Image, in bytes. > On return, points to the length of > the image, in bytes. >=20 > @@ -191,7 +200,7 @@ FmpGetImageInfo ( > @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is > too small to hold the > image. The current buffer size needed > to hold the image is returned > in ImageSize. > - @retval EFI_INVALID_PARAMETER The Image was NULL. > + @retval EFI_INVALID_PARAMETER The ImageSize is not too small and > + Image is NULL > @retval EFI_NOT_FOUND The current image is not copied to > the buffer. > @retval EFI_UNSUPPORTED The operation is not supported. > @retval EFI_SECURITY_VIOLATION The operation could not be performed > due to an authentication failure. > -- > 2.38.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115332): https://edk2.groups.io/g/devel/message/115332 Mute This Topic: https://groups.io/mt/104120132/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-