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 887AD7803CE for ; Tue, 27 Feb 2024 12:48:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=HWrdzbW8CQjK6b11ho8nPuwXxWqQ3KaAXbCjhFF0sTQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1709038106; v=1; b=ae7DivcH7tul+svvRSL1ULjX55dlRb8tb1S15nACWAmJfc4t26y9W+TB3tICxFkecBhYLHR7 2qUVpX0V2W1v8AinwcyJUyZR2K9SW53hsv2Y1q8+dlruD/fxyrQi56xI03bPi8TOe3FUsbTTzup ByFqHre5CsIZ/ec7KW/Ru1YE= X-Received: by 127.0.0.2 with SMTP id nJ0OYY7687511xG1C0edrCn6; Tue, 27 Feb 2024 04:48:26 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mx.groups.io with SMTP id smtpd.web11.8913.1709028284138379521 for ; Tue, 27 Feb 2024 02:04:44 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="3477778" X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="3477778" X-Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2024 02:04:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,187,1705392000"; d="scan'208";a="11723989" X-Received: from basatg01.gar.corp.intel.com ([10.66.253.28]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2024 02:04:41 -0800 From: Pethaiyan Madhan To: devel@edk2.groups.io Cc: Pethaiyan Madhan , Michael D Kinney , Liming Gao , Zhiguang Liu , Yi Li , GuoX Xu Subject: [edk2-devel] [PATCH] SignedCapsulePkg: Update GetImage and GetImageInfo description details Date: Tue, 27 Feb 2024 15:34:27 +0530 Message-Id: MIME-Version: 1.0 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,madhan.pethaiyan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: fNCX3CtsnsQa69YgKvp6XjWfx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ae7DivcH; 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 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 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/SystemFirmwareCommonDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonDxe.c index 077bd0cb31..6e394d85d4 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonDxe.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonDxe.c @@ -34,6 +34,8 @@ EFI_FIRMWARE_MANAGEMENT_PROTOCOL mFirmwareManagementProtocol = { 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 = { @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. **/ @@ -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. @@ -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. **/ @@ -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. @@ -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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116039): https://edk2.groups.io/g/devel/message/116039 Mute This Topic: https://groups.io/mt/104601543/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-