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 EF667941B6D for ; Sat, 9 Mar 2024 19:34:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ApZGn+6jnWjw4zRwflB+gIYZaLzaM2SNCtWx18Yjm7Y=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1710012861; v=1; b=juP3AyOhJX7/v7Nfmj5CiHT9sA9MKf38dbsMD5Svx4NRfHK0L7MVAgdzcZSsy+facLIF7NjB fClQ05Eazqeju7MeDfQVz57DX0Xy4oFYAn7+ajYF4DiUkYk0IvJxZM59jdyxnEIedI+MdziIJ8U h+Piff23AHw48H4m/xZByppfRpBuI/iN054NHJ/uz0nDp3vYQvdTtAsyuZvEzLJDEldo2z9SHEh ekWoNcZeZWSzUB9tK8Lew5J/vCVLZFYcQSRJQwZKT2TQzmWe9otLw5nqVNDb/2xINxqPtVwsSON 2SS1wUCJ7tFrBJy3wG8YBKgSsLCLGm0w1cT5M8068ZYqg== X-Received: by 127.0.0.2 with SMTP id N3CxYY7687511x2ZpLAYpBmB; Sat, 09 Mar 2024 11:34:21 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mx.groups.io with SMTP id smtpd.web10.19399.1710012860686028373 for ; Sat, 09 Mar 2024 11:34:20 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,11008"; a="4898197" X-IronPort-AV: E=Sophos;i="6.07,113,1708416000"; d="scan'208";a="4898197" X-Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2024 11:34:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,113,1708416000"; d="scan'208";a="10781049" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Mar 2024 11:34:20 -0800 X-Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sat, 9 Mar 2024 11:34:19 -0800 X-Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sat, 9 Mar 2024 11:34:18 -0800 X-Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Sat, 9 Mar 2024 11:34:18 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) 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; Sat, 9 Mar 2024 11:34:18 -0800 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by DS0PR11MB7559.namprd11.prod.outlook.com (2603:10b6:8:146::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.10; Sat, 9 Mar 2024 19:34:16 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::e34e:4d18:b93e:c368]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::e34e:4d18:b93e:c368%5]) with mapi id 15.20.7386.011; Sat, 9 Mar 2024 19:34:16 +0000 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "Pethaiyan, Madhan" CC: Liming Gao , "Liu, Zhiguang" , "Li, Yi1" , GuoX Xu , "Kinney, Michael D" 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: AQHacX3Pail4Pw+/G0mweK5JEze9mrEvzo+Q Date: Sat, 09 Mar 2024 11:34:20 -0800 Message-ID: References: <20240308172556.2473-1-madhan.pethaiyan@intel.com> In-Reply-To: <20240308172556.2473-1-madhan.pethaiyan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|DS0PR11MB7559:EE_ x-ms-office365-filtering-correlation-id: b7712553-9867-4c9b-eb49-08dc406fe883 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: jZ2s+WnQcFggHY3mB6r4eQvyWLUnxTQqT+AeNjVe5sMXYF+GPImT68SjJVoCSJql5DhwLocWbb+VbiFEFGhJpQ6BV+rb+Eu1uGvsGDZHl1QGsXqh590TfPDWw7oeqIOK6oWv6DRuHc+ElvqW0B3hdJKyVHJQv69iyXfO0P8osOkYfAgthXr1bnks1FLdvAMTE2SWEi+wu0b10zvbCNeO/orNRIw/ZZ+2Dk7aH54UxjLP7vag2AS6FJqcmQAy3EQ6/a0hmdrVGAgeThjrm4sE5luQUXJNIqgNl6rWrbJebKWpECpJV3s9zudFugaEnE6/82z8edBjP7ruopOyUvy5UJOC8LlJItI/6hTog5fx13Oy/GGlkLLYM8+wBVRmMOXGisTTVHYQrHFXjT8bRFz5cKE7t6iQzuSHPC7wO9YfcMQyHGXK3FC21krWnP5mOfmphiieWnGfkglSk3Du4tJXWIuJ45ePG8GgLvd/RBWmUm0JWUlh7HpeJJZV4noVpezZ8/78OGG7ygoyq1/CW1g6N7yp2mYBXwgoKCQE2dUjEgS/8PRywelWPq99LHKfuQSDVxN4OrbOMvGJv+Jsd6IyUXTi/w3UH8ed8XGzKCtQGzb2Thn2a0gmGbHNbKxlEpJ/oh5a6ehsJsxVNbD3iTcMBpE8bHqbhbAJ94Ql+mLyiIFeIPP98kLrxRMZyZfBWu2D x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aZe2mrthD+/ptKagIiPqKBrLj6x2tOEVkYtahqkifRhKBoM/mxNedd7/7Flo?= =?us-ascii?Q?nEJ7jngFynSQ0xoPlMalb5DBhHXP7dyDpA0gI/Xl7lC6+W5z1Slis5HQhLEh?= =?us-ascii?Q?tSr6n+5tArs0/hNL0JW8uYsnHqshOFxdBQWMNarPq530Bc9rVM0UhsMxgB0F?= =?us-ascii?Q?Q1fVBKO6jNUJe9ENN6uC6U1E0eUAyKnxQOB6ZYCFclkshkWZCPqjxLudC8B8?= =?us-ascii?Q?jkEQlfm4DnKYbHNyVm+rO4oiymXuVAghAbnnon2GRz8SQna0iayRo/7D0nZy?= =?us-ascii?Q?f7gDa04Ykxfibm/56U8MqNIlZJD7rxweVgqCEPSNkErB7ON+kefe0IIgi01K?= =?us-ascii?Q?hjqFGZdv3nA29hQgKydh1EukROnNeza+SbabuIHhEkqv5b0ZG4H9f4Z6AG2/?= =?us-ascii?Q?Jys9JbA556psSdM/a+KHwJ2j3zPs/LV9DwfVJ+4RpVkHTkeCpXS41+jCR5uC?= =?us-ascii?Q?gW/BRx6AsDAiiy0PYJordOuXxmwPTLxt93iNkpZXLF4weR6ldyqdURGEsY/Y?= =?us-ascii?Q?feNaXxigjkTnJflDWAywKGY/PXQnJhT4s13cfAatuXF0d0LbOloQYMZCT0tQ?= =?us-ascii?Q?DMv5CTZd6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U+L7DEGf5SKoSQd?= =?us-ascii?Q?pn5DpuoH9XgI/xAyLWdZEU8JMUrwl//FLgC0MGk4+fqPQJKsFnYFPB/M6ph8?= =?us-ascii?Q?UmXBImVHWM4ECGr0KWTEzLuj6vjAHgYCWHIlZ944?= 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: b7712553-9867-4c9b-eb49-08dc406fe883 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2024 19:34:16.5649 (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: 352jluqLPqWenwN9URSEwEVrS44f0kIVVlG+Ybc9Co3dBNaw4Yn6rW0waKN0oRSxc9sTY2kuDHk06M4uqIR62E3b3H1DvK8PJ5ovnj0wgVY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7559 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: gVm7gdaIVK01OFVJqDY3dSVHx7686176AA= 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=20240206 header.b=juP3AyOh; 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 Does anyone know why this condition was dropped between=20 UEFI 2.7 and UEFI 2.8 for Firmware Management Protocol GetImageInfo()? EFI_INVALID_PARAMETER ImageInfoSize is NULL. It seems the updated return code assumes ImageInfoSize is not NULL to perform those checks. Thanks, Mike > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of > Pethaiyan Madhan > Sent: Friday, March 8, 2024 3:17 PM > To: devel@edk2.groups.io > Cc: Pethaiyan, Madhan ; Kinney, Michael D > ; Liming Gao ; > Liu, Zhiguang ; Li, Yi1 ; > GuoX Xu > Subject: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo > description details >=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 > 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) > 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. > -- > 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 (#116562): https://edk2.groups.io/g/devel/message/116562 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-