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 DE6C5941E31 for ; Mon, 18 Mar 2024 23:16:35 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=6YnlnWnBgDY/iZhsRAiKFNVuhR0GEvi5rycpPPnRhws=; c=relaxed/simple; d=groups.io; h=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:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1710803794; v=1; b=B10nHI1J5FZSZG4DB5A7JhcJnDbZJMGpxXxvxzUrrSUysNOncwqfK2KoPcdYgR/mOyKhOUb0 2sJ+P60dgjnebcVgXa/am+YaIwXWBxhEwtyDn3xrNHJCTK5do208ZtuuolUAnvZnlvo3N+CcT3l GlRnokR8JHsy5Lw5/9L3YqakZRKwCNZaQeavcSV3R68OjuQ9ybY2yLE9mX65+NlN8pa6H/I6XWQ 6VYXVQ0cG+xKXs1LKWePdOCyo41A24ntMSbhK+o7pZ/ujN+oJgCcz+hlQYQ3FvC+I9t4g1S3CEM p0PH5gzJr++se4ElIvEs6ZjHw8u9JnJNHJ9xw7jY+TbXw== X-Received: by 127.0.0.2 with SMTP id fSNWYY7687511xxWBvrqLv6r; Mon, 18 Mar 2024 16:16:34 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web11.7585.1710404200508711962 for ; Thu, 14 Mar 2024 01:16:40 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,11012"; a="15766588" X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="15766588" X-Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 01:16:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="12102767" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Mar 2024 01:16:36 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Mar 2024 01:16:35 -0700 X-Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 14 Mar 2024 01:16:35 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 14 Mar 2024 01:16:35 -0700 X-Received: from DM4PR11MB5295.namprd11.prod.outlook.com (2603:10b6:5:392::14) by IA1PR11MB6217.namprd11.prod.outlook.com (2603:10b6:208:3eb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20; Thu, 14 Mar 2024 08:16:32 +0000 X-Received: from DM4PR11MB5295.namprd11.prod.outlook.com ([fe80::8ec2:e2d:4b55:63c1]) by DM4PR11MB5295.namprd11.prod.outlook.com ([fe80::8ec2:e2d:4b55:63c1%3]) with mapi id 15.20.7386.017; Thu, 14 Mar 2024 08:16:31 +0000 From: "Pethaiyan, Madhan" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: Liming Gao , "Liu, Zhiguang" , "Li, Yi1" , GuoX Xu Subject: Re: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo description details Thread-Topic: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo description details Thread-Index: AQHacX3Pfh6JTk/oyU+AqCv+Ja5bw7Ev2qCAgAcRpSA= Date: Thu, 14 Mar 2024 08:16:31 +0000 Message-ID: References: <20240308172556.2473-1-madhan.pethaiyan@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5295:EE_|IA1PR11MB6217:EE_ x-ms-office365-filtering-correlation-id: 180c156e-5028-4033-1f8d-08dc43ff0e6d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: owiKuj/c0CzG0OT2zaxs1w2ZsR8lXTW/x4n9SXgpG1PWMls62iffmkLYtblIb3uTmi2r8LGfm2ZIRBtlQFMlXiLNheiBW05B9+/j+C4+m0ISMEEuWWN9f6SM4NVZT1gnX0XsVqRJSLNgb/T6CF7Hc/zw8GgPntMe2P6EhRdMpxKLGQRqYmqhncnXy9MegBU8TlLxgzmDaUQCysiTO3RNuGhMoc8MMzlKAqEt8zW9FSsX+W/3ka1vJm5+fFwqo76O9EZy8+AXEpWE6N/HD15F9goVKLwG6PbTl6ZpsocDTMsdjoTjLpaYtLfGzfrxxIjpVnuVzHZF/r/TAlInzxAiY3CZBCn+gjLg51PdG5EYeYwpJ6LZ994Urpt9vf8gNAfcQ/z1Mdr7f2P0dmaXSyA7/arGnl5+co3ydEx/XwSUEU6qwg4GX5LGU8bbUI/rE6UkSz5ZUSGcK/gWZAFUc86wo0+gkIIWfq/UV6StJXxdJsuS1Ao8BXKg9eDzzsOuVtFT8luhAvTmeLul6KAxGbHvkDDBtbkHjoiHYFDf7cUytc+iwI1ONU9ZNcLNQYgWm2J1c5kdAaU+vH+QwN5AmpVpy2iX+oyJNl0S5nVJ9wsSkwSwkGzwWvmEqrAA336DTd4mVC6JwFPm1z2C/tsVzAyVQ3L6GUk0P1D9g1kQ2y/qRzgH60h2pdPqPpURAwq03WFw x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?SG3jkj1IBQUIsKKUHDNcb2vXzeCq3N7C92CK7cRFP/BbLxasCAA+VMEQIFYL?= =?us-ascii?Q?sb8oxrevJpqvGO3/u3YKZ/wGuuKqQ1N+wutgV71qz1BBVukBtda3n5miWsx3?= =?us-ascii?Q?Odoz67jfH8nmgaVx4GuFBS/ITbrjqfEetPCr1SpGzPnVxquVoNGLJDHgEVX3?= =?us-ascii?Q?yfS1HvPlaV+tYMOyR1P9BJOTMj7hXv84+uNSLn8OHhaLLkjS0E1qmDwf/jEw?= =?us-ascii?Q?Cu0eFfM8bXXKYkyBHd4sM7cTKj8/MJD9zWS1NZFYhQuRd427cM8XzseCb6f1?= =?us-ascii?Q?KCv4mTZpafrmuOXcgEHEHmUkY2TXHmQoVpu5PZMbaWprijcbp3x6tP5nTRCg?= =?us-ascii?Q?5EHiF+JibzA0+kMHUbVovFymQOSGlYCSepmNhJ02T6AdAkcFtg/lq0vO1slt?= =?us-ascii?Q?oZM/1OZN+0SQu2v/aE4tVliCodeNobaONeV2gEPDuJXPLze5O+JAMXb2sQhu?= =?us-ascii?Q?gDO+WSndqN4gliN/AAjcf3hyWa8vy7U3G7oeRdEUac9dXKSGQ/tQJNLwGT77?= =?us-ascii?Q?9+VGXsZjfmL+X0C0QBOcbS/S5QQbtY/qngK9LEaHk+jrgLGUREZJN1JGjKve?= =?us-ascii?Q?9DRRLRaUCDIH03pCq93TZCeF/IUsov4yPbQm+atKDR9Z/Q79A2NcbcQT1Dhl?= =?us-ascii?Q?BvAdK7WLMrq92g1dyRnVlUjoB9zKddO539jW1gN+wIPD5EjCVvxGkeHANUun?= =?us-ascii?Q?WQHNa6IwVG36UF664YAnrCCtkYxgTfVflJ1CgMDqUte8MUynYJBfkZWtPBUm?= =?us-ascii?Q?7pUjDMmUMcbLsJK9BhChpUy8slTCgpZwcfmpKnmPhIkiDNOqW9BTAME4nOkC?= =?us-ascii?Q?zUTqK4raMCcUPvUJQB/wPZuunHZNZZmgYpytUjYPRIuHMRLgoIs5N7Xg4gxw?= =?us-ascii?Q?Zd5lbmMMwQyjw27uakgEzZoKoYEQ/GbuuN4Vc06uHZrKOvP0tLUIeuBY3IcD?= =?us-ascii?Q?0VLiupcvex+UHDyudz5yNnMGf+XY48I1iB04TCB6e/FqQSOtT+2C0OSy5o78?= =?us-ascii?Q?qW+9H+DKSisaADbCNvIOM9NTBjf0j3lS5upbfCxoKY67kwREVfzGnIEb/Grg?= =?us-ascii?Q?YBhgE8hYqdLLcwEAOKpoaioxXVK3I/9gXrkUXHlRjzZYLQf4oLgqdeBDDSC/?= =?us-ascii?Q?nRXgHrb45zs3YubhFVk9FwYoS07HQ3x7jVhXPjLYfNHXExMNvFj55fo8L7bo?= =?us-ascii?Q?8IZI+/2/7H2EqRvc5Zx5YMEM/jmtYZEStMOMxWGQ5PgwQReieSG4eO68V98j?= =?us-ascii?Q?y8SnSMg2s09sR6ZAMaDSymY6jq33r9rIjfx6jsH0xx0djPlvklbSe0jQzAoY?= =?us-ascii?Q?SkJBfSa98O3VWNCEYFQgD6jEHATRjGHoNMWVhbZRgahfFiv0pCY+68OtsMrc?= =?us-ascii?Q?Tmhd5PHYbz/oBRDI7ngDZXxgEFMJNk888Hr/W5puv+obLZ3tLA8rLes912xN?= =?us-ascii?Q?otc5U/wVM5plx/SNilJJ6cPrqWugLVssB2t1gPO1zkL3vsrw4jMd76U/6DoS?= =?us-ascii?Q?0EBW5mLky7E2TC1eYgp69CTWC9Ehqy+JazVZ6mCX78c7C9B9cW4KyDQKf3dq?= =?us-ascii?Q?PrsBwJ+BoZjk6BD2F4eiH2RUebQL0tbXtsF8LiF4?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5295.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 180c156e-5028-4033-1f8d-08dc43ff0e6d X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2024 08:16:31.6914 (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: dj1OB3UgYiLzXcTKNqDybu08hT+reu5xVcESHtYD/MMy9pDuH60sfyGB1OGhYNnlJK1ZVnyxi9hoasCp9OW4V/GSKCnbrMJIzN1yvB5S3Ng= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6217 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 Resent-Date: Mon, 18 Mar 2024 16:16:32 -0700 Reply-To: devel@edk2.groups.io,madhan.pethaiyan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 9svCUz6G42QQNOfoTqiRbTC2x7686176AA= Content-Language: en-US Content-Type: multipart/mixed; boundary="_004_DM4PR11MB5295E76503A430314063763199292DM4PR11MB5295namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=B10nHI1J; 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 --_004_DM4PR11MB5295E76503A430314063763199292DM4PR11MB5295namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Mike , I had raised new code review addressing the coding standard errors and thos= e were not part of my change any way ..=20 Thanks, P. Madhan -----Original Message----- From: Kinney, Michael D =20 Sent: Sunday, March 10, 2024 1:47 AM To: devel@edk2.groups.io; Pethaiyan, Madhan Cc: Liming Gao ; Liu, Zhiguang ; Li, Yi1 ; GuoX Xu ; Kinney, Mi= chael D Subject: RE: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo= description details Hi Madhan, I created a PR with all 3 related patches to run through EDK II CI. https://github.com/tianocore/edk2/pull/5453 There are CI failures. Please resolve and send updated patches. Thanks, Mike > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of=20 > Pethaiyan Madhan > Sent: Friday, March 8, 2024 3:17 PM > To: devel@edk2.groups.io > Cc: Pethaiyan, Madhan ; Kinney, Michael D=20 > ; Liming Gao ;=20 > Liu, Zhiguang ; Li, Yi1 ;=20 > GuoX Xu > Subject: [edk2-devel] [PATCH V1] MdePkg: Update GetImage ,=20 > GetImageInfo description details >=20 > 1.For EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage(): > Add the following sentence at the end of the Image parameter=20 > description. "May be NULL with a zero ImageSize in order to determine=20 > the size of the buffer needed". >=20 > Modify the description of "EFI_INVALID_PARAMETER" return code as "The=20 > 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=20 > description."May be NULL with a zero ImageInfoSize in order to=20 > determine the size of the buffer needed". >=20 > Modify the description of "EFI_INVALID_PARAMETER" return code as "The=20 > ImageInfoSize is not too small and Image is NULL." and add new=20 > descriptions for "EFI_INVALID_PARAMETER" return code. >=20 > REF: UEFI spec v2.10 23.1.2 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4660 >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Yi Li > Cc: GuoX Xu > Signed-off-by: Pethaiyan Madhan > --- > MdePkg/Include/Protocol/FirmwareManagement.h | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) >=20 > 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)=20 > 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=20 > 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=20 > 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)=20 > 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=20 > 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=20 > 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=20 > 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=20 > due to an authentication failure. > -- > 2.38.1.windows.1 >=20 >=20 >=20 >=20 >=20 -=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 (#116855): https://edk2.groups.io/g/devel/message/116855 Mute This Topic: https://groups.io/mt/104819885/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- --_004_DM4PR11MB5295E76503A430314063763199292DM4PR11MB5295namp_ Content-Type: message/rfc822 Content-Disposition: attachment; creation-date="Thu, 14 Mar 2024 08:16:23 GMT"; modification-date="Thu, 14 Mar 2024 08:16:26 GMT" Received: from DM4PR11MB5312.namprd11.prod.outlook.com (2603:10b6:5:393::8) by DM4PR11MB5295.namprd11.prod.outlook.com with HTTPS; Thu, 14 Mar 2024 08:12:12 +0000 Received: from BN0PR03CA0051.namprd03.prod.outlook.com (2603:10b6:408:e7::26) by DM4PR11MB5312.namprd11.prod.outlook.com (2603:10b6:5:393::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.19; Thu, 14 Mar 2024 08:12:11 +0000 Received: from BN1PEPF0000468C.namprd05.prod.outlook.com (2603:10b6:408:e7:cafe::9d) by BN0PR03CA0051.outlook.office365.com (2603:10b6:408:e7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21 via Frontend Transport; Thu, 14 Mar 2024 08:12:11 +0000 Received: from edgegateway.intel.com (134.134.137.103) by BN1PEPF0000468C.mail.protection.outlook.com (10.167.243.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.12 via Frontend Transport; Thu, 14 Mar 2024 08:12:11 +0000 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by edgegateway.intel.com (10.7.248.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Mar 2024 01:12:01 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) 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; Thu, 14 Mar 2024 01:12:00 -0700 Received: from orviesa002.jf.intel.com (10.64.159.142) by orsmsx602.amr.corp.intel.com (10.22.229.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 14 Mar 2024 01:12:00 -0700 Received: from basatg01.gar.corp.intel.com ([10.66.253.28]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 01:11:56 -0700 From: "Pethaiyan, Madhan" To: "devel@edk2.groups.io" CC: "Pethaiyan, Madhan" , "Kinney, Michael D" , Liming Gao , "Liu, Zhiguang" , "Li, Yi1" , GuoX Xu Subject: [PATCH V1 3/3] SignedCapsulePkg: Update GetImage and GetImageInfo description details Thread-Topic: [PATCH V1 3/3] SignedCapsulePkg: Update GetImage and GetImageInfo description details Thread-Index: AQHadedRaWXFyNw/VUSJOYhcW2IhoQ== Date: Thu, 14 Mar 2024 08:11:33 +0000 Message-ID: <20240314081133.1134-3-madhan.pethaiyan@intel.com> References: <20240314081133.1134-1-madhan.pethaiyan@intel.com> In-Reply-To: <20240314081133.1134-1-madhan.pethaiyan@intel.com> Content-Language: en-US X-MS-Exchange-Organization-AuthMechanism: 10 X-MS-Exchange-Organization-AuthSource: ORSMSX602.amr.corp.intel.com X-MS-Exchange-Organization-ComplianceLabelId: 12ee4da9-25d2-4141-a122-b55133cf49dd X-MS-Has-Attach: X-MS-Exchange-Organization-Network-Message-Id: 7adf7872-cd22-460a-653e-08dc43fe7335 X-MS-TNEF-Correlator: X-MS-Exchange-Organization-RecordReviewCfmType: 0 x-ms-exchange-organization-originalserveripaddress: 10.167.243.137 x-ms-exchange-organization-originalclientipaddress: 10.64.159.142 x-originatororg: intel.onmicrosoft.com x-ms-exchange-transport-crosstenantheadersstamped: DM4PR11MB5312 x-ms-exchange-crosstenant-originalarrivaltime: 14 Mar 2024 08:12:11.1369 (UTC) x-ms-exchange-crosstenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d x-ms-exchange-crosstenant-fromentityheader: HybridOnPrem x-crosspremisesheaderspromoted: BN1PEPF0000468C.namprd05.prod.outlook.com x-organizationheaderspreserved: ORSMSX610.amr.corp.intel.com x-crosspremisesheadersfiltered: BN1PEPF0000468C.namprd05.prod.outlook.com x-ms-publictraffictype: Email authentication-results: spf=fail (sender IP is 134.134.137.103) smtp.mailfrom=intel.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=intel.com; x-ms-office365-filtering-correlation-id: 7adf7872-cd22-460a-653e-08dc43fe7335 x-ms-traffictypediagnostic: BN1PEPF0000468C:EE_|DM4PR11MB5312:EE_|DM4PR11MB5295:EE_ x-forefront-antispam-report: CIP:134.134.137.103;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edgegateway.intel.com;PTR:edgegateway.intel.com;CAT:NONE;SFS:;DIR:INT; x-microsoft-antispam: BCL:0; x-ms-exchange-crosstenant-network-message-id: 7adf7872-cd22-460a-653e-08dc43fe7335 x-ironport-av: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="43129912" x-ms-exchange-transport-endtoendlatency: 00:00:01.6312211 x-ms-exchange-processed-by-bccfoldering: 15.20.7386.010 x-eopattributedmessage: 0 x-ms-exchange-crosstenant-originalattributedtenantconnectingip: TenantId=46c98d88-e344-4ed4-8496-4ed7712e255d;Ip=[134.134.137.103];Helo=[edgegateway.intel.com] received-spf: Fail (protection.outlook.com: domain of intel.com does not designate 134.134.137.103 as permitted sender) receiver=protection.outlook.com; client-ip=134.134.137.103; helo=edgegateway.intel.com; x-extloop1: 1 x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: ORSMSX602.amr.corp.intel.com x-mailer: git-send-email 2.38.1.windows.1 X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;auth:0;dest:I;ENG:(910001)(944506478)(944626604)(920097)(425001)(930097)(140003); X-Microsoft-Antispam-Message-Info: mzRgHaw44AptUEXdjquqyd4+Kl5QQOiBtd5nFKTqfiNrZ+p+20RtfZKHOPBX+atGdRNnu5nxwvNZ8gYNZztrRTJzDlIrsUM11Rr+Dd7UL94EESQlxyP6QtLldUPzKV7gMywLxPy8tIQziSMGiDsa2r8qijpcysHUk8jv/wMvxJeCKkU9fp7Z+AYsVYME2DdcMotBJ9AcHx26MJlAn+uF4MPXXz4EuUl4vp8fgxNMUZitQTTmD2ufIVumilricsLuLpqXnzXFYVeJgkxTcYvMTvvx3QVBugNjkNK8WcH9C2CKR900/CguGPmLuhoIlWpMWlej69phD41cOcN/tSWtWfr33nqVB44pWgLa/SqZeNy7amztJPjKi3iQ6KzJ8vcr+LbEcJ3skTrkkKUB/kjBM/Xbp5nbt7rG3Rv74GSs2tDlrRhx/kqiiB/AAeQWAvpjMHPOl3gqm9cs8cM9h7NH4SZM/eugIlhNjFzBqpyApyqEhhvuXmzBA998DSR26KKn3ejb6BSKSB04Osf2TKYC7RJq/q8NfoGl2j+Qet6IYN3Cgg4QmXVpwHzo/rkM9HS7k41AdI/BFylpQdrvx+pomR1xzcRyulErxh3JvicKrRuGufuBx5igacUdQFgUnregk0rrA7UQR9FYfY7vEee2BhLlprMqpWykBBsvKivi1vwrZuKyX5Pfgzzff8zW3BhNKGQSIYcsLZrd5tWMRwhZbXqPypjLQd0Ivu2QJrFr9flNFhYMYuz+dz9iX39SvG0qShKGXrV9/+JBaoRR3r14A0duXQHy2oOd2q5YPy7CyRZRJNj0K7P+5f3u3917FCTc Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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". Modify the description of "EFI_INVALID_PARAMETER" return code as "The ImageSize is not too small and Image is NULL." 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". 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. REF: UEFI spec v2.10 23.1.2 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4660 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Yi Li Cc: GuoX Xu Signed-off-by: Pethaiyan Madhan --- .../SystemFirmwareUpdate/SystemFirmwareCommonDxe.c | 13 +++++++++++-- .../SystemFirmwareUpdate/SystemFirmwareDxe.h | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmware= CommonDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwar= eCommonDxe.c index 077bd0cb31..6e394d85d4 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonD= xe.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonD= xe.c @@ -34,6 +34,8 @@ EFI_FIRMWARE_MANAGEMENT_PROTOCOL mFirmwareManagementProt= ocol =3D { to contain the image(s) information i= f the buffer was too small. @param[in, out] ImageInfo A pointer to the buffer in which firm= ware places the current image(s) information. The information is an ar= ray 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 fi= rmware returns the version number associated with the EFI_FIRMWARE_IMAG= E_DESCRIPTOR. @param[out] DescriptorCount A pointer to the location in which fi= rmware returns the number of @@ -54,7 +56,12 @@ EFI_FIRMWARE_MANAGEMENT_PROTOCOL mFirmwareManagementPro= tocol =3D { @retval EFI_SUCCESS The device was successfully updated w= ith the new image. @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too small. T= he current buffer size needed to hold the image(s) informati= on is returned in ImageInfoSize. - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small and Im= ageInfo is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torVersion is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torCount is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= Version is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= VersionName is NULL. @retval EFI_DEVICE_ERROR Valid information could not be return= ed. Possible corrupted image. **/ @@ -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 DescriptorCou= nt. @param[in,out] Image Points to the buffer where the current im= age is copied to. + May be NULL with a zero ImageSize in orde= r to determine the size of the + buffer needed. @param[in,out] ImageSize On entry, points to the size of the buffe= r pointed to by Image, in bytes. On return, points to the length of the im= age, in bytes. @@ -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 bu= ffer. @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/SystemFirmware= Dxe.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 i= f the buffer was too small. @param[in, out] ImageInfo A pointer to the buffer in which firm= ware places the current image(s) information. The information is an ar= ray 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 fi= rmware returns the version number associated with the EFI_FIRMWARE_IMAG= E_DESCRIPTOR. @param[out] DescriptorCount A pointer to the location in which fi= rmware returns the number of @@ -157,7 +159,12 @@ typedef struct { @retval EFI_SUCCESS The device was successfully updated w= ith the new image. @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too small. T= he current buffer size needed to hold the image(s) informati= on is returned in ImageInfoSize. - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small and Im= ageInfo is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torVersion is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torCount is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= Version is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= VersionName is NULL. @retval EFI_DEVICE_ERROR Valid information could not be return= ed. Possible corrupted image. **/ @@ -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 DescriptorCou= nt. @param[in,out] Image Points to the buffer where the current im= age is copied to. + May be NULL with a zero ImageSize in orde= r to determine the size of the + buffer needed. @param[in,out] ImageSize On entry, points to the size of the buffe= r pointed to by Image, in bytes. On return, points to the length of the im= age, in bytes. @@ -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 bu= ffer. @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 --_004_DM4PR11MB5295E76503A430314063763199292DM4PR11MB5295namp_ Content-Type: message/rfc822 Content-Disposition: attachment; creation-date="Thu, 14 Mar 2024 08:16:26 GMT"; modification-date="Thu, 14 Mar 2024 08:16:28 GMT" Received: from DM4PR11MB6334.namprd11.prod.outlook.com (2603:10b6:8:b5::18) by DM4PR11MB5295.namprd11.prod.outlook.com with HTTPS; Thu, 14 Mar 2024 08:12:09 +0000 Received: from BN9PR03CA0280.namprd03.prod.outlook.com (2603:10b6:408:f5::15) by DM4PR11MB6334.namprd11.prod.outlook.com (2603:10b6:8:b5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20; Thu, 14 Mar 2024 08:12:08 +0000 Received: from BN1PEPF00004687.namprd05.prod.outlook.com (2603:10b6:408:f5:cafe::6a) by BN9PR03CA0280.outlook.office365.com (2603:10b6:408:f5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21 via Frontend Transport; Thu, 14 Mar 2024 08:12:08 +0000 Received: from edgegateway.intel.com (134.134.137.103) by BN1PEPF00004687.mail.protection.outlook.com (10.167.243.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.12 via Frontend Transport; Thu, 14 Mar 2024 08:12:07 +0000 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by edgegateway.intel.com (10.7.248.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Mar 2024 01:11:55 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Mar 2024 01:11:55 -0700 Received: from orviesa002.jf.intel.com (10.64.159.142) by orsmsx603.amr.corp.intel.com (10.22.229.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 14 Mar 2024 01:11:55 -0700 Received: from basatg01.gar.corp.intel.com ([10.66.253.28]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 01:11:51 -0700 From: "Pethaiyan, Madhan" To: "devel@edk2.groups.io" CC: "Pethaiyan, Madhan" , "Kinney, Michael D" , Liming Gao , "Liu, Zhiguang" , "Li, Yi1" , GuoX Xu Subject: [PATCH V1 2/3] MdePkg: Update GetImage , GetImageInfo description details Thread-Topic: [PATCH V1 2/3] MdePkg: Update GetImage , GetImageInfo description details Thread-Index: AQHadedPI+qw+swm6kepdhi4eO6ICQ== Date: Thu, 14 Mar 2024 08:11:32 +0000 Message-ID: <20240314081133.1134-2-madhan.pethaiyan@intel.com> References: <20240314081133.1134-1-madhan.pethaiyan@intel.com> In-Reply-To: <20240314081133.1134-1-madhan.pethaiyan@intel.com> Content-Language: en-US X-MS-Exchange-Organization-AuthMechanism: 10 X-MS-Exchange-Organization-AuthSource: ORSMSX603.amr.corp.intel.com X-MS-Exchange-Organization-ComplianceLabelId: 12ee4da9-25d2-4141-a122-b55133cf49dd X-MS-Has-Attach: X-MS-Exchange-Organization-Network-Message-Id: 8c6a93ac-3539-45d5-9397-08dc43fe714c X-MS-TNEF-Correlator: X-MS-Exchange-Organization-RecordReviewCfmType: 0 x-ms-exchange-organization-originalserveripaddress: 10.167.243.132 x-ms-exchange-organization-originalclientipaddress: 10.64.159.142 x-originatororg: intel.onmicrosoft.com x-ms-exchange-transport-crosstenantheadersstamped: DM4PR11MB6334 x-ms-exchange-crosstenant-originalarrivaltime: 14 Mar 2024 08:12:07.9022 (UTC) x-ms-exchange-crosstenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d x-ms-exchange-crosstenant-fromentityheader: HybridOnPrem x-crosspremisesheaderspromoted: BN1PEPF00004687.namprd05.prod.outlook.com x-organizationheaderspreserved: ORSMSX603.amr.corp.intel.com x-crosspremisesheadersfiltered: BN1PEPF00004687.namprd05.prod.outlook.com x-ms-publictraffictype: Email authentication-results: spf=fail (sender IP is 134.134.137.103) smtp.mailfrom=intel.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=intel.com; x-ms-office365-filtering-correlation-id: 8c6a93ac-3539-45d5-9397-08dc43fe714c x-ms-traffictypediagnostic: BN1PEPF00004687:EE_|DM4PR11MB6334:EE_|DM4PR11MB5295:EE_ x-forefront-antispam-report: CIP:134.134.137.103;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edgegateway.intel.com;PTR:edgegateway.intel.com;CAT:NONE;SFS:;DIR:INT; x-microsoft-antispam: BCL:0; x-ms-exchange-crosstenant-network-message-id: 8c6a93ac-3539-45d5-9397-08dc43fe714c x-ironport-av: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="43129881" x-ms-exchange-transport-endtoendlatency: 00:00:01.5843009 x-ms-exchange-processed-by-bccfoldering: 15.20.7386.010 x-eopattributedmessage: 0 x-ms-exchange-crosstenant-originalattributedtenantconnectingip: TenantId=46c98d88-e344-4ed4-8496-4ed7712e255d;Ip=[134.134.137.103];Helo=[edgegateway.intel.com] received-spf: Fail (protection.outlook.com: domain of intel.com does not designate 134.134.137.103 as permitted sender) receiver=protection.outlook.com; client-ip=134.134.137.103; helo=edgegateway.intel.com; x-extloop1: 1 x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: ORSMSX603.amr.corp.intel.com x-mailer: git-send-email 2.38.1.windows.1 X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;auth:0;dest:I;ENG:(910001)(944506478)(944626604)(920097)(425001)(930097)(140003); X-Microsoft-Antispam-Message-Info: CRpS+YEE+/XHulEktG/IhBQc3b1YKAlLC2KCJE5YaCZeNiutJ8jIGCvvRscyQa+0mWg33/w+WWPPDGKmiS5GnmFiwQ30S35enZV1MuxFI2n8lf0Mp7Kn12lfSrVvBg+vGgspOl3rh0hjrUV/OlRxcLnGO3O9KdVTTAohtqlJnQXQeaZQqaC/EBvDgIc1YrLVpEmflgC8PuYSrRqk/iI6BT5LdzZ1PDjIOTHsNKcbdoxSi8JpiPAW0k9PiGXWpEBW2uIA7qeWvCmMcH2acxzILT794vf9KjxOIVGV1EIf1KmweEs9mnDA8r3hlAoDh4Hdb0hYbEgJNbDSrpbMWofHuttKucvpJ0gE7FkjXAj8cCgM/oaySNsapF0RHZc1A7YRMZ0FO673PTXJQnSfFJXQVW+zqnYxH3Mq7s1wjG4NEuR4OLFzeLVoSdHL1q9eGEZf7O/gsrCBA22nhuEruB6rrNc2ojiI6IDk/ftjg3hzQ+57HPckuUDlgYNIPQtn2M9qFpBs2HZZ6QKPFw306WCGYcrEhHEl1L1s4yAr/YoSm/mXxlzI24c5DXBsLHvhr0/Xu0XwKleZNxRH6Qy3cBAchLcbxGPx5JSKwkncOMgT5YSXMYoTHHGeZgMiWT0348hzImIJ9TY/PI2TryxOVLwtY39Xx29Kv+ctw8BreuZS+F+6xgZ66YG+Uo2g7yBkBr89J/Mf9OQJtrmmlhNGlZaFo6AfCYCASnb+Qryx5ZDnJyXXEwSpX7KaZ/OKepS6R5cxqNwDkW4e8JVHyp7kC2qmJj1vl/BDhpsyAzkEiz8k1JoW6bBMIkM8iLigX8ASuHnj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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". Modify the description of "EFI_INVALID_PARAMETER" return code as "The ImageSize is not too small and Image is NULL." 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". 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. REF: UEFI spec v2.10 23.1.2 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4660 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Yi Li Cc: GuoX Xu Signed-off-by: Pethaiyan Madhan --- MdePkg/Include/Protocol/FirmwareManagement.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 i= f the buffer was too small. @param[in, out] ImageInfo A pointer to the buffer in which firm= ware places the current image(s) information. The information is an ar= ray 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 fi= rmware returns the version number associated with the EFI_FIRMWARE_IMAG= E_DESCRIPTOR. @param[out] DescriptorCount A pointer to the location in which fi= rmware returns the number of @@ -314,7 +316,12 @@ EFI_STATUS @retval EFI_SUCCESS The device was successfully updated w= ith the new image. @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too small. T= he current buffer size needed to hold the image(s) informati= on is returned in ImageInfoSize. - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small and Im= ageInfo is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torVersion is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torCount is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= Version is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= VersionName is NULL. @retval EFI_DEVICE_ERROR Valid information could not be return= ed. Possible corrupted image. **/ @@ -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 DescriptorCou= nt. @param[out] Image Points to the buffer where the current im= age is copied to. + May be NULL with a zero ImageSize in orde= r to determine the size of the + buffer needed. + @param[in, out] ImageSize On entry, points to the size of the buffe= r pointed to by Image, in bytes. On return, points to the length of the im= age, in bytes. @@ -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 bu= ffer. @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 --_004_DM4PR11MB5295E76503A430314063763199292DM4PR11MB5295namp_ Content-Type: message/rfc822 Content-Disposition: attachment; creation-date="Thu, 14 Mar 2024 08:16:29 GMT"; modification-date="Thu, 14 Mar 2024 08:16:31 GMT" Received: from CH3PR11MB7940.namprd11.prod.outlook.com (2603:10b6:610:130::18) by DM4PR11MB5295.namprd11.prod.outlook.com with HTTPS; Thu, 14 Mar 2024 08:11:59 +0000 Received: from CH0PR03CA0371.namprd03.prod.outlook.com (2603:10b6:610:119::19) by CH3PR11MB7940.namprd11.prod.outlook.com (2603:10b6:610:130::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.18; Thu, 14 Mar 2024 08:11:58 +0000 Received: from CH3PEPF00000015.namprd21.prod.outlook.com (2603:10b6:610:119:cafe::f8) by CH0PR03CA0371.outlook.office365.com (2603:10b6:610:119::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.19 via Frontend Transport; Thu, 14 Mar 2024 08:11:58 +0000 Received: from edgegateway.intel.com (192.55.55.68) by CH3PEPF00000015.mail.protection.outlook.com (10.167.244.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.0 via Frontend Transport; Thu, 14 Mar 2024 08:11:57 +0000 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by edgegateway.intel.com (10.1.192.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Mar 2024 01:11:50 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Mar 2024 01:11:50 -0700 Received: from orviesa002.jf.intel.com (10.64.159.142) by fmsmsx601.amr.corp.intel.com (10.18.84.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 14 Mar 2024 01:11:50 -0700 Received: from basatg01.gar.corp.intel.com ([10.66.253.28]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 01:11:46 -0700 From: "Pethaiyan, Madhan" To: "devel@edk2.groups.io" CC: "Pethaiyan, Madhan" , "Kinney, Michael D" , Liming Gao , "Liu, Zhiguang" , "Li, Yi1" , GuoX Xu Subject: [PATCH V1 1/3] FmpDevicePkg: GetImageInfo Add missing conditions Thread-Topic: [PATCH V1 1/3] FmpDevicePkg: GetImageInfo Add missing conditions Thread-Index: AQHadedJHQYckCfObE+t8P+F4lbXPA== Date: Thu, 14 Mar 2024 08:11:31 +0000 Message-ID: <20240314081133.1134-1-madhan.pethaiyan@intel.com> Content-Language: en-US X-MS-Exchange-Organization-AuthMechanism: 10 X-MS-Exchange-Organization-AuthSource: fmsmsx601.amr.corp.intel.com X-MS-Exchange-Organization-ComplianceLabelId: 12ee4da9-25d2-4141-a122-b55133cf49dd X-MS-Has-Attach: X-MS-Exchange-Organization-Network-Message-Id: b9a1613a-0ec6-498b-3bc9-08dc43fe6b4f X-MS-TNEF-Correlator: X-MS-Exchange-Organization-RecordReviewCfmType: 0 x-ms-exchange-organization-originalserveripaddress: 10.167.244.120 x-ms-exchange-organization-originalclientipaddress: 10.64.159.142 x-originatororg: intel.onmicrosoft.com x-ms-exchange-transport-crosstenantheadersstamped: CH3PR11MB7940 x-ms-exchange-crosstenant-originalarrivaltime: 14 Mar 2024 08:11:57.9314 (UTC) x-ms-exchange-crosstenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d x-ms-exchange-crosstenant-fromentityheader: HybridOnPrem x-crosspremisesheaderspromoted: CH3PEPF00000015.namprd21.prod.outlook.com x-organizationheaderspreserved: fmsmsx601.amr.corp.intel.com x-crosspremisesheadersfiltered: CH3PEPF00000015.namprd21.prod.outlook.com x-ms-publictraffictype: Email authentication-results: spf=fail (sender IP is 192.55.55.68) smtp.mailfrom=intel.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=intel.com; x-ms-office365-filtering-correlation-id: b9a1613a-0ec6-498b-3bc9-08dc43fe6b4f x-ms-traffictypediagnostic: CH3PEPF00000015:EE_|CH3PR11MB7940:EE_|DM4PR11MB5295:EE_ x-forefront-antispam-report: CIP:192.55.55.68;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edgegateway.intel.com;PTR:edgegateway.intel.com;CAT:NONE;SFS:;DIR:INT; x-microsoft-antispam: BCL:0; x-ms-exchange-crosstenant-network-message-id: b9a1613a-0ec6-498b-3bc9-08dc43fe6b4f x-ironport-av: E=Sophos;i="6.07,124,1708416000"; d="scan'208";a="43129836" x-ms-exchange-transport-endtoendlatency: 00:00:01.2202160 x-ms-exchange-processed-by-bccfoldering: 15.20.7386.010 x-eopattributedmessage: 0 x-ms-exchange-crosstenant-originalattributedtenantconnectingip: TenantId=46c98d88-e344-4ed4-8496-4ed7712e255d;Ip=[192.55.55.68];Helo=[edgegateway.intel.com] received-spf: Fail (protection.outlook.com: domain of intel.com does not designate 192.55.55.68 as permitted sender) receiver=protection.outlook.com; client-ip=192.55.55.68; helo=edgegateway.intel.com; x-extloop1: 1 x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: fmsmsx601.amr.corp.intel.com x-mailer: git-send-email 2.38.1.windows.1 X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;auth:0;dest:I;ENG:(910001)(944506478)(944626604)(920097)(425001)(930097)(140003); X-Microsoft-Antispam-Message-Info: voL2jZJ8EfHiv/YCV/dZeKd46WvIrKAR7Xp0tNe+tOv1aUy1k1r+IqVB4K+OLXlQDG73DhPKnPbBu741x6ESbzPrC3n2bnASdav3N57X6xWg0+Y/Pi8IYT3nesXo/psOXSB8d8cKraCBkloBxIUnkyJLo5Uf9gnRFfz4un39tONNJFeJuA2Qh3rFrt55WQcRTw30klbHdrq6f2st08yCFJBH5X2n+2H5Wzwp0T90ni7wiLpEJckdaJGyZqLOXgDLXZBJvOPCThdh/m29Mf7Fu8w5M9Sm2+dYinjXrC8acIm3Tdd17WlWeG/t9d0FZh2RIxxIIlEetw6OV9W8HrLM5E2XvynwFmBNYtyJN0vilgG6kVvaiuJ2RUMZDS2RxsMjppMDTGntwIqYHsjQJWgkHSDISwKI5KY2oNmiHZ/Ff3CUjQR3cr+UaeSnDkgOprwku/7vvfeHVoFn84NUWfLjn27Qc5mlfPyqEeMylF+UTrgUy7hbG04sXXWIF7snTyiEBtPFgHjQDMhM+c/9T3xDmGgY/YU9jKcETTYsV5Ok47lHTmaylxFs5voSyrjSNDM+5lzj57AMsvv4PU85mDxE03UcH7PheUQsK2h8nNE4BXh6hR4DGJ1eYs2vpWz4avNzgsumzdO4OL0g9J9pMgKxJKV/WtNrVogdMWNn2TtHZgF7WjUm4UA7WjDU/6Y1n9A6O5wtM70CUyEO0K/gDv81/dL8RTiVRBaIg2lE3Sd5wkyRdbkXxutuwp9VSSRl/6RCZO/QzZsTyxfc88S3gJJeb0ieII+uaxIg1xqYJsF3AlMP5/kUmJ+io71Mwl2mxXW+ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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". Modify the description of "EFI_INVALID_PARAMETER" return code as "The ImageSize is not too small and Image is NULL." 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". 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. REF: UEFI spec v2.10 23.1.2 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4660 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 | 52 +++++++++++++++++++++--------------- FmpDevicePkg/FmpDxe/FmpDxe.h | 15 ++++++++--- 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index 1e7ec4a09e..4111b7cb8e 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -43,20 +43,20 @@ const FIRMWARE_MANAGEMENT_PRIVATE_DATA mFirmwareManage= mentPrivateDataTemplate =3D FIRMWARE_MANAGEMENT_PRIVATE_DATA_SIGNATURE, // Signature NULL, // Handle { // Fmp - GetTheImageInfo, + GetImageInfo, GetTheImage, SetTheImage, CheckTheImage, GetPackageInfo, SetPackageInfo }, - FALSE, // DescriptorPopulated - { // Desc - 1, // ImageIndex + FALSE, // DescriptorPopulated + { // Desc + 1, // ImageIndex // // ImageTypeId // - { 0x00000000, 0x0000,0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0= x00, 0x00 } + { 0x00000000, 0x0000,0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x= 00, 0x00 } }, 1, // ImageId NULL, // ImageIdName @@ -71,18 +71,18 @@ const FIRMWARE_MANAGEMENT_PRIVATE_DATA mFirmwareManage= mentPrivateDataTemplate =3D 0, // LastAttemptStatus 0 // HardwareInstance }, - NULL, // ImageIdName - NULL, // VersionName - TRUE, // RuntimeVersionSupported - NULL, // FmpDeviceLockEvent - FALSE, // FmpDeviceLocked - NULL, // FmpDeviceContext - NULL, // VersionVariableName - NULL, // LsvVariableName - NULL, // LastAttemptStatusVariableName - NULL, // LastAttemptVersionVariableName - NULL, // FmpStateVariableName - TRUE // DependenciesSatisfied + NULL, // ImageIdName + NULL, // VersionName + TRUE, // RuntimeVersionSupported + NULL, // FmpDeviceLockEvent + FALSE, // FmpDeviceLocked + NULL, // FmpDeviceContext + NULL, // VersionVariableName + NULL, // LsvVariableName + NULL, // LastAttemptStatusVariableName + NULL, // LastAttemptVersionVariableName + NULL, // FmpStateVariableName + TRUE // DependenciesSatisfied }; /// @@ -417,6 +417,8 @@ PopulateDescriptor ( to contain the image(s) information i= f the buffer was too small. @param[in, out] ImageInfo A pointer to the buffer in which firm= ware places the current image(s) information. The information is an ar= ray 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 fi= rmware returns the version number associated with the EFI_FIRMWARE_IMAG= E_DESCRIPTOR. @param[out] DescriptorCount A pointer to the location in which fi= rmware returns the number of @@ -437,13 +439,18 @@ PopulateDescriptor ( @retval EFI_SUCCESS The device was successfully updated w= ith the new image. @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too small. T= he current buffer size needed to hold the image(s) informati= on is returned in ImageInfoSize. - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small and Im= ageInfo is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torVersion is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torCount is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= Version is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= VersionName is NULL. @retval EFI_DEVICE_ERROR Valid information could not be return= ed. Possible corrupted image. **/ 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) || (Des= criptorCount =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 i= s 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 DescriptorCou= nt. @param[in, out] Image Points to the buffer where the current im= age is copied to. + May be NULL with a zero ImageSize in orde= r to determine the size of the + buffer needed. + @param[in, out] ImageSize On entry, points to the size of the buffe= r pointed to by Image, in bytes. On return, points to the length of the im= age, in bytes. @@ -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 bu= ffer. @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 i= f the buffer was too small. @param[in, out] ImageInfo A pointer to the buffer in which firm= ware places the current image(s) information. The information is an ar= ray 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 fi= rmware returns the version number associated with the EFI_FIRMWARE_IMAG= E_DESCRIPTOR. @param[out] DescriptorCount A pointer to the location in which fi= rmware returns the number of @@ -134,13 +136,18 @@ DetectTestKey ( @retval EFI_SUCCESS The device was successfully updated w= ith the new image. @retval EFI_BUFFER_TOO_SMALL The ImageInfo buffer was too small. T= he current buffer size needed to hold the image(s) informati= on is returned in ImageInfoSize. - @retval EFI_INVALID_PARAMETER ImageInfoSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is not too small and Im= ageInfo is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torVersion is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torCount is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Descrip= torSize is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= Version is NULL. + @retval EFI_INVALID_PARAMETER ImageInfoSize is non-zero and Package= VersionName is NULL. @retval EFI_DEVICE_ERROR Valid information could not be return= ed. Possible corrupted image. **/ 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 DescriptorCou= nt. @param[in, out] Image Points to the buffer where the current im= age is copied to. + May be NULL with a zero ImageSize in orde= r to determine the size of the + buffer needed. @param[in, out] ImageSize On entry, points to the size of the buffe= r pointed to by Image, in bytes. On return, points to the length of the im= age, in bytes. @@ -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 bu= ffer. @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 --_004_DM4PR11MB5295E76503A430314063763199292DM4PR11MB5295namp_--