summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQingyu <qingyu.shang@intel.com>2024-04-08 16:56:47 +0800
committerLiming Gao <gaoliming@byosoft.com.cn>2024-04-15 21:30:48 +0800
commite25808f5018ea601d0adf1d6d10c1cb3cb6a050b (patch)
tree5acd290c97cbf0825d36dcccf87d10391f0064b5
parent98f150a954b35cc74bd87ae355cf35d8c9e1580d (diff)
downloadedk2-e25808f5018ea601d0adf1d6d10c1cb3cb6a050b.tar.gz
edk2-e25808f5018ea601d0adf1d6d10c1cb3cb6a050b.tar.bz2
edk2-e25808f5018ea601d0adf1d6d10c1cb3cb6a050b.zip
MdePkg: Update the comments of GetInformation function
Refer to Uefi spec 2.10 section 11.11.2, add a new retval EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation(). Reference: [mantis #1866] - GetInfo() of Adapter Information Protocol should have a provision for IHV to return no data. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Qingyu <qingyu.shang@intel.com> Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
-rw-r--r--MdePkg/Include/Protocol/AdapterInformation.h5
-rw-r--r--MdePkg/Library/DxeHstiLib/HstiAip.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/MdePkg/Include/Protocol/AdapterInformation.h b/MdePkg/Include/Protocol/AdapterInformation.h
index ed19e5736c..8e4448eb0f 100644
--- a/MdePkg/Include/Protocol/AdapterInformation.h
+++ b/MdePkg/Include/Protocol/AdapterInformation.h
@@ -140,7 +140,9 @@ typedef struct {
This function returns information of type InformationType from the adapter.
If an adapter does not support the requested informational type, then
- EFI_UNSUPPORTED is returned.
+ EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+ the requested InformationType, it fills InformationBlockSize with 0 and
+ returns EFI_NOT_FOUND.
@param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
@param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
@@ -150,6 +152,7 @@ typedef struct {
@retval EFI_SUCCESS The InformationType information was retrieved.
@retval EFI_UNSUPPORTED The InformationType is not known.
+ @retval EFI_NOT_FOUND Information is not available for the requested information type.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
@retval EFI_INVALID_PARAMETER This is NULL.
diff --git a/MdePkg/Library/DxeHstiLib/HstiAip.c b/MdePkg/Library/DxeHstiLib/HstiAip.c
index a2454ffeaa..523a712e6f 100644
--- a/MdePkg/Library/DxeHstiLib/HstiAip.c
+++ b/MdePkg/Library/DxeHstiLib/HstiAip.c
@@ -12,7 +12,9 @@
This function returns information of type InformationType from the adapter.
If an adapter does not support the requested informational type, then
- EFI_UNSUPPORTED is returned.
+ EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+ the requested InformationType, it fills InformationBlockSize with 0 and
+ returns EFI_NOT_FOUND.
@param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
@param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
@@ -22,6 +24,7 @@
@retval EFI_SUCCESS The InformationType information was retrieved.
@retval EFI_UNSUPPORTED The InformationType is not known.
+ @retval EFI_NOT_FOUND Information is not available for the requested information type.
@retval EFI_DEVICE_ERROR The device reported an error.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
@retval EFI_INVALID_PARAMETER This is NULL.