* [PATCH 1/5] RedfishPkg: introduce EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL
@ 2023-04-13 6:20 Nickle Wang
2023-04-15 3:22 ` Chang, Abner
0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2023-04-13 6:20 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Igor Kulchytskyy, Nick Ramirez
EDKII Redfish Platform Config Protocol defines the protocol
interfaces that abstracts the platform configuration format
and storage from EDK2 Redfish Feature driver. This protocol
provides the interfaces to get and set platform configuration
with the format and configuration storage agnostic to the
Redfish feature driver.
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>
---
RedfishPkg/RedfishPkg.dec | 3 +
.../Protocol/EdkIIRedfishPlatformConfig.h | 257 ++++++++++++++++++
2 files changed, 260 insertions(+)
create mode 100644 RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h
diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec
index f171053aec10..904630ae4be6 100644
--- a/RedfishPkg/RedfishPkg.dec
+++ b/RedfishPkg/RedfishPkg.dec
@@ -78,6 +78,9 @@
## Include/Protocol/Edk2RedfishConfigHandler.h
gEdkIIRedfishConfigHandlerProtocolGuid = { 0xbc0fe6bb, 0x2cc9, 0x463e, { 0x90, 0x82, 0xfa, 0x11, 0x76, 0xfc, 0x67, 0xde } }
+ ## Include/Protocol/EdkIIRedfishPlatformConfig.h
+ gEdkIIRedfishPlatformConfigProtocolGuid = { 0X4D94A7C7, 0X4CE4, 0X4A84, { 0X88, 0XC1, 0X33, 0X0C, 0XD4, 0XA3, 0X47, 0X67 } }
+
[Guids]
gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}
diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h b/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h
new file mode 100644
index 000000000000..364960933ac5
--- /dev/null
+++ b/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h
@@ -0,0 +1,257 @@
+/** @file
+ This file defines the EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL interface.
+
+ (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef EDKII_REDFISH_PLATFORM_CONFIG_H_
+#define EDKII_REDFISH_PLATFORM_CONFIG_H_
+
+typedef struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL;
+
+/**
+ Definition of EDKII_REDFISH_TYPE_VALUE
+ **/
+typedef union {
+ INT64 Integer;
+ BOOLEAN Boolean;
+ CHAR8 *Buffer;
+ CHAR8 **StringArray;
+ INT64 *IntegerArray;
+ BOOLEAN *BooleanArray;
+} EDKII_REDFISH_TYPE_VALUE;
+
+/**
+ Definition of EDKII_REDFISH_VALUE_TYPES
+ **/
+typedef enum {
+ RedfishValueTypeUnknown = 0,
+ RedfishValueTypeInteger,
+ RedfishValueTypeBoolean,
+ RedfishValueTypeString,
+ RedfishValueTypeStringArray,
+ RedfishValueTypeIntegerArray,
+ RedfishValueTypeBooleanArray,
+ RedfishValueTypeMax
+} EDKII_REDFISH_VALUE_TYPES;
+
+/**
+ Definition of EDKII_REDFISH_ATTRIBUTE_TYPES
+ **/
+typedef enum {
+ RedfishAttributeTypeUnknown = 0,
+ RedfishAttributeTypeEnumeration,
+ RedfishAttributeTypeString,
+ RedfishAttributeTypeInteger,
+ RedfishAttributeTypeBoolean,
+ RedfishAttributeTypePassword
+} EDKII_REDFISH_ATTRIBUTE_TYPES;
+
+/**
+ Definition of EDKII_REDFISH_VALUE
+ **/
+typedef struct {
+ EDKII_REDFISH_VALUE_TYPES Type;
+ EDKII_REDFISH_TYPE_VALUE Value;
+ UINTN ArrayCount;
+} EDKII_REDFISH_VALUE;
+
+/**
+ Definition of EDKII_REDFISH_ATTRIBUTE_VALUE
+ **/
+typedef struct {
+ CHAR8 *ValueName;
+ CHAR8 *ValueDisplayName;
+} EDKII_REDFISH_ATTRIBUTE_VALUE;
+
+/**
+ Definition of EDKII_REDFISH_POSSIBLE_VALUES
+ **/
+typedef struct {
+ UINTN ValueCount;
+ EDKII_REDFISH_ATTRIBUTE_VALUE *ValueArray;
+} EDKII_REDFISH_POSSIBLE_VALUES;
+
+/**
+ Definition of EDKII_REDFISH_ATTRIBUTE
+ **/
+typedef struct {
+ CHAR8 *AttributeName;
+ CHAR8 *DisplayName;
+ CHAR8 *HelpText;
+ CHAR8 *MenuPath;
+ EDKII_REDFISH_ATTRIBUTE_TYPES Type;
+ BOOLEAN ResetRequired;
+ BOOLEAN ReadOnly;
+ BOOLEAN GrayedOut;
+ BOOLEAN Suppress;
+ UINT64 NumMaximum;
+ UINT64 NumMinimum;
+ UINT64 NumStep;
+ UINT8 StrMaxSize;
+ UINT8 StrMinSize;
+ EDKII_REDFISH_POSSIBLE_VALUES Values;
+} EDKII_REDFISH_ATTRIBUTE;
+
+/**
+ Get Redfish value with the given Schema and Configure Language.
+
+ @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
+ @param[in] Schema The Redfish schema to query.
+ @param[in] Version The Redfish version to query.
+ @param[in] ConfigureLang The target value which match this configure Language.
+ @param[out] Value The returned value.
+
+ @retval EFI_SUCCESS Value is returned successfully.
+ @retval Others Some error happened.
+
+**/
+typedef
+ EFI_STATUS
+(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_VALUE)(
+ IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
+ IN CHAR8 *Schema,
+ IN CHAR8 *Version,
+ IN EFI_STRING ConfigureLang,
+ OUT EDKII_REDFISH_VALUE *Value
+ );
+
+//
+// Default class standard
+//
+#define EDKII_REDFISH_DEFAULT_CLASS_STANDARD EFI_HII_DEFAULT_CLASS_STANDARD
+
+/**
+ Get Redfish default value with the given Schema and Configure Language.
+
+ @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
+ @param[in] Schema The Redfish schema to query.
+ @param[in] Version The Redfish version to query.
+ @param[in] ConfigureLang The target value which match this configure Language.
+ @param[in] DefaultClass The UEFI defined default class.
+ Please refer to UEFI spec. 33.2.5.8 "defaults" for details.
+ @param[out] Value The returned value.
+
+ @retval EFI_SUCCESS Value is returned successfully.
+ @retval Others Some error happened.
+
+**/
+typedef
+ EFI_STATUS
+(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_DEFAULT_VALUE)(
+ IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
+ IN CHAR8 *Schema,
+ IN CHAR8 *Version,
+ IN EFI_STRING ConfigureLang,
+ IN UINT16 DefaultClass,
+ OUT EDKII_REDFISH_VALUE *Value
+ );
+
+/**
+ Set Redfish value with the given Schema and Configure Language.
+
+ @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
+ @param[in] Schema The Redfish schema to query.
+ @param[in] Version The Redfish version to query.
+ @param[in] ConfigureLang The target value which match this configure Language.
+ @param[in] Value The value to set.
+
+ @retval EFI_SUCCESS Value is returned successfully.
+ @retval Others Some error happened.
+
+**/
+typedef
+ EFI_STATUS
+(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_SET_VALUE)(
+ IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
+ IN CHAR8 *Schema,
+ IN CHAR8 *Version,
+ IN EFI_STRING ConfigureLang,
+ IN EDKII_REDFISH_VALUE Value
+ );
+
+/**
+ Get Redfish attribute value with the given Schema and Configure Language.
+
+ @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
+ @param[in] Schema The Redfish schema to query.
+ @param[in] Version The Redfish version to query.
+ @param[in] ConfigureLang The target value which match this configure Language.
+ @param[out] AttributeValue The attribute value.
+
+ @retval EFI_SUCCESS Value is returned successfully.
+ @retval Others Some error happened.
+
+**/
+typedef
+ EFI_STATUS
+(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_ATTRIBUTE)(
+ IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
+ IN CHAR8 *Schema,
+ IN CHAR8 *Version,
+ IN EFI_STRING ConfigureLang,
+ OUT EDKII_REDFISH_ATTRIBUTE *AttributeValue
+ );
+
+/**
+ Get the list of Configure Language from platform configuration by the given Schema and RegexPattern.
+
+ @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
+ @param[in] Schema The Redfish schema to query.
+ @param[in] Version The Redfish version to query.
+ @param[in] RegexPattern The target Configure Language pattern. This is used for regular expression matching.
+ @param[out] ConfigureLangList The list of Configure Language.
+ @param[out] Count The number of Configure Language in ConfigureLangList.
+
+ @retval EFI_SUCCESS ConfigureLangList is returned successfully.
+ @retval Others Some error happened.
+
+**/
+typedef
+ EFI_STATUS
+(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_CONFIG_LANG)(
+ IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
+ IN CHAR8 *Schema,
+ IN CHAR8 *Version,
+ IN EFI_STRING RegexPattern,
+ OUT EFI_STRING **ConfigureLangList,
+ OUT UINTN *Count
+ );
+
+/**
+ Get the list of supported Redfish schema from platform configuration.
+
+ @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
+ @param[out] SupportedSchema The supported schema list which is separated by ';'.
+ For example: "x-uefi-redfish-Memory.v1_7_1;x-uefi-redfish-Boot.v1_0_1"
+ The SupportedSchema is allocated by the callee. It's caller's
+ responsibility to free this buffer using FreePool().
+
+ @retval EFI_SUCCESS Schema is returned successfully.
+ @retval Others Some error happened.
+
+**/
+typedef
+ EFI_STATUS
+(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_SUPPORTED_SCHEMA)(
+ IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
+ OUT CHAR8 **SupportedSchema
+ );
+
+struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL {
+ UINT64 Revision;
+ EDKII_REDFISH_PLATFORM_CONFIG_GET_VALUE GetValue;
+ EDKII_REDFISH_PLATFORM_CONFIG_SET_VALUE SetValue;
+ EDKII_REDFISH_PLATFORM_CONFIG_GET_DEFAULT_VALUE GetDefaultValue;
+ EDKII_REDFISH_PLATFORM_CONFIG_GET_ATTRIBUTE GetAttribute;
+ EDKII_REDFISH_PLATFORM_CONFIG_GET_CONFIG_LANG GetConfigureLang;
+ EDKII_REDFISH_PLATFORM_CONFIG_GET_SUPPORTED_SCHEMA GetSupportedSchema;
+};
+
+extern EFI_GUID gEdkIIRedfishPlatformConfigProtocolGuid;
+
+#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/5] RedfishPkg: introduce EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL
2023-04-13 6:20 [PATCH 1/5] RedfishPkg: introduce EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL Nickle Wang
@ 2023-04-15 3:22 ` Chang, Abner
0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2023-04-15 3:22 UTC (permalink / raw)
To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy, Nick Ramirez
[AMD Official Use Only - General]
> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Thursday, April 13, 2023 2:21 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [PATCH 1/5] RedfishPkg: introduce
> EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> EDKII Redfish Platform Config Protocol defines the protocol interfaces that
> abstracts the platform configuration format and storage from EDK2 Redfish
> Feature driver. This protocol provides the interfaces to get and set platform
> configuration with the format and configuration storage agnostic to the
> Redfish feature driver.
>
> 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>
> ---
> RedfishPkg/RedfishPkg.dec | 3 +
> .../Protocol/EdkIIRedfishPlatformConfig.h | 257 ++++++++++++++++++
> 2 files changed, 260 insertions(+)
> create mode 100644
> RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h
>
> diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index
> f171053aec10..904630ae4be6 100644
> --- a/RedfishPkg/RedfishPkg.dec
> +++ b/RedfishPkg/RedfishPkg.dec
> @@ -78,6 +78,9 @@
> ## Include/Protocol/Edk2RedfishConfigHandler.h
> gEdkIIRedfishConfigHandlerProtocolGuid = { 0xbc0fe6bb, 0x2cc9, 0x463e,
> { 0x90, 0x82, 0xfa, 0x11, 0x76, 0xfc, 0x67, 0xde } }
>
> + ## Include/Protocol/EdkIIRedfishPlatformConfig.h
> + gEdkIIRedfishPlatformConfigProtocolGuid = { 0X4D94A7C7, 0X4CE4,
> + 0X4A84, { 0X88, 0XC1, 0X33, 0X0C, 0XD4, 0XA3, 0X47, 0X67 } }
> +
> [Guids]
> gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88,
> 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }}
>
> diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h
> b/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h
> new file mode 100644
> index 000000000000..364960933ac5
> --- /dev/null
> +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishPlatformConfig.h
> @@ -0,0 +1,257 @@
> +/** @file
> + This file defines the EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL
> interface.
> +
> + (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR>
> + Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef EDKII_REDFISH_PLATFORM_CONFIG_H_ #define
> +EDKII_REDFISH_PLATFORM_CONFIG_H_
> +
> +typedef struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL
> +EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL;
> +
> +/**
> + Definition of EDKII_REDFISH_TYPE_VALUE **/
I am thinking we should have the consistent comment style for the structure under RedfishPkg.
Could you please update the comments style for structure to use "///".
> + typedef union {
> + INT64 Integer;
> + BOOLEAN Boolean;
> + CHAR8 *Buffer;
> + CHAR8 **StringArray;
> + INT64 *IntegerArray;
> + BOOLEAN *BooleanArray;
> +} EDKII_REDFISH_TYPE_VALUE;
> +
> +/**
> + Definition of EDKII_REDFISH_VALUE_TYPES **/ typedef enum {
> + RedfishValueTypeUnknown = 0,
> + RedfishValueTypeInteger,
> + RedfishValueTypeBoolean,
> + RedfishValueTypeString,
> + RedfishValueTypeStringArray,
> + RedfishValueTypeIntegerArray,
> + RedfishValueTypeBooleanArray,
> + RedfishValueTypeMax
> +} EDKII_REDFISH_VALUE_TYPES;
> +
> +/**
> + Definition of EDKII_REDFISH_ATTRIBUTE_TYPES **/ typedef enum {
> + RedfishAttributeTypeUnknown = 0,
> + RedfishAttributeTypeEnumeration,
> + RedfishAttributeTypeString,
> + RedfishAttributeTypeInteger,
> + RedfishAttributeTypeBoolean,
> + RedfishAttributeTypePassword
> +} EDKII_REDFISH_ATTRIBUTE_TYPES;
> +
> +/**
> + Definition of EDKII_REDFISH_VALUE
> + **/
> +typedef struct {
> + EDKII_REDFISH_VALUE_TYPES Type;
> + EDKII_REDFISH_TYPE_VALUE Value;
> + UINTN ArrayCount;
> +} EDKII_REDFISH_VALUE;
> +
> +/**
> + Definition of EDKII_REDFISH_ATTRIBUTE_VALUE **/ typedef struct {
> + CHAR8 *ValueName;
> + CHAR8 *ValueDisplayName;
> +} EDKII_REDFISH_ATTRIBUTE_VALUE;
> +
> +/**
> + Definition of EDKII_REDFISH_POSSIBLE_VALUES **/ typedef struct {
> + UINTN ValueCount;
> + EDKII_REDFISH_ATTRIBUTE_VALUE *ValueArray;
> +} EDKII_REDFISH_POSSIBLE_VALUES;
> +
> +/**
> + Definition of EDKII_REDFISH_ATTRIBUTE **/ typedef struct {
> + CHAR8 *AttributeName;
> + CHAR8 *DisplayName;
> + CHAR8 *HelpText;
> + CHAR8 *MenuPath;
> + EDKII_REDFISH_ATTRIBUTE_TYPES Type;
> + BOOLEAN ResetRequired;
> + BOOLEAN ReadOnly;
> + BOOLEAN GrayedOut;
> + BOOLEAN Suppress;
> + UINT64 NumMaximum;
> + UINT64 NumMinimum;
> + UINT64 NumStep;
> + UINT8 StrMaxSize;
> + UINT8 StrMinSize;
> + EDKII_REDFISH_POSSIBLE_VALUES Values;
> +} EDKII_REDFISH_ATTRIBUTE;
> +
> +/**
> + Get Redfish value with the given Schema and Configure Language.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
> + @param[in] Schema The Redfish schema to query.
> + @param[in] Version The Redfish version to query.
> + @param[in] ConfigureLang The target value which match this configure
> Language.
> + @param[out] Value The returned value.
> +
> + @retval EFI_SUCCESS Value is returned successfully.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> + EFI_STATUS
There are two redundant leading white spaces at EFI_STATUS. Please fix it for all function prototypes.
Thanks
Abner
> +(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_VALUE)(
> + IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
> + IN CHAR8 *Schema,
> + IN CHAR8 *Version,
> + IN EFI_STRING ConfigureLang,
> + OUT EDKII_REDFISH_VALUE *Value
> + );
> +
> +//
> +// Default class standard
> +//
> +#define EDKII_REDFISH_DEFAULT_CLASS_STANDARD
> +EFI_HII_DEFAULT_CLASS_STANDARD
> +
> +/**
> + Get Redfish default value with the given Schema and Configure Language.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
> + @param[in] Schema The Redfish schema to query.
> + @param[in] Version The Redfish version to query.
> + @param[in] ConfigureLang The target value which match this configure
> Language.
> + @param[in] DefaultClass The UEFI defined default class.
> + Please refer to UEFI spec. 33.2.5.8 "defaults" for details.
> + @param[out] Value The returned value.
> +
> + @retval EFI_SUCCESS Value is returned successfully.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> + EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_DEFAULT_VALUE)(
> + IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
> + IN CHAR8 *Schema,
> + IN CHAR8 *Version,
> + IN EFI_STRING ConfigureLang,
> + IN UINT16 DefaultClass,
> + OUT EDKII_REDFISH_VALUE *Value
> + );
> +
> +/**
> + Set Redfish value with the given Schema and Configure Language.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
> + @param[in] Schema The Redfish schema to query.
> + @param[in] Version The Redfish version to query.
> + @param[in] ConfigureLang The target value which match this configure
> Language.
> + @param[in] Value The value to set.
> +
> + @retval EFI_SUCCESS Value is returned successfully.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> + EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_SET_VALUE)(
> + IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
> + IN CHAR8 *Schema,
> + IN CHAR8 *Version,
> + IN EFI_STRING ConfigureLang,
> + IN EDKII_REDFISH_VALUE Value
> + );
> +
> +/**
> + Get Redfish attribute value with the given Schema and Configure Language.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
> + @param[in] Schema The Redfish schema to query.
> + @param[in] Version The Redfish version to query.
> + @param[in] ConfigureLang The target value which match this configure
> Language.
> + @param[out] AttributeValue The attribute value.
> +
> + @retval EFI_SUCCESS Value is returned successfully.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> + EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_ATTRIBUTE)(
> + IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
> + IN CHAR8 *Schema,
> + IN CHAR8 *Version,
> + IN EFI_STRING ConfigureLang,
> + OUT EDKII_REDFISH_ATTRIBUTE *AttributeValue
> + );
> +
> +/**
> + Get the list of Configure Language from platform configuration by the
> given Schema and RegexPattern.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
> + @param[in] Schema The Redfish schema to query.
> + @param[in] Version The Redfish version to query.
> + @param[in] RegexPattern The target Configure Language pattern.
> This is used for regular expression matching.
> + @param[out] ConfigureLangList The list of Configure Language.
> + @param[out] Count The number of Configure Language in
> ConfigureLangList.
> +
> + @retval EFI_SUCCESS ConfigureLangList is returned successfully.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> + EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_PLATFORM_CONFIG_GET_CONFIG_LANG)(
> + IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
> + IN CHAR8 *Schema,
> + IN CHAR8 *Version,
> + IN EFI_STRING RegexPattern,
> + OUT EFI_STRING **ConfigureLangList,
> + OUT UINTN *Count
> + );
> +
> +/**
> + Get the list of supported Redfish schema from platform configuration.
> +
> + @param[in] This Pointer to
> EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
> + @param[out] SupportedSchema The supported schema list which is
> separated by ';'.
> + For example: "x-uefi-redfish-Memory.v1_7_1;x-uefi-
> redfish-Boot.v1_0_1"
> + The SupportedSchema is allocated by the callee. It's
> caller's
> + responsibility to free this buffer using FreePool().
> +
> + @retval EFI_SUCCESS Schema is returned successfully.
> + @retval Others Some error happened.
> +
> +**/
> +typedef
> + EFI_STATUS
> +(EFIAPI
> *EDKII_REDFISH_PLATFORM_CONFIG_GET_SUPPORTED_SCHEMA)(
> + IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This,
> + OUT CHAR8 **SupportedSchema
> + );
> +
> +struct _EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL {
> + UINT64 Revision;
> + EDKII_REDFISH_PLATFORM_CONFIG_GET_VALUE GetValue;
> + EDKII_REDFISH_PLATFORM_CONFIG_SET_VALUE SetValue;
> + EDKII_REDFISH_PLATFORM_CONFIG_GET_DEFAULT_VALUE
> GetDefaultValue;
> + EDKII_REDFISH_PLATFORM_CONFIG_GET_ATTRIBUTE GetAttribute;
> + EDKII_REDFISH_PLATFORM_CONFIG_GET_CONFIG_LANG
> GetConfigureLang;
> + EDKII_REDFISH_PLATFORM_CONFIG_GET_SUPPORTED_SCHEMA
> GetSupportedSchema;
> +};
> +
> +extern EFI_GUID gEdkIIRedfishPlatformConfigProtocolGuid;
> +
> +#endif
> --
> 2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-15 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 6:20 [PATCH 1/5] RedfishPkg: introduce EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL Nickle Wang
2023-04-15 3:22 ` Chang, Abner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox