public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [staging/edk2-redfish-client RedfishFeatureCore PATCH 0/3] RedfishFeatureCoreDxe
@ 2021-07-27 14:54 Abner Chang
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files Abner Chang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Abner Chang @ 2021-07-27 14:54 UTC (permalink / raw)
  To: devel; +Cc: Nickle Wang, Liming Gao

Patch of EDKII Redfish Feature Core DXE driver.

EDKII Redfish Feature Core DXE driver provides the protocol interface to
the auto-generated Redfish feature driver to register itself for the
Redfish resource URI it manages.

You can skip 0003 patch which is the diagrams.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Abner Chang (3):
  RedfishClientPkg: Initial commit of meta files
  RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE
    driver
  RedfishClientPkg/Document: Update diagrams

 RedfishClientPkg/RedfishClientPkg.dec         |  35 ++
 RedfishClientPkg/RedfishClient.dsc.inc        |  21 +
 .../RedfishClientComponents.dsc.inc           |  18 +
 RedfishClientPkg/RedfishClientDefines.dsc.inc |  27 ++
 RedfishClientPkg/RedfishClientLibs.dsc.inc    |  13 +
 RedfishClientPkg/RedfishClientPkg.dsc         |  46 +++
 RedfishClientPkg/RedfishClient.fdf.inc        |  15 +
 .../RedfishFeatureCoreDxe.inf                 |  49 +++
 .../Include/Protocol/EdkIIRedfishFeature.h    | 116 ++++++
 .../RedfishFeatureCoreDxe.h                   |  43 ++
 .../RedfishFeatureCoreDxe.c                   | 382 ++++++++++++++++++
 RedfishClientPkg/Readme.md                    |  36 ++
 .../Media/RedfishClientDriverStack.svg        | 197 ++++++---
 13 files changed, 936 insertions(+), 62 deletions(-)
 create mode 100644 RedfishClientPkg/RedfishClientPkg.dec
 create mode 100644 RedfishClientPkg/RedfishClient.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientComponents.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientDefines.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientLibs.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientPkg.dsc
 create mode 100644 RedfishClientPkg/RedfishClient.fdf.inc
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
 create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c

-- 
2.17.1


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

* [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files
  2021-07-27 14:54 [staging/edk2-redfish-client RedfishFeatureCore PATCH 0/3] RedfishFeatureCoreDxe Abner Chang
@ 2021-07-27 14:54 ` Abner Chang
  2021-08-08 12:46   ` Nickle Wang
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver Abner Chang
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 3/3] RedfishClientPkg/Document: Update diagrams Abner Chang
  2 siblings, 1 reply; 8+ messages in thread
From: Abner Chang @ 2021-07-27 14:54 UTC (permalink / raw)
  To: devel; +Cc: Nickle Wang, Liming Gao

Initial commit of RedfishclientPkg meta files

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 RedfishClientPkg/RedfishClientPkg.dec         | 24 ++++++++++
 RedfishClientPkg/RedfishClient.dsc.inc        | 21 +++++++++
 .../RedfishClientComponents.dsc.inc           | 16 +++++++
 RedfishClientPkg/RedfishClientDefines.dsc.inc | 27 +++++++++++
 RedfishClientPkg/RedfishClientLibs.dsc.inc    | 13 ++++++
 RedfishClientPkg/RedfishClientPkg.dsc         | 46 +++++++++++++++++++
 RedfishClientPkg/RedfishClient.fdf.inc        | 14 ++++++
 7 files changed, 161 insertions(+)
 create mode 100644 RedfishClientPkg/RedfishClientPkg.dec
 create mode 100644 RedfishClientPkg/RedfishClient.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientComponents.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientDefines.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientLibs.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientPkg.dsc
 create mode 100644 RedfishClientPkg/RedfishClient.fdf.inc

diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec
new file mode 100644
index 0000000000..4038a47bd5
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -0,0 +1,24 @@
+## @file
+# Redfish Client Package
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+  DEC_SPECIFICATION = 0x0001001b
+  PACKAGE_NAME      = RedfishClientPkg
+  PACKAGE_GUID      = 61B1638B-1DF9-4052-9468-382FC164AA85
+  PACKAGE_VERSION   = 1.0
+
+[Includes]
+  Include
+
+
+[LibraryClasses]
+
+[Protocols]
+
+[Guids]
+  gEfiRedfishClientPkgTokenSpaceGuid    = { 0x8c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } }
diff --git a/RedfishClientPkg/RedfishClient.dsc.inc b/RedfishClientPkg/RedfishClient.dsc.inc
new file mode 100644
index 0000000000..ad771fcb7f
--- /dev/null
+++ b/RedfishClientPkg/RedfishClient.dsc.inc
@@ -0,0 +1,21 @@
+## @file
+# Redfish Client DSC include file for Platform DSC
+#
+# This file includes all required information to enable Redfish features.
+# It can be included to a platform DSC file by using "!include RedfishClientPkg/RedfishClient.dsc.inc".
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  !include RedfishClientPkg/RedfishClientDefines.dsc.inc
+
+[LibraryClasses]
+  !include RedfishClientPkg/RedfishClientLibs.dsc.inc
+
+[Components]
+  !include RedfishClientPkg/RedfishClientComponents.dsc.inc
+
diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc b/RedfishClientPkg/RedfishClientComponents.dsc.inc
new file mode 100644
index 0000000000..0648fa9d54
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
@@ -0,0 +1,16 @@
+## @file
+# Redfish Client DSC include file for [Components*] section of all Architectures.
+#
+# This file can be included to the [Components*] section(s) of a platform DSC file
+# by using "!include RedfishClientPkg/RedfishClientComponents.dsc.inc" to specify the INF files
+# of EDKII Redfish drivers according to the value of flags described in
+# "RedfishClientDefines.dsc.inc".
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+!if $(REDFISH_CLIENT) == TRUE
+!endif
diff --git a/RedfishClientPkg/RedfishClientDefines.dsc.inc b/RedfishClientPkg/RedfishClientDefines.dsc.inc
new file mode 100644
index 0000000000..14b7d67102
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientDefines.dsc.inc
@@ -0,0 +1,27 @@
+## @file
+# RedfishClientPkg DSC include file for [Defines] section of all Architectures.
+#
+# This file can be included to the [Defines] section of a platform DSC file by
+# using "!include RedfishClientPkg/RedfishClientDefines.dsc.inc" to set value of
+# flags.
+#
+# These flags can be defined before the !include line, or changed on the command
+# line to enable or disable related feature support.
+#   -D FLAG=VALUE
+#
+# The default value of these flags are:
+#   DEFINE REDFISH_CLIENT = TRUE
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+!ifndef REDFISH_CLIENT
+  #
+  # This flag is to enable or disable the EDK2 Redfish client support.
+  #
+  DEFINE REDFISH_CLIENT = TRUE
+!endif
+
diff --git a/RedfishClientPkg/RedfishClientLibs.dsc.inc b/RedfishClientPkg/RedfishClientLibs.dsc.inc
new file mode 100644
index 0000000000..2f360abed6
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientLibs.dsc.inc
@@ -0,0 +1,13 @@
+## @file
+# Redfish DSC include file for [LibraryClasses*] section of all Architectures.
+#
+# This file can be included to the [LibraryClasses*] section(s) of a platform DSC file
+# by using "!include RedfishPkg/RedfisLibs.dsc.inc" to specify the library instances
+# of EDKII network library classes.
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
diff --git a/RedfishClientPkg/RedfishClientPkg.dsc b/RedfishClientPkg/RedfishClientPkg.dsc
new file mode 100644
index 0000000000..f423bf3861
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientPkg.dsc
@@ -0,0 +1,46 @@
+## @file
+# Redfish Client Package
+#
+# (C) Copyright 2021 Hewlett-Packard Enterprise Development LP.
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  PLATFORM_NAME                  = RedfishClientPkg
+  PLATFORM_GUID                  = 43491BF9-2879-492B-905E-E82E0C30B412
+  PLATFORM_VERSION               = 1.0
+  DSC_SPECIFICATION              = 0x0001001c
+  OUTPUT_DIRECTORY               = Build/RedfishClientPkg
+  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64|RISCV64
+  BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
+  SKUID_IDENTIFIER               = DEFAULT
+
+!include MdePkg/MdeLibs.dsc.inc
+
+[LibraryClasses]
+  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+  DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
+  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+
+[LibraryClasses.ARM, LibraryClasses.AARCH64]
+  #
+  # This library provides the instrinsic functions generated by a given compiler.
+  #
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+  ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
+
+[Components]
+
+  !include RedfishClientPkg/RedfishClient.dsc.inc
diff --git a/RedfishClientPkg/RedfishClient.fdf.inc b/RedfishClientPkg/RedfishClient.fdf.inc
new file mode 100644
index 0000000000..4f0714004e
--- /dev/null
+++ b/RedfishClientPkg/RedfishClient.fdf.inc
@@ -0,0 +1,14 @@
+## @file
+# Redfish Client FDF include file for [FV*] section of all Architectures.
+#
+# This file can be included to the [FV*] section(s) of a platform FDF file
+# by using "!include RedfishClientPkg/RedfisClientLibs.fdf.inc" to specify the module instances
+# to be built in the firmware volume.
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+!if $(REDFISH_CLIENT) == TRUE
+!endif
-- 
2.17.1


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

* [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver
  2021-07-27 14:54 [staging/edk2-redfish-client RedfishFeatureCore PATCH 0/3] RedfishFeatureCoreDxe Abner Chang
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files Abner Chang
@ 2021-07-27 14:54 ` Abner Chang
  2021-08-08 12:54   ` Nickle Wang
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 3/3] RedfishClientPkg/Document: Update diagrams Abner Chang
  2 siblings, 1 reply; 8+ messages in thread
From: Abner Chang @ 2021-07-27 14:54 UTC (permalink / raw)
  To: devel; +Cc: Nickle Wang, Liming Gao

EDKII Redfish Feature Core DXE driver provides the protocol interface to
the auto-generated Redfish feature driver to register itself for the
Redfish resource URI it manages. Refer to the Readme.md for the details.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 RedfishClientPkg/RedfishClientPkg.dec         |  13 +-
 .../RedfishClientComponents.dsc.inc           |   2 +
 RedfishClientPkg/RedfishClient.fdf.inc        |   1 +
 .../RedfishFeatureCoreDxe.inf                 |  49 +++
 .../Include/Protocol/EdkIIRedfishFeature.h    | 116 ++++++
 .../RedfishFeatureCoreDxe.h                   |  43 ++
 .../RedfishFeatureCoreDxe.c                   | 382 ++++++++++++++++++
 RedfishClientPkg/Readme.md                    |  36 ++
 8 files changed, 641 insertions(+), 1 deletion(-)
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
 create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c

diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec
index 4038a47bd5..6da0468e65 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -15,10 +15,21 @@
 [Includes]
   Include
 
-
 [LibraryClasses]
 
 [Protocols]
+  ## Include/Protocol/EdkIIRedfishFeature.h
+  gEdkIIRedfishFeatureProtocolGuid = { 0x785CC694, 0x4930, 0xEFBF, { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } }
 
 [Guids]
   gEfiRedfishClientPkgTokenSpaceGuid    = { 0x8c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } }
+
+[PcdsFixedAtBuild]
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UINT32|0x10000001
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8|UINT32|0x10000002
+  #
+  # gEfiEventReadyToBootGuid is the default event to startup Redfish feature drivers.
+  # { 0x7CE88FB3, 0x4BD7, 0x4679, { 0x87, 0xA8, 0xA8, 0xD8, 0xDE, 0xE5, 0x0D, 0x2B }}
+  #
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupEventGuid|{0xB3, 0x8F, 0xE8, 0x7C, 0xD7, 0x4B, 0x79, 0x46, 0x87, 0xA8, 0xA8, 0xD8, 0xDE, 0xE5, 0x0D, 0x2B}|VOID*|0x10000003
+
diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc b/RedfishClientPkg/RedfishClientComponents.dsc.inc
index 0648fa9d54..e4e2619bfb 100644
--- a/RedfishClientPkg/RedfishClientComponents.dsc.inc
+++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
@@ -13,4 +13,6 @@
 ##
 
 !if $(REDFISH_CLIENT) == TRUE
+  RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
 !endif
+
diff --git a/RedfishClientPkg/RedfishClient.fdf.inc b/RedfishClientPkg/RedfishClient.fdf.inc
index 4f0714004e..d4c5874787 100644
--- a/RedfishClientPkg/RedfishClient.fdf.inc
+++ b/RedfishClientPkg/RedfishClient.fdf.inc
@@ -11,4 +11,5 @@
 #
 ##
 !if $(REDFISH_CLIENT) == TRUE
+  INF RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
 !endif
diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
new file mode 100644
index 0000000000..5a2cd7fecc
--- /dev/null
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
@@ -0,0 +1,49 @@
+## @file
+#  RedfishFeatureCoreDxe is the DXE driver which provides
+#  EdkIIRedfishFeatureCoreProtocol to EDK2 Redfish Feature
+#  drivers for the registration.
+#
+#  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x0001000b
+  BASE_NAME                      = RedfishFeatureCoreDxe
+  FILE_GUID                      = 1E01A624-4161-F1F1-25BC-D28E77420D8E
+  MODULE_TYPE                    = DXE_DRIVER
+  VERSION_STRING                 = 1.0
+  ENTRY_POINT                    = RedfishFeatureCoreEntryPoint
+
+#
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
+#
+
+[Sources]
+  RedfishFeatureCoreDxe.c
+  RedfishFeatureCoreDxe.h
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  RedfishClientPkg/RedfishClientPkg.dec
+
+[LibraryClasses]
+  BaseLib
+  BaseMemoryLib
+  DebugLib
+  MemoryAllocationLib
+  PrintLib
+  UefiBootServicesTableLib
+  UefiDriverEntryPoint
+  UefiLib
+
+[Protocols]
+  gEdkIIRedfishFeatureProtocolGuid    ## BY_START
+
+[Pcd]
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupEventGuid
+
+[Depex]
+  TRUE
diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
new file mode 100644
index 0000000000..036622128d
--- /dev/null
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
@@ -0,0 +1,116 @@
+/** @file
+  This file defines the EDKII_REDFISH_FEATURE_PROTOCOL interface.
+
+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef EDKII_REDFISH_FEATURE_H_
+#define EDKII_REDFISH_FEATURE_H_
+
+typedef struct _EDKII_REDFISH_FEATURE_PROTOCOL EDKII_REDFISH_FEATURE_PROTOCOL;
+
+#define EDKII_REDFISH_FEATURE_PROTOCOL_GUID \
+    {  \
+      0x785CC694, 0x4930, 0xEFBF, { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 }  \
+    }
+
+typedef enum {
+  CallbackActionNone = 0,       ///< Invalid action
+  CallbackActionStartOperation, ///< Start the operations on Redfish resource
+  CallbackActionMax
+} FEATURE_CALLBACK_ACTION;
+
+typedef enum {
+  InformationTypeNone = 0,            ///< Invalid information.
+  InformationTypeCollectionMemberUri, ///< URI to the new created collection member.
+  InformationTypeMax
+} FEATURE_RETURNED_INFORMATION_TYPE;
+
+typedef struct {
+  FEATURE_RETURNED_INFORMATION_TYPE Type;
+} FEATURE_RETURNED_INFORMATION;
+
+/**
+  The callback function provided by Redfish Feature driver.
+
+  @param[in]     This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]     FeatureAction       The action Redfish feature driver should take.
+  @param[in]     Context             The context of Redfish feature driver.
+  @param[in,out] InformationReturned The pointer to retrive the pointer to
+                                     FEATURE_RETURNED_INFOMATION. The memory block of this
+                                     information should be freed by caller.
+
+  @retval EFI_SUCCESS              Redfish feature driver callback is executed successfully.
+  @retval Others                   Some errors happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *REDFISH_FEATURE_CALLBACK) (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL *This,
+  IN     FEATURE_CALLBACK_ACTION        FeatureAction,
+  IN     VOID                           *Context,
+  IN OUT FEATURE_RETURNED_INFORMATION   **InformationReturned
+);
+/**
+  The registration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+  @param[in]   Callback            Callback routine associated with this registration that
+                                   provided by Redfish feature driver to execute the action
+                                   on Redfish resource which is managed by this Redfish
+                                   feature driver.
+  @param[in]   Context             The context of the registering feature driver. The pointer
+                                   to the conext is delivered through callback function.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval Others                   Some error happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *REDFISH_FEATURE_REGISTER) (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN     EFI_STRING                      FeatureManagedUri,
+  IN     REDFISH_FEATURE_CALLBACK        Callback,
+  IN     VOID                            *Context
+);
+
+/**
+  The unregistration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+  @param[in]   Context             The context used for the previous feature driver
+                                   registration.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval Others                   Some error happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *REDFISH_FEATURE_UNREGISTER) (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN     EFI_STRING                      FeatureManagedUri,
+  IN     VOID                            *Context
+);
+
+struct _EDKII_REDFISH_FEATURE_PROTOCOL {
+  REDFISH_FEATURE_REGISTER      Register;
+  REDFISH_FEATURE_UNREGISTER    Unregister;
+};
+
+extern EFI_GUID gEdkIIRedfishFeatureProtocolGuid;
+
+#endif
diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
new file mode 100644
index 0000000000..7b1778b038
--- /dev/null
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
@@ -0,0 +1,43 @@
+/** @file
+  Definitions of RedfishFeatureCoreDxe
+
+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+#ifndef EDKII_REDFISH_FEATURE_CORE_DXE_H_
+#define EDKII_REDFISH_FEATURE_CORE_DXE_H_
+
+#include <Protocol/EdkIIRedfishFeature.h>
+
+#include <Base.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/PrintLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+#define MaxNodeNameLength 64
+#define NodeSeperator L'/'
+#define NodeIsCollectionLeftBracket '{'
+#define NodeIsCollectionRightBracket '}'
+
+typedef struct _REDFISH_FEATURE_INTERNAL_DATA REDFISH_FEATURE_INTERNAL_DATA;
+struct _REDFISH_FEATURE_INTERNAL_DATA {
+  REDFISH_FEATURE_INTERNAL_DATA *SiblingList; ///< Next same level in hierarchy of resource URI.
+  REDFISH_FEATURE_INTERNAL_DATA *ChildList;   ///< Next level in hierarchy of resource URI.
+  EFI_STRING               NodeName;    ///< Name of the node in hierarchy of resource URI.
+  REDFISH_FEATURE_CALLBACK Callback;    ///< Callback function of Redfish feature driver.
+  VOID                     *Context;    ///< Context of feature driver.
+  FEATURE_RETURNED_INFORMATION *ReturnedInformation; ///< Information returned from Redfish feature driver.
+  UINT32         Flags;
+};
+#define REDFISH_FEATURE_INTERNAL_DATA_IS_COLLECTION 0x00000001
+
+typedef struct {
+  EDKII_REDFISH_FEATURE_PROTOCOL *This;
+  FEATURE_CALLBACK_ACTION Action;
+} REDFISH_FEATURE_STARTUP_CONTEXT;
+#endif
diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
new file mode 100644
index 0000000000..e5dcc3de8e
--- /dev/null
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
@@ -0,0 +1,382 @@
+/** @file
+  RedfishFeatureCoreDxe produces EdkIIRedfishFeatureCoreProtocol
+  for EDK2 Redfish Feature driver registration.
+
+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <RedfishFeatureCoreDxe.h>
+
+EFI_EVENT mEdkIIRedfishFeatureDriverStartupEvent;
+REDFISH_FEATURE_STARTUP_CONTEXT mFeatureDriverStartupContext;
+REDFISH_FEATURE_INTERNAL_DATA *ResourceUriNodeList;
+
+/**
+  Startup child feature drivers and it's sibing feature drivers.
+
+  @param[in]  HeadList              Head list of this feature driver
+  @param[in]  ThisFeatureDriverList This feature driver list.
+  @param[in]  StartupContext        Start up information
+
+**/
+VOID
+StartUpFeatureDriver (
+  IN REDFISH_FEATURE_INTERNAL_DATA *ThisFeatureDriverList,
+  IN REDFISH_FEATURE_STARTUP_CONTEXT *StartupContext
+)
+{
+  EFI_STATUS Status;
+  REDFISH_FEATURE_INTERNAL_DATA *ThisList;
+
+  ThisList = ThisFeatureDriverList;
+  while (TRUE) {
+    if (ThisList->Callback != NULL) {
+      Status = ThisList->Callback(
+                           StartupContext->This,
+                           StartupContext->Action,
+                           ThisList->Context,
+                           &ThisList->ReturnedInformation
+                           );
+      if (EFI_ERROR (Status)) {
+        DEBUG((DEBUG_ERROR, "%a: Callback to EDK2 Redfish feature driver fail.", __FUNCTION__));
+      }
+    }
+    if (ThisList->ChildList != NULL) {
+      StartUpFeatureDriver (ThisList->ChildList, StartupContext);
+    }
+    //
+    // Check sibling Redfish feature driver.
+    //
+    if (ThisList->SiblingList == NULL) {
+      break;
+    }
+    //
+    // Go next sibling Redfish feature driver.
+    //
+    ThisList = ThisList->SiblingList;
+  };
+}
+
+/**
+  Callback routine when mEdkIIRedfishFeatureDriverStartupEvent
+  is signaled.
+
+  @param[in]  Event                 Event whose notification function is being invoked.
+  @param[in]  Context               The pointer to the notification function's context,
+                                    which is implementation-dependent.
+
+**/
+VOID
+RedfishFeatureDriverStartup(
+  IN  EFI_EVENT                Event,
+  IN  VOID                     *Context
+  )
+{
+  REDFISH_FEATURE_STARTUP_CONTEXT *StartupContext;
+
+  StartupContext = (REDFISH_FEATURE_STARTUP_CONTEXT *)Context;
+  //
+  // Invoke EDK2 Redfish feature driver callback to start up
+  // the Redfish operations.
+  //
+  if (ResourceUriNodeList == NULL) {
+    return;
+  }
+  //
+  // Invoke the callback by the hierarchy level
+  //
+  StartUpFeatureDriver (ResourceUriNodeList, StartupContext);
+}
+
+/**
+  Create new internal data instance.
+
+  @param[in,out] PtrToNewInternalData  Pointer to receive new instance of
+                                       REDFISH_FEATURE_INTERNAL_DATA.
+  @param[in]     NodeName              Name of URI node.
+
+  @retval EFI_SUCCESS              New entry is inserted successfully.
+  @retval EFI_INVALID_PARAMETER    Improper given parameters.
+  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data structure.
+
+**/
+EFI_STATUS
+NewInternalInstance (
+  IN OUT REDFISH_FEATURE_INTERNAL_DATA **PtrToNewInternalData,
+  IN EFI_STRING NodeName
+  )
+{
+  REDFISH_FEATURE_INTERNAL_DATA *NewInternalData;
+
+  if (PtrToNewInternalData == NULL || NodeName == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: Inproper given parameters\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  *PtrToNewInternalData = NULL;
+  NewInternalData = AllocateZeroPool (sizeof (REDFISH_FEATURE_INTERNAL_DATA));
+  if (NewInternalData == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: No memory for REDFISH_FEATURE_INTERNAL_DATA\n", __FUNCTION__));
+    return EFI_OUT_OF_RESOURCES;
+  }
+  NewInternalData->NodeName = AllocateZeroPool (StrSize (NodeName));
+  StrnCpyS (NewInternalData->NodeName, StrSize (NodeName), (CONST CHAR16 *)NodeName, StrLen (NodeName));
+  NewInternalData->SiblingList = NULL;
+  NewInternalData->ChildList = NULL;
+  if (NodeName[0] == (UINT16)NodeIsCollectionLeftBracket &&
+      NodeName [StrLen (NodeName) - 1] == (UINT16)NodeIsCollectionRightBracket) {
+    NewInternalData->Flags |= REDFISH_FEATURE_INTERNAL_DATA_IS_COLLECTION;
+  }
+  *PtrToNewInternalData = NewInternalData;
+  return EFI_SUCCESS;
+}
+
+/**
+  Insert the URI node into internal data structure
+
+  @param[in]   HeadEntryToInsert  The head entry to start the searching.
+  @param[in]   NodeName           Name of URI node.
+  @param[in]   NextNodeEntry      Pointer to receive the pointer of next head
+                                  entry for inserting the follow up nodes.
+                                  The returned LIST_ENTRY is the address of
+                                  ChildList link list.
+  @retval EFI_SUCCESS              New entry is inserted successfully.
+  @retval EFI_INVALID_PARAMETER    Improper given parameters.
+  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data structure.
+
+**/
+EFI_STATUS
+InsertRedfishFeatureUriNode (
+  IN REDFISH_FEATURE_INTERNAL_DATA      *HeadEntryToInsert,
+  IN EFI_STRING                         NodeName,
+  IN OUT REDFISH_FEATURE_INTERNAL_DATA  **NextNodeEntry
+  )
+{
+  EFI_STATUS Status;
+  REDFISH_FEATURE_INTERNAL_DATA *NewInternalData;
+  REDFISH_FEATURE_INTERNAL_DATA *ThisInternalData;
+  REDFISH_FEATURE_INTERNAL_DATA *SiblingList;
+
+  if (NodeName == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: Node name is NULL.\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+  if (NextNodeEntry == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: NextNodeEntry can't be NULL.\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  if (HeadEntryToInsert == NULL || HeadEntryToInsert->ChildList == NULL) {
+    Status = NewInternalInstance (&NewInternalData, NodeName);
+    if (EFI_ERROR (Status)) {
+      return Status;
+    }
+    if (HeadEntryToInsert == NULL) {
+      ResourceUriNodeList = NewInternalData;
+    } else {
+      HeadEntryToInsert->ChildList = NewInternalData;
+    }
+    *NextNodeEntry = NewInternalData;
+    return EFI_SUCCESS;
+  }
+  //
+  // Go through sibling list to find the entry.
+  //
+  ThisInternalData = HeadEntryToInsert;
+  SiblingList = ThisInternalData->SiblingList;
+  while (TRUE) {
+    if (StrCmp((CONST CHAR16 *)ThisInternalData->NodeName, (CONST CHAR16 *)NodeName) == 0) {
+      *NextNodeEntry = ThisInternalData->ChildList;
+      return EFI_SUCCESS;
+    }
+    //
+    // If sibing exist?
+    //
+    if (SiblingList == NULL) {
+      Status = NewInternalInstance (&NewInternalData, NodeName);
+      if (EFI_ERROR (Status)) {
+        return Status;
+      }
+      ThisInternalData->SiblingList = NewInternalData;
+      *NextNodeEntry = NewInternalData->ChildList;
+      return EFI_SUCCESS;
+    }
+    SiblingList = SiblingList->SiblingList;
+  };
+  return EFI_SUCCESS;
+}
+
+/**
+  The registration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+                                   e.g. "ServiceRoot/" - Managed by ServiceRoot feature driver
+                                        "ServiceRoot/Systems[]/" - Managed by ComputerSystemCollection feature driver
+                                        "ServiceRoot/Systems[1]/" - Managed by ComputerSystem feature driver
+                                        "ServiceRoot/Systems[2]/Bios/" - Managed by Bios feature driver
+  @param[in]   Callback            Callback routine associated with this registration that
+                                   provided by Redfish feature driver to execute the action
+                                   on Redfish resource which is managed by this Redfish
+                                   feature driver.
+  @param[in]   Context             The context of the registering feature driver. The pointer
+                                   to the conext is delivered through callback function.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval EFI_INVALID_PARAMETER    Improper given parameters or fail to register
+                                   feature driver.
+  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data structure.
+  @retval Others                   Some error happened.
+
+**/
+EFI_STATUS
+EFIAPI
+RedfishFeatureRegister (
+  IN EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN EFI_STRING                      FeatureManagedUri,
+  IN REDFISH_FEATURE_CALLBACK        Callback,
+  IN VOID                            *Context
+)
+{
+  CHAR16 NodeName [MaxNodeNameLength];
+  EFI_STATUS Status;
+  UINTN Index;
+  UINTN AnchorIndex;
+  UINTN UriLength;
+  REDFISH_FEATURE_INTERNAL_DATA *ThisUriNode;
+
+  if (FeatureManagedUri == NULL || Callback == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: The given parameter is invalid\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+  //
+  // Walk through URI which managed by this EDK2 Redfish feature driver.
+  //
+  UriLength = StrLen (FeatureManagedUri) + 1; // Add one NULL for the last node.
+  Index = 0;
+  AnchorIndex = 0;
+  ThisUriNode = ResourceUriNodeList;
+  do {
+    if ((Index - AnchorIndex + 1) >= MaxNodeNameLength) { // Increase one for the NULL terminator
+      DEBUG((DEBUG_ERROR, "%a: the length of node name is >= MaxNodeNameLength\n", __FUNCTION__));
+      ASSERT (FALSE);
+    }
+    NodeName[Index - AnchorIndex] = *(FeatureManagedUri + Index);
+    if (NodeName [Index - AnchorIndex] == NodeSeperator || NodeName [Index - AnchorIndex] == (CHAR16)0) {
+      NodeName [Index - AnchorIndex] = 0;
+      AnchorIndex = Index + 1;
+      //
+      // Insert node
+      //
+      if (StrLen(NodeName) != 0) {
+        Status = InsertRedfishFeatureUriNode(ThisUriNode, NodeName, &ThisUriNode);
+        if (EFI_ERROR (Status)) {
+          return Status;
+        }
+      }
+    }
+    Index ++;
+  } while ((Index < UriLength));
+
+  if (ThisUriNode == NULL) {
+    //
+    // No URI node was created
+    //
+    DEBUG((DEBUG_ERROR, "%a: No URI node is added\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+  //
+  // Add feature driver info to internal data instance.
+  //
+  ThisUriNode->Callback = Callback;
+  ThisUriNode->Context = Context;
+  return EFI_SUCCESS;
+}
+
+/**
+  The unregistration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+  @param[in]   Context             The context used for the previous feature driver
+                                   registration.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval Others                   Some error happened.
+
+**/
+EFI_STATUS
+RedfishFeatureUnregister (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN     EFI_STRING                      FeatureManagedUri,
+  IN     VOID                            *Context
+)
+{
+  return EFI_UNSUPPORTED;
+}
+
+EDKII_REDFISH_FEATURE_PROTOCOL mRedfishFeatureProtocol = {
+  RedfishFeatureRegister,
+  RedfishFeatureUnregister
+};
+
+/**
+  Main entry for this driver.
+
+  @param ImageHandle     Image handle this driver.
+  @param SystemTable     Pointer to SystemTable.
+
+  @retval EFI_SUCESS     This function always complete successfully.
+
+**/
+EFI_STATUS
+EFIAPI
+RedfishFeatureCoreEntryPoint (
+  IN EFI_HANDLE         ImageHandle,
+  IN EFI_SYSTEM_TABLE   *SystemTable
+  )
+{
+  EFI_STATUS  Status;
+  EFI_HANDLE  Handle;
+  EFI_GUID *EventGuid;
+
+  Handle = NULL;
+  ResourceUriNodeList = NULL;
+  EventGuid = (EFI_GUID *)PcdGetPtr (PcdEdkIIRedfishFeatureDriverStartupEventGuid);
+
+  ZeroMem ((VOID *)&mFeatureDriverStartupContext, sizeof (REDFISH_FEATURE_STARTUP_CONTEXT));
+  mFeatureDriverStartupContext.This = &mRedfishFeatureProtocol;
+
+  Status = gBS->CreateEventEx (
+                EVT_NOTIFY_SIGNAL,
+                TPL_CALLBACK,
+                RedfishFeatureDriverStartup,
+                (CONST VOID *)&mFeatureDriverStartupContext,
+                EventGuid,
+                &mEdkIIRedfishFeatureDriverStartupEvent
+                );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Install the RedfishCredentialProtocol onto Handle.
+  //
+  Status = gBS->InstallMultipleProtocolInterfaces (
+                  &Handle,
+                  &gEdkIIRedfishFeatureProtocolGuid,
+                  &mRedfishFeatureProtocol,
+                  NULL
+                  );
+  return Status;
+}
diff --git a/RedfishClientPkg/Readme.md b/RedfishClientPkg/Readme.md
index 9e56fb9039..18a27633cf 100644
--- a/RedfishClientPkg/Readme.md
+++ b/RedfishClientPkg/Readme.md
@@ -119,6 +119,42 @@ struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL {
 For those Non-EDK2 HII-based platform configuration formats, the driver instance
 can provide its own implementation to get or set the platform configurations.
 
+### EDKII Redfish Feature Core DXE Driver ***[[12]](#[0])***
+EDKII Redfish Feature Core DXE driver provides the protocol interface to
+the auto-generated Redfish feature driver to register itself for the
+Redfish resource URI it manages.
+
+```C
+struct _EDKII_REDFISH_FEATURE_PROTOCOL {
+  REDFISH_FEATURE_REGISTER      Register;
+  REDFISH_FEATURE_UNREGISTER    Unregister;
+};
+```
+
+Redfish Feature Core DXE driver records the
+URI according to the URI hierarchy, and then it starts up the Redfish
+feature drivers based on the hierarchy when the particular event
+***[[11]](#[0])*** is triggered. This makes sure the upper-level Redfish
+resource is built up before the lower-level resource. For example,
+ComputerSystem resource must be ready before the Memory resource managed
+by MemoryCollection because the Memory resource is part of ComputerSystem
+resource.
+
+### Start-Up Event to Trigger EDKII Redfish Feature Core ***[[11]](#[0])***
+This is an EFI event for triggering EDKII Redfish Feature Core to travel
+URIs in the database and execute the callback that registered by Redfish feature
+drivers. The event GUID is defined in below PCD and is default set to
+**gEfiEventReadyToBootGuid**.
+
+```C
+PcdEdkIIRedfishFeatureDriverStartupEventGuid
+```
+
+This PCD can be overridden to any events based on the platform
+implementation. EDKII Redfish Feature Core can be triggered earlier,
+for example before the BDS or in the early DXE phase if the platform provides
+the EFI REST EX protocol which is available before the BDS phase.
+
 ### EDK2 HII VFR Form ***[[8]](#[0])***
 According to **UEFI spec 2.9 section 35.6 Form Browser Protocol**,
 **EFI_HII_REST_STYLE_FORMSET_GUID** is used on HII form to indicate that HII
-- 
2.17.1


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

* [staging/edk2-redfish-client RedfishFeatureCore PATCH 3/3] RedfishClientPkg/Document: Update diagrams
  2021-07-27 14:54 [staging/edk2-redfish-client RedfishFeatureCore PATCH 0/3] RedfishFeatureCoreDxe Abner Chang
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files Abner Chang
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver Abner Chang
@ 2021-07-27 14:54 ` Abner Chang
  2021-08-08 12:55   ` Nickle Wang
  2 siblings, 1 reply; 8+ messages in thread
From: Abner Chang @ 2021-07-27 14:54 UTC (permalink / raw)
  To: devel; +Cc: Nickle Wang, Liming Gao

Update architectural diagrams.
You can skip reviewing this patch.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 .../Media/RedfishClientDriverStack.svg        | 197 ++++++++++++------
 1 file changed, 135 insertions(+), 62 deletions(-)

diff --git a/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg b/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg
index 881d9647e5..913c941e73 100644
--- a/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg
+++ b/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg
@@ -3,7 +3,7 @@
 <!-- Generated by Microsoft Visio, SVG Export RedfishClientDriverStack.svg Page-2 -->
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
 		xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="12.1281in" height="9.93872in"
-		viewBox="0 0 873.222 715.588" xml:space="preserve" color-interpolation-filters="sRGB" class="st69">
+		viewBox="0 0 873.222 715.588" xml:space="preserve" color-interpolation-filters="sRGB" class="st71">
 	<v:documentProperties v:langID="1033" v:viewMarkup="false">
 		<v:userDefs>
 			<v:ud v:nameU="msvNoAutoConnect" v:val="VT0(1):26"/>
@@ -47,9 +47,9 @@
 		.st33 {stroke:#7f7f7f;stroke-linecap:round;stroke-linejoin:round;stroke-width:4.5}
 		.st34 {fill:#000000;fill-opacity:0.38;filter:url(#filter_3.3333334922791);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.38}
 		.st35 {fill:#000000;fill-opacity:0.38;stroke:#000000;stroke-opacity:0.38;stroke-width:0.22935779816514}
-		.st36 {fill:#f2f2f2;stroke:#7f7f7f;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
-		.st37 {fill:#7f7f7f;fill-opacity:1;stroke:#7f7f7f;stroke-opacity:1;stroke-width:0.22935779816514}
-		.st38 {fill:#d8d8d8;stroke:#7f7f7f;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
+		.st36 {fill:#f2f2f2;stroke:#ffff00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
+		.st37 {fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-opacity:1;stroke-width:0.22935779816514}
+		.st38 {fill:#d8d8d8;stroke:#ffff00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
 		.st39 {fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
 		.st40 {fill:#000000;fill-opacity:0.4;filter:url(#filter_3.3333334922791);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.4}
 		.st41 {fill:#0070c0;stroke:#003f6c;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}
@@ -78,9 +78,11 @@
 		.st64 {marker-start:url(#mrkr4-405);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
 		.st65 {fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;stroke-width:0.3315649867374}
 		.st66 {marker-end:url(#mrkr4-411);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
-		.st67 {marker-end:url(#mrkr10-430);marker-start:url(#mrkr10-112);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
+		.st67 {marker-end:url(#mrkr10-425);marker-start:url(#mrkr10-112);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
 		.st68 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
-		.st69 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
+		.st69 {fill:#f59d56;stroke:none;stroke-linecap:butt;stroke-width:0.75}
+		.st70 {fill:#ffffff;stroke:#ffc000;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}
+		.st71 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
 	]]>
 	</style>
 
@@ -145,7 +147,7 @@
 				markerUnits="strokeWidth" overflow="visible">
 			<use xlink:href="#lend4" transform="scale(-3.016,-3.016) "/>
 		</marker>
-		<marker id="mrkr10-430" class="st24" v:arrowType="10" v:arrowSize="1" v:setback="1.542" refX="-1.542" orient="auto"
+		<marker id="mrkr10-425" class="st24" v:arrowType="10" v:arrowSize="1" v:setback="1.542" refX="-1.542" orient="auto"
 				markerUnits="strokeWidth" overflow="visible">
 			<use xlink:href="#lend10" transform="scale(-2.44,-2.44) "/>
 		</marker>
@@ -177,6 +179,7 @@
 		<title>Page-2</title>
 		<v:pageProperties v:drawingScale="1" v:pageScale="1" v:drawingUnits="19" v:shadowOffsetX="9" v:shadowOffsetY="-9"/>
 		<v:layer v:name="Connector" v:index="0"/>
+		<v:layer v:name="Flowchart" v:index="1"/>
 		<g id="shape52-3" v:mID="52" v:groupContext="shape" transform="translate(336.222,-197.713)">
 			<title>Rectangle.52</title>
 			<v:userDefs>
@@ -544,27 +547,27 @@
 			<title>Sheet.78</title>
 			<path d="M0 715.59 L810 715.59" class="st33"/>
 		</g>
-		<g id="group80-158" transform="translate(-173.49,382.875) rotate(-90)" v:mID="80" v:groupContext="group">
+		<g id="group80-158" transform="translate(-173.49,391.588) rotate(-90)" v:mID="80" v:groupContext="group">
 			<v:userDefs>
 				<v:ud v:nameU="ControlDistFromCorner" v:prompt="" v:val="VT0(0.35355339059327):1"/>
 				<v:ud v:nameU="AngToControl" v:prompt="" v:val="VT0(0.78539816339745):32"/>
 				<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 				<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
-				<v:ud v:nameU="ControlDistFromCorner" v:prompt="" v:val="VT0(0.57622152858081):1"/>
-				<v:ud v:nameU="AngToControl" v:prompt="" v:val="VT0(0.70862627212768):32"/>
-				<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44270833333333):1"/>
-				<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.3794642857143):1"/>
+				<v:ud v:nameU="ControlDistFromCorner" v:prompt="" v:val="VT0(0.58312410958657):1"/>
+				<v:ud v:nameU="AngToControl" v:prompt="" v:val="VT0(0.72232731526223):32"/>
+				<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44100391727396):1"/>
+				<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.38860997392129):1"/>
 			</v:userDefs>
 			<title>Folded Corner</title>
 			<g id="shape80-159" v:mID="80" v:groupContext="groupContent">
 				<g id="shadow80-160" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
-						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-3.105,-9.45175)" class="st10">
-					<path d="M0 715.59 L278.62 715.59 L310.5 688.27 L310.5 229.59 L0 229.59 L0 715.59 Z" class="st34"/>
+						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-3.19213,-9.45175)" class="st10">
+					<path d="M0 715.59 L287.46 715.59 L319.21 687.61 L319.21 229.59 L0 229.59 L0 715.59 Z" class="st34"/>
 				</g>
-				<path d="M0 715.59 L278.62 715.59 L310.5 688.27 L310.5 229.59 L0 229.59 L0 715.59 Z" class="st36"/>
+				<path d="M0 715.59 L287.46 715.59 L319.21 687.61 L319.21 229.59 L0 229.59 L0 715.59 Z" class="st36"/>
 			</g>
-			<g id="shape81-168" v:mID="81" v:groupContext="shape" transform="translate(278.625,0)">
+			<g id="shape81-168" v:mID="81" v:groupContext="shape" transform="translate(287.46,0)">
 				<title>Sheet.81</title>
 				<v:userDefs>
 					<v:ud v:nameU="ControlX" v:prompt="" v:val="VT0(1):1"/>
@@ -572,20 +575,20 @@
 					<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 					<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 					<v:ud v:nameU="FillForegnd" v:prompt="" v:val="VT0(1):26"/>
-					<v:ud v:nameU="ControlX" v:prompt="" v:val="VT0(3.9375):1"/>
+					<v:ud v:nameU="ControlX" v:prompt="" v:val="VT0(4.0479846046172):1"/>
 					<v:ud v:nameU="ControlY" v:prompt="" v:val="VT0(0.4375):1"/>
-					<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44270833333333):1"/>
-					<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.3794642857143):1"/>
+					<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44100391727396):1"/>
+					<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.38860997392129):1"/>
 					<v:ud v:nameU="FillForegnd" v:prompt="" v:val="VT5(#f2f2f2)"/>
 				</v:userDefs>
 				<g id="shadow81-169" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
-						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-0.6375,-14.3117)" class="st10">
-					<path d="M0 715.59 L31.88 688.27 L4.87 684.09 L0 715.59 Z" class="st34"/>
+						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-0.635046,-14.3117)" class="st10">
+					<path d="M0 715.59 L31.75 687.61 L3.99 684.09 L0 715.59 Z" class="st34"/>
 				</g>
-				<path d="M0 715.59 L31.88 688.27 L4.87 684.09 L0 715.59 Z" class="st38"/>
+				<path d="M0 715.59 L31.75 687.61 L3.99 684.09 L0 715.59 Z" class="st38"/>
 			</g>
 		</g>
-		<g id="group82-175" transform="translate(432.972,-530.713)" v:mID="82" v:groupContext="group">
+		<g id="group82-175" transform="translate(432.972,-567)" v:mID="82" v:groupContext="group">
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
 			</v:userDefs>
@@ -607,7 +610,7 @@
 				<text x="11.84" y="681.09" class="st31" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>EDK2 HII <tspan
 							x="10.24" dy="1.2em" class="st5">Database</tspan></text>			</g>
 		</g>
-		<g id="shape84-182" v:mID="84" v:groupContext="shape" transform="translate(390.222,-429.463)">
+		<g id="shape84-182" v:mID="84" v:groupContext="shape" transform="translate(390.222,-483.75)">
 			<title>Sheet.84</title>
 			<desc>EDKII REDFISH_PLATFORM_CONFIG_PROTOCOL</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
@@ -619,26 +622,26 @@
 			<rect x="0" y="670.588" width="144" height="45" class="st41"/>
 			<text x="58.18" y="683.34" class="st20" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>EDKII <tspan
 						x="6" dy="1em" class="st5">REDFISH</tspan>_PLATFORM_CO<tspan x="26.68" dy="1em" class="st5">NFIG</tspan>_PROTOCOL</text>		</g>
-		<g id="shape85-190" v:mID="85" v:groupContext="shape" v:layerMember="0" transform="translate(1171.06,184.875) rotate(90)">
+		<g id="shape85-190" v:mID="85" v:groupContext="shape" v:layerMember="0" transform="translate(1171.06,148.588) rotate(90)">
 			<title>1-D double.75</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M6.75 704.79 L6.75 702.09 L0 708.84 L6.75 715.59 L6.75 712.89 L49.5 712.89 L49.5 715.59 L56.25 708.84 L49.5
-						 702.09 L49.5 704.79 L6.75 704.79 Z" class="st39"/>
+			<path d="M6.75 704.79 L6.75 702.09 L0 708.84 L6.75 715.59 L6.75 712.89 L31.5 712.89 L31.5 715.59 L38.25 708.84 L31.5
+						 702.09 L31.5 704.79 L6.75 704.79 Z" class="st39"/>
 		</g>
-		<g id="shape86-192" v:mID="86" v:groupContext="shape" v:layerMember="0" transform="translate(1164.31,286.125) rotate(90)">
+		<g id="shape86-192" v:mID="86" v:groupContext="shape" v:layerMember="0" transform="translate(1164.31,231.838) rotate(90)">
 			<title>1-D double.68</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
 			<g id="shadow86-193" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
-					v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-1.1475,-14.0418)" class="st10">
-				<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L101.25 710.19 L101.25 715.59 L114.75 702.09
-							 L101.25 688.59 L101.25 693.99 L13.5 693.99 Z" class="st40"/>
+					v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-1.69037,-14.0418)" class="st10">
+				<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L155.54 710.19 L155.54 715.59 L169.04 702.09
+							 L155.54 688.59 L155.54 693.99 L13.5 693.99 Z" class="st40"/>
 			</g>
-			<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L101.25 710.19 L101.25 715.59 L114.75 702.09 L101.25
-						 688.59 L101.25 693.99 L13.5 693.99 Z" class="st39"/>
+			<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L155.54 710.19 L155.54 715.59 L169.04 702.09 L155.54
+						 688.59 L155.54 693.99 L13.5 693.99 Z" class="st39"/>
 		</g>
 		<g id="shape87-197" v:mID="87" v:groupContext="shape" transform="translate(27.9724,-616.213)">
 			<title>Sheet.87</title>
@@ -701,7 +704,7 @@
 			<rect x="0" y="670.588" width="153" height="45" class="st19"/>
 			<text x="16.96" y="689.84" class="st20" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>Script-generated EDK2 <tspan
 						x="11.39" dy="1em" class="st5">Redfish Collection Driver</tspan></text>		</g>
-		<g id="shape98-229" v:mID="98" v:groupContext="shape" transform="translate(67.3474,-420.463)">
+		<g id="shape98-229" v:mID="98" v:groupContext="shape" transform="translate(67.3474,-432)">
 			<title>Rounded Rectangle.98</title>
 			<desc>EDK2 HII UNI file #string STR_OPTION_A #language x-uefi-redfi...</desc>
 			<v:userDefs>
@@ -753,7 +756,7 @@
 						class="st48">  </tspan><tspan class="st50"> </tspan><tspan x="4" dy="1.312em" class="st50">“</tspan><tspan
 						class="st50">/</tspan><tspan class="st50">SCHEMA</tspan><tspan class="st50">/</tspan><tspan class="st50">PropertyC</tspan><tspan
 						class="st50">”</tspan><v:newlineChar/></text>		</g>
-		<g id="shape100-316" v:mID="100" v:groupContext="shape" transform="translate(171.972,-550.963)">
+		<g id="shape100-316" v:mID="100" v:groupContext="shape" transform="translate(171.972,-560.812)">
 			<title>Rounded Rectangle.100</title>
 			<desc>EDK2 HII VFR Form Option A Enabled Option B Disabled Option C...</desc>
 			<v:userDefs>
@@ -783,7 +786,7 @@
 						x="24.37" dy="1.6em" class="st53">Option A        Enabled<v:newlineChar/></tspan><tspan x="24.6" dy="0.8em"
 						class="st53">Option B       Disabled<v:newlineChar/></tspan><tspan x="24.4" dy="0.8em" class="st53">Option C              </tspan><tspan
 						class="st53">0</tspan><tspan class="st53">x</tspan><tspan class="st53">16</tspan></text>		</g>
-		<g id="shape101-325" v:mID="101" v:groupContext="shape" transform="translate(147.222,-539.713)">
+		<g id="shape101-325" v:mID="101" v:groupContext="shape" transform="translate(147.222,-549.562)">
 			<title>Rounded Rectangle.101</title>
 			<desc>EDK2 HII VFR Form Option A Enabled Option B Disabled Option C...</desc>
 			<v:userDefs>
@@ -813,7 +816,7 @@
 						x="24.37" dy="1.6em" class="st53">Option A        Enabled<v:newlineChar/></tspan><tspan x="24.6" dy="0.8em"
 						class="st53">Option B       Disabled<v:newlineChar/></tspan><tspan x="24.4" dy="0.8em" class="st53">Option C              </tspan><tspan
 						class="st53">0</tspan><tspan class="st53">x</tspan><tspan class="st53">16</tspan></text>		</g>
-		<g id="shape102-334" v:mID="102" v:groupContext="shape" transform="translate(129.222,-526.213)">
+		<g id="shape102-334" v:mID="102" v:groupContext="shape" transform="translate(129.222,-536.063)">
 			<title>Rounded Rectangle</title>
 			<desc>EDK2 HII VFR Form Option A Enabled Option B Disabled Option C...</desc>
 			<v:userDefs>
@@ -845,14 +848,15 @@
 						x="24.4" dy="0.8em" class="st54">Option C              </tspan><tspan class="st55">0</tspan><tspan
 						class="st55">x</tspan><tspan class="st55">16</tspan></text>		</g>
 		<g id="shape110-345" v:mID="110" v:groupContext="shape" v:layerMember="0"
-				transform="translate(503.938,-444.613) rotate(13.0919)">
+				transform="translate(732.324,840.498) rotate(-33.0707) scale(1,-1)">
 			<title>Curve connect 1.110</title>
 			<v:userDefs>
 				<v:ud v:nameU="Scale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M0 715.59 A11.592 11.592 0 0 1 22.97 715.59 A13.4718 13.4718 -180 0 0 48.31 719.9 L48.42 719.56" class="st56"/>
+			<path d="M0 715.59 A13.9015 13.9015 0 0 1 26.7 715.59 A16.1558 16.1558 -180 0 0 55.87 719.71 L56.02 719.38"
+					class="st56"/>
 		</g>
 		<g id="shape122-351" v:mID="122" v:groupContext="shape" transform="translate(41.4724,-96.4625)">
 			<title>Sheet.122</title>
@@ -889,21 +893,21 @@
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[5]</text>		</g>
-		<g id="shape127-366" v:mID="127" v:groupContext="shape" transform="translate(390.222,-476.713)">
+		<g id="shape127-366" v:mID="127" v:groupContext="shape" transform="translate(390.222,-531)">
 			<title>Sheet.127</title>
 			<desc>[6]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[6]</text>		</g>
-		<g id="shape128-369" v:mID="128" v:groupContext="shape" transform="translate(123.597,-579.088)">
+		<g id="shape128-369" v:mID="128" v:groupContext="shape" transform="translate(123.597,-588.937)">
 			<title>Sheet.128</title>
 			<desc>[8]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[8]</text>		</g>
-		<g id="shape129-372" v:mID="129" v:groupContext="shape" transform="translate(62.8474,-501.463)">
+		<g id="shape129-372" v:mID="129" v:groupContext="shape" transform="translate(62.8474,-513)">
 			<title>Sheet.129</title>
 			<desc>[9]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
@@ -954,7 +958,7 @@
 			<v:textRect cx="54" cy="702.088" width="108" height="27"/>
 			<rect x="0" y="688.588" width="108" height="27" class="st6"/>
 			<text x="9.97" y="704.34" class="st61" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>UEFI/EDK2 open source</text>		</g>
-		<g id="shape140-398" v:mID="140" v:groupContext="shape" transform="translate(281.66,-341.784)">
+		<g id="shape140-398" v:mID="140" v:groupContext="shape" transform="translate(164.467,-339.75)">
 			<title>Configure</title>
 			<v:userDefs>
 				<v:ud v:nameU="msvShapeCategories" v:prompt="" v:val="VT4(Icon)"/>
@@ -998,15 +1002,16 @@
 						 21.41 683.97 23.76 684.23 Z" class="st63"/>
 		</g>
 		<g id="shape145-400" v:mID="145" v:groupContext="shape" v:layerMember="0"
-				transform="translate(323.911,1069.28) scale(1,-1)">
+				transform="translate(205.698,1070.76) scale(1,-1)">
 			<title>Side to top/bottom.145</title>
 			<v:userDefs>
 				<v:ud v:nameU="TextPos" v:val="VT0(0):5"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M7.18 715.59 L7.54 715.59 L96.69 715.59 L96.69 668.4" class="st64"/>
+			<path d="M7.18 715.59 L7.54 715.59 L214.9 715.59 L214.9 669.89" class="st64"/>
 		</g>
-		<g id="shape146-406" v:mID="146" v:groupContext="shape" v:layerMember="0" transform="translate(204.597,-382.144)">
+		<g id="shape146-406" v:mID="146" v:groupContext="shape" v:layerMember="0"
+				transform="translate(204.597,-380.109) scale(-1,1)">
 			<title>Bottom to top fixed 2</title>
 			<v:userDefs>
 				<v:ud v:nameU="TextPos" v:val="VT0(1):26"/>
@@ -1015,31 +1020,23 @@
 				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M0 677.27 L0 697.59 L99.14 697.59 L99.14 708.05" class="st66"/>
+			<path d="M0 663.7 L0 697.59 L19.74 697.59 L19.74 708.05" class="st66"/>
 		</g>
-		<g id="shape150-412" v:mID="150" v:groupContext="shape" v:layerMember="0" transform="translate(281.66,1070.51) rotate(180)">
-			<title>Side to top/bottom</title>
-			<v:userDefs>
-				<v:ud v:nameU="TextPos" v:val="VT0(0):5"/>
-				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
-			</v:userDefs>
-			<path d="M7.18 715.59 L7.54 715.59 L107.44 715.59 L107.44 669.64" class="st64"/>
-		</g>
-		<g id="shape152-417" v:mID="152" v:groupContext="shape" transform="translate(173.097,-359.713)">
+		<g id="shape152-412" v:mID="152" v:groupContext="shape" transform="translate(56.0331,-368.928)">
 			<title>Sheet.152</title>
 			<desc>[10]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="22.5" cy="702.088" width="45" height="27"/>
 			<rect x="0" y="688.588" width="45" height="27" class="st6"/>
 			<text x="12.52" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[10]</text>		</g>
-		<g id="shape153-420" v:mID="153" v:groupContext="shape" transform="translate(186.597,-359.713)">
+		<g id="shape153-415" v:mID="153" v:groupContext="shape" transform="translate(69.4044,-368.928)">
 			<title>Sheet.153</title>
 			<desc>EDK2 Build Tool</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="54" cy="702.088" width="108" height="27"/>
 			<rect x="0" y="688.588" width="108" height="27" class="st6"/>
 			<text x="21.18" y="704.59" class="st22" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>EDK2 Build Tool</text>		</g>
-		<g id="shape95-423" v:mID="95" v:groupContext="shape" v:layerMember="0"
+		<g id="shape95-418" v:mID="95" v:groupContext="shape" v:layerMember="0"
 				transform="translate(479.651,-242.34) rotate(-1.84761)">
 			<title>Curve connect 2</title>
 			<v:userDefs>
@@ -1047,22 +1044,98 @@
 			</v:userDefs>
 			<path d="M1.08 713.99 L1.29 713.7 A41.432 41.432 0 0 1 68.5 713.7 L68.7 713.99" class="st67"/>
 		</g>
-		<g id="shape154-431" v:mID="154" v:groupContext="shape" transform="translate(546.597,-607.213)">
+		<g id="shape154-426" v:mID="154" v:groupContext="shape" transform="translate(546.597,-607.213)">
 			<title>Sheet.154</title>
 			<desc>[7]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[7]</text>		</g>
-		<g id="shape155-434" v:mID="155" v:groupContext="shape" v:layerMember="0"
-				transform="translate(919.083,249.319) rotate(-86.8202) scale(1,-1)">
+		<g id="shape155-429" v:mID="155" v:groupContext="shape" v:layerMember="0"
+				transform="translate(918.874,241.377) rotate(-86.5318) scale(1,-1)">
 			<title>Curve connect 1.155</title>
 			<v:userDefs>
 				<v:ud v:nameU="Scale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M0 715.59 A6.2366 6.2366 0 0 1 11.73 715.59 A4.54475 4.54475 -180 0 0 20.28 715.59" class="st68"/>
+			<path d="M0 715.59 A5.57145 5.57145 0 0 1 10.76 715.59 A4.06004 4.06004 -180 0 0 18.6 715.59" class="st68"/>
+		</g>
+		<g id="shape294-432" v:mID="294" v:groupContext="shape" transform="translate(279,-387)">
+			<title>Sheet.294</title>
+			<desc>Redfish Feature Core DXE</desc>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="72" cy="702.088" width="144" height="27"/>
+			<g id="shadow294-433" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
+					v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-1.44,-14.0418)" class="st10">
+				<rect x="0" y="688.588" width="144" height="27" class="st40"/>
+			</g>
+			<rect x="0" y="688.588" width="144" height="27" class="st41"/>
+			<text x="4.61" y="705.34" class="st20" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>Redfish Feature Core DXE</text>		</g>
+		<g id="shape296-438" v:mID="296" v:groupContext="shape" v:layerMember="0" transform="translate(174.222,-314.713)">
+			<title>Bottom to top fixed 2.296</title>
+			<v:userDefs>
+				<v:ud v:nameU="TextPos" v:val="VT0(1):26"/>
+				<v:ud v:nameU="Offset" v:val="VT0(0.25):0"/>
+				<v:ud v:nameU="Scale" v:val="VT0(1):26"/>
+				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
+				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
+			</v:userDefs>
+			<path d="M0 715.59 L0 697.59 L10.5 697.59 L10.5 693.32" class="st66"/>
+		</g>
+		<g id="shape298-443" v:mID="298" v:groupContext="shape" transform="translate(427.5,-389.25)">
+			<title>Forward</title>
+			<v:userDefs>
+				<v:ud v:nameU="msvShapeCategories" v:prompt="" v:val="VT4(Icon)"/>
+				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
+			</v:userDefs>
+			<path d="M0 698.71 L0 709.96 L11.25 709.96 L11.25 715.59 L24.75 704.36 L11.25 693.09 L11.25 698.71 L0 698.71 Z"
+					class="st69"/>
+		</g>
+		<g id="shape303-445" v:mID="303" v:groupContext="shape" transform="translate(216,-378)">
+			<title>16-Point Star</title>
+			<desc>Event Trigger</desc>
+			<v:userDefs>
+				<v:ud v:nameU="CtrlYOffset" v:prompt="" v:val="VT0(0.5):1"/>
+				<v:ud v:nameU="CtrlXOffset" v:prompt="" v:val="VT0(0.099456183689829):1"/>
+				<v:ud v:nameU="CtrlAngle" v:prompt="" v:val="VT0(0.19634954084936):26"/>
+				<v:ud v:nameU="ElbowDist" v:prompt="" v:val="VT0(0.50979557910416):1"/>
+				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
+				<v:ud v:nameU="CtrlYOffset" v:prompt="" v:val="VT0(0.25):1"/>
+				<v:ud v:nameU="CtrlXOffset" v:prompt="" v:val="VT0(0.049728091844915):1"/>
+				<v:ud v:nameU="ElbowDist" v:prompt="" v:val="VT0(0.25489778955208):1"/>
+			</v:userDefs>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="22.5" cy="693.088" width="45" height="45"/>
+			<path d="M22.5 670.59 L26.08 675.09 L31.11 672.3 L32.7 677.83 L38.41 677.18 L37.76 682.89 L43.29 684.48 L40.5 689.51
+						 L45 693.09 L40.5 696.67 L43.29 701.7 L37.76 703.28 L38.41 709 L32.7 708.35 L31.11 713.87 L26.08 711.09 L22.5
+						 715.59 L18.92 711.09 L13.89 713.87 L12.3 708.35 L6.59 709 L7.24 703.28 L1.71 701.7 L4.5 696.67 L0 693.09
+						 L4.5 689.51 L1.71 684.48 L7.24 682.89 L6.59 677.18 L12.3 677.83 L13.89 672.3 L18.92 675.09 L22.5 670.59
+						 Z" class="st70"/>
+			<text x="11.01" y="690.09" class="st31" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Event <v:lf/><tspan
+						x="8.23" dy="1.2em" class="st5">Trigger</tspan></text>		</g>
+		<g id="shape304-449" v:mID="304" v:groupContext="shape" transform="translate(238.5,-360)">
+			<title>Sheet.304</title>
+			<desc>[11]</desc>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="22.5" cy="702.088" width="45" height="27"/>
+			<rect x="0" y="688.588" width="45" height="27" class="st6"/>
+			<text x="12.52" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[11]</text>		</g>
+		<g id="shape305-452" v:mID="305" v:groupContext="shape" transform="translate(400.5,-407.25)">
+			<title>Sheet.305</title>
+			<desc>[12]</desc>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="22.5" cy="702.088" width="45" height="27"/>
+			<rect x="0" y="688.588" width="45" height="27" class="st6"/>
+			<text x="12.52" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[12]</text>		</g>
+		<g id="shape307-455" v:mID="307" v:groupContext="shape" transform="translate(262.125,-392.932)">
+			<title>Forward.307</title>
+			<v:userDefs>
+				<v:ud v:nameU="msvShapeCategories" v:prompt="" v:val="VT4(Icon)"/>
+				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
+			</v:userDefs>
+			<path d="M0 704.85 L0 712.01 L7.16 712.01 L7.16 715.59 L15.75 708.44 L7.16 701.27 L7.16 704.85 L0 704.85 Z"
+					class="st69"/>
 		</g>
 	</g>
 </svg>
-- 
2.17.1


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

* Re: [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files Abner Chang
@ 2021-08-08 12:46   ` Nickle Wang
  0 siblings, 0 replies; 8+ messages in thread
From: Nickle Wang @ 2021-08-08 12:46 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist), devel@edk2.groups.io; +Cc: Liming Gao

Reviewed-by: Nickle Wang <nickle.wang@hpe.com>

Thanks,
Nickle

-----Original Message-----
From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com> 
Sent: Tuesday, July 27, 2021 10:55 PM
To: devel@edk2.groups.io
Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files

Initial commit of RedfishclientPkg meta files

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 RedfishClientPkg/RedfishClientPkg.dec         | 24 ++++++++++
 RedfishClientPkg/RedfishClient.dsc.inc        | 21 +++++++++
 .../RedfishClientComponents.dsc.inc           | 16 +++++++
 RedfishClientPkg/RedfishClientDefines.dsc.inc | 27 +++++++++++
 RedfishClientPkg/RedfishClientLibs.dsc.inc    | 13 ++++++
 RedfishClientPkg/RedfishClientPkg.dsc         | 46 +++++++++++++++++++
 RedfishClientPkg/RedfishClient.fdf.inc        | 14 ++++++
 7 files changed, 161 insertions(+)
 create mode 100644 RedfishClientPkg/RedfishClientPkg.dec
 create mode 100644 RedfishClientPkg/RedfishClient.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientComponents.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientDefines.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientLibs.dsc.inc
 create mode 100644 RedfishClientPkg/RedfishClientPkg.dsc
 create mode 100644 RedfishClientPkg/RedfishClient.fdf.inc

diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec
new file mode 100644
index 0000000000..4038a47bd5
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -0,0 +1,24 @@
+## @file
+# Redfish Client Package
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+  DEC_SPECIFICATION = 0x0001001b
+  PACKAGE_NAME      = RedfishClientPkg
+  PACKAGE_GUID      = 61B1638B-1DF9-4052-9468-382FC164AA85
+  PACKAGE_VERSION   = 1.0
+
+[Includes]
+  Include
+
+
+[LibraryClasses]
+
+[Protocols]
+
+[Guids]
+  gEfiRedfishClientPkgTokenSpaceGuid    = { 0x8c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } }
diff --git a/RedfishClientPkg/RedfishClient.dsc.inc b/RedfishClientPkg/RedfishClient.dsc.inc
new file mode 100644
index 0000000000..ad771fcb7f
--- /dev/null
+++ b/RedfishClientPkg/RedfishClient.dsc.inc
@@ -0,0 +1,21 @@
+## @file
+# Redfish Client DSC include file for Platform DSC
+#
+# This file includes all required information to enable Redfish features.
+# It can be included to a platform DSC file by using "!include RedfishClientPkg/RedfishClient.dsc.inc".
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  !include RedfishClientPkg/RedfishClientDefines.dsc.inc
+
+[LibraryClasses]
+  !include RedfishClientPkg/RedfishClientLibs.dsc.inc
+
+[Components]
+  !include RedfishClientPkg/RedfishClientComponents.dsc.inc
+
diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc b/RedfishClientPkg/RedfishClientComponents.dsc.inc
new file mode 100644
index 0000000000..0648fa9d54
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
@@ -0,0 +1,16 @@
+## @file
+# Redfish Client DSC include file for [Components*] section of all Architectures.
+#
+# This file can be included to the [Components*] section(s) of a platform DSC file
+# by using "!include RedfishClientPkg/RedfishClientComponents.dsc.inc" to specify the INF files
+# of EDKII Redfish drivers according to the value of flags described in
+# "RedfishClientDefines.dsc.inc".
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+!if $(REDFISH_CLIENT) == TRUE
+!endif
diff --git a/RedfishClientPkg/RedfishClientDefines.dsc.inc b/RedfishClientPkg/RedfishClientDefines.dsc.inc
new file mode 100644
index 0000000000..14b7d67102
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientDefines.dsc.inc
@@ -0,0 +1,27 @@
+## @file
+# RedfishClientPkg DSC include file for [Defines] section of all Architectures.
+#
+# This file can be included to the [Defines] section of a platform DSC file by
+# using "!include RedfishClientPkg/RedfishClientDefines.dsc.inc" to set value of
+# flags.
+#
+# These flags can be defined before the !include line, or changed on the command
+# line to enable or disable related feature support.
+#   -D FLAG=VALUE
+#
+# The default value of these flags are:
+#   DEFINE REDFISH_CLIENT = TRUE
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+!ifndef REDFISH_CLIENT
+  #
+  # This flag is to enable or disable the EDK2 Redfish client support.
+  #
+  DEFINE REDFISH_CLIENT = TRUE
+!endif
+
diff --git a/RedfishClientPkg/RedfishClientLibs.dsc.inc b/RedfishClientPkg/RedfishClientLibs.dsc.inc
new file mode 100644
index 0000000000..2f360abed6
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientLibs.dsc.inc
@@ -0,0 +1,13 @@
+## @file
+# Redfish DSC include file for [LibraryClasses*] section of all Architectures.
+#
+# This file can be included to the [LibraryClasses*] section(s) of a platform DSC file
+# by using "!include RedfishPkg/RedfisLibs.dsc.inc" to specify the library instances
+# of EDKII network library classes.
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
diff --git a/RedfishClientPkg/RedfishClientPkg.dsc b/RedfishClientPkg/RedfishClientPkg.dsc
new file mode 100644
index 0000000000..f423bf3861
--- /dev/null
+++ b/RedfishClientPkg/RedfishClientPkg.dsc
@@ -0,0 +1,46 @@
+## @file
+# Redfish Client Package
+#
+# (C) Copyright 2021 Hewlett-Packard Enterprise Development LP.
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  PLATFORM_NAME                  = RedfishClientPkg
+  PLATFORM_GUID                  = 43491BF9-2879-492B-905E-E82E0C30B412
+  PLATFORM_VERSION               = 1.0
+  DSC_SPECIFICATION              = 0x0001001c
+  OUTPUT_DIRECTORY               = Build/RedfishClientPkg
+  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64|RISCV64
+  BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT
+  SKUID_IDENTIFIER               = DEFAULT
+
+!include MdePkg/MdeLibs.dsc.inc
+
+[LibraryClasses]
+  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+  DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
+  DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+
+[LibraryClasses.ARM, LibraryClasses.AARCH64]
+  #
+  # This library provides the instrinsic functions generated by a given compiler.
+  #
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+  ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
+
+[Components]
+
+  !include RedfishClientPkg/RedfishClient.dsc.inc
diff --git a/RedfishClientPkg/RedfishClient.fdf.inc b/RedfishClientPkg/RedfishClient.fdf.inc
new file mode 100644
index 0000000000..4f0714004e
--- /dev/null
+++ b/RedfishClientPkg/RedfishClient.fdf.inc
@@ -0,0 +1,14 @@
+## @file
+# Redfish Client FDF include file for [FV*] section of all Architectures.
+#
+# This file can be included to the [FV*] section(s) of a platform FDF file
+# by using "!include RedfishClientPkg/RedfisClientLibs.fdf.inc" to specify the module instances
+# to be built in the firmware volume.
+#
+# (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+!if $(REDFISH_CLIENT) == TRUE
+!endif
-- 
2.17.1


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

* Re: [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver Abner Chang
@ 2021-08-08 12:54   ` Nickle Wang
  2021-08-11  3:35     ` Abner Chang
  0 siblings, 1 reply; 8+ messages in thread
From: Nickle Wang @ 2021-08-08 12:54 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist), devel@edk2.groups.io; +Cc: Liming Gao

Minor issue as inline below.

Thanks,
Nickle

-----Original Message-----
From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com> 
Sent: Tuesday, July 27, 2021 10:55 PM
To: devel@edk2.groups.io
Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver

EDKII Redfish Feature Core DXE driver provides the protocol interface to
the auto-generated Redfish feature driver to register itself for the
Redfish resource URI it manages. Refer to the Readme.md for the details.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 RedfishClientPkg/RedfishClientPkg.dec         |  13 +-
 .../RedfishClientComponents.dsc.inc           |   2 +
 RedfishClientPkg/RedfishClient.fdf.inc        |   1 +
 .../RedfishFeatureCoreDxe.inf                 |  49 +++
 .../Include/Protocol/EdkIIRedfishFeature.h    | 116 ++++++
 .../RedfishFeatureCoreDxe.h                   |  43 ++
 .../RedfishFeatureCoreDxe.c                   | 382 ++++++++++++++++++
 RedfishClientPkg/Readme.md                    |  36 ++
 8 files changed, 641 insertions(+), 1 deletion(-)
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
 create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
 create mode 100644 RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c

diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec
index 4038a47bd5..6da0468e65 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -15,10 +15,21 @@
 [Includes]
   Include
 
-
 [LibraryClasses]
 
 [Protocols]
+  ## Include/Protocol/EdkIIRedfishFeature.h
+  gEdkIIRedfishFeatureProtocolGuid = { 0x785CC694, 0x4930, 0xEFBF, { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } }
 
 [Guids]
   gEfiRedfishClientPkgTokenSpaceGuid    = { 0x8c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } }
+
+[PcdsFixedAtBuild]
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UINT32|0x10000001
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8|UINT32|0x10000002
+  #
+  # gEfiEventReadyToBootGuid is the default event to startup Redfish feature drivers.
+  # { 0x7CE88FB3, 0x4BD7, 0x4679, { 0x87, 0xA8, 0xA8, 0xD8, 0xDE, 0xE5, 0x0D, 0x2B }}
+  #
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupEventGuid|{0xB3, 0x8F, 0xE8, 0x7C, 0xD7, 0x4B, 0x79, 0x46, 0x87, 0xA8, 0xA8, 0xD8, 0xDE, 0xE5, 0x0D, 0x2B}|VOID*|0x10000003
+
diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc b/RedfishClientPkg/RedfishClientComponents.dsc.inc
index 0648fa9d54..e4e2619bfb 100644
--- a/RedfishClientPkg/RedfishClientComponents.dsc.inc
+++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
@@ -13,4 +13,6 @@
 ##
 
 !if $(REDFISH_CLIENT) == TRUE
+  RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
 !endif
+
diff --git a/RedfishClientPkg/RedfishClient.fdf.inc b/RedfishClientPkg/RedfishClient.fdf.inc
index 4f0714004e..d4c5874787 100644
--- a/RedfishClientPkg/RedfishClient.fdf.inc
+++ b/RedfishClientPkg/RedfishClient.fdf.inc
@@ -11,4 +11,5 @@
 #
 ##
 !if $(REDFISH_CLIENT) == TRUE
+  INF RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
 !endif
diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
new file mode 100644
index 0000000000..5a2cd7fecc
--- /dev/null
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
@@ -0,0 +1,49 @@
+## @file
+#  RedfishFeatureCoreDxe is the DXE driver which provides
+#  EdkIIRedfishFeatureCoreProtocol to EDK2 Redfish Feature
+#  drivers for the registration.
+#
+#  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x0001000b
+  BASE_NAME                      = RedfishFeatureCoreDxe
+  FILE_GUID                      = 1E01A624-4161-F1F1-25BC-D28E77420D8E
+  MODULE_TYPE                    = DXE_DRIVER
+  VERSION_STRING                 = 1.0
+  ENTRY_POINT                    = RedfishFeatureCoreEntryPoint
+
+#
+#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
+#
+
+[Sources]
+  RedfishFeatureCoreDxe.c
+  RedfishFeatureCoreDxe.h
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  RedfishClientPkg/RedfishClientPkg.dec
+
+[LibraryClasses]
+  BaseLib
+  BaseMemoryLib
+  DebugLib
+  MemoryAllocationLib
+  PrintLib
+  UefiBootServicesTableLib
+  UefiDriverEntryPoint
+  UefiLib
+
+[Protocols]
+  gEdkIIRedfishFeatureProtocolGuid    ## BY_START
+
+[Pcd]
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupEventGuid
+
+[Depex]
+  TRUE
diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
new file mode 100644
index 0000000000..036622128d
--- /dev/null
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
@@ -0,0 +1,116 @@
+/** @file
+  This file defines the EDKII_REDFISH_FEATURE_PROTOCOL interface.
+
+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef EDKII_REDFISH_FEATURE_H_
+#define EDKII_REDFISH_FEATURE_H_
+
+typedef struct _EDKII_REDFISH_FEATURE_PROTOCOL EDKII_REDFISH_FEATURE_PROTOCOL;
+
+#define EDKII_REDFISH_FEATURE_PROTOCOL_GUID \
+    {  \
+      0x785CC694, 0x4930, 0xEFBF, { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 }  \
+    }
+
+typedef enum {
+  CallbackActionNone = 0,       ///< Invalid action
+  CallbackActionStartOperation, ///< Start the operations on Redfish resource
+  CallbackActionMax
+} FEATURE_CALLBACK_ACTION;
+
+typedef enum {
+  InformationTypeNone = 0,            ///< Invalid information.
+  InformationTypeCollectionMemberUri, ///< URI to the new created collection member.
+  InformationTypeMax
+} FEATURE_RETURNED_INFORMATION_TYPE;
+
+typedef struct {
+  FEATURE_RETURNED_INFORMATION_TYPE Type;
+} FEATURE_RETURNED_INFORMATION;
+
+/**
+  The callback function provided by Redfish Feature driver.
+
+  @param[in]     This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]     FeatureAction       The action Redfish feature driver should take.
+  @param[in]     Context             The context of Redfish feature driver.
+  @param[in,out] InformationReturned The pointer to retrive the pointer to
+                                     FEATURE_RETURNED_INFOMATION. The memory block of this
+                                     information should be freed by caller.
+
+  @retval EFI_SUCCESS              Redfish feature driver callback is executed successfully.
+  @retval Others                   Some errors happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *REDFISH_FEATURE_CALLBACK) (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL *This,
+  IN     FEATURE_CALLBACK_ACTION        FeatureAction,
+  IN     VOID                           *Context,
+  IN OUT FEATURE_RETURNED_INFORMATION   **InformationReturned
+);
+/**
+  The registration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+  @param[in]   Callback            Callback routine associated with this registration that
+                                   provided by Redfish feature driver to execute the action
+                                   on Redfish resource which is managed by this Redfish
+                                   feature driver.
+  @param[in]   Context             The context of the registering feature driver. The pointer
+                                   to the conext is delivered through callback function.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval Others                   Some error happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *REDFISH_FEATURE_REGISTER) (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN     EFI_STRING                      FeatureManagedUri,
+  IN     REDFISH_FEATURE_CALLBACK        Callback,
+  IN     VOID                            *Context
+);
+
+/**
+  The unregistration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+  @param[in]   Context             The context used for the previous feature driver
+                                   registration.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval Others                   Some error happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *REDFISH_FEATURE_UNREGISTER) (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN     EFI_STRING                      FeatureManagedUri,
+  IN     VOID                            *Context
+);
+
+struct _EDKII_REDFISH_FEATURE_PROTOCOL {
+  REDFISH_FEATURE_REGISTER      Register;
+  REDFISH_FEATURE_UNREGISTER    Unregister;
+};
+
+extern EFI_GUID gEdkIIRedfishFeatureProtocolGuid;
+
+#endif
diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
new file mode 100644
index 0000000000..7b1778b038
--- /dev/null
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
@@ -0,0 +1,43 @@
+/** @file
+  Definitions of RedfishFeatureCoreDxe
+
+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+#ifndef EDKII_REDFISH_FEATURE_CORE_DXE_H_
+#define EDKII_REDFISH_FEATURE_CORE_DXE_H_
+
+#include <Protocol/EdkIIRedfishFeature.h>
+
+#include <Base.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/PrintLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+#define MaxNodeNameLength 64
+#define NodeSeperator L'/'
+#define NodeIsCollectionLeftBracket '{'
+#define NodeIsCollectionRightBracket '}'
+
+typedef struct _REDFISH_FEATURE_INTERNAL_DATA REDFISH_FEATURE_INTERNAL_DATA;
+struct _REDFISH_FEATURE_INTERNAL_DATA {
+  REDFISH_FEATURE_INTERNAL_DATA *SiblingList; ///< Next same level in hierarchy of resource URI.
+  REDFISH_FEATURE_INTERNAL_DATA *ChildList;   ///< Next level in hierarchy of resource URI.
+  EFI_STRING               NodeName;    ///< Name of the node in hierarchy of resource URI.
+  REDFISH_FEATURE_CALLBACK Callback;    ///< Callback function of Redfish feature driver.
+  VOID                     *Context;    ///< Context of feature driver.
+  FEATURE_RETURNED_INFORMATION *ReturnedInformation; ///< Information returned from Redfish feature driver.
+  UINT32         Flags;
+};
+#define REDFISH_FEATURE_INTERNAL_DATA_IS_COLLECTION 0x00000001
+
+typedef struct {
+  EDKII_REDFISH_FEATURE_PROTOCOL *This;
+  FEATURE_CALLBACK_ACTION Action;
+} REDFISH_FEATURE_STARTUP_CONTEXT;
+#endif
diff --git a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
new file mode 100644
index 0000000000..e5dcc3de8e
--- /dev/null
+++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
@@ -0,0 +1,382 @@
+/** @file
+  RedfishFeatureCoreDxe produces EdkIIRedfishFeatureCoreProtocol
+  for EDK2 Redfish Feature driver registration.
+
+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <RedfishFeatureCoreDxe.h>
+
+EFI_EVENT mEdkIIRedfishFeatureDriverStartupEvent;
+REDFISH_FEATURE_STARTUP_CONTEXT mFeatureDriverStartupContext;
+REDFISH_FEATURE_INTERNAL_DATA *ResourceUriNodeList;
+
+/**
+  Startup child feature drivers and it's sibing feature drivers.
+
+  @param[in]  HeadList              Head list of this feature driver
+  @param[in]  ThisFeatureDriverList This feature driver list.
+  @param[in]  StartupContext        Start up information
+
+**/

Function header mismatch here. HeadList is not a function parameter as below.

+VOID
+StartUpFeatureDriver (
+  IN REDFISH_FEATURE_INTERNAL_DATA *ThisFeatureDriverList,
+  IN REDFISH_FEATURE_STARTUP_CONTEXT *StartupContext
+)
+{
+  EFI_STATUS Status;
+  REDFISH_FEATURE_INTERNAL_DATA *ThisList;
+
+  ThisList = ThisFeatureDriverList;
+  while (TRUE) {
+    if (ThisList->Callback != NULL) {
+      Status = ThisList->Callback(
+                           StartupContext->This,
+                           StartupContext->Action,
+                           ThisList->Context,
+                           &ThisList->ReturnedInformation
+                           );
+      if (EFI_ERROR (Status)) {
+        DEBUG((DEBUG_ERROR, "%a: Callback to EDK2 Redfish feature driver fail.", __FUNCTION__));
+      }
+    }
+    if (ThisList->ChildList != NULL) {
+      StartUpFeatureDriver (ThisList->ChildList, StartupContext);
+    }
+    //
+    // Check sibling Redfish feature driver.
+    //
+    if (ThisList->SiblingList == NULL) {
+      break;
+    }
+    //
+    // Go next sibling Redfish feature driver.
+    //
+    ThisList = ThisList->SiblingList;
+  };
+}
+
+/**
+  Callback routine when mEdkIIRedfishFeatureDriverStartupEvent
+  is signaled.
+
+  @param[in]  Event                 Event whose notification function is being invoked.
+  @param[in]  Context               The pointer to the notification function's context,
+                                    which is implementation-dependent.
+
+**/
+VOID
+RedfishFeatureDriverStartup(
+  IN  EFI_EVENT                Event,
+  IN  VOID                     *Context
+  )
+{
+  REDFISH_FEATURE_STARTUP_CONTEXT *StartupContext;
+
+  StartupContext = (REDFISH_FEATURE_STARTUP_CONTEXT *)Context;
+  //
+  // Invoke EDK2 Redfish feature driver callback to start up
+  // the Redfish operations.
+  //
+  if (ResourceUriNodeList == NULL) {
+    return;
+  }
+  //
+  // Invoke the callback by the hierarchy level
+  //
+  StartUpFeatureDriver (ResourceUriNodeList, StartupContext);
+}
+
+/**
+  Create new internal data instance.
+
+  @param[in,out] PtrToNewInternalData  Pointer to receive new instance of
+                                       REDFISH_FEATURE_INTERNAL_DATA.
+  @param[in]     NodeName              Name of URI node.
+
+  @retval EFI_SUCCESS              New entry is inserted successfully.
+  @retval EFI_INVALID_PARAMETER    Improper given parameters.
+  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data structure.
+
+**/
+EFI_STATUS
+NewInternalInstance (
+  IN OUT REDFISH_FEATURE_INTERNAL_DATA **PtrToNewInternalData,
+  IN EFI_STRING NodeName
+  )
+{
+  REDFISH_FEATURE_INTERNAL_DATA *NewInternalData;
+
+  if (PtrToNewInternalData == NULL || NodeName == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: Inproper given parameters\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  *PtrToNewInternalData = NULL;
+  NewInternalData = AllocateZeroPool (sizeof (REDFISH_FEATURE_INTERNAL_DATA));
+  if (NewInternalData == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: No memory for REDFISH_FEATURE_INTERNAL_DATA\n", __FUNCTION__));
+    return EFI_OUT_OF_RESOURCES;
+  }
+  NewInternalData->NodeName = AllocateZeroPool (StrSize (NodeName));
+  StrnCpyS (NewInternalData->NodeName, StrSize (NodeName), (CONST CHAR16 *)NodeName, StrLen (NodeName));
+  NewInternalData->SiblingList = NULL;
+  NewInternalData->ChildList = NULL;
+  if (NodeName[0] == (UINT16)NodeIsCollectionLeftBracket &&
+      NodeName [StrLen (NodeName) - 1] == (UINT16)NodeIsCollectionRightBracket) {
+    NewInternalData->Flags |= REDFISH_FEATURE_INTERNAL_DATA_IS_COLLECTION;
+  }
+  *PtrToNewInternalData = NewInternalData;
+  return EFI_SUCCESS;
+}
+
+/**
+  Insert the URI node into internal data structure
+
+  @param[in]   HeadEntryToInsert  The head entry to start the searching.
+  @param[in]   NodeName           Name of URI node.
+  @param[in]   NextNodeEntry      Pointer to receive the pointer of next head
+                                  entry for inserting the follow up nodes.
+                                  The returned LIST_ENTRY is the address of
+                                  ChildList link list.

This is [in, out] according to below function header.

+  @retval EFI_SUCCESS              New entry is inserted successfully.
+  @retval EFI_INVALID_PARAMETER    Improper given parameters.
+  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data structure.
+
+**/
+EFI_STATUS
+InsertRedfishFeatureUriNode (
+  IN REDFISH_FEATURE_INTERNAL_DATA      *HeadEntryToInsert,
+  IN EFI_STRING                         NodeName,
+  IN OUT REDFISH_FEATURE_INTERNAL_DATA  **NextNodeEntry
+  )
+{
+  EFI_STATUS Status;
+  REDFISH_FEATURE_INTERNAL_DATA *NewInternalData;
+  REDFISH_FEATURE_INTERNAL_DATA *ThisInternalData;
+  REDFISH_FEATURE_INTERNAL_DATA *SiblingList;
+
+  if (NodeName == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: Node name is NULL.\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+  if (NextNodeEntry == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: NextNodeEntry can't be NULL.\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+
+  if (HeadEntryToInsert == NULL || HeadEntryToInsert->ChildList == NULL) {
+    Status = NewInternalInstance (&NewInternalData, NodeName);
+    if (EFI_ERROR (Status)) {
+      return Status;
+    }
+    if (HeadEntryToInsert == NULL) {
+      ResourceUriNodeList = NewInternalData;
+    } else {
+      HeadEntryToInsert->ChildList = NewInternalData;
+    }
+    *NextNodeEntry = NewInternalData;
+    return EFI_SUCCESS;
+  }
+  //
+  // Go through sibling list to find the entry.
+  //
+  ThisInternalData = HeadEntryToInsert;
+  SiblingList = ThisInternalData->SiblingList;
+  while (TRUE) {
+    if (StrCmp((CONST CHAR16 *)ThisInternalData->NodeName, (CONST CHAR16 *)NodeName) == 0) {
+      *NextNodeEntry = ThisInternalData->ChildList;
+      return EFI_SUCCESS;
+    }
+    //
+    // If sibing exist?
+    //
+    if (SiblingList == NULL) {
+      Status = NewInternalInstance (&NewInternalData, NodeName);
+      if (EFI_ERROR (Status)) {
+        return Status;
+      }
+      ThisInternalData->SiblingList = NewInternalData;
+      *NextNodeEntry = NewInternalData->ChildList;
+      return EFI_SUCCESS;
+    }
+    SiblingList = SiblingList->SiblingList;
+  };
+  return EFI_SUCCESS;
+}
+
+/**
+  The registration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+                                   e.g. "ServiceRoot/" - Managed by ServiceRoot feature driver
+                                        "ServiceRoot/Systems[]/" - Managed by ComputerSystemCollection feature driver
+                                        "ServiceRoot/Systems[1]/" - Managed by ComputerSystem feature driver
+                                        "ServiceRoot/Systems[2]/Bios/" - Managed by Bios feature driver
+  @param[in]   Callback            Callback routine associated with this registration that
+                                   provided by Redfish feature driver to execute the action
+                                   on Redfish resource which is managed by this Redfish
+                                   feature driver.
+  @param[in]   Context             The context of the registering feature driver. The pointer
+                                   to the conext is delivered through callback function.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval EFI_INVALID_PARAMETER    Improper given parameters or fail to register
+                                   feature driver.
+  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data structure.
+  @retval Others                   Some error happened.
+
+**/
+EFI_STATUS
+EFIAPI
+RedfishFeatureRegister (
+  IN EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN EFI_STRING                      FeatureManagedUri,
+  IN REDFISH_FEATURE_CALLBACK        Callback,
+  IN VOID                            *Context
+)
+{
+  CHAR16 NodeName [MaxNodeNameLength];
+  EFI_STATUS Status;
+  UINTN Index;
+  UINTN AnchorIndex;
+  UINTN UriLength;
+  REDFISH_FEATURE_INTERNAL_DATA *ThisUriNode;
+
+  if (FeatureManagedUri == NULL || Callback == NULL) {
+    DEBUG((DEBUG_ERROR, "%a: The given parameter is invalid\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+  //
+  // Walk through URI which managed by this EDK2 Redfish feature driver.
+  //
+  UriLength = StrLen (FeatureManagedUri) + 1; // Add one NULL for the last node.
+  Index = 0;
+  AnchorIndex = 0;
+  ThisUriNode = ResourceUriNodeList;
+  do {
+    if ((Index - AnchorIndex + 1) >= MaxNodeNameLength) { // Increase one for the NULL terminator
+      DEBUG((DEBUG_ERROR, "%a: the length of node name is >= MaxNodeNameLength\n", __FUNCTION__));
+      ASSERT (FALSE);
+    }
+    NodeName[Index - AnchorIndex] = *(FeatureManagedUri + Index);
+    if (NodeName [Index - AnchorIndex] == NodeSeperator || NodeName [Index - AnchorIndex] == (CHAR16)0) {
+      NodeName [Index - AnchorIndex] = 0;
+      AnchorIndex = Index + 1;
+      //
+      // Insert node
+      //
+      if (StrLen(NodeName) != 0) {
+        Status = InsertRedfishFeatureUriNode(ThisUriNode, NodeName, &ThisUriNode);
+        if (EFI_ERROR (Status)) {
+          return Status;
+        }
+      }
+    }
+    Index ++;
+  } while ((Index < UriLength));
+
+  if (ThisUriNode == NULL) {
+    //
+    // No URI node was created
+    //
+    DEBUG((DEBUG_ERROR, "%a: No URI node is added\n", __FUNCTION__));
+    return EFI_INVALID_PARAMETER;
+  }
+  //
+  // Add feature driver info to internal data instance.
+  //
+  ThisUriNode->Callback = Callback;
+  ThisUriNode->Context = Context;
+  return EFI_SUCCESS;
+}
+
+/**
+  The unregistration function for the Redfish Feature driver.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL instance.
+  @param[in]   FeatureManagedUri   The URI represents the hierarchy path of the Redfish
+                                   resource in the entire Redfish data model that managed
+                                   by Redfish feature driver . Each node in the hierarchy
+                                   path is the property name defined in the schema of the
+                                   resource.
+  @param[in]   Context             The context used for the previous feature driver
+                                   registration.
+  @retval EFI_SUCCESS              Redfish feature driver is registered successfully.
+  @retval Others                   Some error happened.
+
+**/
+EFI_STATUS
+RedfishFeatureUnregister (
+  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
+  IN     EFI_STRING                      FeatureManagedUri,
+  IN     VOID                            *Context
+)
+{
+  return EFI_UNSUPPORTED;
+}
+
+EDKII_REDFISH_FEATURE_PROTOCOL mRedfishFeatureProtocol = {
+  RedfishFeatureRegister,
+  RedfishFeatureUnregister
+};
+
+/**
+  Main entry for this driver.
+
+  @param ImageHandle     Image handle this driver.
+  @param SystemTable     Pointer to SystemTable.
+

@param[in] for above two paramters

+  @retval EFI_SUCESS     This function always complete successfully.
+
+**/
+EFI_STATUS
+EFIAPI
+RedfishFeatureCoreEntryPoint (
+  IN EFI_HANDLE         ImageHandle,
+  IN EFI_SYSTEM_TABLE   *SystemTable
+  )
+{
+  EFI_STATUS  Status;
+  EFI_HANDLE  Handle;
+  EFI_GUID *EventGuid;
+
+  Handle = NULL;
+  ResourceUriNodeList = NULL;
+  EventGuid = (EFI_GUID *)PcdGetPtr (PcdEdkIIRedfishFeatureDriverStartupEventGuid);
+
+  ZeroMem ((VOID *)&mFeatureDriverStartupContext, sizeof (REDFISH_FEATURE_STARTUP_CONTEXT));
+  mFeatureDriverStartupContext.This = &mRedfishFeatureProtocol;
+
+  Status = gBS->CreateEventEx (
+                EVT_NOTIFY_SIGNAL,
+                TPL_CALLBACK,
+                RedfishFeatureDriverStartup,
+                (CONST VOID *)&mFeatureDriverStartupContext,
+                EventGuid,
+                &mEdkIIRedfishFeatureDriverStartupEvent
+                );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Install the RedfishCredentialProtocol onto Handle.
+  //
+  Status = gBS->InstallMultipleProtocolInterfaces (
+                  &Handle,
+                  &gEdkIIRedfishFeatureProtocolGuid,
+                  &mRedfishFeatureProtocol,
+                  NULL
+                  );
+  return Status;
+}
diff --git a/RedfishClientPkg/Readme.md b/RedfishClientPkg/Readme.md
index 9e56fb9039..18a27633cf 100644
--- a/RedfishClientPkg/Readme.md
+++ b/RedfishClientPkg/Readme.md
@@ -119,6 +119,42 @@ struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL {
 For those Non-EDK2 HII-based platform configuration formats, the driver instance
 can provide its own implementation to get or set the platform configurations.
 
+### EDKII Redfish Feature Core DXE Driver ***[[12]](#[0])***
+EDKII Redfish Feature Core DXE driver provides the protocol interface to
+the auto-generated Redfish feature driver to register itself for the
+Redfish resource URI it manages.
+
+```C
+struct _EDKII_REDFISH_FEATURE_PROTOCOL {
+  REDFISH_FEATURE_REGISTER      Register;
+  REDFISH_FEATURE_UNREGISTER    Unregister;
+};
+```
+
+Redfish Feature Core DXE driver records the
+URI according to the URI hierarchy, and then it starts up the Redfish
+feature drivers based on the hierarchy when the particular event
+***[[11]](#[0])*** is triggered. This makes sure the upper-level Redfish
+resource is built up before the lower-level resource. For example,
+ComputerSystem resource must be ready before the Memory resource managed
+by MemoryCollection because the Memory resource is part of ComputerSystem
+resource.
+
+### Start-Up Event to Trigger EDKII Redfish Feature Core ***[[11]](#[0])***
+This is an EFI event for triggering EDKII Redfish Feature Core to travel
+URIs in the database and execute the callback that registered by Redfish feature
+drivers. The event GUID is defined in below PCD and is default set to
+**gEfiEventReadyToBootGuid**.
+
+```C
+PcdEdkIIRedfishFeatureDriverStartupEventGuid
+```
+
+This PCD can be overridden to any events based on the platform
+implementation. EDKII Redfish Feature Core can be triggered earlier,
+for example before the BDS or in the early DXE phase if the platform provides
+the EFI REST EX protocol which is available before the BDS phase.
+
 ### EDK2 HII VFR Form ***[[8]](#[0])***
 According to **UEFI spec 2.9 section 35.6 Form Browser Protocol**,
 **EFI_HII_REST_STYLE_FORMSET_GUID** is used on HII form to indicate that HII
-- 
2.17.1


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

* Re: [staging/edk2-redfish-client RedfishFeatureCore PATCH 3/3] RedfishClientPkg/Document: Update diagrams
  2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 3/3] RedfishClientPkg/Document: Update diagrams Abner Chang
@ 2021-08-08 12:55   ` Nickle Wang
  0 siblings, 0 replies; 8+ messages in thread
From: Nickle Wang @ 2021-08-08 12:55 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist), devel@edk2.groups.io; +Cc: Liming Gao

Reviewed-by: Nickle Wang <nickle.wang@hpe.com>

Thanks,
Nickle

-----Original Message-----
From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com> 
Sent: Tuesday, July 27, 2021 10:55 PM
To: devel@edk2.groups.io
Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: [staging/edk2-redfish-client RedfishFeatureCore PATCH 3/3] RedfishClientPkg/Document: Update diagrams

Update architectural diagrams.
You can skip reviewing this patch.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 .../Media/RedfishClientDriverStack.svg        | 197 ++++++++++++------
 1 file changed, 135 insertions(+), 62 deletions(-)

diff --git a/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg b/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg
index 881d9647e5..913c941e73 100644
--- a/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg
+++ b/RedfishClientPkg/Documents/Media/RedfishClientDriverStack.svg
@@ -3,7 +3,7 @@
 <!-- Generated by Microsoft Visio, SVG Export RedfishClientDriverStack.svg Page-2 -->  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
 		xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="12.1281in" height="9.93872in"
-		viewBox="0 0 873.222 715.588" xml:space="preserve" color-interpolation-filters="sRGB" class="st69">
+		viewBox="0 0 873.222 715.588" xml:space="preserve" 
+color-interpolation-filters="sRGB" class="st71">
 	<v:documentProperties v:langID="1033" v:viewMarkup="false">
 		<v:userDefs>
 			<v:ud v:nameU="msvNoAutoConnect" v:val="VT0(1):26"/> @@ -47,9 +47,9 @@
 		.st33 {stroke:#7f7f7f;stroke-linecap:round;stroke-linejoin:round;stroke-width:4.5}
 		.st34 {fill:#000000;fill-opacity:0.38;filter:url(#filter_3.3333334922791);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.38}
 		.st35 {fill:#000000;fill-opacity:0.38;stroke:#000000;stroke-opacity:0.38;stroke-width:0.22935779816514}
-		.st36 {fill:#f2f2f2;stroke:#7f7f7f;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
-		.st37 {fill:#7f7f7f;fill-opacity:1;stroke:#7f7f7f;stroke-opacity:1;stroke-width:0.22935779816514}
-		.st38 {fill:#d8d8d8;stroke:#7f7f7f;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
+		.st36 {fill:#f2f2f2;stroke:#ffff00;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.75}
+		.st37 {fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-opacity:1;stroke-width:0.22935779816514}
+		.st38 
+{fill:#d8d8d8;stroke:#ffff00;stroke-linecap:round;stroke-linejoin:round
+;stroke-width:0.75}
 		.st39 {fill:#ffffff;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}
 		.st40 {fill:#000000;fill-opacity:0.4;filter:url(#filter_3.3333334922791);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.4}
 		.st41 {fill:#0070c0;stroke:#003f6c;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5}
@@ -78,9 +78,11 @@
 		.st64 {marker-start:url(#mrkr4-405);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
 		.st65 {fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;stroke-width:0.3315649867374}
 		.st66 {marker-end:url(#mrkr4-411);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
-		.st67 {marker-end:url(#mrkr10-430);marker-start:url(#mrkr10-112);stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
+		.st67 
+{marker-end:url(#mrkr10-425);marker-start:url(#mrkr10-112);stroke:#0000
+00;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
 		.st68 {stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.25}
-		.st69 {fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}
+		.st69 {fill:#f59d56;stroke:none;stroke-linecap:butt;stroke-width:0.75}
+		.st70 {fill:#ffffff;stroke:#ffc000;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}
+		.st71 
+{fill:none;fill-rule:evenodd;font-size:12px;overflow:visible;stroke-lin
+ecap:square;stroke-miterlimit:3}
 	]]>
 	</style>
 
@@ -145,7 +147,7 @@
 				markerUnits="strokeWidth" overflow="visible">
 			<use xlink:href="#lend4" transform="scale(-3.016,-3.016) "/>
 		</marker>
-		<marker id="mrkr10-430" class="st24" v:arrowType="10" v:arrowSize="1" v:setback="1.542" refX="-1.542" orient="auto"
+		<marker id="mrkr10-425" class="st24" v:arrowType="10" v:arrowSize="1" v:setback="1.542" refX="-1.542" orient="auto"
 				markerUnits="strokeWidth" overflow="visible">
 			<use xlink:href="#lend10" transform="scale(-2.44,-2.44) "/>
 		</marker>
@@ -177,6 +179,7 @@
 		<title>Page-2</title>
 		<v:pageProperties v:drawingScale="1" v:pageScale="1" v:drawingUnits="19" v:shadowOffsetX="9" v:shadowOffsetY="-9"/>
 		<v:layer v:name="Connector" v:index="0"/>
+		<v:layer v:name="Flowchart" v:index="1"/>
 		<g id="shape52-3" v:mID="52" v:groupContext="shape" transform="translate(336.222,-197.713)">
 			<title>Rectangle.52</title>
 			<v:userDefs>
@@ -544,27 +547,27 @@
 			<title>Sheet.78</title>
 			<path d="M0 715.59 L810 715.59" class="st33"/>
 		</g>
-		<g id="group80-158" transform="translate(-173.49,382.875) rotate(-90)" v:mID="80" v:groupContext="group">
+		<g id="group80-158" transform="translate(-173.49,391.588) 
+rotate(-90)" v:mID="80" v:groupContext="group">
 			<v:userDefs>
 				<v:ud v:nameU="ControlDistFromCorner" v:prompt="" v:val="VT0(0.35355339059327):1"/>
 				<v:ud v:nameU="AngToControl" v:prompt="" v:val="VT0(0.78539816339745):32"/>
 				<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 				<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
-				<v:ud v:nameU="ControlDistFromCorner" v:prompt="" v:val="VT0(0.57622152858081):1"/>
-				<v:ud v:nameU="AngToControl" v:prompt="" v:val="VT0(0.70862627212768):32"/>
-				<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44270833333333):1"/>
-				<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.3794642857143):1"/>
+				<v:ud v:nameU="ControlDistFromCorner" v:prompt="" v:val="VT0(0.58312410958657):1"/>
+				<v:ud v:nameU="AngToControl" v:prompt="" v:val="VT0(0.72232731526223):32"/>
+				<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44100391727396):1"/>
+				<v:ud v:nameU="YFoldLength" v:prompt="" 
+v:val="VT0(0.38860997392129):1"/>
 			</v:userDefs>
 			<title>Folded Corner</title>
 			<g id="shape80-159" v:mID="80" v:groupContext="groupContent">
 				<g id="shadow80-160" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
-						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-3.105,-9.45175)" class="st10">
-					<path d="M0 715.59 L278.62 715.59 L310.5 688.27 L310.5 229.59 L0 229.59 L0 715.59 Z" class="st34"/>
+						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-3.19213,-9.45175)" class="st10">
+					<path d="M0 715.59 L287.46 715.59 L319.21 687.61 L319.21 229.59 L0 
+229.59 L0 715.59 Z" class="st34"/>
 				</g>
-				<path d="M0 715.59 L278.62 715.59 L310.5 688.27 L310.5 229.59 L0 229.59 L0 715.59 Z" class="st36"/>
+				<path d="M0 715.59 L287.46 715.59 L319.21 687.61 L319.21 229.59 L0 
+229.59 L0 715.59 Z" class="st36"/>
 			</g>
-			<g id="shape81-168" v:mID="81" v:groupContext="shape" transform="translate(278.625,0)">
+			<g id="shape81-168" v:mID="81" v:groupContext="shape" 
+transform="translate(287.46,0)">
 				<title>Sheet.81</title>
 				<v:userDefs>
 					<v:ud v:nameU="ControlX" v:prompt="" v:val="VT0(1):1"/> @@ -572,20 +575,20 @@
 					<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 					<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.25):1"/>
 					<v:ud v:nameU="FillForegnd" v:prompt="" v:val="VT0(1):26"/>
-					<v:ud v:nameU="ControlX" v:prompt="" v:val="VT0(3.9375):1"/>
+					<v:ud v:nameU="ControlX" v:prompt="" 
+v:val="VT0(4.0479846046172):1"/>
 					<v:ud v:nameU="ControlY" v:prompt="" v:val="VT0(0.4375):1"/>
-					<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44270833333333):1"/>
-					<v:ud v:nameU="YFoldLength" v:prompt="" v:val="VT0(0.3794642857143):1"/>
+					<v:ud v:nameU="XFoldLength" v:prompt="" v:val="VT0(0.44100391727396):1"/>
+					<v:ud v:nameU="YFoldLength" v:prompt="" 
+v:val="VT0(0.38860997392129):1"/>
 					<v:ud v:nameU="FillForegnd" v:prompt="" v:val="VT5(#f2f2f2)"/>
 				</v:userDefs>
 				<g id="shadow81-169" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
-						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-0.6375,-14.3117)" class="st10">
-					<path d="M0 715.59 L31.88 688.27 L4.87 684.09 L0 715.59 Z" class="st34"/>
+						v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-0.635046,-14.3117)" class="st10">
+					<path d="M0 715.59 L31.75 687.61 L3.99 684.09 L0 715.59 Z" 
+class="st34"/>
 				</g>
-				<path d="M0 715.59 L31.88 688.27 L4.87 684.09 L0 715.59 Z" class="st38"/>
+				<path d="M0 715.59 L31.75 687.61 L3.99 684.09 L0 715.59 Z" 
+class="st38"/>
 			</g>
 		</g>
-		<g id="group82-175" transform="translate(432.972,-530.713)" v:mID="82" v:groupContext="group">
+		<g id="group82-175" transform="translate(432.972,-567)" v:mID="82" 
+v:groupContext="group">
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
 			</v:userDefs>
@@ -607,7 +610,7 @@
 				<text x="11.84" y="681.09" class="st31" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>EDK2 HII <tspan
 							x="10.24" dy="1.2em" class="st5">Database</tspan></text>			</g>
 		</g>
-		<g id="shape84-182" v:mID="84" v:groupContext="shape" transform="translate(390.222,-429.463)">
+		<g id="shape84-182" v:mID="84" v:groupContext="shape" 
+transform="translate(390.222,-483.75)">
 			<title>Sheet.84</title>
 			<desc>EDKII REDFISH_PLATFORM_CONFIG_PROTOCOL</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/> @@ -619,26 +622,26 @@
 			<rect x="0" y="670.588" width="144" height="45" class="st41"/>
 			<text x="58.18" y="683.34" class="st20" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>EDKII <tspan
 						x="6" dy="1em" class="st5">REDFISH</tspan>_PLATFORM_CO<tspan x="26.68" dy="1em" class="st5">NFIG</tspan>_PROTOCOL</text>		</g>
-		<g id="shape85-190" v:mID="85" v:groupContext="shape" v:layerMember="0" transform="translate(1171.06,184.875) rotate(90)">
+		<g id="shape85-190" v:mID="85" v:groupContext="shape" 
+v:layerMember="0" transform="translate(1171.06,148.588) rotate(90)">
 			<title>1-D double.75</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M6.75 704.79 L6.75 702.09 L0 708.84 L6.75 715.59 L6.75 712.89 L49.5 712.89 L49.5 715.59 L56.25 708.84 L49.5
-						 702.09 L49.5 704.79 L6.75 704.79 Z" class="st39"/>
+			<path d="M6.75 704.79 L6.75 702.09 L0 708.84 L6.75 715.59 L6.75 712.89 L31.5 712.89 L31.5 715.59 L38.25 708.84 L31.5
+						 702.09 L31.5 704.79 L6.75 704.79 Z" class="st39"/>
 		</g>
-		<g id="shape86-192" v:mID="86" v:groupContext="shape" v:layerMember="0" transform="translate(1164.31,286.125) rotate(90)">
+		<g id="shape86-192" v:mID="86" v:groupContext="shape" 
+v:layerMember="0" transform="translate(1164.31,231.838) rotate(90)">
 			<title>1-D double.68</title>
 			<v:userDefs>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
 			<g id="shadow86-193" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
-					v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-1.1475,-14.0418)" class="st10">
-				<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L101.25 710.19 L101.25 715.59 L114.75 702.09
-							 L101.25 688.59 L101.25 693.99 L13.5 693.99 Z" class="st40"/>
+					v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-1.69037,-14.0418)" class="st10">
+				<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L155.54 710.19 L155.54 715.59 L169.04 702.09
+							 L155.54 688.59 L155.54 693.99 L13.5 693.99 Z" class="st40"/>
 			</g>
-			<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L101.25 710.19 L101.25 715.59 L114.75 702.09 L101.25
-						 688.59 L101.25 693.99 L13.5 693.99 Z" class="st39"/>
+			<path d="M13.5 693.99 L13.5 688.59 L0 702.09 L13.5 715.59 L13.5 710.19 L155.54 710.19 L155.54 715.59 L169.04 702.09 L155.54
+						 688.59 L155.54 693.99 L13.5 693.99 Z" class="st39"/>
 		</g>
 		<g id="shape87-197" v:mID="87" v:groupContext="shape" transform="translate(27.9724,-616.213)">
 			<title>Sheet.87</title>
@@ -701,7 +704,7 @@
 			<rect x="0" y="670.588" width="153" height="45" class="st19"/>
 			<text x="16.96" y="689.84" class="st20" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>Script-generated EDK2 <tspan
 						x="11.39" dy="1em" class="st5">Redfish Collection Driver</tspan></text>		</g>
-		<g id="shape98-229" v:mID="98" v:groupContext="shape" transform="translate(67.3474,-420.463)">
+		<g id="shape98-229" v:mID="98" v:groupContext="shape" 
+transform="translate(67.3474,-432)">
 			<title>Rounded Rectangle.98</title>
 			<desc>EDK2 HII UNI file #string STR_OPTION_A #language x-uefi-redfi...</desc>
 			<v:userDefs>
@@ -753,7 +756,7 @@
 						class="st48">  </tspan><tspan class="st50"> </tspan><tspan x="4" dy="1.312em" class="st50">“</tspan><tspan
 						class="st50">/</tspan><tspan class="st50">SCHEMA</tspan><tspan class="st50">/</tspan><tspan class="st50">PropertyC</tspan><tspan
 						class="st50">”</tspan><v:newlineChar/></text>		</g>
-		<g id="shape100-316" v:mID="100" v:groupContext="shape" transform="translate(171.972,-550.963)">
+		<g id="shape100-316" v:mID="100" v:groupContext="shape" 
+transform="translate(171.972,-560.812)">
 			<title>Rounded Rectangle.100</title>
 			<desc>EDK2 HII VFR Form Option A Enabled Option B Disabled Option C...</desc>
 			<v:userDefs>
@@ -783,7 +786,7 @@
 						x="24.37" dy="1.6em" class="st53">Option A        Enabled<v:newlineChar/></tspan><tspan x="24.6" dy="0.8em"
 						class="st53">Option B       Disabled<v:newlineChar/></tspan><tspan x="24.4" dy="0.8em" class="st53">Option C              </tspan><tspan
 						class="st53">0</tspan><tspan class="st53">x</tspan><tspan class="st53">16</tspan></text>		</g>
-		<g id="shape101-325" v:mID="101" v:groupContext="shape" transform="translate(147.222,-539.713)">
+		<g id="shape101-325" v:mID="101" v:groupContext="shape" 
+transform="translate(147.222,-549.562)">
 			<title>Rounded Rectangle.101</title>
 			<desc>EDK2 HII VFR Form Option A Enabled Option B Disabled Option C...</desc>
 			<v:userDefs>
@@ -813,7 +816,7 @@
 						x="24.37" dy="1.6em" class="st53">Option A        Enabled<v:newlineChar/></tspan><tspan x="24.6" dy="0.8em"
 						class="st53">Option B       Disabled<v:newlineChar/></tspan><tspan x="24.4" dy="0.8em" class="st53">Option C              </tspan><tspan
 						class="st53">0</tspan><tspan class="st53">x</tspan><tspan class="st53">16</tspan></text>		</g>
-		<g id="shape102-334" v:mID="102" v:groupContext="shape" transform="translate(129.222,-526.213)">
+		<g id="shape102-334" v:mID="102" v:groupContext="shape" 
+transform="translate(129.222,-536.063)">
 			<title>Rounded Rectangle</title>
 			<desc>EDK2 HII VFR Form Option A Enabled Option B Disabled Option C...</desc>
 			<v:userDefs>
@@ -845,14 +848,15 @@
 						x="24.4" dy="0.8em" class="st54">Option C              </tspan><tspan class="st55">0</tspan><tspan
 						class="st55">x</tspan><tspan class="st55">16</tspan></text>		</g>
 		<g id="shape110-345" v:mID="110" v:groupContext="shape" v:layerMember="0"
-				transform="translate(503.938,-444.613) rotate(13.0919)">
+				transform="translate(732.324,840.498) rotate(-33.0707) 
+scale(1,-1)">
 			<title>Curve connect 1.110</title>
 			<v:userDefs>
 				<v:ud v:nameU="Scale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M0 715.59 A11.592 11.592 0 0 1 22.97 715.59 A13.4718 13.4718 -180 0 0 48.31 719.9 L48.42 719.56" class="st56"/>
+			<path d="M0 715.59 A13.9015 13.9015 0 0 1 26.7 715.59 A16.1558 16.1558 -180 0 0 55.87 719.71 L56.02 719.38"
+					class="st56"/>
 		</g>
 		<g id="shape122-351" v:mID="122" v:groupContext="shape" transform="translate(41.4724,-96.4625)">
 			<title>Sheet.122</title>
@@ -889,21 +893,21 @@
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[5]</text>		</g>
-		<g id="shape127-366" v:mID="127" v:groupContext="shape" transform="translate(390.222,-476.713)">
+		<g id="shape127-366" v:mID="127" v:groupContext="shape" 
+transform="translate(390.222,-531)">
 			<title>Sheet.127</title>
 			<desc>[6]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[6]</text>		</g>
-		<g id="shape128-369" v:mID="128" v:groupContext="shape" transform="translate(123.597,-579.088)">
+		<g id="shape128-369" v:mID="128" v:groupContext="shape" 
+transform="translate(123.597,-588.937)">
 			<title>Sheet.128</title>
 			<desc>[8]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[8]</text>		</g>
-		<g id="shape129-372" v:mID="129" v:groupContext="shape" transform="translate(62.8474,-501.463)">
+		<g id="shape129-372" v:mID="129" v:groupContext="shape" 
+transform="translate(62.8474,-513)">
 			<title>Sheet.129</title>
 			<desc>[9]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/> @@ -954,7 +958,7 @@
 			<v:textRect cx="54" cy="702.088" width="108" height="27"/>
 			<rect x="0" y="688.588" width="108" height="27" class="st6"/>
 			<text x="9.97" y="704.34" class="st61" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>UEFI/EDK2 open source</text>		</g>
-		<g id="shape140-398" v:mID="140" v:groupContext="shape" transform="translate(281.66,-341.784)">
+		<g id="shape140-398" v:mID="140" v:groupContext="shape" 
+transform="translate(164.467,-339.75)">
 			<title>Configure</title>
 			<v:userDefs>
 				<v:ud v:nameU="msvShapeCategories" v:prompt="" v:val="VT4(Icon)"/> @@ -998,15 +1002,16 @@
 						 21.41 683.97 23.76 684.23 Z" class="st63"/>
 		</g>
 		<g id="shape145-400" v:mID="145" v:groupContext="shape" v:layerMember="0"
-				transform="translate(323.911,1069.28) scale(1,-1)">
+				transform="translate(205.698,1070.76) scale(1,-1)">
 			<title>Side to top/bottom.145</title>
 			<v:userDefs>
 				<v:ud v:nameU="TextPos" v:val="VT0(0):5"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M7.18 715.59 L7.54 715.59 L96.69 715.59 L96.69 668.4" class="st64"/>
+			<path d="M7.18 715.59 L7.54 715.59 L214.9 715.59 L214.9 669.89" 
+class="st64"/>
 		</g>
-		<g id="shape146-406" v:mID="146" v:groupContext="shape" v:layerMember="0" transform="translate(204.597,-382.144)">
+		<g id="shape146-406" v:mID="146" v:groupContext="shape" v:layerMember="0"
+				transform="translate(204.597,-380.109) scale(-1,1)">
 			<title>Bottom to top fixed 2</title>
 			<v:userDefs>
 				<v:ud v:nameU="TextPos" v:val="VT0(1):26"/> @@ -1015,31 +1020,23 @@
 				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M0 677.27 L0 697.59 L99.14 697.59 L99.14 708.05" class="st66"/>
+			<path d="M0 663.7 L0 697.59 L19.74 697.59 L19.74 708.05" 
+class="st66"/>
 		</g>
-		<g id="shape150-412" v:mID="150" v:groupContext="shape" v:layerMember="0" transform="translate(281.66,1070.51) rotate(180)">
-			<title>Side to top/bottom</title>
-			<v:userDefs>
-				<v:ud v:nameU="TextPos" v:val="VT0(0):5"/>
-				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
-			</v:userDefs>
-			<path d="M7.18 715.59 L7.54 715.59 L107.44 715.59 L107.44 669.64" class="st64"/>
-		</g>
-		<g id="shape152-417" v:mID="152" v:groupContext="shape" transform="translate(173.097,-359.713)">
+		<g id="shape152-412" v:mID="152" v:groupContext="shape" 
+transform="translate(56.0331,-368.928)">
 			<title>Sheet.152</title>
 			<desc>[10]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="22.5" cy="702.088" width="45" height="27"/>
 			<rect x="0" y="688.588" width="45" height="27" class="st6"/>
 			<text x="12.52" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[10]</text>		</g>
-		<g id="shape153-420" v:mID="153" v:groupContext="shape" transform="translate(186.597,-359.713)">
+		<g id="shape153-415" v:mID="153" v:groupContext="shape" 
+transform="translate(69.4044,-368.928)">
 			<title>Sheet.153</title>
 			<desc>EDK2 Build Tool</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="54" cy="702.088" width="108" height="27"/>
 			<rect x="0" y="688.588" width="108" height="27" class="st6"/>
 			<text x="21.18" y="704.59" class="st22" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>EDK2 Build Tool</text>		</g>
-		<g id="shape95-423" v:mID="95" v:groupContext="shape" v:layerMember="0"
+		<g id="shape95-418" v:mID="95" v:groupContext="shape" v:layerMember="0"
 				transform="translate(479.651,-242.34) rotate(-1.84761)">
 			<title>Curve connect 2</title>
 			<v:userDefs>
@@ -1047,22 +1044,98 @@
 			</v:userDefs>
 			<path d="M1.08 713.99 L1.29 713.7 A41.432 41.432 0 0 1 68.5 713.7 L68.7 713.99" class="st67"/>
 		</g>
-		<g id="shape154-431" v:mID="154" v:groupContext="shape" transform="translate(546.597,-607.213)">
+		<g id="shape154-426" v:mID="154" v:groupContext="shape" 
+transform="translate(546.597,-607.213)">
 			<title>Sheet.154</title>
 			<desc>[7]</desc>
 			<v:textBlock v:margins="rect(4,4,4,4)"/>
 			<v:textRect cx="12.375" cy="702.088" width="24.75" height="27"/>
 			<rect x="0" y="688.588" width="24.75" height="27" class="st6"/>
 			<text x="5.44" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[7]</text>		</g>
-		<g id="shape155-434" v:mID="155" v:groupContext="shape" v:layerMember="0"
-				transform="translate(919.083,249.319) rotate(-86.8202) scale(1,-1)">
+		<g id="shape155-429" v:mID="155" v:groupContext="shape" v:layerMember="0"
+				transform="translate(918.874,241.377) rotate(-86.5318) 
+scale(1,-1)">
 			<title>Curve connect 1.155</title>
 			<v:userDefs>
 				<v:ud v:nameU="Scale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
 				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
 			</v:userDefs>
-			<path d="M0 715.59 A6.2366 6.2366 0 0 1 11.73 715.59 A4.54475 4.54475 -180 0 0 20.28 715.59" class="st68"/>
+			<path d="M0 715.59 A5.57145 5.57145 0 0 1 10.76 715.59 A4.06004 4.06004 -180 0 0 18.6 715.59" class="st68"/>
+		</g>
+		<g id="shape294-432" v:mID="294" v:groupContext="shape" transform="translate(279,-387)">
+			<title>Sheet.294</title>
+			<desc>Redfish Feature Core DXE</desc>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="72" cy="702.088" width="144" height="27"/>
+			<g id="shadow294-433" v:groupContext="shadow" v:shadowOffsetX="7.2E-008" v:shadowOffsetY="0" v:shadowType="1"
+					v:shadowScale="1.02" transform="matrix(1.02,0,0,1.02,-1.44,-14.0418)" class="st10">
+				<rect x="0" y="688.588" width="144" height="27" class="st40"/>
+			</g>
+			<rect x="0" y="688.588" width="144" height="27" class="st41"/>
+			<text x="4.61" y="705.34" class="st20" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>Redfish Feature Core DXE</text>		</g>
+		<g id="shape296-438" v:mID="296" v:groupContext="shape" v:layerMember="0" transform="translate(174.222,-314.713)">
+			<title>Bottom to top fixed 2.296</title>
+			<v:userDefs>
+				<v:ud v:nameU="TextPos" v:val="VT0(1):26"/>
+				<v:ud v:nameU="Offset" v:val="VT0(0.25):0"/>
+				<v:ud v:nameU="Scale" v:val="VT0(1):26"/>
+				<v:ud v:nameU="AntiScale" v:val="VT0(1):26"/>
+				<v:ud v:nameU="visVersion" v:val="VT0(15):26"/>
+			</v:userDefs>
+			<path d="M0 715.59 L0 697.59 L10.5 697.59 L10.5 693.32" class="st66"/>
+		</g>
+		<g id="shape298-443" v:mID="298" v:groupContext="shape" transform="translate(427.5,-389.25)">
+			<title>Forward</title>
+			<v:userDefs>
+				<v:ud v:nameU="msvShapeCategories" v:prompt="" v:val="VT4(Icon)"/>
+				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
+			</v:userDefs>
+			<path d="M0 698.71 L0 709.96 L11.25 709.96 L11.25 715.59 L24.75 704.36 L11.25 693.09 L11.25 698.71 L0 698.71 Z"
+					class="st69"/>
+		</g>
+		<g id="shape303-445" v:mID="303" v:groupContext="shape" transform="translate(216,-378)">
+			<title>16-Point Star</title>
+			<desc>Event Trigger</desc>
+			<v:userDefs>
+				<v:ud v:nameU="CtrlYOffset" v:prompt="" v:val="VT0(0.5):1"/>
+				<v:ud v:nameU="CtrlXOffset" v:prompt="" v:val="VT0(0.099456183689829):1"/>
+				<v:ud v:nameU="CtrlAngle" v:prompt="" v:val="VT0(0.19634954084936):26"/>
+				<v:ud v:nameU="ElbowDist" v:prompt="" v:val="VT0(0.50979557910416):1"/>
+				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
+				<v:ud v:nameU="CtrlYOffset" v:prompt="" v:val="VT0(0.25):1"/>
+				<v:ud v:nameU="CtrlXOffset" v:prompt="" v:val="VT0(0.049728091844915):1"/>
+				<v:ud v:nameU="ElbowDist" v:prompt="" v:val="VT0(0.25489778955208):1"/>
+			</v:userDefs>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="22.5" cy="693.088" width="45" height="45"/>
+			<path d="M22.5 670.59 L26.08 675.09 L31.11 672.3 L32.7 677.83 L38.41 677.18 L37.76 682.89 L43.29 684.48 L40.5 689.51
+						 L45 693.09 L40.5 696.67 L43.29 701.7 L37.76 703.28 L38.41 709 L32.7 708.35 L31.11 713.87 L26.08 711.09 L22.5
+						 715.59 L18.92 711.09 L13.89 713.87 L12.3 708.35 L6.59 709 L7.24 703.28 L1.71 701.7 L4.5 696.67 L0 693.09
+						 L4.5 689.51 L1.71 684.48 L7.24 682.89 L6.59 677.18 L12.3 677.83 L13.89 672.3 L18.92 675.09 L22.5 670.59
+						 Z" class="st70"/>
+			<text x="11.01" y="690.09" class="st31" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Event <v:lf/><tspan
+						x="8.23" dy="1.2em" class="st5">Trigger</tspan></text>		</g>
+		<g id="shape304-449" v:mID="304" v:groupContext="shape" transform="translate(238.5,-360)">
+			<title>Sheet.304</title>
+			<desc>[11]</desc>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="22.5" cy="702.088" width="45" height="27"/>
+			<rect x="0" y="688.588" width="45" height="27" class="st6"/>
+			<text x="12.52" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[11]</text>		</g>
+		<g id="shape305-452" v:mID="305" v:groupContext="shape" transform="translate(400.5,-407.25)">
+			<title>Sheet.305</title>
+			<desc>[12]</desc>
+			<v:textBlock v:margins="rect(4,4,4,4)"/>
+			<v:textRect cx="22.5" cy="702.088" width="45" height="27"/>
+			<rect x="0" y="688.588" width="45" height="27" class="st6"/>
+			<text x="12.52" y="705.09" class="st7" v:langID="1033"><v:paragraph v:spLine="-1" v:horizAlign="1"/><v:tabList/>[12]</text>		</g>
+		<g id="shape307-455" v:mID="307" v:groupContext="shape" transform="translate(262.125,-392.932)">
+			<title>Forward.307</title>
+			<v:userDefs>
+				<v:ud v:nameU="msvShapeCategories" v:prompt="" v:val="VT4(Icon)"/>
+				<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
+			</v:userDefs>
+			<path d="M0 704.85 L0 712.01 L7.16 712.01 L7.16 715.59 L15.75 708.44 L7.16 701.27 L7.16 704.85 L0 704.85 Z"
+					class="st69"/>
 		</g>
 	</g>
 </svg>
--
2.17.1


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

* Re: [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver
  2021-08-08 12:54   ` Nickle Wang
@ 2021-08-11  3:35     ` Abner Chang
  0 siblings, 0 replies; 8+ messages in thread
From: Abner Chang @ 2021-08-11  3:35 UTC (permalink / raw)
  To: Wang, Nickle (HPS SW), devel@edk2.groups.io; +Cc: Liming Gao

Thanks
All issues were addressed before merged to edk2-staging edk2-redfish-clinet branch.
Abner

> -----Original Message-----
> From: Wang, Nickle (HPS SW)
> Sent: Sunday, August 8, 2021 8:55 PM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> devel@edk2.groups.io
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Subject: RE: [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3]
> RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver
> 
> Minor issue as inline below.
> 
> Thanks,
> Nickle
> 
> -----Original Message-----
> From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Sent: Tuesday, July 27, 2021 10:55 PM
> To: devel@edk2.groups.io
> Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> Subject: [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3]
> RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver
> 
> EDKII Redfish Feature Core DXE driver provides the protocol interface to
> the auto-generated Redfish feature driver to register itself for the
> Redfish resource URI it manages. Refer to the Readme.md for the details.
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> ---
>  RedfishClientPkg/RedfishClientPkg.dec         |  13 +-
>  .../RedfishClientComponents.dsc.inc           |   2 +
>  RedfishClientPkg/RedfishClient.fdf.inc        |   1 +
>  .../RedfishFeatureCoreDxe.inf                 |  49 +++
>  .../Include/Protocol/EdkIIRedfishFeature.h    | 116 ++++++
>  .../RedfishFeatureCoreDxe.h                   |  43 ++
>  .../RedfishFeatureCoreDxe.c                   | 382 ++++++++++++++++++
>  RedfishClientPkg/Readme.md                    |  36 ++
>  8 files changed, 641 insertions(+), 1 deletion(-)
>  create mode 100644
> RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
>  create mode 100644
> RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
>  create mode 100644
> RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
>  create mode 100644
> RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> 
> diff --git a/RedfishClientPkg/RedfishClientPkg.dec
> b/RedfishClientPkg/RedfishClientPkg.dec
> index 4038a47bd5..6da0468e65 100644
> --- a/RedfishClientPkg/RedfishClientPkg.dec
> +++ b/RedfishClientPkg/RedfishClientPkg.dec
> @@ -15,10 +15,21 @@
>  [Includes]
>    Include
> 
> -
>  [LibraryClasses]
> 
>  [Protocols]
> +  ## Include/Protocol/EdkIIRedfishFeature.h
> +  gEdkIIRedfishFeatureProtocolGuid = { 0x785CC694, 0x4930, 0xEFBF, { 0x2A,
> 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } }
> 
>  [Guids]
>    gEfiRedfishClientPkgTokenSpaceGuid    = { 0x8c444dae, 0x728b, 0x48ee,
> { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } }
> +
> +[PcdsFixedAtBuild]
> +
> gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|
> UINT32|0x10000001
> +
> gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8|
> UINT32|0x10000002
> +  #
> +  # gEfiEventReadyToBootGuid is the default event to startup Redfish
> feature drivers.
> +  # { 0x7CE88FB3, 0x4BD7, 0x4679, { 0x87, 0xA8, 0xA8, 0xD8, 0xDE, 0xE5, 0x0D,
> 0x2B }}
> +  #
> +
> gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupE
> ventGuid|{0xB3, 0x8F, 0xE8, 0x7C, 0xD7, 0x4B, 0x79, 0x46, 0x87, 0xA8, 0xA8,
> 0xD8, 0xDE, 0xE5, 0x0D, 0x2B}|VOID*|0x10000003
> +
> diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc
> b/RedfishClientPkg/RedfishClientComponents.dsc.inc
> index 0648fa9d54..e4e2619bfb 100644
> --- a/RedfishClientPkg/RedfishClientComponents.dsc.inc
> +++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
> @@ -13,4 +13,6 @@
>  ##
> 
>  !if $(REDFISH_CLIENT) == TRUE
> +  RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
>  !endif
> +
> diff --git a/RedfishClientPkg/RedfishClient.fdf.inc
> b/RedfishClientPkg/RedfishClient.fdf.inc
> index 4f0714004e..d4c5874787 100644
> --- a/RedfishClientPkg/RedfishClient.fdf.inc
> +++ b/RedfishClientPkg/RedfishClient.fdf.inc
> @@ -11,4 +11,5 @@
>  #
>  ##
>  !if $(REDFISH_CLIENT) == TRUE
> +  INF RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
>  !endif
> diff --git
> a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
> b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
> new file mode 100644
> index 0000000000..5a2cd7fecc
> --- /dev/null
> +++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
> @@ -0,0 +1,49 @@
> +## @file
> +#  RedfishFeatureCoreDxe is the DXE driver which provides
> +#  EdkIIRedfishFeatureCoreProtocol to EDK2 Redfish Feature
> +#  drivers for the registration.
> +#
> +#  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION                    = 0x0001000b
> +  BASE_NAME                      = RedfishFeatureCoreDxe
> +  FILE_GUID                      = 1E01A624-4161-F1F1-25BC-D28E77420D8E
> +  MODULE_TYPE                    = DXE_DRIVER
> +  VERSION_STRING                 = 1.0
> +  ENTRY_POINT                    = RedfishFeatureCoreEntryPoint
> +
> +#
> +#  VALID_ARCHITECTURES           = IA32 X64 ARM AARCH64 RISCV64
> +#
> +
> +[Sources]
> +  RedfishFeatureCoreDxe.c
> +  RedfishFeatureCoreDxe.h
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  RedfishClientPkg/RedfishClientPkg.dec
> +
> +[LibraryClasses]
> +  BaseLib
> +  BaseMemoryLib
> +  DebugLib
> +  MemoryAllocationLib
> +  PrintLib
> +  UefiBootServicesTableLib
> +  UefiDriverEntryPoint
> +  UefiLib
> +
> +[Protocols]
> +  gEdkIIRedfishFeatureProtocolGuid    ## BY_START
> +
> +[Pcd]
> +
> gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupE
> ventGuid
> +
> +[Depex]
> +  TRUE
> diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
> b/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
> new file mode 100644
> index 0000000000..036622128d
> --- /dev/null
> +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishFeature.h
> @@ -0,0 +1,116 @@
> +/** @file
> +  This file defines the EDKII_REDFISH_FEATURE_PROTOCOL interface.
> +
> +  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef EDKII_REDFISH_FEATURE_H_
> +#define EDKII_REDFISH_FEATURE_H_
> +
> +typedef struct _EDKII_REDFISH_FEATURE_PROTOCOL
> EDKII_REDFISH_FEATURE_PROTOCOL;
> +
> +#define EDKII_REDFISH_FEATURE_PROTOCOL_GUID \
> +    {  \
> +      0x785CC694, 0x4930, 0xEFBF, { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA,
> 0x34 }  \
> +    }
> +
> +typedef enum {
> +  CallbackActionNone = 0,       ///< Invalid action
> +  CallbackActionStartOperation, ///< Start the operations on Redfish
> resource
> +  CallbackActionMax
> +} FEATURE_CALLBACK_ACTION;
> +
> +typedef enum {
> +  InformationTypeNone = 0,            ///< Invalid information.
> +  InformationTypeCollectionMemberUri, ///< URI to the new created
> collection member.
> +  InformationTypeMax
> +} FEATURE_RETURNED_INFORMATION_TYPE;
> +
> +typedef struct {
> +  FEATURE_RETURNED_INFORMATION_TYPE Type;
> +} FEATURE_RETURNED_INFORMATION;
> +
> +/**
> +  The callback function provided by Redfish Feature driver.
> +
> +  @param[in]     This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL
> instance.
> +  @param[in]     FeatureAction       The action Redfish feature driver should
> take.
> +  @param[in]     Context             The context of Redfish feature driver.
> +  @param[in,out] InformationReturned The pointer to retrive the pointer to
> +                                     FEATURE_RETURNED_INFOMATION. The memory block
> of this
> +                                     information should be freed by caller.
> +
> +  @retval EFI_SUCCESS              Redfish feature driver callback is executed
> successfully.
> +  @retval Others                   Some errors happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *REDFISH_FEATURE_CALLBACK) (
> +  IN     EDKII_REDFISH_FEATURE_PROTOCOL *This,
> +  IN     FEATURE_CALLBACK_ACTION        FeatureAction,
> +  IN     VOID                           *Context,
> +  IN OUT FEATURE_RETURNED_INFORMATION   **InformationReturned
> +);
> +/**
> +  The registration function for the Redfish Feature driver.
> +
> +  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL
> instance.
> +  @param[in]   FeatureManagedUri   The URI represents the hierarchy path
> of the Redfish
> +                                   resource in the entire Redfish data model that managed
> +                                   by Redfish feature driver . Each node in the hierarchy
> +                                   path is the property name defined in the schema of the
> +                                   resource.
> +  @param[in]   Callback            Callback routine associated with this
> registration that
> +                                   provided by Redfish feature driver to execute the action
> +                                   on Redfish resource which is managed by this Redfish
> +                                   feature driver.
> +  @param[in]   Context             The context of the registering feature driver.
> The pointer
> +                                   to the conext is delivered through callback function.
> +  @retval EFI_SUCCESS              Redfish feature driver is registered
> successfully.
> +  @retval Others                   Some error happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *REDFISH_FEATURE_REGISTER) (
> +  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
> +  IN     EFI_STRING                      FeatureManagedUri,
> +  IN     REDFISH_FEATURE_CALLBACK        Callback,
> +  IN     VOID                            *Context
> +);
> +
> +/**
> +  The unregistration function for the Redfish Feature driver.
> +
> +  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL
> instance.
> +  @param[in]   FeatureManagedUri   The URI represents the hierarchy path
> of the Redfish
> +                                   resource in the entire Redfish data model that managed
> +                                   by Redfish feature driver . Each node in the hierarchy
> +                                   path is the property name defined in the schema of the
> +                                   resource.
> +  @param[in]   Context             The context used for the previous feature
> driver
> +                                   registration.
> +  @retval EFI_SUCCESS              Redfish feature driver is registered
> successfully.
> +  @retval Others                   Some error happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *REDFISH_FEATURE_UNREGISTER) (
> +  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
> +  IN     EFI_STRING                      FeatureManagedUri,
> +  IN     VOID                            *Context
> +);
> +
> +struct _EDKII_REDFISH_FEATURE_PROTOCOL {
> +  REDFISH_FEATURE_REGISTER      Register;
> +  REDFISH_FEATURE_UNREGISTER    Unregister;
> +};
> +
> +extern EFI_GUID gEdkIIRedfishFeatureProtocolGuid;
> +
> +#endif
> diff --git
> a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
> b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
> new file mode 100644
> index 0000000000..7b1778b038
> --- /dev/null
> +++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.h
> @@ -0,0 +1,43 @@
> +/** @file
> +  Definitions of RedfishFeatureCoreDxe
> +
> +  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +#ifndef EDKII_REDFISH_FEATURE_CORE_DXE_H_
> +#define EDKII_REDFISH_FEATURE_CORE_DXE_H_
> +
> +#include <Protocol/EdkIIRedfishFeature.h>
> +
> +#include <Base.h>
> +#include <Library/BaseLib.h>
> +#include <Library/BaseMemoryLib.h>
> +#include <Library/DebugLib.h>
> +#include <Library/MemoryAllocationLib.h>
> +#include <Library/PrintLib.h>
> +#include <Library/UefiBootServicesTableLib.h>
> +
> +#define MaxNodeNameLength 64
> +#define NodeSeperator L'/'
> +#define NodeIsCollectionLeftBracket '{'
> +#define NodeIsCollectionRightBracket '}'
> +
> +typedef struct _REDFISH_FEATURE_INTERNAL_DATA
> REDFISH_FEATURE_INTERNAL_DATA;
> +struct _REDFISH_FEATURE_INTERNAL_DATA {
> +  REDFISH_FEATURE_INTERNAL_DATA *SiblingList; ///< Next same level in
> hierarchy of resource URI.
> +  REDFISH_FEATURE_INTERNAL_DATA *ChildList;   ///< Next level in
> hierarchy of resource URI.
> +  EFI_STRING               NodeName;    ///< Name of the node in hierarchy of
> resource URI.
> +  REDFISH_FEATURE_CALLBACK Callback;    ///< Callback function of Redfish
> feature driver.
> +  VOID                     *Context;    ///< Context of feature driver.
> +  FEATURE_RETURNED_INFORMATION *ReturnedInformation; ///<
> Information returned from Redfish feature driver.
> +  UINT32         Flags;
> +};
> +#define REDFISH_FEATURE_INTERNAL_DATA_IS_COLLECTION 0x00000001
> +
> +typedef struct {
> +  EDKII_REDFISH_FEATURE_PROTOCOL *This;
> +  FEATURE_CALLBACK_ACTION Action;
> +} REDFISH_FEATURE_STARTUP_CONTEXT;
> +#endif
> diff --git
> a/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> new file mode 100644
> index 0000000000..e5dcc3de8e
> --- /dev/null
> +++ b/RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.c
> @@ -0,0 +1,382 @@
> +/** @file
> +  RedfishFeatureCoreDxe produces EdkIIRedfishFeatureCoreProtocol
> +  for EDK2 Redfish Feature driver registration.
> +
> +  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include <RedfishFeatureCoreDxe.h>
> +
> +EFI_EVENT mEdkIIRedfishFeatureDriverStartupEvent;
> +REDFISH_FEATURE_STARTUP_CONTEXT mFeatureDriverStartupContext;
> +REDFISH_FEATURE_INTERNAL_DATA *ResourceUriNodeList;
> +
> +/**
> +  Startup child feature drivers and it's sibing feature drivers.
> +
> +  @param[in]  HeadList              Head list of this feature driver
> +  @param[in]  ThisFeatureDriverList This feature driver list.
> +  @param[in]  StartupContext        Start up information
> +
> +**/
> 
> Function header mismatch here. HeadList is not a function parameter as
> below.
> 
> +VOID
> +StartUpFeatureDriver (
> +  IN REDFISH_FEATURE_INTERNAL_DATA *ThisFeatureDriverList,
> +  IN REDFISH_FEATURE_STARTUP_CONTEXT *StartupContext
> +)
> +{
> +  EFI_STATUS Status;
> +  REDFISH_FEATURE_INTERNAL_DATA *ThisList;
> +
> +  ThisList = ThisFeatureDriverList;
> +  while (TRUE) {
> +    if (ThisList->Callback != NULL) {
> +      Status = ThisList->Callback(
> +                           StartupContext->This,
> +                           StartupContext->Action,
> +                           ThisList->Context,
> +                           &ThisList->ReturnedInformation
> +                           );
> +      if (EFI_ERROR (Status)) {
> +        DEBUG((DEBUG_ERROR, "%a: Callback to EDK2 Redfish feature driver
> fail.", __FUNCTION__));
> +      }
> +    }
> +    if (ThisList->ChildList != NULL) {
> +      StartUpFeatureDriver (ThisList->ChildList, StartupContext);
> +    }
> +    //
> +    // Check sibling Redfish feature driver.
> +    //
> +    if (ThisList->SiblingList == NULL) {
> +      break;
> +    }
> +    //
> +    // Go next sibling Redfish feature driver.
> +    //
> +    ThisList = ThisList->SiblingList;
> +  };
> +}
> +
> +/**
> +  Callback routine when mEdkIIRedfishFeatureDriverStartupEvent
> +  is signaled.
> +
> +  @param[in]  Event                 Event whose notification function is being
> invoked.
> +  @param[in]  Context               The pointer to the notification function's
> context,
> +                                    which is implementation-dependent.
> +
> +**/
> +VOID
> +RedfishFeatureDriverStartup(
> +  IN  EFI_EVENT                Event,
> +  IN  VOID                     *Context
> +  )
> +{
> +  REDFISH_FEATURE_STARTUP_CONTEXT *StartupContext;
> +
> +  StartupContext = (REDFISH_FEATURE_STARTUP_CONTEXT *)Context;
> +  //
> +  // Invoke EDK2 Redfish feature driver callback to start up
> +  // the Redfish operations.
> +  //
> +  if (ResourceUriNodeList == NULL) {
> +    return;
> +  }
> +  //
> +  // Invoke the callback by the hierarchy level
> +  //
> +  StartUpFeatureDriver (ResourceUriNodeList, StartupContext);
> +}
> +
> +/**
> +  Create new internal data instance.
> +
> +  @param[in,out] PtrToNewInternalData  Pointer to receive new instance of
> +                                       REDFISH_FEATURE_INTERNAL_DATA.
> +  @param[in]     NodeName              Name of URI node.
> +
> +  @retval EFI_SUCCESS              New entry is inserted successfully.
> +  @retval EFI_INVALID_PARAMETER    Improper given parameters.
> +  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data
> structure.
> +
> +**/
> +EFI_STATUS
> +NewInternalInstance (
> +  IN OUT REDFISH_FEATURE_INTERNAL_DATA **PtrToNewInternalData,
> +  IN EFI_STRING NodeName
> +  )
> +{
> +  REDFISH_FEATURE_INTERNAL_DATA *NewInternalData;
> +
> +  if (PtrToNewInternalData == NULL || NodeName == NULL) {
> +    DEBUG((DEBUG_ERROR, "%a: Inproper given parameters\n",
> __FUNCTION__));
> +    return EFI_INVALID_PARAMETER;
> +  }
> +
> +  *PtrToNewInternalData = NULL;
> +  NewInternalData = AllocateZeroPool (sizeof
> (REDFISH_FEATURE_INTERNAL_DATA));
> +  if (NewInternalData == NULL) {
> +    DEBUG((DEBUG_ERROR, "%a: No memory for
> REDFISH_FEATURE_INTERNAL_DATA\n", __FUNCTION__));
> +    return EFI_OUT_OF_RESOURCES;
> +  }
> +  NewInternalData->NodeName = AllocateZeroPool (StrSize (NodeName));
> +  StrnCpyS (NewInternalData->NodeName, StrSize (NodeName), (CONST
> CHAR16 *)NodeName, StrLen (NodeName));
> +  NewInternalData->SiblingList = NULL;
> +  NewInternalData->ChildList = NULL;
> +  if (NodeName[0] == (UINT16)NodeIsCollectionLeftBracket &&
> +      NodeName [StrLen (NodeName) - 1] ==
> (UINT16)NodeIsCollectionRightBracket) {
> +    NewInternalData->Flags |=
> REDFISH_FEATURE_INTERNAL_DATA_IS_COLLECTION;
> +  }
> +  *PtrToNewInternalData = NewInternalData;
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  Insert the URI node into internal data structure
> +
> +  @param[in]   HeadEntryToInsert  The head entry to start the searching.
> +  @param[in]   NodeName           Name of URI node.
> +  @param[in]   NextNodeEntry      Pointer to receive the pointer of next
> head
> +                                  entry for inserting the follow up nodes.
> +                                  The returned LIST_ENTRY is the address of
> +                                  ChildList link list.
> 
> This is [in, out] according to below function header.
> 
> +  @retval EFI_SUCCESS              New entry is inserted successfully.
> +  @retval EFI_INVALID_PARAMETER    Improper given parameters.
> +  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data
> structure.
> +
> +**/
> +EFI_STATUS
> +InsertRedfishFeatureUriNode (
> +  IN REDFISH_FEATURE_INTERNAL_DATA      *HeadEntryToInsert,
> +  IN EFI_STRING                         NodeName,
> +  IN OUT REDFISH_FEATURE_INTERNAL_DATA  **NextNodeEntry
> +  )
> +{
> +  EFI_STATUS Status;
> +  REDFISH_FEATURE_INTERNAL_DATA *NewInternalData;
> +  REDFISH_FEATURE_INTERNAL_DATA *ThisInternalData;
> +  REDFISH_FEATURE_INTERNAL_DATA *SiblingList;
> +
> +  if (NodeName == NULL) {
> +    DEBUG((DEBUG_ERROR, "%a: Node name is NULL.\n", __FUNCTION__));
> +    return EFI_INVALID_PARAMETER;
> +  }
> +  if (NextNodeEntry == NULL) {
> +    DEBUG((DEBUG_ERROR, "%a: NextNodeEntry can't be NULL.\n",
> __FUNCTION__));
> +    return EFI_INVALID_PARAMETER;
> +  }
> +
> +  if (HeadEntryToInsert == NULL || HeadEntryToInsert->ChildList == NULL) {
> +    Status = NewInternalInstance (&NewInternalData, NodeName);
> +    if (EFI_ERROR (Status)) {
> +      return Status;
> +    }
> +    if (HeadEntryToInsert == NULL) {
> +      ResourceUriNodeList = NewInternalData;
> +    } else {
> +      HeadEntryToInsert->ChildList = NewInternalData;
> +    }
> +    *NextNodeEntry = NewInternalData;
> +    return EFI_SUCCESS;
> +  }
> +  //
> +  // Go through sibling list to find the entry.
> +  //
> +  ThisInternalData = HeadEntryToInsert;
> +  SiblingList = ThisInternalData->SiblingList;
> +  while (TRUE) {
> +    if (StrCmp((CONST CHAR16 *)ThisInternalData->NodeName, (CONST
> CHAR16 *)NodeName) == 0) {
> +      *NextNodeEntry = ThisInternalData->ChildList;
> +      return EFI_SUCCESS;
> +    }
> +    //
> +    // If sibing exist?
> +    //
> +    if (SiblingList == NULL) {
> +      Status = NewInternalInstance (&NewInternalData, NodeName);
> +      if (EFI_ERROR (Status)) {
> +        return Status;
> +      }
> +      ThisInternalData->SiblingList = NewInternalData;
> +      *NextNodeEntry = NewInternalData->ChildList;
> +      return EFI_SUCCESS;
> +    }
> +    SiblingList = SiblingList->SiblingList;
> +  };
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  The registration function for the Redfish Feature driver.
> +
> +  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL
> instance.
> +  @param[in]   FeatureManagedUri   The URI represents the hierarchy path
> of the Redfish
> +                                   resource in the entire Redfish data model that managed
> +                                   by Redfish feature driver . Each node in the hierarchy
> +                                   path is the property name defined in the schema of the
> +                                   resource.
> +                                   e.g. "ServiceRoot/" - Managed by ServiceRoot feature
> driver
> +                                        "ServiceRoot/Systems[]/" - Managed by
> ComputerSystemCollection feature driver
> +                                        "ServiceRoot/Systems[1]/" - Managed by
> ComputerSystem feature driver
> +                                        "ServiceRoot/Systems[2]/Bios/" - Managed by Bios
> feature driver
> +  @param[in]   Callback            Callback routine associated with this
> registration that
> +                                   provided by Redfish feature driver to execute the action
> +                                   on Redfish resource which is managed by this Redfish
> +                                   feature driver.
> +  @param[in]   Context             The context of the registering feature driver.
> The pointer
> +                                   to the conext is delivered through callback function.
> +  @retval EFI_SUCCESS              Redfish feature driver is registered
> successfully.
> +  @retval EFI_SUCCESS              Redfish feature driver is registered
> successfully.
> +  @retval EFI_INVALID_PARAMETER    Improper given parameters or fail to
> register
> +                                   feature driver.
> +  @retval EFI_OUT_OF_RESOURCES     Lack of memory for the internal data
> structure.
> +  @retval Others                   Some error happened.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +RedfishFeatureRegister (
> +  IN EDKII_REDFISH_FEATURE_PROTOCOL  *This,
> +  IN EFI_STRING                      FeatureManagedUri,
> +  IN REDFISH_FEATURE_CALLBACK        Callback,
> +  IN VOID                            *Context
> +)
> +{
> +  CHAR16 NodeName [MaxNodeNameLength];
> +  EFI_STATUS Status;
> +  UINTN Index;
> +  UINTN AnchorIndex;
> +  UINTN UriLength;
> +  REDFISH_FEATURE_INTERNAL_DATA *ThisUriNode;
> +
> +  if (FeatureManagedUri == NULL || Callback == NULL) {
> +    DEBUG((DEBUG_ERROR, "%a: The given parameter is invalid\n",
> __FUNCTION__));
> +    return EFI_INVALID_PARAMETER;
> +  }
> +  //
> +  // Walk through URI which managed by this EDK2 Redfish feature driver.
> +  //
> +  UriLength = StrLen (FeatureManagedUri) + 1; // Add one NULL for the last
> node.
> +  Index = 0;
> +  AnchorIndex = 0;
> +  ThisUriNode = ResourceUriNodeList;
> +  do {
> +    if ((Index - AnchorIndex + 1) >= MaxNodeNameLength) { // Increase one
> for the NULL terminator
> +      DEBUG((DEBUG_ERROR, "%a: the length of node name is >=
> MaxNodeNameLength\n", __FUNCTION__));
> +      ASSERT (FALSE);
> +    }
> +    NodeName[Index - AnchorIndex] = *(FeatureManagedUri + Index);
> +    if (NodeName [Index - AnchorIndex] == NodeSeperator || NodeName
> [Index - AnchorIndex] == (CHAR16)0) {
> +      NodeName [Index - AnchorIndex] = 0;
> +      AnchorIndex = Index + 1;
> +      //
> +      // Insert node
> +      //
> +      if (StrLen(NodeName) != 0) {
> +        Status = InsertRedfishFeatureUriNode(ThisUriNode, NodeName,
> &ThisUriNode);
> +        if (EFI_ERROR (Status)) {
> +          return Status;
> +        }
> +      }
> +    }
> +    Index ++;
> +  } while ((Index < UriLength));
> +
> +  if (ThisUriNode == NULL) {
> +    //
> +    // No URI node was created
> +    //
> +    DEBUG((DEBUG_ERROR, "%a: No URI node is added\n",
> __FUNCTION__));
> +    return EFI_INVALID_PARAMETER;
> +  }
> +  //
> +  // Add feature driver info to internal data instance.
> +  //
> +  ThisUriNode->Callback = Callback;
> +  ThisUriNode->Context = Context;
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  The unregistration function for the Redfish Feature driver.
> +
> +  @param[in]   This                Pointer to EDKII_REDFISH_FEATURE_PROTOCOL
> instance.
> +  @param[in]   FeatureManagedUri   The URI represents the hierarchy path
> of the Redfish
> +                                   resource in the entire Redfish data model that managed
> +                                   by Redfish feature driver . Each node in the hierarchy
> +                                   path is the property name defined in the schema of the
> +                                   resource.
> +  @param[in]   Context             The context used for the previous feature
> driver
> +                                   registration.
> +  @retval EFI_SUCCESS              Redfish feature driver is registered
> successfully.
> +  @retval Others                   Some error happened.
> +
> +**/
> +EFI_STATUS
> +RedfishFeatureUnregister (
> +  IN     EDKII_REDFISH_FEATURE_PROTOCOL  *This,
> +  IN     EFI_STRING                      FeatureManagedUri,
> +  IN     VOID                            *Context
> +)
> +{
> +  return EFI_UNSUPPORTED;
> +}
> +
> +EDKII_REDFISH_FEATURE_PROTOCOL mRedfishFeatureProtocol = {
> +  RedfishFeatureRegister,
> +  RedfishFeatureUnregister
> +};
> +
> +/**
> +  Main entry for this driver.
> +
> +  @param ImageHandle     Image handle this driver.
> +  @param SystemTable     Pointer to SystemTable.
> +
> 
> @param[in] for above two paramters
> 
> +  @retval EFI_SUCESS     This function always complete successfully.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +RedfishFeatureCoreEntryPoint (
> +  IN EFI_HANDLE         ImageHandle,
> +  IN EFI_SYSTEM_TABLE   *SystemTable
> +  )
> +{
> +  EFI_STATUS  Status;
> +  EFI_HANDLE  Handle;
> +  EFI_GUID *EventGuid;
> +
> +  Handle = NULL;
> +  ResourceUriNodeList = NULL;
> +  EventGuid = (EFI_GUID *)PcdGetPtr
> (PcdEdkIIRedfishFeatureDriverStartupEventGuid);
> +
> +  ZeroMem ((VOID *)&mFeatureDriverStartupContext, sizeof
> (REDFISH_FEATURE_STARTUP_CONTEXT));
> +  mFeatureDriverStartupContext.This = &mRedfishFeatureProtocol;
> +
> +  Status = gBS->CreateEventEx (
> +                EVT_NOTIFY_SIGNAL,
> +                TPL_CALLBACK,
> +                RedfishFeatureDriverStartup,
> +                (CONST VOID *)&mFeatureDriverStartupContext,
> +                EventGuid,
> +                &mEdkIIRedfishFeatureDriverStartupEvent
> +                );
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  //
> +  // Install the RedfishCredentialProtocol onto Handle.
> +  //
> +  Status = gBS->InstallMultipleProtocolInterfaces (
> +                  &Handle,
> +                  &gEdkIIRedfishFeatureProtocolGuid,
> +                  &mRedfishFeatureProtocol,
> +                  NULL
> +                  );
> +  return Status;
> +}
> diff --git a/RedfishClientPkg/Readme.md b/RedfishClientPkg/Readme.md
> index 9e56fb9039..18a27633cf 100644
> --- a/RedfishClientPkg/Readme.md
> +++ b/RedfishClientPkg/Readme.md
> @@ -119,6 +119,42 @@ struct
> _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL {
>  For those Non-EDK2 HII-based platform configuration formats, the driver
> instance
>  can provide its own implementation to get or set the platform configurations.
> 
> +### EDKII Redfish Feature Core DXE Driver ***[[12]](#[0])***
> +EDKII Redfish Feature Core DXE driver provides the protocol interface to
> +the auto-generated Redfish feature driver to register itself for the
> +Redfish resource URI it manages.
> +
> +```C
> +struct _EDKII_REDFISH_FEATURE_PROTOCOL {
> +  REDFISH_FEATURE_REGISTER      Register;
> +  REDFISH_FEATURE_UNREGISTER    Unregister;
> +};
> +```
> +
> +Redfish Feature Core DXE driver records the
> +URI according to the URI hierarchy, and then it starts up the Redfish
> +feature drivers based on the hierarchy when the particular event
> +***[[11]](#[0])*** is triggered. This makes sure the upper-level Redfish
> +resource is built up before the lower-level resource. For example,
> +ComputerSystem resource must be ready before the Memory resource
> managed
> +by MemoryCollection because the Memory resource is part of
> ComputerSystem
> +resource.
> +
> +### Start-Up Event to Trigger EDKII Redfish Feature Core
> ***[[11]](#[0])***
> +This is an EFI event for triggering EDKII Redfish Feature Core to travel
> +URIs in the database and execute the callback that registered by Redfish
> feature
> +drivers. The event GUID is defined in below PCD and is default set to
> +**gEfiEventReadyToBootGuid**.
> +
> +```C
> +PcdEdkIIRedfishFeatureDriverStartupEventGuid
> +```
> +
> +This PCD can be overridden to any events based on the platform
> +implementation. EDKII Redfish Feature Core can be triggered earlier,
> +for example before the BDS or in the early DXE phase if the platform
> provides
> +the EFI REST EX protocol which is available before the BDS phase.
> +
>  ### EDK2 HII VFR Form ***[[8]](#[0])***
>  According to **UEFI spec 2.9 section 35.6 Form Browser Protocol**,
>  **EFI_HII_REST_STYLE_FORMSET_GUID** is used on HII form to indicate
> that HII
> --
> 2.17.1


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

end of thread, other threads:[~2021-08-11  3:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-27 14:54 [staging/edk2-redfish-client RedfishFeatureCore PATCH 0/3] RedfishFeatureCoreDxe Abner Chang
2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 1/3] RedfishClientPkg: Initial commit of meta files Abner Chang
2021-08-08 12:46   ` Nickle Wang
2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 2/3] RedfishClientPkg/RedfishFeatureCoreDxe: Redfish Feature Core DXE driver Abner Chang
2021-08-08 12:54   ` Nickle Wang
2021-08-11  3:35     ` Abner Chang
2021-07-27 14:54 ` [staging/edk2-redfish-client RedfishFeatureCore PATCH 3/3] RedfishClientPkg/Document: Update diagrams Abner Chang
2021-08-08 12:55   ` Nickle Wang

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