public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Pethaiyan, Madhan" <madhan.pethaiyan@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
	"Liu, Zhiguang" <zhiguang.liu@intel.com>,
	"Li, Yi1" <yi1.li@intel.com>, GuoX Xu <guox.xu@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo description details
Date: Sat, 09 Mar 2024 11:34:20 -0800	[thread overview]
Message-ID: <CO1PR11MB4929074D5CFDD13BCACD16FDD2262@CO1PR11MB4929.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20240308172556.2473-1-madhan.pethaiyan@intel.com>

Does anyone know why this condition was dropped between 
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 <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 <madhan.pethaiyan@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Liu, Zhiguang <zhiguang.liu@intel.com>; Li, Yi1 <yi1.li@intel.com>;
> GuoX Xu <guox.xu@intel.com>
> Subject: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo
> description details
> 
> 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=4660
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Yi Li <yi1.li@intel.com>
> Cc: GuoX Xu <guox.xu@intel.com>
> Signed-off-by: Pethaiyan Madhan <madhan.pethaiyan@intel.com>
> ---
>  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 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.
> 
>  **/
> @@ -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.
> 
> @@ -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
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-03-09 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 23:16 [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo description details Pethaiyan Madhan
2024-03-09 19:34 ` Michael D Kinney [this message]
2024-03-09 20:17 ` Michael D Kinney
2024-03-14  8:16   ` Pethaiyan, Madhan
2024-03-26  5:51     ` Pethaiyan, Madhan
2024-03-28  1:10     ` 回复: " gaoliming via groups.io
2024-05-13 12:09       ` Pethaiyan, Madhan
2024-05-13 13:11         ` 回复: " gaoliming via groups.io

Reply instructions:

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

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

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

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

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

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

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