public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH 0/3] Update the comments of GetInformation function
@ 2024-04-08  9:47 Qingyu
  2024-04-08  9:47 ` [edk2-devel] [PATCH 1/3] OptionRomPkg: " Qingyu
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Qingyu @ 2024-04-08  9:47 UTC (permalink / raw)
  To: devel

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.

This patch series update GetInformation() API signature comments of
EFI_ADAPTER_INFORMATION_PROTOCOL implementations in Edk2-platform.

Qingyu (3):
  OptionRomPkg: Update the comments of GetInformation function
  MinPlatformPkg: Update the comments of GetInformation function
  Silicon/Marvell: Update the comments of GetInformation function

 Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h                 | 5 ++++-
 Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c            | 5 ++++-
 .../Test/Library/TestPointLib/DxeTestPointAip.c              | 5 ++++-
 .../Test/Library/TestPointLib/SmmTestPointAip.c              | 5 ++++-
 Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c                  | 5 ++++-
 5 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117496): https://edk2.groups.io/g/devel/message/117496
Mute This Topic: https://groups.io/mt/105398056/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function
  2024-04-08  9:47 [edk2-devel] [PATCH 0/3] Update the comments of GetInformation function Qingyu
@ 2024-04-08  9:47 ` Qingyu
  2024-04-09  1:52   ` Ni, Ray
                     ` (2 more replies)
  2024-04-08  9:47 ` [edk2-devel] [PATCH 2/3] MinPlatformPkg: " Qingyu
  2024-04-08  9:47 ` [edk2-devel] [PATCH 3/3] Silicon/Marvell: " Qingyu
  2 siblings, 3 replies; 10+ messages in thread
From: Qingyu @ 2024-04-08  9:47 UTC (permalink / raw)
  To: devel; +Cc: Pedro Falcato, Ray Ni, Gahan Saraiya

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: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Qingyu <qingyu.shang@intel.com>
Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
---
 Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h      | 5 ++++-
 Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
index 31c55a8e11..665221e952 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
@@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);
 
   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.
@@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);
 
   @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/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
index 21151a076f..d80ce65da9 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
@@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {
 
   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.
@@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {
 
   @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. 
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117497): https://edk2.groups.io/g/devel/message/117497
Mute This Topic: https://groups.io/mt/105398061/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [edk2-devel] [PATCH 2/3] MinPlatformPkg: Update the comments of GetInformation function
  2024-04-08  9:47 [edk2-devel] [PATCH 0/3] Update the comments of GetInformation function Qingyu
  2024-04-08  9:47 ` [edk2-devel] [PATCH 1/3] OptionRomPkg: " Qingyu
@ 2024-04-08  9:47 ` Qingyu
  2024-04-08 21:11   ` Nate DeSimone
  2024-04-08 22:13   ` Nate DeSimone
  2024-04-08  9:47 ` [edk2-devel] [PATCH 3/3] Silicon/Marvell: " Qingyu
  2 siblings, 2 replies; 10+ messages in thread
From: Qingyu @ 2024-04-08  9:47 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong, Gahan Saraiya

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: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Qingyu <qingyu.shang@intel.com>
Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
---
 .../Test/Library/TestPointLib/DxeTestPointAip.c              | 5 ++++-
 .../Test/Library/TestPointLib/SmmTestPointAip.c              | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.c
index a7fe9530cf..f2c44afb50 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.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. 
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.c
index 84c3f8292e..96fadb6f6f 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.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. 
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117498): https://edk2.groups.io/g/devel/message/117498
Mute This Topic: https://groups.io/mt/105398062/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [edk2-devel] [PATCH 3/3] Silicon/Marvell: Update the comments of GetInformation function
  2024-04-08  9:47 [edk2-devel] [PATCH 0/3] Update the comments of GetInformation function Qingyu
  2024-04-08  9:47 ` [edk2-devel] [PATCH 1/3] OptionRomPkg: " Qingyu
  2024-04-08  9:47 ` [edk2-devel] [PATCH 2/3] MinPlatformPkg: " Qingyu
@ 2024-04-08  9:47 ` Qingyu
  2 siblings, 0 replies; 10+ messages in thread
From: Qingyu @ 2024-04-08  9:47 UTC (permalink / raw)
  To: devel; +Cc: Marcin Wojtas, Gahan Saraiya

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: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Qingyu <qingyu.shang@intel.com>
Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
Reviewed-by: Marcin Wojtas <mw@semihalf.com>
---
 Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
index 5e463ac932..c0073daa8e 100644
--- a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
+++ b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
@@ -1384,7 +1384,9 @@ Pp2DxeSnpInstall (
 
   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.
@@ -1394,6 +1396,7 @@ Pp2DxeSnpInstall (
 
   @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.
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117499): https://edk2.groups.io/g/devel/message/117499
Mute This Topic: https://groups.io/mt/105398063/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH 2/3] MinPlatformPkg: Update the comments of GetInformation function
  2024-04-08  9:47 ` [edk2-devel] [PATCH 2/3] MinPlatformPkg: " Qingyu
@ 2024-04-08 21:11   ` Nate DeSimone
  2024-04-08 22:13   ` Nate DeSimone
  1 sibling, 0 replies; 10+ messages in thread
From: Nate DeSimone @ 2024-04-08 21:11 UTC (permalink / raw)
  To: Shang, Qingyu, devel@edk2.groups.io
  Cc: Chiu, Chasel, Liming Gao, Dong, Eric, Gahan Saraiya

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

> -----Original Message-----
> From: Shang, Qingyu <qingyu.shang@intel.com>
> Sent: Monday, April 8, 2024 2:47 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Dong, Eric <eric.dong@intel.com>; Gahan Saraiya <gahan.saraiya@intel.com>
> Subject: [PATCH 2/3] MinPlatformPkg: 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: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Qingyu <qingyu.shang@intel.com>
> Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
> ---
>  .../Test/Library/TestPointLib/DxeTestPointAip.c              | 5 ++++-
>  .../Test/Library/TestPointLib/SmmTestPointAip.c              | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> index a7fe9530cf..f2c44afb50 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPoi
> +++ ntAip.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.
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAi
> p.c
> index 84c3f8292e..96fadb6f6f 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoi
> +++ ntAip.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.
> --
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117504): https://edk2.groups.io/g/devel/message/117504
Mute This Topic: https://groups.io/mt/105398062/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH 2/3] MinPlatformPkg: Update the comments of GetInformation function
  2024-04-08  9:47 ` [edk2-devel] [PATCH 2/3] MinPlatformPkg: " Qingyu
  2024-04-08 21:11   ` Nate DeSimone
@ 2024-04-08 22:13   ` Nate DeSimone
  1 sibling, 0 replies; 10+ messages in thread
From: Nate DeSimone @ 2024-04-08 22:13 UTC (permalink / raw)
  To: Shang, Qingyu, devel@edk2.groups.io
  Cc: Chiu, Chasel, Liming Gao, Dong, Eric, Gahan Saraiya

Pushed as 1c41906

> -----Original Message-----
> From: Shang, Qingyu <qingyu.shang@intel.com>
> Sent: Monday, April 8, 2024 2:47 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>;
> Dong, Eric <eric.dong@intel.com>; Gahan Saraiya <gahan.saraiya@intel.com>
> Subject: [PATCH 2/3] MinPlatformPkg: 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: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Qingyu <qingyu.shang@intel.com>
> Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
> ---
>  .../Test/Library/TestPointLib/DxeTestPointAip.c              | 5 ++++-
>  .../Test/Library/TestPointLib/SmmTestPointAip.c              | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> index a7fe9530cf..f2c44afb50 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPoi
> +++ ntAip.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.
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAi
> p.c
> index 84c3f8292e..96fadb6f6f 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoi
> +++ ntAip.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.
> --
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117505): https://edk2.groups.io/g/devel/message/117505
Mute This Topic: https://groups.io/mt/105398062/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function
  2024-04-08  9:47 ` [edk2-devel] [PATCH 1/3] OptionRomPkg: " Qingyu
@ 2024-04-09  1:52   ` Ni, Ray
  2024-04-09  2:12   ` Pedro Falcato
  2024-04-10  5:17   ` Ni, Ray
  2 siblings, 0 replies; 10+ messages in thread
From: Ni, Ray @ 2024-04-09  1:52 UTC (permalink / raw)
  To: Shang, Qingyu, devel@edk2.groups.io; +Cc: Pedro Falcato, Gahan Saraiya

[-- Attachment #1: Type: text/plain, Size: 4368 bytes --]

Reviewed-by: Ray Ni <ray.ni@intel.com>

Thanks,
Ray
________________________________
From: Shang, Qingyu <qingyu.shang@intel.com>
Sent: Monday, April 8, 2024 17:47
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Pedro Falcato <pedro.falcato@gmail.com>; Ni, Ray <ray.ni@intel.com>; Gahan Saraiya <gahan.saraiya@intel.com>
Subject: [PATCH 1/3] OptionRomPkg: 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: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Qingyu <qingyu.shang@intel.com>
Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
---
 Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h      | 5 ++++-
 Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
index 31c55a8e11..665221e952 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
@@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);

   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.
@@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);

   @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/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
index 21151a076f..d80ce65da9 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
@@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {

   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.
@@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {

   @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.
--
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117515): https://edk2.groups.io/g/devel/message/117515
Mute This Topic: https://groups.io/mt/105398061/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 7577 bytes --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function
  2024-04-08  9:47 ` [edk2-devel] [PATCH 1/3] OptionRomPkg: " Qingyu
  2024-04-09  1:52   ` Ni, Ray
@ 2024-04-09  2:12   ` Pedro Falcato
  2024-04-10  5:22     ` Ni, Ray
  2024-04-10  5:17   ` Ni, Ray
  2 siblings, 1 reply; 10+ messages in thread
From: Pedro Falcato @ 2024-04-09  2:12 UTC (permalink / raw)
  To: Qingyu; +Cc: devel, Ray Ni, Gahan Saraiya

On Mon, Apr 8, 2024 at 10:48 AM Qingyu <qingyu.shang@intel.com> wrote:
>
> 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.

Let's reword this commit message a bit, shall we? Something like this:

Add a new return value EFI_NOT_FOUND to
EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation(), according to UEFI
spec 2.10 section 11.11.2.
This brings the documentation up to par with UEFI 2.10.
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

I'm not sure about the commit title too, but it's late here and I
can't figure out a nice succinct description. Maybe:
"OptionRomPkg/UndiRuntimeDxe: Update UndiAipGetInfo's docs to UEFI spec 2.10"

>
> Cc: Pedro Falcato <pedro.falcato@gmail.com>

Why was I CC'd on this? /me is confused

> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Qingyu <qingyu.shang@intel.com>
> Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
> ---
>  Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h      | 5 ++++-
>  Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> index 31c55a8e11..665221e952 100644
> --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> @@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);
>
>    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.
> @@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);
>
>    @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/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> index 21151a076f..d80ce65da9 100644
> --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> @@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {
>
>    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.
> @@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {
>
>    @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.

In any case, since I've been meaning to say this for some time: I know
this is not your fault (and this is part of some UEFI spec upgrade
goal), but changing all of these comments isn't the win you think it
is. It's very churny and gains us nothing. The function does not
return EFI_NOT_FOUND, so why are we changing its docs? Changing the
protocol header's docs is fine (and expected), changing the individual
implementations is very... iffy.

I'm not a maintainer for this, but if this helps: with the changes above:
Acked-by: Pedro Falcato <pedro.falcato@gmail.com>

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117517): https://edk2.groups.io/g/devel/message/117517
Mute This Topic: https://groups.io/mt/105398061/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function
  2024-04-08  9:47 ` [edk2-devel] [PATCH 1/3] OptionRomPkg: " Qingyu
  2024-04-09  1:52   ` Ni, Ray
  2024-04-09  2:12   ` Pedro Falcato
@ 2024-04-10  5:17   ` Ni, Ray
  2 siblings, 0 replies; 10+ messages in thread
From: Ni, Ray @ 2024-04-10  5:17 UTC (permalink / raw)
  To: Shang, Qingyu, devel@edk2.groups.io; +Cc: Pedro Falcato, Gahan Saraiya

[-- Attachment #1: Type: text/plain, Size: 4337 bytes --]

merged.

Thanks,
Ray
________________________________
From: Shang, Qingyu <qingyu.shang@intel.com>
Sent: Monday, April 8, 2024 17:47
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Pedro Falcato <pedro.falcato@gmail.com>; Ni, Ray <ray.ni@intel.com>; Gahan Saraiya <gahan.saraiya@intel.com>
Subject: [PATCH 1/3] OptionRomPkg: 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: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Qingyu <qingyu.shang@intel.com>
Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
---
 Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h      | 5 ++++-
 Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
index 31c55a8e11..665221e952 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
@@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);

   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.
@@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);

   @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/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
index 21151a076f..d80ce65da9 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
@@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {

   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.
@@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {

   @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.
--
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117565): https://edk2.groups.io/g/devel/message/117565
Mute This Topic: https://groups.io/mt/105398061/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 7540 bytes --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function
  2024-04-09  2:12   ` Pedro Falcato
@ 2024-04-10  5:22     ` Ni, Ray
  0 siblings, 0 replies; 10+ messages in thread
From: Ni, Ray @ 2024-04-10  5:22 UTC (permalink / raw)
  To: Pedro Falcato, Shang, Qingyu; +Cc: devel@edk2.groups.io, Gahan Saraiya

[-- Attachment #1: Type: text/plain, Size: 5935 bytes --]

Pedro,
I didn't notice your mail and merged the patch.:(

Your comments to the commit messages are good to me.

However, I am ok with the changes to the function header of an existing implementation.

Thanks,
Ray

________________________________
From: Pedro Falcato <pedro.falcato@gmail.com>
Sent: Tuesday, April 9, 2024 10:12
To: Shang, Qingyu <qingyu.shang@intel.com>
Cc: devel@edk2.groups.io <devel@edk2.groups.io>; Ni, Ray <ray.ni@intel.com>; Gahan Saraiya <gahan.saraiya@intel.com>
Subject: Re: [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function

On Mon, Apr 8, 2024 at 10:48 AM Qingyu <qingyu.shang@intel.com> wrote:
>
> 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.

Let's reword this commit message a bit, shall we? Something like this:

Add a new return value EFI_NOT_FOUND to
EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation(), according to UEFI
spec 2.10 section 11.11.2.
This brings the documentation up to par with UEFI 2.10.
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

I'm not sure about the commit title too, but it's late here and I
can't figure out a nice succinct description. Maybe:
"OptionRomPkg/UndiRuntimeDxe: Update UndiAipGetInfo's docs to UEFI spec 2.10"

>
> Cc: Pedro Falcato <pedro.falcato@gmail.com>

Why was I CC'd on this? /me is confused

> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Qingyu <qingyu.shang@intel.com>
> Signed-off-by: Gahan Saraiya <gahan.saraiya@intel.com>
> ---
>  Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h      | 5 ++++-
>  Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 ++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> index 31c55a8e11..665221e952 100644
> --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> @@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);
>
>    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.
> @@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI *PxePtr);
>
>    @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/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> index 21151a076f..d80ce65da9 100644
> --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> @@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {
>
>    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.
> @@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {
>
>    @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.

In any case, since I've been meaning to say this for some time: I know
this is not your fault (and this is part of some UEFI spec upgrade
goal), but changing all of these comments isn't the win you think it
is. It's very churny and gains us nothing. The function does not
return EFI_NOT_FOUND, so why are we changing its docs? Changing the
protocol header's docs is fine (and expected), changing the individual
implementations is very... iffy.

I'm not a maintainer for this, but if this helps: with the changes above:
Acked-by: Pedro Falcato <pedro.falcato@gmail.com>

--
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117566): https://edk2.groups.io/g/devel/message/117566
Mute This Topic: https://groups.io/mt/105398061/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 10686 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-10  5:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08  9:47 [edk2-devel] [PATCH 0/3] Update the comments of GetInformation function Qingyu
2024-04-08  9:47 ` [edk2-devel] [PATCH 1/3] OptionRomPkg: " Qingyu
2024-04-09  1:52   ` Ni, Ray
2024-04-09  2:12   ` Pedro Falcato
2024-04-10  5:22     ` Ni, Ray
2024-04-10  5:17   ` Ni, Ray
2024-04-08  9:47 ` [edk2-devel] [PATCH 2/3] MinPlatformPkg: " Qingyu
2024-04-08 21:11   ` Nate DeSimone
2024-04-08 22:13   ` Nate DeSimone
2024-04-08  9:47 ` [edk2-devel] [PATCH 3/3] Silicon/Marvell: " Qingyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox