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

Go to the source code of this file.

Functions

REDFISH_STACKNewRedfishStack (IN UINTN StackSize)
 
VOID ReleaseRedfishStack (IN REDFISH_STACK *Stack)
 
BOOLEAN IsEmptyRedfishStack (IN REDFISH_STACK *Stack)
 
EFI_STATUS PushRedfishStack (IN REDFISH_STACK *Stack, IN VOID *Data)
 
VOID * PopRedfishStack (IN REDFISH_STACK *Stack)
 
REDFISH_PLATFORM_CONFIG_FORM_PRIVATEFindFormLinkToThis (IN REDFISH_PLATFORM_CONFIG_FORM_PRIVATE *FormPrivate)
 
EFI_STATUS DumpHiiStatementValue (IN UINTN ErrorLevel, IN HII_STATEMENT_VALUE *Value, IN CHAR8 *Message OPTIONAL)
 
EFI_STATUS DumpHiiStatementPrompt (IN UINTN ErrorLevel, IN EFI_HII_HANDLE HiiHandle, IN HII_STATEMENT *HiiStatement, IN CHAR8 *Message OPTIONAL)
 
CHAR8 * BuildMenuPath (IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *StatementPrivate)
 
CHAR8 * GetAttributeNameFromConfigLanguage (IN CHAR8 *ConfigLanguage)
 
EFI_STATUS OneOfStatementToAttributeValues (IN EFI_HII_HANDLE HiiHandle, IN CHAR8 *SchemaName, IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *StatementPrivate, OUT EDKII_REDFISH_POSSIBLE_VALUES *Values)
 
EDKII_REDFISH_ATTRIBUTE_TYPES HiiStatementToAttributeType (IN HII_STATEMENT *HiiStatement)
 
UINT64 ExtendHiiValueToU64 (IN HII_STATEMENT_VALUE *Value)
 
VOID OrderedListSetArrayData (IN VOID *Array, IN UINT8 Type, IN UINTN Index, IN UINT64 Value)
 
UINT64 OrderedListGetArrayData (IN VOID *Array, IN UINT8 Type, IN UINTN Index)
 
EFI_STRING_ID OrderedListOptionValueToStringId (IN HII_STATEMENT *HiiStatement, IN UINT64 Value)
 
INTN CompareHiiStatementValue (IN HII_STATEMENT_VALUE *Value1, IN HII_STATEMENT_VALUE *Value2)
 
EFI_STRING_ID HiiValueToOneOfOptionStringId (IN HII_STATEMENT *HiiStatement, IN HII_STATEMENT_VALUE *Value)
 
EFI_STATUS HiiStringToOneOfOptionValue (IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *Statement, IN CHAR8 *Schema, IN EFI_STRING HiiString, OUT HII_STATEMENT_VALUE *Value)
 
EFI_STATUS HiiValueToRedfishNumeric (IN HII_STATEMENT_VALUE *Value, OUT EDKII_REDFISH_VALUE *RedfishValue)
 
EFI_STATUS RedfishNumericToHiiValue (IN EDKII_REDFISH_VALUE *RedfishValue, OUT HII_STATEMENT_VALUE *Value)
 
VOID DumpOrderedListValue (IN HII_STATEMENT *OrderedListStatement)
 
EFI_STRING_ID * HiiValueToOrderedListOptionStringId (IN HII_STATEMENT *HiiStatement, OUT UINTN *ReturnSize)
 
EFI_STATUS HiiStringToOrderedListOptionValue (IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *Statement, IN CHAR8 *Schema, IN EFI_STRING HiiString, OUT UINT64 *Value)
 
EFI_STATUS HiiValueToRedfishValue (IN EFI_HII_HANDLE HiiHandle, IN CHAR8 *FullSchema, IN HII_STATEMENT *HiiStatement, IN HII_STATEMENT_VALUE *Value, OUT EDKII_REDFISH_VALUE *RedfishValue)
 
EFI_STRING StrToUnicodeStr (IN CHAR8 *AsciiString)
 
CHAR8 * StrToAsciiStr (IN EFI_STRING UnicodeString)
 
CHAR8 * GetFullSchemaString (IN CHAR8 *Schema, IN CHAR8 *Version)
 
EFI_STATUS RedfishPlatformConfigGetStatementCommon (IN REDFISH_PLATFORM_CONFIG_PRIVATE *RedfishPlatformConfigPrivate, IN CHAR8 *Schema, IN EFI_STRING ConfigureLang, OUT REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE **Statement)
 
EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetValue (IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This, IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING ConfigureLang, OUT EDKII_REDFISH_VALUE *Value)
 
EFI_STATUS RedfishPlatformConfigSaveQuestionValue (IN HII_FORMSET *HiiFormset, IN HII_FORM *HiiForm, IN HII_STATEMENT *HiiStatement, IN HII_STATEMENT_VALUE *Value)
 
EFI_STATUS RedfishPlatformConfigSetStatementCommon (IN REDFISH_PLATFORM_CONFIG_PRIVATE *RedfishPlatformConfigPrivate, IN CHAR8 *Schema, IN EFI_STRING ConfigureLang, IN HII_STATEMENT_VALUE *StatementValue)
 
EFI_STATUS EFIAPI RedfishPlatformConfigProtocolSetValue (IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This, IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING ConfigureLang, IN EDKII_REDFISH_VALUE Value)
 
EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetConfigureLang (IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This, IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING RegexPattern, OUT EFI_STRING **ConfigureLangList, OUT UINTN *Count)
 
EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetSupportedSchema (IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This, OUT CHAR8 **SupportedSchema)
 
EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetDefaultValue (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)
 
EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetAttribute (IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL *This, IN CHAR8 *Schema, IN CHAR8 *Version, IN EFI_STRING ConfigureLang, OUT EDKII_REDFISH_ATTRIBUTE *AttributeValue)
 
EFI_STATUS EFIAPI RedfishPlatformConfigFormUpdateNotify (IN UINT8 PackageType, IN CONST EFI_GUID *PackageGuid, IN CONST EFI_HII_PACKAGE_HEADER *Package, IN EFI_HII_HANDLE Handle, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType)
 
VOID EFIAPI HiiStringProtocolInstalled (IN EFI_EVENT Event, IN VOID *Context)
 
VOID EFIAPI HiiDatabaseProtocolInstalled (IN EFI_EVENT Event, IN VOID *Context)
 
VOID EFIAPI RegexProtocolInstalled (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI RedfishPlatformConfigDxeUnload (IN EFI_HANDLE ImageHandle)
 
EFI_STATUS EFIAPI RedfishPlatformConfigDxeEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

REDFISH_PLATFORM_CONFIG_PRIVATEmRedfishPlatformConfigPrivate = NULL
 

Detailed Description

The implementation of EDKII Redfish Platform Config Protocol.

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

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

Definition in file RedfishPlatformConfigDxe.c.

Function Documentation

◆ BuildMenuPath()

CHAR8 * BuildMenuPath ( IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE StatementPrivate)

Build the menu path to given statement instance. It is caller's responsibility to free returned string buffer.

Parameters
[in]StatementPrivatePointer to statement private instance.
Return values
CHAR8* Menu path to given statement.
NULLCan not find menu path.

Definition at line 318 of file RedfishPlatformConfigDxe.c.

◆ CompareHiiStatementValue()

INTN CompareHiiStatementValue ( IN HII_STATEMENT_VALUE Value1,
IN HII_STATEMENT_VALUE Value2 
)

Compare two value in HII statement format.

Parameters
[in]Value1First value to compare.
[in]Value2Second value to be compared.
Return values
INTN0 is returned when two values are equal. 1 is returned when first value is greater than second value. -1 is returned when second value is greater than first value.

Definition at line 786 of file RedfishPlatformConfigDxe.c.

◆ DumpHiiStatementPrompt()

EFI_STATUS DumpHiiStatementPrompt ( IN UINTN  ErrorLevel,
IN EFI_HII_HANDLE  HiiHandle,
IN HII_STATEMENT HiiStatement,
IN CHAR8 *Message  OPTIONAL 
)

Debug dump HII statement prompt string.

Parameters
[in]ErrorLevelDEBUG macro error level
[in]HiiHandleHII handle instance
[in]HiiStatementHII statement
[in]MessageDebug message
Return values
EFI_SUCCESSDump HII statement string successfully
OthersErrors occur

Definition at line 274 of file RedfishPlatformConfigDxe.c.

◆ DumpHiiStatementValue()

EFI_STATUS DumpHiiStatementValue ( IN UINTN  ErrorLevel,
IN HII_STATEMENT_VALUE Value,
IN CHAR8 *Message  OPTIONAL 
)

Debug dump HII statement value.

Parameters
[in]ErrorLevelDEBUG macro error level
[in]ValueHII statement value to dump
[in]MessageDebug message
Return values
EFI_SUCCESSDump HII statement value successfully
OthersErrors occur

Definition at line 219 of file RedfishPlatformConfigDxe.c.

◆ DumpOrderedListValue()

VOID DumpOrderedListValue ( IN HII_STATEMENT OrderedListStatement)

Dump the value in ordered list buffer.

Parameters
[in]OrderedListStatementOrdered list statement.

Definition at line 1049 of file RedfishPlatformConfigDxe.c.

◆ ExtendHiiValueToU64()

UINT64 ExtendHiiValueToU64 ( IN HII_STATEMENT_VALUE Value)

Zero extend integer/boolean to UINT64 for comparing.

Parameters
ValueHII Value to be converted.

Definition at line 607 of file RedfishPlatformConfigDxe.c.

◆ FindFormLinkToThis()

Seach forms in this HII package and find which form links to give form.

Parameters
[in]FormPrivatePointer to form private instance.
Return values
REDFISH_PLATFORM_CONFIG_FORM_PRIVATEPointer to target form
NULLNo form links to give form.

Definition at line 148 of file RedfishPlatformConfigDxe.c.

◆ GetAttributeNameFromConfigLanguage()

CHAR8 * GetAttributeNameFromConfigLanguage ( IN CHAR8 *  ConfigLanguage)

Get the attribute name from config language.

For example: /Bios/Attributes/BiosOption1 is config language and attribute name is BiosOption1.

Parameters
[in]ConfigLanguageConfig language string.
Return values
CHAR8* Attribute name string.
NULLCan not find attribute name.

Definition at line 416 of file RedfishPlatformConfigDxe.c.

◆ GetFullSchemaString()

CHAR8 * GetFullSchemaString ( IN CHAR8 *  Schema,
IN CHAR8 *  Version 
)

Return the full Redfish schema string from the given Schema and Version.

Returned schema string is: Schema + '.' + Version

Parameters
[in]SchemaSchema string
[in]VersionSchema version string
Return values
CHAR8* Schema string. NULL when errors occur.

Definition at line 1530 of file RedfishPlatformConfigDxe.c.

◆ HiiDatabaseProtocolInstalled()

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

This is a EFI_HII_DATABASE_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 2505 of file RedfishPlatformConfigDxe.c.

◆ HiiStatementToAttributeType()

EDKII_REDFISH_ATTRIBUTE_TYPES HiiStatementToAttributeType ( IN HII_STATEMENT HiiStatement)

Return Redfish attribute type from given HII statement operand.

Parameters
[in]HiiStatementTarget HII statement.
Return values
EDKII_REDFISH_ATTRIBUTE_TYPESAttribute type.

Definition at line 565 of file RedfishPlatformConfigDxe.c.

◆ HiiStringProtocolInstalled()

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

This is a EFI_HII_STRING_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 2470 of file RedfishPlatformConfigDxe.c.

◆ HiiStringToOneOfOptionValue()

EFI_STATUS HiiStringToOneOfOptionValue ( IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE Statement,
IN CHAR8 *  Schema,
IN EFI_STRING  HiiString,
OUT HII_STATEMENT_VALUE Value 
)

Convert HII string to the value in HII one-of opcode.

Parameters
[in]StatementStatement private instance
[in]SchemaSchema string
[in]HiiStringInput string
[out]ValueValue returned
Return values
EFI_SUCCESSHII value is returned successfully.
OthersErrors occur

Definition at line 902 of file RedfishPlatformConfigDxe.c.

◆ HiiStringToOrderedListOptionValue()

EFI_STATUS HiiStringToOrderedListOptionValue ( IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE Statement,
IN CHAR8 *  Schema,
IN EFI_STRING  HiiString,
OUT UINT64 *  Value 
)

Convert HII string to the value in HII ordered list opcode.

Parameters
[in]StatementStatement private instance
[in]SchemaSchema string
[in]HiiStringInput string
[out]ValueValue returned
Return values
EFI_SUCCESSHII value is returned successfully.
OthersErrors occur

Definition at line 1203 of file RedfishPlatformConfigDxe.c.

◆ HiiValueToOneOfOptionStringId()

EFI_STRING_ID HiiValueToOneOfOptionStringId ( IN HII_STATEMENT HiiStatement,
IN HII_STATEMENT_VALUE Value 
)

Convert HII value to the string in HII one-of opcode.

Parameters
[in]HiiStatementHII Statement private instance
[in]ValueHII Statement value
Return values
EFI_STRING_IDThe string ID in HII database. 0 is returned when something goes wrong.

Definition at line 855 of file RedfishPlatformConfigDxe.c.

◆ HiiValueToOrderedListOptionStringId()

EFI_STRING_ID * HiiValueToOrderedListOptionStringId ( IN HII_STATEMENT HiiStatement,
OUT UINTN ReturnSize 
)

Convert HII value to the string in HII ordered list opcode. It's caller's responsibility to free returned buffer using FreePool().

Parameters
[in]HiiStatementHII Statement private instance
[out]ReturnSizeThe size of returned array
Return values
EFI_STRING_IDThe string ID array for options in ordered list.

Definition at line 1138 of file RedfishPlatformConfigDxe.c.

◆ HiiValueToRedfishNumeric()

EFI_STATUS HiiValueToRedfishNumeric ( IN HII_STATEMENT_VALUE Value,
OUT EDKII_REDFISH_VALUE RedfishValue 
)

Convert HII value to numeric value in Redfish format.

Parameters
[in]ValueValue to be converted.
[out]RedfishValueValue in Redfish format.
Return values
EFI_SUCCESSRedfish value is returned successfully.
OthersErrors occur

Definition at line 966 of file RedfishPlatformConfigDxe.c.

◆ HiiValueToRedfishValue()

EFI_STATUS HiiValueToRedfishValue ( IN EFI_HII_HANDLE  HiiHandle,
IN CHAR8 *  FullSchema,
IN HII_STATEMENT HiiStatement,
IN HII_STATEMENT_VALUE Value,
OUT EDKII_REDFISH_VALUE RedfishValue 
)

Convert HII value to Redfish value.

Parameters
[in]HiiHandleHII handle.
[in]FullSchemaSchema string.
[in]HiiStatementHII statement.
[in]ValueValue to be converted.
[out]RedfishValueValue in Redfish format.
Return values
EFI_SUCCESSRedfish value is returned successfully.
OthersErrors occur

Definition at line 1272 of file RedfishPlatformConfigDxe.c.

◆ IsEmptyRedfishStack()

BOOLEAN IsEmptyRedfishStack ( IN REDFISH_STACK Stack)

Check and see if stack is empty or not.

Parameters
[in]StackPointer to stack instance.
Return values
TRUEStack is empty.
FALSEStack is not empty.

Definition at line 83 of file RedfishPlatformConfigDxe.c.

◆ NewRedfishStack()

REDFISH_STACK * NewRedfishStack ( IN UINTN  StackSize)

Create a new stack instance with given stack size.

Parameters
[in]StackSizeThe size of stack.
Return values
REDFISH_STACK* Pointer to created stack.
NULLOut of resource.

Definition at line 27 of file RedfishPlatformConfigDxe.c.

◆ OneOfStatementToAttributeValues()

EFI_STATUS OneOfStatementToAttributeValues ( IN EFI_HII_HANDLE  HiiHandle,
IN CHAR8 *  SchemaName,
IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE StatementPrivate,
OUT EDKII_REDFISH_POSSIBLE_VALUES Values 
)

Convert one-of options to string array in Redfish attribute.

Parameters
[in]HiiHandleHII handle.
[in]SchemaNameSchema string.
[in]StatementPrivatePointer to statement instance.
[out]ValuesAttribute value array.
Return values
EFI_SUCCESSOptions are converted successfully.
OtherError occurs.

Definition at line 484 of file RedfishPlatformConfigDxe.c.

◆ OrderedListGetArrayData()

UINT64 OrderedListGetArrayData ( IN VOID *  Array,
IN UINT8  Type,
IN UINTN  Index 
)

Return data element in an Array by its Index in ordered list array buffer.

Parameters
ArrayThe data array.
TypeType of the data in this array.
IndexZero based index for data in this array.
Return values
ValueThe data to be returned

Definition at line 692 of file RedfishPlatformConfigDxe.c.

◆ OrderedListOptionValueToStringId()

EFI_STRING_ID OrderedListOptionValueToStringId ( IN HII_STATEMENT HiiStatement,
IN UINT64  Value 
)

Find string ID of option if its value equals to given value.

Parameters
[in]HiiStatementStatement to search.
[in]ValueTarget value.
Return values
EFI_SUCCESSHII value is returned successfully.
OthersErrors occur

Definition at line 738 of file RedfishPlatformConfigDxe.c.

◆ OrderedListSetArrayData()

VOID OrderedListSetArrayData ( IN VOID *  Array,
IN UINT8  Type,
IN UINTN  Index,
IN UINT64  Value 
)

Set value of a data element in an Array by its Index in ordered list buffer.

Parameters
ArrayThe data array.
TypeType of the data in this array.
IndexZero based index for data in this array.
ValueThe value to be set.

Definition at line 650 of file RedfishPlatformConfigDxe.c.

◆ PopRedfishStack()

VOID * PopRedfishStack ( IN REDFISH_STACK Stack)

Pop an item from stack.

Parameters
[in]StackPointer to stack instance.
Return values
VOID* Pointer to popped item.
NULLStack is empty.

Definition at line 126 of file RedfishPlatformConfigDxe.c.

◆ PushRedfishStack()

EFI_STATUS PushRedfishStack ( IN REDFISH_STACK Stack,
IN VOID *  Data 
)

Push an item to stack.

Parameters
[in]StackPointer to stack instance.
[in]DataPointer to data.
Return values
EFI_OUT_OF_RESOURCESStack is full.
EFI_SUCCESSItem is pushed successfully.

Definition at line 101 of file RedfishPlatformConfigDxe.c.

◆ RedfishNumericToHiiValue()

EFI_STATUS RedfishNumericToHiiValue ( IN EDKII_REDFISH_VALUE RedfishValue,
OUT HII_STATEMENT_VALUE Value 
)

Convert numeric value in Redfish format to HII value.

Parameters
[in]RedfishValueValue in Redfish format to be converted.
[out]ValueHII value returned.
Return values
EFI_SUCCESSHII value is returned successfully.
OthersErrors occur

Definition at line 1016 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigDxeEntryPoint()

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

This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both device drivers and bus drivers.

Parameters
ImageHandleThe firmware allocated handle for the UEFI image.
SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe operation completed successfully.
OthersAn unexpected error occurred.

Definition at line 2666 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigDxeUnload()

EFI_STATUS EFIAPI RedfishPlatformConfigDxeUnload ( IN EFI_HANDLE  ImageHandle)

Unloads an image.

Parameters
ImageHandleHandle that identifies the image to be unloaded.
Return values
EFI_SUCCESSThe image has been unloaded.
EFI_INVALID_PARAMETERImageHandle is not a valid image handle.

Definition at line 2603 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigFormUpdateNotify()

EFI_STATUS EFIAPI RedfishPlatformConfigFormUpdateNotify ( IN UINT8  PackageType,
IN CONST EFI_GUID PackageGuid,
IN CONST EFI_HII_PACKAGE_HEADER Package,
IN EFI_HII_HANDLE  Handle,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType 
)

Functions which are registered to receive notification of database events have this prototype. The actual event is encoded in NotifyType. The following table describes how PackageType, PackageGuid, Handle, and Package are used for each of the notification types.

Parameters
[in]PackageTypePackage type of the notification.
[in]PackageGuidIf PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to the GUID from the Guid field of EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it must be NULL.
[in]PackagePoints to the package referred to by the notification Handle The handle of the package list which contains the specified package.
[in]HandleThe HII handle.
[in]NotifyTypeThe type of change concerning the database. See EFI_HII_DATABASE_NOTIFY_TYPE.

Definition at line 2426 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigGetStatementCommon()

EFI_STATUS RedfishPlatformConfigGetStatementCommon ( IN REDFISH_PLATFORM_CONFIG_PRIVATE RedfishPlatformConfigPrivate,
IN CHAR8 *  Schema,
IN EFI_STRING  ConfigureLang,
OUT REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE **  Statement 
)

Common implementation to get statement private instance.

Parameters
[in]RedfishPlatformConfigPrivatePrivate instance.
[in]SchemaRedfish schema string.
[in]ConfigureLangConfigure language that refers to this statement.
[out]StatementStatement instance
Return values
EFI_SUCCESSHII value is returned successfully.
OthersErrors occur

Definition at line 1568 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigProtocolGetAttribute()

EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetAttribute ( IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL This,
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]ThisPointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
[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 2307 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigProtocolGetConfigureLang()

EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetConfigureLang ( 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 Configure Language from platform configuration by the given Schema and RegexPattern.

Parameters
[in]ThisPointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
[in]SchemaThe Redfish schema to query.
[in]VersionThe Redfish version to query.
[in]RegexPatternThe target Configure Language pattern. This is used for regular expression matching.
[out]ConfigureLangListThe list of Configure Language.
[out]CountThe number of Configure Language in ConfigureLangList.
Return values
EFI_SUCCESSConfigureLangList is returned successfully.
OthersSome error happened.

Definition at line 2001 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigProtocolGetDefaultValue()

EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetDefaultValue ( 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 
)

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

Parameters
[in]ThisPointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
[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 2227 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigProtocolGetSupportedSchema()

EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetSupportedSchema ( IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL This,
OUT CHAR8 **  SupportedSchema 
)

Get the list of supported Redfish schema from platform configuration.

Parameters
[in]ThisPointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
[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.
OthersSome error happened.

Definition at line 2125 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigProtocolGetValue()

EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetValue ( IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL This,
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]ThisPointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
[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.
OthersSome error happened.

Definition at line 1637 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigProtocolSetValue()

EFI_STATUS EFIAPI RedfishPlatformConfigProtocolSetValue ( IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL This,
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]ThisPointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
[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.
OthersSome error happened.

Definition at line 1901 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigSaveQuestionValue()

EFI_STATUS RedfishPlatformConfigSaveQuestionValue ( IN HII_FORMSET HiiFormset,
IN HII_FORM HiiForm,
IN HII_STATEMENT HiiStatement,
IN HII_STATEMENT_VALUE Value 
)

Function to save question value into HII database.

Parameters
[in]HiiFormsetHII form-set instance
[in]HiiFormHII form instance
[in]HiiStatementHII statement that keeps new value.
[in]ValueNew value to apply.
Return values
EFI_SUCCESSHII value is returned successfully.
OthersErrors occur

Definition at line 1707 of file RedfishPlatformConfigDxe.c.

◆ RedfishPlatformConfigSetStatementCommon()

EFI_STATUS RedfishPlatformConfigSetStatementCommon ( IN REDFISH_PLATFORM_CONFIG_PRIVATE RedfishPlatformConfigPrivate,
IN CHAR8 *  Schema,
IN EFI_STRING  ConfigureLang,
IN HII_STATEMENT_VALUE StatementValue 
)

Common implementation to set statement private instance.

Parameters
[in]RedfishPlatformConfigPrivatePrivate instance.
[in]SchemaRedfish schema string.
[in]ConfigureLangConfigure language that refers to this statement.
[in]StatementValueStatement value.
Return values
EFI_SUCCESSHII value is returned successfully.
OthersErrors occur

Definition at line 1753 of file RedfishPlatformConfigDxe.c.

◆ RegexProtocolInstalled()

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

This is a EFI_REGULAR_EXPRESSION_PROTOCOL notification event handler.

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

Definition at line 2568 of file RedfishPlatformConfigDxe.c.

◆ ReleaseRedfishStack()

VOID ReleaseRedfishStack ( IN REDFISH_STACK Stack)

Release stack buffer.

Parameters
[in]StackPointer to stack instance.

Definition at line 61 of file RedfishPlatformConfigDxe.c.

◆ StrToAsciiStr()

CHAR8 * StrToAsciiStr ( IN EFI_STRING  UnicodeString)

Convert input unicode string to ascii string. It's caller's responsibility to free returned buffer using FreePool().

Parameters
[in]UnicodeStringUnicode string to be converted.
Return values
CHAR8* Ascii string on return.

Definition at line 1491 of file RedfishPlatformConfigDxe.c.

◆ StrToUnicodeStr()

EFI_STRING StrToUnicodeStr ( IN CHAR8 *  AsciiString)

Convert input ascii string to unicode string. It's caller's responsibility to free returned buffer using FreePool().

Parameters
[in]AsciiStringAscii string to be converted.
Return values
CHAR16* Unicode string on return.

Definition at line 1454 of file RedfishPlatformConfigDxe.c.

Variable Documentation

◆ mRedfishPlatformConfigPrivate

REDFISH_PLATFORM_CONFIG_PRIVATE* mRedfishPlatformConfigPrivate = NULL

Definition at line 15 of file RedfishPlatformConfigDxe.c.