public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [EFI Shell PATCH v2 0/2] Support EFI Redfish protocols
@ 2020-11-06  7:47 Abner Chang
  2020-11-06  7:47 ` [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover protocol Abner Chang
  2020-11-06  7:47 ` [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols Abner Chang
  0 siblings, 2 replies; 7+ messages in thread
From: Abner Chang @ 2020-11-06  7:47 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Ray Ni, Zhichao Gao,
	Nickle Wang, Peter O'Hanley

In v2: Address comments given by Liming on patch 1/2.

Add handle parsing for EFI Redfish Discover protocol and
EFI RestEx protocol.

This change also moves the GUID definition of EFI Redfish Discover
protocol to under MdePkg. With this we don't have dependency of
RedfishPkg in ShellPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Peter O'Hanley <peter.ohanley@hpe.com>

Abner Chang (2):
  MdePkg/Include: EFI Redfish Discover protocol
  ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols

 .../Include/Protocol/RedfishDiscover.h        | 42 ++++++++-----------
 MdePkg/MdePkg.dec                             |  3 ++
 RedfishPkg/RedfishPkg.dec                     |  4 --
 .../UefiHandleParsingLib.c                    |  8 +++-
 .../UefiHandleParsingLib.inf                  |  4 +-
 .../UefiHandleParsingLib.uni                  |  4 +-
 6 files changed, 33 insertions(+), 32 deletions(-)
 rename {RedfishPkg => MdePkg}/Include/Protocol/RedfishDiscover.h (87%)

-- 
2.17.1


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

* [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover protocol
  2020-11-06  7:47 [EFI Shell PATCH v2 0/2] Support EFI Redfish protocols Abner Chang
@ 2020-11-06  7:47 ` Abner Chang
  2020-11-09  1:40   ` 回复: " gaoliming
  2020-11-06  7:47 ` [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols Abner Chang
  1 sibling, 1 reply; 7+ messages in thread
From: Abner Chang @ 2020-11-06  7:47 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang,
	Peter O'Hanley

Move GUID definition of EFI Redfish Discover protocol
to under MdePkg. With this we don't have dependency of
RedfishPkg in ShellPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Peter O'Hanley <peter.ohanley@hpe.com>
---
 .../Include/Protocol/RedfishDiscover.h        | 42 ++++++++-----------
 MdePkg/MdePkg.dec                             |  3 ++
 RedfishPkg/RedfishPkg.dec                     |  4 --
 3 files changed, 21 insertions(+), 28 deletions(-)
 rename {RedfishPkg => MdePkg}/Include/Protocol/RedfishDiscover.h (87%)

diff --git a/RedfishPkg/Include/Protocol/RedfishDiscover.h b/MdePkg/Include/Protocol/RedfishDiscover.h
similarity index 87%
rename from RedfishPkg/Include/Protocol/RedfishDiscover.h
rename to MdePkg/Include/Protocol/RedfishDiscover.h
index 4c91605c4e..8fe23470e1 100644
--- a/RedfishPkg/Include/Protocol/RedfishDiscover.h
+++ b/MdePkg/Include/Protocol/RedfishDiscover.h
@@ -5,16 +5,13 @@
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
+  @par Revision Reference:
+  This Protocol is introduced in UEFI Specification 2.8
 **/
 
 #ifndef EFI_REDFISH_DISCOVER_PROTOCOL_H_
 #define EFI_REDFISH_DISCOVER_PROTOCOL_H_
 
-#include <IndustryStandard/Http11.h>
-#include <Protocol/Http.h>
-#include <Protocol/RestEx.h>
-#include <Uefi.h>
-
 //
 // GUID definitions
 //
@@ -40,12 +37,9 @@ typedef UINT32 EFI_REDFISH_DISCOVER_FLAG;
                                                        ///< 3 to 15. The corresponding duration is 8 to 2^15 seconds.
                                                        ///< Duration is only valid when EFI_REDFISH_DISCOVER_KEEP_ALIVE
                                                        ///< is set to 1.
-#define EFI_REDFISH_DISCOVER_DURATION_BIT_POS 8
-
 typedef struct _EFI_REDFISH_DISCOVER_PROTOCOL EFI_REDFISH_DISCOVER_PROTOCOL;
-typedef struct _EFI_REDFISH_DISCOVERED_INFORMATION EFI_REDFISH_DISCOVERED_INFORMATION;
 
-typedef struct _EFI_REDFISH_DISCOVERED_INFORMATION {
+typedef struct {
   EFI_HANDLE RedfishRestExHandle;           ///< REST EX EFI handle associated with this Redfish service.
   BOOLEAN         IsUdp6;                   ///< Indicates it's IP versino 6.
   EFI_IP_ADDRESS  RedfishHostIpAddress;     ///< IP address of Redfish service.
@@ -57,7 +51,7 @@ typedef struct _EFI_REDFISH_DISCOVERED_INFORMATION {
   CHAR16 *Product;                          ///< Redfish service product name.
   CHAR16 *ProductVer;                       ///< Redfish service product version.
   BOOLEAN UseHttps;                         ///< Using HTTPS.
-};
+} EFI_REDFISH_DISCOVERED_INFORMATION;
 
 typedef struct {
   EFI_STATUS Status;                                ///< Status of Redfish service discovery.
@@ -75,7 +69,7 @@ typedef struct {
     EFI_IP_ADDRESS        SubnetId;               ///< Subnet ID.
     UINT8                 SubnetPrefixLength;     ///< Subnet prefix-length for IPv4 and IPv6.
     UINT16                VlanId;                 ///< VLAN ID.
-} EFI_REDFISH_DISCOVER_NETWORK_INSTANCE;
+} EFI_REDFISH_DISCOVER_NETWORK_INTERFACE;
 
 typedef struct {
   UINT32    Signature;            ///< Token signature.
@@ -112,10 +106,10 @@ typedef struct {
 typedef
 EFI_STATUS
 (EFIAPI *EFI_REDFISH_DISCOVER_NETWORK_LIST)(
-  IN EFI_REDFISH_DISCOVER_PROTOCOL   *This,
-  IN EFI_HANDLE                      ImageHandle,
-  OUT UINTN                          *NumberOfNetworkInterfaces,
-  OUT EFI_REDFISH_DISCOVER_NETWORK_INSTANCE **NetworkInterfaces
+  IN EFI_REDFISH_DISCOVER_PROTOCOL           *This,
+  IN EFI_HANDLE                              ImageHandle,
+  OUT UINTN                                  *NumberOfNetworkInterfaces,
+  OUT EFI_REDFISH_DISCOVER_NETWORK_INTERFACE **NetworkInterfaces
 );
 
 /**
@@ -147,7 +141,7 @@ EFI_STATUS
 (EFIAPI *EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE)(
   IN EFI_REDFISH_DISCOVER_PROTOCOL          *This,
   IN EFI_HANDLE                             ImageHandle,
-  IN EFI_REDFISH_DISCOVER_NETWORK_INSTANCE  *TargetNetworkInterface,
+  IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *TargetNetworkInterface OPTIONAL,
   IN EFI_REDFISH_DISCOVER_FLAG              Flags,
   IN EFI_REDFISH_DISCOVERED_TOKEN           *Token
 );
@@ -155,8 +149,8 @@ EFI_STATUS
 /**
   This function aborts Redfish service discovery on the given network interface.
 
-  @param[in]    This          EFI_REDFISH_DISCOVER_PROTOCOL instance.
-  @param[in]    TargetNetworkInterface     Target NIC to do the discovery.
+  @param[in]    This                    EFI_REDFISH_DISCOVER_PROTOCOL instance.
+  @param[in]    TargetNetworkInterface  Target NIC to do the discovery.
 
   @retval EFI_SUCCESS             REST EX instance of discovered Redfish services are returned.
   @retval Others                  Fail to abort Redfish service discovery.
@@ -165,15 +159,15 @@ EFI_STATUS
 typedef
 EFI_STATUS
 (EFIAPI *EFI_REDFISH_DISCOVER_ABORT_ACQUIRE)(
-  IN EFI_REDFISH_DISCOVER_PROTOCOL      *This,
-  IN EFI_REDFISH_DISCOVER_NETWORK_INSTANCE  *TargetNetworkInterface OPTIONAL
+  IN EFI_REDFISH_DISCOVER_PROTOCOL          *This,
+  IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *TargetNetworkInterface OPTIONAL
 );
 
 /**
   This function releases Redfish services found by RedfishServiceAcquire().
 
   @param[in]    This         EFI_REDFISH_DISCOVER_PROTOCOL instance.
-  @param[in]    InstanceList The Redfish service to release.
+  @param[in]    List         The Redfish service to release.
 
   @retval EFI_SUCCESS        REST EX instances of discovered Redfish are released.
   @retval Others             Fail to remove the entry
@@ -183,15 +177,15 @@ typedef
 EFI_STATUS
 (EFIAPI *EFI_REDFISH_DISCOVER_RELEASE_SERVICE)(
   IN EFI_REDFISH_DISCOVER_PROTOCOL   *This,
-  IN EFI_REDFISH_DISCOVERED_LIST *InstanceList
+  IN EFI_REDFISH_DISCOVERED_LIST     *List
 );
 
-typedef struct _EFI_REDFISH_DISCOVER_PROTOCOL {
+struct _EFI_REDFISH_DISCOVER_PROTOCOL {
   EFI_REDFISH_DISCOVER_NETWORK_LIST    GetNetworkInterfaceList;
   EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE AcquireRedfishService;
   EFI_REDFISH_DISCOVER_ABORT_ACQUIRE   AbortAcquireRedfishService;
   EFI_REDFISH_DISCOVER_RELEASE_SERVICE ReleaseRedfishService;
-} EFI_REDFISH_DISCOVER_PROTOCOL;
+};
 
 extern EFI_GUID gEfiRestExProtocolGuid;
 extern EFI_GUID gEfiRestExServiceBindingProtocolGuid;
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 645f61b80e..839bcfe063 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1858,6 +1858,9 @@
   ## Include/Protocol/RestJsonStructure.h
   gEfiRestJsonStructureProtocolGuid  = { 0xa9a048f6, 0x48a0, 0x4714, {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 }}
 
+  ## Include/Protocol/RedfishDiscover.h
+  gEfiRedfishDiscoverProtocolGuid      = { 0x5db12509, 0x4550, 0x4347, { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
+
   #
   # Protocols defined in Shell2.0
   #
diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec
index f12f83526c..65e21f6bd6 100644
--- a/RedfishPkg/RedfishPkg.dec
+++ b/RedfishPkg/RedfishPkg.dec
@@ -21,10 +21,6 @@
   #   Platform implementation-specific Redfish Host Interface.
   RedfishPlatformHostInterfaceLib|Include/Library/RedfishHostInterfaceLib.h
 
-[Protocols]
-  ## Include/Protocol/RedfishDiscover.h
-  gEfiRedfishDiscoverProtocolGuid      = { 0x5db12509, 0x4550, 0x4347, { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
-
 [Guids]
   gEfiRedfishPkgTokenSpaceGuid      = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}
 
-- 
2.17.1


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

* [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols
  2020-11-06  7:47 [EFI Shell PATCH v2 0/2] Support EFI Redfish protocols Abner Chang
  2020-11-06  7:47 ` [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover protocol Abner Chang
@ 2020-11-06  7:47 ` Abner Chang
  2020-12-28  3:21   ` [edk2-devel] " Gao, Zhichao
  1 sibling, 1 reply; 7+ messages in thread
From: Abner Chang @ 2020-11-06  7:47 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni, Zhichao Gao, Nickle Wang, Peter O'Hanley

Add handle parsing for EFI Redfish Discover protocol.
Add handle parsing for EFI RestEx protocol.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Peter O'Hanley <peter.ohanley@hpe.com>
---
 .../Library/UefiHandleParsingLib/UefiHandleParsingLib.c   | 8 ++++++--
 .../Library/UefiHandleParsingLib/UefiHandleParsingLib.inf | 4 +++-
 .../Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 4 +++-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index 500a95a89a..c00337d6b2 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -3,7 +3,7 @@
 
   Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
   (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
-  (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
+  (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -2355,7 +2355,11 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
   {STRING_TOKEN(STR_NET_HTTP),              &gEfiHttpProtocolGuid,                            NULL},
   {STRING_TOKEN(STR_NET_HTTP_U),            &gEfiHttpUtilitiesProtocolGuid,                   NULL},
   {STRING_TOKEN(STR_REST),                  &gEfiRestProtocolGuid,                            NULL},
-
+//
+// UEFI 2.8
+//
+  {STRING_TOKEN(STR_REST_EX),               &gEfiRestExProtocolGuid,                          NULL},
+  {STRING_TOKEN(STR_REDFISH_DISCOVER),      &gEfiRedfishDiscoverProtocolGuid,                 NULL},
 //
 // PI 1.5
 //
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
index 93b69cd8e9..446cd8d609 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
@@ -2,7 +2,7 @@
 #  Provides interface to advanced shell functionality for parsing both handle and protocol database.
 #  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
 #  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
-#  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
+#  (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -269,6 +269,8 @@
   gEfiHttpProtocolGuid                                    ## UNDEFINED
   gEfiHttpUtilitiesProtocolGuid                           ## UNDEFINED
   gEfiRestProtocolGuid                                    ## UNDEFINED
+  gEfiRestExProtocolGuid                                  ## UNDEFINED
+  gEfiRedfishDiscoverProtocolGuid                         ## UNDEFINED
   gEfiMmEndOfDxeProtocolGuid                              ## UNDEFINED
   gEfiMmIoTrapDispatchProtocolGuid                        ## UNDEFINED
   gEfiMmPowerButtonDispatchProtocolGuid                   ## UNDEFINED
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 9c8028d0d5..69fcbdfe0e 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -2,7 +2,7 @@
 //
 // Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>
 // (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
-// (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
+// (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
 // SPDX-License-Identifier: BSD-2-Clause-Patent
 //
 // Module Name:
@@ -308,6 +308,8 @@
 #string STR_NET_HTTP              #language en-US "Http"
 #string STR_NET_HTTP_U            #language en-US "HttpUtilities"
 #string STR_REST                  #language en-US "Rest"
+#string STR_REST_EX               #language en-US "RestEx"
+#string STR_REDFISH_DISCOVER      #language en-US "RedfishDiscover"
 
 #string STR_MM_EOD                #language en-US "MmEndOfDxe"
 #string STR_MM_ITD                #language en-US "MmIoTrapDispatch"
-- 
2.17.1


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

* 回复: [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover protocol
  2020-11-06  7:47 ` [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover protocol Abner Chang
@ 2020-11-09  1:40   ` gaoliming
  2020-11-09  4:08     ` Abner Chang
  0 siblings, 1 reply; 7+ messages in thread
From: gaoliming @ 2020-11-09  1:40 UTC (permalink / raw)
  To: 'Abner Chang', devel
  Cc: 'Michael D Kinney', 'Zhiguang Liu',
	'Nickle Wang', 'Peter O'Hanley'

Abner:
 I further check UEFI Spec 2.8 A and review the code change. I find some
structure definitions are different. Can you make sure the one in MdePkg to
align to UEFI spec? 
 
 Now, I find these below three structure definition don't follow UEFI spec.
Please help check them. 
 EFI_REDFISH_DISCOVERED_INFORMATION, EFI_REDFISH_DISCOVERED_INSTANCE and
EFI_REDFISH_DISCOVERED_TOKEN

 Besides, the driver should include the header file that defines Guid if the
driver uses those Guid. So, those two guids are not required to be listed
here. 

extern EFI_GUID gEfiRestExProtocolGuid;
extern EFI_GUID gEfiRestExServiceBindingProtocolGuid;

Thanks
Liming
> -----邮件原件-----
> 发件人: Abner Chang <abner.chang@hpe.com>
> 发送时间: 2020年11月6日 15:48
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Nickle
> Wang <nickle.wang@hpe.com>; Peter O'Hanley <peter.ohanley@hpe.com>
> 主题: [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover
protocol
> 
> Move GUID definition of EFI Redfish Discover protocol
> to under MdePkg. With this we don't have dependency of
> RedfishPkg in ShellPkg.
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Cc: Peter O'Hanley <peter.ohanley@hpe.com>
> ---
>  .../Include/Protocol/RedfishDiscover.h        | 42 ++++++++-----------
>  MdePkg/MdePkg.dec                             |  3 ++
>  RedfishPkg/RedfishPkg.dec                     |  4 --
>  3 files changed, 21 insertions(+), 28 deletions(-)
>  rename {RedfishPkg => MdePkg}/Include/Protocol/RedfishDiscover.h (87%)
> 
> diff --git a/RedfishPkg/Include/Protocol/RedfishDiscover.h
> b/MdePkg/Include/Protocol/RedfishDiscover.h
> similarity index 87%
> rename from RedfishPkg/Include/Protocol/RedfishDiscover.h
> rename to MdePkg/Include/Protocol/RedfishDiscover.h
> index 4c91605c4e..8fe23470e1 100644
> --- a/RedfishPkg/Include/Protocol/RedfishDiscover.h
> +++ b/MdePkg/Include/Protocol/RedfishDiscover.h
> @@ -5,16 +5,13 @@
> 
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +  @par Revision Reference:
> +  This Protocol is introduced in UEFI Specification 2.8
>  **/
> 
>  #ifndef EFI_REDFISH_DISCOVER_PROTOCOL_H_
>  #define EFI_REDFISH_DISCOVER_PROTOCOL_H_
> 
> -#include <IndustryStandard/Http11.h>
> -#include <Protocol/Http.h>
> -#include <Protocol/RestEx.h>
> -#include <Uefi.h>
> -
>  //
>  // GUID definitions
>  //
> @@ -40,12 +37,9 @@ typedef UINT32 EFI_REDFISH_DISCOVER_FLAG;
>                                                         ///< 3
> to 15. The corresponding duration is 8 to 2^15 seconds.
>                                                         ///<
> Duration is only valid when EFI_REDFISH_DISCOVER_KEEP_ALIVE
>                                                         ///< is
> set to 1.
> -#define EFI_REDFISH_DISCOVER_DURATION_BIT_POS 8
> -
>  typedef struct _EFI_REDFISH_DISCOVER_PROTOCOL
> EFI_REDFISH_DISCOVER_PROTOCOL;
> -typedef struct _EFI_REDFISH_DISCOVERED_INFORMATION
> EFI_REDFISH_DISCOVERED_INFORMATION;
> 
> -typedef struct _EFI_REDFISH_DISCOVERED_INFORMATION {
> +typedef struct {
>    EFI_HANDLE RedfishRestExHandle;           ///< REST EX EFI handle
> associated with this Redfish service.
>    BOOLEAN         IsUdp6;                   ///< Indicates it's IP
> versino 6.
>    EFI_IP_ADDRESS  RedfishHostIpAddress;     ///< IP address of Redfish
> service.
> @@ -57,7 +51,7 @@ typedef struct
> _EFI_REDFISH_DISCOVERED_INFORMATION {
>    CHAR16 *Product;                          ///< Redfish service
> product name.
>    CHAR16 *ProductVer;                       ///< Redfish service
> product version.
>    BOOLEAN UseHttps;                         ///< Using HTTPS.
> -};
> +} EFI_REDFISH_DISCOVERED_INFORMATION;
> 
>  typedef struct {
>    EFI_STATUS Status;                                ///< Status of
> Redfish service discovery.
> @@ -75,7 +69,7 @@ typedef struct {
>      EFI_IP_ADDRESS        SubnetId;               ///< Subnet ID.
>      UINT8                 SubnetPrefixLength;     ///< Subnet
> prefix-length for IPv4 and IPv6.
>      UINT16                VlanId;                 ///< VLAN ID.
> -} EFI_REDFISH_DISCOVER_NETWORK_INSTANCE;
> +} EFI_REDFISH_DISCOVER_NETWORK_INTERFACE;
> 
>  typedef struct {
>    UINT32    Signature;            ///< Token signature.
> @@ -112,10 +106,10 @@ typedef struct {
>  typedef
>  EFI_STATUS
>  (EFIAPI *EFI_REDFISH_DISCOVER_NETWORK_LIST)(
> -  IN EFI_REDFISH_DISCOVER_PROTOCOL   *This,
> -  IN EFI_HANDLE                      ImageHandle,
> -  OUT UINTN
> *NumberOfNetworkInterfaces,
> -  OUT EFI_REDFISH_DISCOVER_NETWORK_INSTANCE
> **NetworkInterfaces
> +  IN EFI_REDFISH_DISCOVER_PROTOCOL           *This,
> +  IN EFI_HANDLE                              ImageHandle,
> +  OUT UINTN
> *NumberOfNetworkInterfaces,
> +  OUT EFI_REDFISH_DISCOVER_NETWORK_INTERFACE
> **NetworkInterfaces
>  );
> 
>  /**
> @@ -147,7 +141,7 @@ EFI_STATUS
>  (EFIAPI *EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE)(
>    IN EFI_REDFISH_DISCOVER_PROTOCOL          *This,
>    IN EFI_HANDLE                             ImageHandle,
> -  IN EFI_REDFISH_DISCOVER_NETWORK_INSTANCE
> *TargetNetworkInterface,
> +  IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE
> *TargetNetworkInterface OPTIONAL,
>    IN EFI_REDFISH_DISCOVER_FLAG              Flags,
>    IN EFI_REDFISH_DISCOVERED_TOKEN           *Token
>  );
> @@ -155,8 +149,8 @@ EFI_STATUS
>  /**
>    This function aborts Redfish service discovery on the given network
> interface.
> 
> -  @param[in]    This          EFI_REDFISH_DISCOVER_PROTOCOL
> instance.
> -  @param[in]    TargetNetworkInterface     Target NIC to do the
> discovery.
> +  @param[in]    This
> EFI_REDFISH_DISCOVER_PROTOCOL instance.
> +  @param[in]    TargetNetworkInterface  Target NIC to do the
> discovery.
> 
>    @retval EFI_SUCCESS             REST EX instance of discovered
> Redfish services are returned.
>    @retval Others                  Fail to abort Redfish service
> discovery.
> @@ -165,15 +159,15 @@ EFI_STATUS
>  typedef
>  EFI_STATUS
>  (EFIAPI *EFI_REDFISH_DISCOVER_ABORT_ACQUIRE)(
> -  IN EFI_REDFISH_DISCOVER_PROTOCOL      *This,
> -  IN EFI_REDFISH_DISCOVER_NETWORK_INSTANCE
> *TargetNetworkInterface OPTIONAL
> +  IN EFI_REDFISH_DISCOVER_PROTOCOL          *This,
> +  IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE
> *TargetNetworkInterface OPTIONAL
>  );
> 
>  /**
>    This function releases Redfish services found by
RedfishServiceAcquire().
> 
>    @param[in]    This         EFI_REDFISH_DISCOVER_PROTOCOL
> instance.
> -  @param[in]    InstanceList The Redfish service to release.
> +  @param[in]    List         The Redfish service to release.
> 
>    @retval EFI_SUCCESS        REST EX instances of discovered Redfish
> are released.
>    @retval Others             Fail to remove the entry
> @@ -183,15 +177,15 @@ typedef
>  EFI_STATUS
>  (EFIAPI *EFI_REDFISH_DISCOVER_RELEASE_SERVICE)(
>    IN EFI_REDFISH_DISCOVER_PROTOCOL   *This,
> -  IN EFI_REDFISH_DISCOVERED_LIST *InstanceList
> +  IN EFI_REDFISH_DISCOVERED_LIST     *List
>  );
> 
> -typedef struct _EFI_REDFISH_DISCOVER_PROTOCOL {
> +struct _EFI_REDFISH_DISCOVER_PROTOCOL {
>    EFI_REDFISH_DISCOVER_NETWORK_LIST    GetNetworkInterfaceList;
>    EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE AcquireRedfishService;
>    EFI_REDFISH_DISCOVER_ABORT_ACQUIRE
> AbortAcquireRedfishService;
>    EFI_REDFISH_DISCOVER_RELEASE_SERVICE ReleaseRedfishService;
> -} EFI_REDFISH_DISCOVER_PROTOCOL;
> +};
> 
>  extern EFI_GUID gEfiRestExProtocolGuid;
>  extern EFI_GUID gEfiRestExServiceBindingProtocolGuid;
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
> index 645f61b80e..839bcfe063 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -1858,6 +1858,9 @@
>    ## Include/Protocol/RestJsonStructure.h
>    gEfiRestJsonStructureProtocolGuid  = { 0xa9a048f6, 0x48a0, 0x4714,
> {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 }}
> 
> +  ## Include/Protocol/RedfishDiscover.h
> +  gEfiRedfishDiscoverProtocolGuid      = { 0x5db12509, 0x4550, 0x4347,
> { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
> +
>    #
>    # Protocols defined in Shell2.0
>    #
> diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec
> index f12f83526c..65e21f6bd6 100644
> --- a/RedfishPkg/RedfishPkg.dec
> +++ b/RedfishPkg/RedfishPkg.dec
> @@ -21,10 +21,6 @@
>    #   Platform implementation-specific Redfish Host Interface.
> 
> RedfishPlatformHostInterfaceLib|Include/Library/RedfishHostInterfaceLib.h
> 
> -[Protocols]
> -  ## Include/Protocol/RedfishDiscover.h
> -  gEfiRedfishDiscoverProtocolGuid      = { 0x5db12509, 0x4550, 0x4347,
> { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
> -
>  [Guids]
>    gEfiRedfishPkgTokenSpaceGuid      = { 0x4fdbccb7, 0xe829, 0x4b4c,
> { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}
> 
> --
> 2.17.1




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

* Re: [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover protocol
  2020-11-09  1:40   ` 回复: " gaoliming
@ 2020-11-09  4:08     ` Abner Chang
  0 siblings, 0 replies; 7+ messages in thread
From: Abner Chang @ 2020-11-09  4:08 UTC (permalink / raw)
  To: gaoliming, devel@edk2.groups.io
  Cc: 'Michael D Kinney', 'Zhiguang Liu',
	Wang, Nickle (HPS SW), O'Hanley, Peter (EXL)

Liming, feedbacks in below.

> -----Original Message-----
> From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> Sent: Monday, November 9, 2020 9:40 AM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> devel@edk2.groups.io
> Cc: 'Michael D Kinney' <michael.d.kinney@intel.com>; 'Zhiguang Liu'
> <zhiguang.liu@intel.com>; Wang, Nickle (HPS SW) <nickle.wang@hpe.com>;
> O'Hanley, Peter (EXL) <peter.ohanley@hpe.com>
> Subject: 回复: [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover
> protocol
> 
> Abner:
>  I further check UEFI Spec 2.8 A and review the code change. I find some
> structure definitions are different. Can you make sure the one in MdePkg to
> align to UEFI spec?
> 
>  Now, I find these below three structure definition don't follow UEFI spec.
> Please help check them.
>  EFI_REDFISH_DISCOVERED_INFORMATION,
> EFI_REDFISH_DISCOVERED_INSTANCE and
> EFI_REDFISH_DISCOVERED_TOKEN

I also found some inconsistencies between UEFI spec and the implementation. Some definitions are changed when we implement the code.
ECR is submitted to Mantis,
https://mantis.uefi.org/mantis/view.php?id=2172
We can just halt this patch until the ECR is approved.

> 
>  Besides, the driver should include the header file that defines Guid if the
> driver uses those Guid. So, those two guids are not required to be listed here.
> 
> extern EFI_GUID gEfiRestExProtocolGuid;
> extern EFI_GUID gEfiRestExServiceBindingProtocolGuid;
Ok, will remove these guids.

> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Abner Chang <abner.chang@hpe.com>
> > 发送时间: 2020年11月6日 15:48
> > 收件人: devel@edk2.groups.io
> > 抄送: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>;
> > Nickle Wang <nickle.wang@hpe.com>; Peter O'Hanley
> > <peter.ohanley@hpe.com>
> > 主题: [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover
> protocol
> >
> > Move GUID definition of EFI Redfish Discover protocol to under MdePkg.
> > With this we don't have dependency of RedfishPkg in ShellPkg.
> >
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Nickle Wang <nickle.wang@hpe.com>
> > Cc: Peter O'Hanley <peter.ohanley@hpe.com>
> > ---
> >  .../Include/Protocol/RedfishDiscover.h        | 42 ++++++++-----------
> >  MdePkg/MdePkg.dec                             |  3 ++
> >  RedfishPkg/RedfishPkg.dec                     |  4 --
> >  3 files changed, 21 insertions(+), 28 deletions(-)  rename
> > {RedfishPkg => MdePkg}/Include/Protocol/RedfishDiscover.h (87%)
> >
> > diff --git a/RedfishPkg/Include/Protocol/RedfishDiscover.h
> > b/MdePkg/Include/Protocol/RedfishDiscover.h
> > similarity index 87%
> > rename from RedfishPkg/Include/Protocol/RedfishDiscover.h
> > rename to MdePkg/Include/Protocol/RedfishDiscover.h
> > index 4c91605c4e..8fe23470e1 100644
> > --- a/RedfishPkg/Include/Protocol/RedfishDiscover.h
> > +++ b/MdePkg/Include/Protocol/RedfishDiscover.h
> > @@ -5,16 +5,13 @@
> >
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +  @par Revision Reference:
> > +  This Protocol is introduced in UEFI Specification 2.8
> >  **/
> >
> >  #ifndef EFI_REDFISH_DISCOVER_PROTOCOL_H_  #define
> > EFI_REDFISH_DISCOVER_PROTOCOL_H_
> >
> > -#include <IndustryStandard/Http11.h>
> > -#include <Protocol/Http.h>
> > -#include <Protocol/RestEx.h>
> > -#include <Uefi.h>
> > -
> >  //
> >  // GUID definitions
> >  //
> > @@ -40,12 +37,9 @@ typedef UINT32 EFI_REDFISH_DISCOVER_FLAG;
> >                                                         ///< 3 to 15.
> > The corresponding duration is 8 to 2^15 seconds.
> >                                                         ///< Duration
> > is only valid when EFI_REDFISH_DISCOVER_KEEP_ALIVE
> >                                                         ///< is set to
> > 1.
> > -#define EFI_REDFISH_DISCOVER_DURATION_BIT_POS 8
> > -
> >  typedef struct _EFI_REDFISH_DISCOVER_PROTOCOL
> > EFI_REDFISH_DISCOVER_PROTOCOL; -typedef struct
> > _EFI_REDFISH_DISCOVERED_INFORMATION
> > EFI_REDFISH_DISCOVERED_INFORMATION;
> >
> > -typedef struct _EFI_REDFISH_DISCOVERED_INFORMATION {
> > +typedef struct {
> >    EFI_HANDLE RedfishRestExHandle;           ///< REST EX EFI handle
> > associated with this Redfish service.
> >    BOOLEAN         IsUdp6;                   ///< Indicates it's IP
> > versino 6.
> >    EFI_IP_ADDRESS  RedfishHostIpAddress;     ///< IP address of Redfish
> > service.
> > @@ -57,7 +51,7 @@ typedef struct
> > _EFI_REDFISH_DISCOVERED_INFORMATION {
> >    CHAR16 *Product;                          ///< Redfish service
> > product name.
> >    CHAR16 *ProductVer;                       ///< Redfish service
> > product version.
> >    BOOLEAN UseHttps;                         ///< Using HTTPS.
> > -};
> > +} EFI_REDFISH_DISCOVERED_INFORMATION;
> >
> >  typedef struct {
> >    EFI_STATUS Status;                                ///< Status of
> > Redfish service discovery.
> > @@ -75,7 +69,7 @@ typedef struct {
> >      EFI_IP_ADDRESS        SubnetId;               ///< Subnet ID.
> >      UINT8                 SubnetPrefixLength;     ///< Subnet
> > prefix-length for IPv4 and IPv6.
> >      UINT16                VlanId;                 ///< VLAN ID.
> > -} EFI_REDFISH_DISCOVER_NETWORK_INSTANCE;
> > +} EFI_REDFISH_DISCOVER_NETWORK_INTERFACE;
> >
> >  typedef struct {
> >    UINT32    Signature;            ///< Token signature.
> > @@ -112,10 +106,10 @@ typedef struct {  typedef  EFI_STATUS  (EFIAPI
> > *EFI_REDFISH_DISCOVER_NETWORK_LIST)(
> > -  IN EFI_REDFISH_DISCOVER_PROTOCOL   *This,
> > -  IN EFI_HANDLE                      ImageHandle,
> > -  OUT UINTN
> > *NumberOfNetworkInterfaces,
> > -  OUT EFI_REDFISH_DISCOVER_NETWORK_INSTANCE
> > **NetworkInterfaces
> > +  IN EFI_REDFISH_DISCOVER_PROTOCOL           *This,
> > +  IN EFI_HANDLE                              ImageHandle,
> > +  OUT UINTN
> > *NumberOfNetworkInterfaces,
> > +  OUT EFI_REDFISH_DISCOVER_NETWORK_INTERFACE
> > **NetworkInterfaces
> >  );
> >
> >  /**
> > @@ -147,7 +141,7 @@ EFI_STATUS
> >  (EFIAPI *EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE)(
> >    IN EFI_REDFISH_DISCOVER_PROTOCOL          *This,
> >    IN EFI_HANDLE                             ImageHandle,
> > -  IN EFI_REDFISH_DISCOVER_NETWORK_INSTANCE
> > *TargetNetworkInterface,
> > +  IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE
> > *TargetNetworkInterface OPTIONAL,
> >    IN EFI_REDFISH_DISCOVER_FLAG              Flags,
> >    IN EFI_REDFISH_DISCOVERED_TOKEN           *Token
> >  );
> > @@ -155,8 +149,8 @@ EFI_STATUS
> >  /**
> >    This function aborts Redfish service discovery on the given network
> > interface.
> >
> > -  @param[in]    This          EFI_REDFISH_DISCOVER_PROTOCOL
> > instance.
> > -  @param[in]    TargetNetworkInterface     Target NIC to do the
> > discovery.
> > +  @param[in]    This
> > EFI_REDFISH_DISCOVER_PROTOCOL instance.
> > +  @param[in]    TargetNetworkInterface  Target NIC to do the
> > discovery.
> >
> >    @retval EFI_SUCCESS             REST EX instance of discovered
> > Redfish services are returned.
> >    @retval Others                  Fail to abort Redfish service
> > discovery.
> > @@ -165,15 +159,15 @@ EFI_STATUS
> >  typedef
> >  EFI_STATUS
> >  (EFIAPI *EFI_REDFISH_DISCOVER_ABORT_ACQUIRE)(
> > -  IN EFI_REDFISH_DISCOVER_PROTOCOL      *This,
> > -  IN EFI_REDFISH_DISCOVER_NETWORK_INSTANCE
> > *TargetNetworkInterface OPTIONAL
> > +  IN EFI_REDFISH_DISCOVER_PROTOCOL          *This,
> > +  IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE
> > *TargetNetworkInterface OPTIONAL
> >  );
> >
> >  /**
> >    This function releases Redfish services found by
> RedfishServiceAcquire().
> >
> >    @param[in]    This         EFI_REDFISH_DISCOVER_PROTOCOL
> > instance.
> > -  @param[in]    InstanceList The Redfish service to release.
> > +  @param[in]    List         The Redfish service to release.
> >
> >    @retval EFI_SUCCESS        REST EX instances of discovered Redfish
> > are released.
> >    @retval Others             Fail to remove the entry
> > @@ -183,15 +177,15 @@ typedef
> >  EFI_STATUS
> >  (EFIAPI *EFI_REDFISH_DISCOVER_RELEASE_SERVICE)(
> >    IN EFI_REDFISH_DISCOVER_PROTOCOL   *This,
> > -  IN EFI_REDFISH_DISCOVERED_LIST *InstanceList
> > +  IN EFI_REDFISH_DISCOVERED_LIST     *List
> >  );
> >
> > -typedef struct _EFI_REDFISH_DISCOVER_PROTOCOL {
> > +struct _EFI_REDFISH_DISCOVER_PROTOCOL {
> >    EFI_REDFISH_DISCOVER_NETWORK_LIST    GetNetworkInterfaceList;
> >    EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE AcquireRedfishService;
> >    EFI_REDFISH_DISCOVER_ABORT_ACQUIRE
> > AbortAcquireRedfishService;
> >    EFI_REDFISH_DISCOVER_RELEASE_SERVICE ReleaseRedfishService; -}
> > EFI_REDFISH_DISCOVER_PROTOCOL;
> > +};
> >
> >  extern EFI_GUID gEfiRestExProtocolGuid;  extern EFI_GUID
> > gEfiRestExServiceBindingProtocolGuid;
> > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> > 645f61b80e..839bcfe063 100644
> > --- a/MdePkg/MdePkg.dec
> > +++ b/MdePkg/MdePkg.dec
> > @@ -1858,6 +1858,9 @@
> >    ## Include/Protocol/RestJsonStructure.h
> >    gEfiRestJsonStructureProtocolGuid  = { 0xa9a048f6, 0x48a0, 0x4714,
> > {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 }}
> >
> > +  ## Include/Protocol/RedfishDiscover.h
> > +  gEfiRedfishDiscoverProtocolGuid      = { 0x5db12509, 0x4550, 0x4347,
> > { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
> > +
> >    #
> >    # Protocols defined in Shell2.0
> >    #
> > diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec
> > index f12f83526c..65e21f6bd6 100644
> > --- a/RedfishPkg/RedfishPkg.dec
> > +++ b/RedfishPkg/RedfishPkg.dec
> > @@ -21,10 +21,6 @@
> >    #   Platform implementation-specific Redfish Host Interface.
> >
> > RedfishPlatformHostInterfaceLib|Include/Library/RedfishHostInterfaceLi
> > RedfishPlatformHostInterfaceLib|b.h
> >
> > -[Protocols]
> > -  ## Include/Protocol/RedfishDiscover.h
> > -  gEfiRedfishDiscoverProtocolGuid      = { 0x5db12509, 0x4550, 0x4347,
> > { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
> > -
> >  [Guids]
> >    gEfiRedfishPkgTokenSpaceGuid      = { 0x4fdbccb7, 0xe829, 0x4b4c,
> > { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}
> >
> > --
> > 2.17.1
> 
> 


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

* Re: [edk2-devel] [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols
  2020-11-06  7:47 ` [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols Abner Chang
@ 2020-12-28  3:21   ` Gao, Zhichao
  2020-12-28  3:42     ` Abner Chang
  0 siblings, 1 reply; 7+ messages in thread
From: Gao, Zhichao @ 2020-12-28  3:21 UTC (permalink / raw)
  To: devel@edk2.groups.io, abner.chang@hpe.com
  Cc: Ni, Ray, Nickle Wang, Peter O'Hanley

Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>

Please make sure #1 pass the review and it should be merged along with #1.

Thanks,
Zhichao

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner Chang
> Sent: Friday, November 6, 2020 3:48 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; Nickle
> Wang <nickle.wang@hpe.com>; Peter O'Hanley <peter.ohanley@hpe.com>
> Subject: [edk2-devel] [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib:
> Support EFI Redfish protocols
> 
> Add handle parsing for EFI Redfish Discover protocol.
> Add handle parsing for EFI RestEx protocol.
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Cc: Peter O'Hanley <peter.ohanley@hpe.com>
> ---
>  .../Library/UefiHandleParsingLib/UefiHandleParsingLib.c   | 8 ++++++--
>  .../Library/UefiHandleParsingLib/UefiHandleParsingLib.inf | 4 +++-
>   .../Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 4 +++-
>  3 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> index 500a95a89a..c00337d6b2 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> @@ -3,7 +3,7 @@
> 
>    Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
>    (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
> -  (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
> +  (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -2355,7 +2355,11 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[]
> = {
>    {STRING_TOKEN(STR_NET_HTTP),              &gEfiHttpProtocolGuid,
> NULL},
>    {STRING_TOKEN(STR_NET_HTTP_U),            &gEfiHttpUtilitiesProtocolGuid,
> NULL},
>    {STRING_TOKEN(STR_REST),                  &gEfiRestProtocolGuid,
> NULL},
> -
> +//
> +// UEFI 2.8
> +//
> +  {STRING_TOKEN(STR_REST_EX),               &gEfiRestExProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_REDFISH_DISCOVER),
> &gEfiRedfishDiscoverProtocolGuid,                 NULL},
>  //
>  // PI 1.5
>  //
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> index 93b69cd8e9..446cd8d609 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> @@ -2,7 +2,7 @@
>  #  Provides interface to advanced shell functionality for parsing both handle and
> protocol database.
>  #  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>  #  (C)
> Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR> -#  (C)
> Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
> +#  (C) Copyright 2015-2020 Hewlett Packard Enterprise Development
> +LP<BR>
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -269,6 +269,8 @@
>    gEfiHttpProtocolGuid                                    ## UNDEFINED
>    gEfiHttpUtilitiesProtocolGuid                           ## UNDEFINED
>    gEfiRestProtocolGuid                                    ## UNDEFINED
> +  gEfiRestExProtocolGuid                                  ## UNDEFINED
> +  gEfiRedfishDiscoverProtocolGuid                         ## UNDEFINED
>    gEfiMmEndOfDxeProtocolGuid                              ## UNDEFINED
>    gEfiMmIoTrapDispatchProtocolGuid                        ## UNDEFINED
>    gEfiMmPowerButtonDispatchProtocolGuid                   ## UNDEFINED
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> index 9c8028d0d5..69fcbdfe0e 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> @@ -2,7 +2,7 @@
>  //
>  // Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>  // (C)
> Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR> -// (C)
> Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
> +// (C) Copyright 2015-2020 Hewlett Packard Enterprise Development
> +LP<BR>
>  // SPDX-License-Identifier: BSD-2-Clause-Patent  //  // Module Name:
> @@ -308,6 +308,8 @@
>  #string STR_NET_HTTP              #language en-US "Http"
>  #string STR_NET_HTTP_U            #language en-US "HttpUtilities"
>  #string STR_REST                  #language en-US "Rest"
> +#string STR_REST_EX               #language en-US "RestEx"
> +#string STR_REDFISH_DISCOVER      #language en-US "RedfishDiscover"
> 
>  #string STR_MM_EOD                #language en-US "MmEndOfDxe"
>  #string STR_MM_ITD                #language en-US "MmIoTrapDispatch"
> --
> 2.17.1
> 
> 
> 
> 
> 


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

* Re: [edk2-devel] [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols
  2020-12-28  3:21   ` [edk2-devel] " Gao, Zhichao
@ 2020-12-28  3:42     ` Abner Chang
  0 siblings, 0 replies; 7+ messages in thread
From: Abner Chang @ 2020-12-28  3:42 UTC (permalink / raw)
  To: devel@edk2.groups.io, zhichao.gao@intel.com
  Cc: Ni, Ray, Wang, Nickle (HPS SW), O'Hanley, Peter (EXL)

Sure. Thanks Zhichao. 
We will have to wait for UEFI 2.9 release then merge these two patches to master branch.

Abner

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Gao, Zhichao
> Sent: Monday, December 28, 2020 11:22 AM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> Cc: Ni, Ray <ray.ni@intel.com>; Wang, Nickle (HPS SW)
> <nickle.wang@hpe.com>; O'Hanley, Peter (EXL) <peter.ohanley@hpe.com>
> Subject: Re: [edk2-devel] [EFI Shell PATCH v2 2/2]
> ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols
> 
> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
> 
> Please make sure #1 pass the review and it should be merged along with #1.
> 
> Thanks,
> Zhichao
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner
> > Chang
> > Sent: Friday, November 6, 2020 3:48 PM
> > To: devel@edk2.groups.io
> > Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>;
> > Nickle Wang <nickle.wang@hpe.com>; Peter O'Hanley
> > <peter.ohanley@hpe.com>
> > Subject: [edk2-devel] [EFI Shell PATCH v2 2/2]
> ShellPkg/UefiHandleParsingLib:
> > Support EFI Redfish protocols
> >
> > Add handle parsing for EFI Redfish Discover protocol.
> > Add handle parsing for EFI RestEx protocol.
> >
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Nickle Wang <nickle.wang@hpe.com>
> > Cc: Peter O'Hanley <peter.ohanley@hpe.com>
> > ---
> >  .../Library/UefiHandleParsingLib/UefiHandleParsingLib.c   | 8 ++++++--
> >  .../Library/UefiHandleParsingLib/UefiHandleParsingLib.inf | 4 +++-
> >   .../Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 4 +++-
> >  3 files changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git
> > a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> > b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> > index 500a95a89a..c00337d6b2 100644
> > --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> > +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> > @@ -3,7 +3,7 @@
> >
> >    Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
> >    (C) Copyright 2013-2015 Hewlett-Packard Development Company,
> > L.P.<BR>
> > -  (C) Copyright 2015-2016 Hewlett Packard Enterprise Development
> > LP<BR>
> > +  (C) Copyright 2015-2020 Hewlett Packard Enterprise Development
> > + LP<BR>
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -2355,7 +2355,11 @@ STATIC CONST GUID_INFO_BLOCK
> mGuidStringList[]
> > = {
> >    {STRING_TOKEN(STR_NET_HTTP),              &gEfiHttpProtocolGuid,
> > NULL},
> >    {STRING_TOKEN(STR_NET_HTTP_U),            &gEfiHttpUtilitiesProtocolGuid,
> > NULL},
> >    {STRING_TOKEN(STR_REST),                  &gEfiRestProtocolGuid,
> > NULL},
> > -
> > +//
> > +// UEFI 2.8
> > +//
> > +  {STRING_TOKEN(STR_REST_EX),               &gEfiRestExProtocolGuid,
> > NULL},
> > +  {STRING_TOKEN(STR_REDFISH_DISCOVER),
> > &gEfiRedfishDiscoverProtocolGuid,                 NULL},
> >  //
> >  // PI 1.5
> >  //
> > diff --git
> > a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> > b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> > index 93b69cd8e9..446cd8d609 100644
> > --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> > +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> > @@ -2,7 +2,7 @@
> >  #  Provides interface to advanced shell functionality for parsing
> > both handle and protocol database.
> >  #  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> > <BR>  #  (C) Copyright 2013-2015 Hewlett-Packard Development Company,
> > L.P.<BR> -#  (C) Copyright 2015 Hewlett Packard Enterprise Development
> > LP<BR>
> > +#  (C) Copyright 2015-2020 Hewlett Packard Enterprise Development
> > +LP<BR>
> >  #
> >  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -269,6 +269,8 @@
> >    gEfiHttpProtocolGuid                                    ## UNDEFINED
> >    gEfiHttpUtilitiesProtocolGuid                           ## UNDEFINED
> >    gEfiRestProtocolGuid                                    ## UNDEFINED
> > +  gEfiRestExProtocolGuid                                  ## UNDEFINED
> > +  gEfiRedfishDiscoverProtocolGuid                         ## UNDEFINED
> >    gEfiMmEndOfDxeProtocolGuid                              ## UNDEFINED
> >    gEfiMmIoTrapDispatchProtocolGuid                        ## UNDEFINED
> >    gEfiMmPowerButtonDispatchProtocolGuid                   ## UNDEFINED
> > diff --git
> > a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > index 9c8028d0d5..69fcbdfe0e 100644
> > --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > @@ -2,7 +2,7 @@
> >  //
> >  // Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
> > <BR>  // (C) Copyright 2013-2015 Hewlett-Packard Development Company,
> > L.P.<BR> -// (C) Copyright 2015-2016 Hewlett Packard Enterprise
> > Development LP<BR>
> > +// (C) Copyright 2015-2020 Hewlett Packard Enterprise Development
> > +LP<BR>
> >  // SPDX-License-Identifier: BSD-2-Clause-Patent  //  // Module Name:
> > @@ -308,6 +308,8 @@
> >  #string STR_NET_HTTP              #language en-US "Http"
> >  #string STR_NET_HTTP_U            #language en-US "HttpUtilities"
> >  #string STR_REST                  #language en-US "Rest"
> > +#string STR_REST_EX               #language en-US "RestEx"
> > +#string STR_REDFISH_DISCOVER      #language en-US "RedfishDiscover"
> >
> >  #string STR_MM_EOD                #language en-US "MmEndOfDxe"
> >  #string STR_MM_ITD                #language en-US "MmIoTrapDispatch"
> > --
> > 2.17.1
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 


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

end of thread, other threads:[~2020-12-28  3:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-06  7:47 [EFI Shell PATCH v2 0/2] Support EFI Redfish protocols Abner Chang
2020-11-06  7:47 ` [EFI Shell PATCH v2 1/2] MdePkg/Include: EFI Redfish Discover protocol Abner Chang
2020-11-09  1:40   ` 回复: " gaoliming
2020-11-09  4:08     ` Abner Chang
2020-11-06  7:47 ` [EFI Shell PATCH v2 2/2] ShellPkg/UefiHandleParsingLib: Support EFI Redfish protocols Abner Chang
2020-12-28  3:21   ` [edk2-devel] " Gao, Zhichao
2020-12-28  3:42     ` Abner Chang

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