TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishPlatformConfigLib.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS RedfishPlatformConfigGetValue (IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING ConfigureLang, OUT EDKII_REDFISH_VALUE *Value)
 
EFI_STATUS RedfishPlatformConfigGetAttribute (IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING ConfigureLang, OUT EDKII_REDFISH_ATTRIBUTE *AttributeValue)
 
EFI_STATUS RedfishPlatformConfigGetDefaultValue (IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING ConfigureLang, IN UINT16 DefaultClass, OUT EDKII_REDFISH_VALUE *Value)
 
EFI_STATUS RedfishPlatformConfigSetValue (IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING ConfigureLang, IN EDKII_REDFISH_VALUE Value)
 
EFI_STATUS RedfishPlatformConfigGetConfigureLang (IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING Pattern, OUT EFI_STRING **ConfigureLangList, OUT UINTN *Count)
 
EFI_STATUS EFIAPI RedfishPlatformConfigGetSupportedSchema (OUT CHAR8 **SupportedSchema)
 
VOID EFIAPI RedfishPlatformConfigProtocolInstalled (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI RedfishPlatformConfigLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI RedfishPlatformConfigLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

REDFISH_PLATFORM_CONFIG_LIB_PRIVATE mRedfishPlatformConfigLibPrivate
 

Detailed Description

Wrapper function to support Redfish Platform Config protocol.

(C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file RedfishPlatformConfigLib.c.

Function Documentation

◆ RedfishPlatformConfigGetAttribute()

EFI_STATUS RedfishPlatformConfigGetAttribute ( IN CHAR8 *  Schema,
IN CHAR8 *  Version,
IN EFI_STRING  ConfigureLang,
OUT EDKII_REDFISH_ATTRIBUTE AttributeValue 
)

Get Redfish attribute value with the given Schema and Configure Language.

Parameters
[in]SchemaThe Redfish schema to query.
[in]VersionThe Redfish version to query.
[in]ConfigureLangThe target value which match this configure Language.
[out]AttributeValueThe attribute value.
Return values
EFI_SUCCESSValue is returned successfully.
OthersSome error happened.

Definition at line 62 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigGetConfigureLang()

EFI_STATUS RedfishPlatformConfigGetConfigureLang ( IN CHAR8 *  Schema,
IN CHAR8 *  Version,
IN EFI_STRING  Pattern,
OUT EFI_STRING **  ConfigureLangList,
OUT UINTN Count 
)

Get the list of Configure Language from platform configuration by the given Schema and Pattern.

Parameters
[in]SchemaThe Redfish schema to query.
[in]VersionThe Redfish version to query.
[in]PatternThe target Configure Language pattern.
[out]ConfigureLangListThe list of Configure Language.
[out]CountThe number of Configure Language in ConfigureLangList.
Return values
EFI_SUCCESSConfigureLangList is returned successfully.
EFI_NOT_READYRedfish Platform Config protocol is not ready.
OthersSome error happened.

Definition at line 168 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigGetDefaultValue()

EFI_STATUS RedfishPlatformConfigGetDefaultValue ( IN CHAR8 *  Schema,
IN CHAR8 *  Version,
IN EFI_STRING  ConfigureLang,
IN UINT16  DefaultClass,
OUT EDKII_REDFISH_VALUE Value 
)

Get Redfish default value with the given Schema and Configure Language.

Parameters
[in]SchemaThe Redfish schema to query.
[in]VersionThe Redfish version to query.
[in]ConfigureLangThe target value which match this configure Language.
[in]DefaultClassThe UEFI defined default class. Please refer to UEFI spec. 33.2.5.8 "defaults" for details.
[out]ValueThe returned value.
Return values
EFI_SUCCESSValue is returned successfully.
OthersSome error happened.

Definition at line 97 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigGetSupportedSchema()

EFI_STATUS EFIAPI RedfishPlatformConfigGetSupportedSchema ( OUT CHAR8 **  SupportedSchema)

Get the list of supported Redfish schema from platform configuration.

Parameters
[out]SupportedSchemaThe 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().
Return values
EFI_SUCCESSSchema is returned successfully.
EFI_NOT_READYRedfish Platform Config protocol is not ready.
OthersSome error happened.

Definition at line 205 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigGetValue()

EFI_STATUS RedfishPlatformConfigGetValue ( IN CHAR8 *  Schema,
IN CHAR8 *  Version,
IN EFI_STRING  ConfigureLang,
OUT EDKII_REDFISH_VALUE Value 
)

Get Redfish value with the given Schema and Configure Language.

Parameters
[in]SchemaThe Redfish schema to query.
[in]VersionThe Redfish version to query.
[in]ConfigureLangThe target value which match this configure Language.
[out]ValueThe returned value.
Return values
EFI_SUCCESSValue is returned successfully.
EFI_NOT_READYRedfish Platform Config protocol is not ready.
OthersSome error happened.

Definition at line 29 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigLibConstructor()

EFI_STATUS EFIAPI RedfishPlatformConfigLibConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Create protocol listener and wait for Redfish Platform Config protocol.

Parameters
ImageHandleThe image handle.
SystemTableThe system table.
Return values
EFI_SUCCESSProtocol listener is registered successfully.

Definition at line 266 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigLibDestructor()

EFI_STATUS EFIAPI RedfishPlatformConfigLibDestructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Unloads the application and its installed protocol.

Parameters
ImageHandleHandle that identifies the image to be unloaded.
SystemTableThe system table.
Return values
EFI_SUCCESSThe image has been unloaded.

Definition at line 297 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigProtocolInstalled()

VOID EFIAPI RedfishPlatformConfigProtocolInstalled ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

This is a EFI_REDFISH_PLATFORM_CONFIG_PROTOCOL notification event handler.

Install HII package notification.

Parameters
[in]EventEvent whose notification function is being invoked.
[in]ContextPointer to the notification function's context.

Definition at line 230 of file RedfishPlatformConfigLib.c.

◆ RedfishPlatformConfigSetValue()

EFI_STATUS RedfishPlatformConfigSetValue ( IN CHAR8 *  Schema,
IN CHAR8 *  Version,
IN EFI_STRING  ConfigureLang,
IN EDKII_REDFISH_VALUE  Value 
)

Set Redfish value with the given Schema and Configure Language.

Parameters
[in]SchemaThe Redfish schema to query.
[in]VersionThe Redfish version to query.
[in]ConfigureLangThe target value which match this configure Language.
[in]ValueThe value to set.
Return values
EFI_SUCCESSValue is returned successfully.
EFI_NOT_READYRedfish Platform Config protocol is not ready.
OthersSome error happened.

Definition at line 133 of file RedfishPlatformConfigLib.c.

Variable Documentation

◆ mRedfishPlatformConfigLibPrivate

REDFISH_PLATFORM_CONFIG_LIB_PRIVATE mRedfishPlatformConfigLibPrivate

Definition at line 13 of file RedfishPlatformConfigLib.c.