* [edk2-staging][PATCH 1/3] edk2-staging/RedfishClientPkg: Add Redfish Resource Addendum Protocol
@ 2022-12-07 14:40 Nickle Wang
2022-12-12 2:50 ` Chang, Abner
0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2022-12-07 14:40 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Igor Kulchytskyy, Nick Ramirez
Introduce Redfish Resource Addendum Protocol to Redfish feature driver.
Feature driver uses this protocol to query OEM resource from platform in
order to support Redfish OEM property. This protocol is also used to get
addendum data that is required by BMC to manage Redfish BIOS service.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
---
.../EdkIIRedfishResourceAddendumProtocol.h | 77 +++++++++++++++++++
RedfishClientPkg/RedfishClientPkg.dec | 2 +
2 files changed, 79 insertions(+)
create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h
diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h
new file mode 100644
index 0000000000..462d94fdc1
--- /dev/null
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h
@@ -0,0 +1,77 @@
+/** @file
+ This file defines the EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL interface.
+
+ Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL_H_
+#define EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL_H_
+
+#include <Uefi.h>
+
+typedef struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL;
+
+//
+// The definition of REDFISH_SCHEMA_INFO
+//
+typedef struct {
+ CHAR8 *Uri;
+ CHAR8 *Schema;
+ CHAR8 *Version;
+} REDFISH_RESOURCE_SCHEMA_INFO;
+
+/**
+ Provising redfish resource with with addendum data in given schema.
+
+ @param[in] This Pointer to EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL instance.
+ @param[in] SchemaInfo Redfish schema information.
+ @param[in,out] Json On input, this is the Redfish data in given Uri in JSON object.
+ On output, This is the Redfish data with addendum information
+ which platform would like to add to Redfish service.
+
+ @retval EFI_SUCCESS Addendum data is attached.
+ @retval EFI_UNSUPPORTED No addendum data is required in given schema.
+ @retval Others Some error happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING)(
+ IN EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL *This,
+ IN REDFISH_RESOURCE_SCHEMA_INFO *SchemaInfo,
+ IN OUT EDKII_JSON_VALUE Json
+ );
+
+/**
+ Provising redfish OEM resource in given schema information.
+
+ @param[in] This Pointer to EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL instance.
+ @param[in] SchemaInfo Redfish schema information.
+ @param[out] Json This is the Redfish data which is attached to OEM object in given
+ schema.
+
+ @retval EFI_SUCCESS OEM data is attached.
+ @retval EFI_UNSUPPORTED No OEM data is required in given schema.
+ @retval Others Some error happened.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_OEM)(
+ IN EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL *This,
+ IN REDFISH_RESOURCE_SCHEMA_INFO *SchemaInfo,
+ OUT EDKII_JSON_VALUE Json
+ );
+
+struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL {
+ UINT64 Revision;
+ EDKII_REDFISH_RESOURCE_ADDENDUM_OEM OemCallback;
+ EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING ProvisioningCallback;
+};
+
+extern EFI_GUID gEdkIIRedfishResourceAddendumProtocolGuid;
+
+#endif
diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec
index d3c97ecf68..9d88680415 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -43,6 +43,8 @@
gEdkIIRedfishConfigLangMapProtocolGuid = { 0x1d9ba9fe, 0x5d5a, 0x4b66, {0x83, 0x5b, 0xe2, 0x5d, 0x13, 0x93, 0x4a, 0x9c } }
## Include/Protocol/EdkIIRedfishInterchangeData.h
gEdkIIRedfishFeatureInterchangeDataProtocolGuid = { 0x4B8FF71C, 0x4A7B, 0x9478, { 0xB7, 0x81, 0x35, 0x9B, 0x0A, 0xF2, 0x00, 0x91 } }
+ ## Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h
+ gEdkIIRedfishResourceAddendumProtocolGuid = { 0xda36b12b, 0xaad4, 0x4e90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } }
[Guids]
## Include/Guid/RedfishClientPkgTokenSpace.h
--
2.38.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [edk2-staging][PATCH 1/3] edk2-staging/RedfishClientPkg: Add Redfish Resource Addendum Protocol
2022-12-07 14:40 [edk2-staging][PATCH 1/3] edk2-staging/RedfishClientPkg: Add Redfish Resource Addendum Protocol Nickle Wang
@ 2022-12-12 2:50 ` Chang, Abner
0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2022-12-12 2:50 UTC (permalink / raw)
To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy, Nick Ramirez
[AMD Official Use Only - General]
Reviewed-by: Abner Chang <abner.chang@amd.com>
> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Wednesday, December 7, 2022 10:41 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [edk2-staging][PATCH 1/3] edk2-staging/RedfishClientPkg: Add
> Redfish Resource Addendum Protocol
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Introduce Redfish Resource Addendum Protocol to Redfish feature driver.
> Feature driver uses this protocol to query OEM resource from platform in
> order to support Redfish OEM property. This protocol is also used to get
> addendum data that is required by BMC to manage Redfish BIOS service.
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Nick Ramirez <nramirez@nvidia.com>
> ---
> .../EdkIIRedfishResourceAddendumProtocol.h | 77
> +++++++++++++++++++
> RedfishClientPkg/RedfishClientPkg.dec | 2 +
> 2 files changed, 79 insertions(+)
> create mode 100644
> RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProtocol
> .h
>
> diff --git
> a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProto
> col.h
> b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProto
> col.h
> new file mode 100644
> index 0000000000..462d94fdc1
> --- /dev/null
> +++
> b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProt
> +++ ocol.h
> @@ -0,0 +1,77 @@
> +/** @file
> + This file defines the EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL
> interface.
> +
> + Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL_H_
> +#define EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL_H_
> +
> +#include <Uefi.h>
> +
> +typedef struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL
> +EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL;
> +
> +//
> +// The definition of REDFISH_SCHEMA_INFO // typedef struct {
> + CHAR8 *Uri;
> + CHAR8 *Schema;
> + CHAR8 *Version;
> +} REDFISH_RESOURCE_SCHEMA_INFO;
> +
> +/**
> + Provising redfish resource with with addendum data in given schema.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL instance.
> + @param[in] SchemaInfo Redfish schema information.
> + @param[in,out] Json On input, this is the Redfish data in given Uri in
> JSON object.
> + On output, This is the Redfish data with addendum
> information
> + which platform would like to add to Redfish service.
> +
> + @retval EFI_SUCCESS Addendum data is attached.
> + @retval EFI_UNSUPPORTED No addendum data is required in given
> schema.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING)(
> + IN EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL *This,
> + IN REDFISH_RESOURCE_SCHEMA_INFO *SchemaInfo,
> + IN OUT EDKII_JSON_VALUE Json
> + );
> +
> +/**
> + Provising redfish OEM resource in given schema information.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL instance.
> + @param[in] SchemaInfo Redfish schema information.
> + @param[out] Json This is the Redfish data which is attached to OEM
> object in given
> + schema.
> +
> + @retval EFI_SUCCESS OEM data is attached.
> + @retval EFI_UNSUPPORTED No OEM data is required in given schema.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_OEM)(
> + IN EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL *This,
> + IN REDFISH_RESOURCE_SCHEMA_INFO *SchemaInfo,
> + OUT EDKII_JSON_VALUE Json
> + );
> +
> +struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL {
> + UINT64 Revision;
> + EDKII_REDFISH_RESOURCE_ADDENDUM_OEM OemCallback;
> + EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING
> ProvisioningCallback;
> +};
> +
> +extern EFI_GUID gEdkIIRedfishResourceAddendumProtocolGuid;
> +
> +#endif
> diff --git a/RedfishClientPkg/RedfishClientPkg.dec
> b/RedfishClientPkg/RedfishClientPkg.dec
> index d3c97ecf68..9d88680415 100644
> --- a/RedfishClientPkg/RedfishClientPkg.dec
> +++ b/RedfishClientPkg/RedfishClientPkg.dec
> @@ -43,6 +43,8 @@
> gEdkIIRedfishConfigLangMapProtocolGuid = { 0x1d9ba9fe, 0x5d5a, 0x4b66,
> {0x83, 0x5b, 0xe2, 0x5d, 0x13, 0x93, 0x4a, 0x9c } }
> ## Include/Protocol/EdkIIRedfishInterchangeData.h
> gEdkIIRedfishFeatureInterchangeDataProtocolGuid = { 0x4B8FF71C, 0x4A7B,
> 0x9478, { 0xB7, 0x81, 0x35, 0x9B, 0x0A, 0xF2, 0x00, 0x91 } }
> + ## Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h
> + gEdkIIRedfishResourceAddendumProtocolGuid = { 0xda36b12b, 0xaad4,
> + 0x4e90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } }
>
> [Guids]
> ## Include/Guid/RedfishClientPkgTokenSpace.h
> --
> 2.38.1.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-12 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-07 14:40 [edk2-staging][PATCH 1/3] edk2-staging/RedfishClientPkg: Add Redfish Resource Addendum Protocol Nickle Wang
2022-12-12 2:50 ` Chang, Abner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox