TianoCore EDK2 master
|
Go to the source code of this file.
Variables | |
REDFISH_PLATFORM_CONFIG_PRIVATE * | mRedfishPlatformConfigPrivate = NULL |
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.
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.
[in] | StatementPrivate | Pointer to statement private instance. |
CHAR8 | * Menu path to given statement. |
NULL | Can not find menu path. |
Definition at line 318 of file RedfishPlatformConfigDxe.c.
INTN CompareHiiStatementValue | ( | IN HII_STATEMENT_VALUE * | Value1, |
IN HII_STATEMENT_VALUE * | Value2 | ||
) |
Compare two value in HII statement format.
[in] | Value1 | First value to compare. |
[in] | Value2 | Second value to be compared. |
INTN | 0 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.
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.
[in] | ErrorLevel | DEBUG macro error level |
[in] | HiiHandle | HII handle instance |
[in] | HiiStatement | HII statement |
[in] | Message | Debug message |
EFI_SUCCESS | Dump HII statement string successfully |
Others | Errors occur |
Definition at line 274 of file RedfishPlatformConfigDxe.c.
EFI_STATUS DumpHiiStatementValue | ( | IN UINTN | ErrorLevel, |
IN HII_STATEMENT_VALUE * | Value, | ||
IN CHAR8 *Message | OPTIONAL | ||
) |
Debug dump HII statement value.
[in] | ErrorLevel | DEBUG macro error level |
[in] | Value | HII statement value to dump |
[in] | Message | Debug message |
EFI_SUCCESS | Dump HII statement value successfully |
Others | Errors occur |
Definition at line 219 of file RedfishPlatformConfigDxe.c.
VOID DumpOrderedListValue | ( | IN HII_STATEMENT * | OrderedListStatement | ) |
Dump the value in ordered list buffer.
[in] | OrderedListStatement | Ordered list statement. |
Definition at line 1049 of file RedfishPlatformConfigDxe.c.
UINT64 ExtendHiiValueToU64 | ( | IN HII_STATEMENT_VALUE * | Value | ) |
Zero extend integer/boolean to UINT64 for comparing.
Value | HII Value to be converted. |
Definition at line 607 of file RedfishPlatformConfigDxe.c.
REDFISH_PLATFORM_CONFIG_FORM_PRIVATE * FindFormLinkToThis | ( | IN REDFISH_PLATFORM_CONFIG_FORM_PRIVATE * | FormPrivate | ) |
Seach forms in this HII package and find which form links to give form.
[in] | FormPrivate | Pointer to form private instance. |
REDFISH_PLATFORM_CONFIG_FORM_PRIVATE | Pointer to target form |
NULL | No form links to give form. |
Definition at line 148 of file RedfishPlatformConfigDxe.c.
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.
[in] | ConfigLanguage | Config language string. |
CHAR8 | * Attribute name string. |
NULL | Can not find attribute name. |
Definition at line 416 of file RedfishPlatformConfigDxe.c.
Return the full Redfish schema string from the given Schema and Version.
Returned schema string is: Schema + '.' + Version
[in] | Schema | Schema string |
[in] | Version | Schema version string |
CHAR8 | * Schema string. NULL when errors occur. |
Definition at line 1530 of file RedfishPlatformConfigDxe.c.
This is a EFI_HII_DATABASE_PROTOCOL notification event handler.
Install HII package notification.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | Pointer to the notification function's context. |
Definition at line 2505 of file RedfishPlatformConfigDxe.c.
EDKII_REDFISH_ATTRIBUTE_TYPES HiiStatementToAttributeType | ( | IN HII_STATEMENT * | HiiStatement | ) |
Return Redfish attribute type from given HII statement operand.
[in] | HiiStatement | Target HII statement. |
EDKII_REDFISH_ATTRIBUTE_TYPES | Attribute type. |
Definition at line 565 of file RedfishPlatformConfigDxe.c.
This is a EFI_HII_STRING_PROTOCOL notification event handler.
Install HII package notification.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | Pointer to the notification function's context. |
Definition at line 2470 of file RedfishPlatformConfigDxe.c.
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.
[in] | Statement | Statement private instance |
[in] | Schema | Schema string |
[in] | HiiString | Input string |
[out] | Value | Value returned |
EFI_SUCCESS | HII value is returned successfully. |
Others | Errors occur |
Definition at line 902 of file RedfishPlatformConfigDxe.c.
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.
[in] | Statement | Statement private instance |
[in] | Schema | Schema string |
[in] | HiiString | Input string |
[out] | Value | Value returned |
EFI_SUCCESS | HII value is returned successfully. |
Others | Errors occur |
Definition at line 1203 of file RedfishPlatformConfigDxe.c.
EFI_STRING_ID HiiValueToOneOfOptionStringId | ( | IN HII_STATEMENT * | HiiStatement, |
IN HII_STATEMENT_VALUE * | Value | ||
) |
Convert HII value to the string in HII one-of opcode.
[in] | HiiStatement | HII Statement private instance |
[in] | Value | HII Statement value |
EFI_STRING_ID | The string ID in HII database. 0 is returned when something goes wrong. |
Definition at line 855 of file RedfishPlatformConfigDxe.c.
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().
[in] | HiiStatement | HII Statement private instance |
[out] | ReturnSize | The size of returned array |
EFI_STRING_ID | The string ID array for options in ordered list. |
Definition at line 1138 of file RedfishPlatformConfigDxe.c.
EFI_STATUS HiiValueToRedfishNumeric | ( | IN HII_STATEMENT_VALUE * | Value, |
OUT EDKII_REDFISH_VALUE * | RedfishValue | ||
) |
Convert HII value to numeric value in Redfish format.
[in] | Value | Value to be converted. |
[out] | RedfishValue | Value in Redfish format. |
EFI_SUCCESS | Redfish value is returned successfully. |
Others | Errors occur |
Definition at line 966 of file RedfishPlatformConfigDxe.c.
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.
[in] | HiiHandle | HII handle. |
[in] | FullSchema | Schema string. |
[in] | HiiStatement | HII statement. |
[in] | Value | Value to be converted. |
[out] | RedfishValue | Value in Redfish format. |
EFI_SUCCESS | Redfish value is returned successfully. |
Others | Errors occur |
Definition at line 1272 of file RedfishPlatformConfigDxe.c.
BOOLEAN IsEmptyRedfishStack | ( | IN REDFISH_STACK * | Stack | ) |
Check and see if stack is empty or not.
[in] | Stack | Pointer to stack instance. |
TRUE | Stack is empty. |
FALSE | Stack is not empty. |
Definition at line 83 of file RedfishPlatformConfigDxe.c.
REDFISH_STACK * NewRedfishStack | ( | IN UINTN | StackSize | ) |
Create a new stack instance with given stack size.
[in] | StackSize | The size of stack. |
REDFISH_STACK | * Pointer to created stack. |
NULL | Out of resource. |
Definition at line 27 of file RedfishPlatformConfigDxe.c.
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.
[in] | HiiHandle | HII handle. |
[in] | SchemaName | Schema string. |
[in] | StatementPrivate | Pointer to statement instance. |
[out] | Values | Attribute value array. |
EFI_SUCCESS | Options are converted successfully. |
Other | Error occurs. |
Definition at line 484 of file RedfishPlatformConfigDxe.c.
Return data element in an Array by its Index in ordered list array buffer.
Array | The data array. |
Type | Type of the data in this array. |
Index | Zero based index for data in this array. |
Value | The data to be returned |
Definition at line 692 of file RedfishPlatformConfigDxe.c.
EFI_STRING_ID OrderedListOptionValueToStringId | ( | IN HII_STATEMENT * | HiiStatement, |
IN UINT64 | Value | ||
) |
Find string ID of option if its value equals to given value.
[in] | HiiStatement | Statement to search. |
[in] | Value | Target value. |
EFI_SUCCESS | HII value is returned successfully. |
Others | Errors occur |
Definition at line 738 of file RedfishPlatformConfigDxe.c.
Set value of a data element in an Array by its Index in ordered list buffer.
Array | The data array. |
Type | Type of the data in this array. |
Index | Zero based index for data in this array. |
Value | The value to be set. |
Definition at line 650 of file RedfishPlatformConfigDxe.c.
VOID * PopRedfishStack | ( | IN REDFISH_STACK * | Stack | ) |
Pop an item from stack.
[in] | Stack | Pointer to stack instance. |
VOID | * Pointer to popped item. |
NULL | Stack is empty. |
Definition at line 126 of file RedfishPlatformConfigDxe.c.
EFI_STATUS PushRedfishStack | ( | IN REDFISH_STACK * | Stack, |
IN VOID * | Data | ||
) |
Push an item to stack.
[in] | Stack | Pointer to stack instance. |
[in] | Data | Pointer to data. |
EFI_OUT_OF_RESOURCES | Stack is full. |
EFI_SUCCESS | Item is pushed successfully. |
Definition at line 101 of file RedfishPlatformConfigDxe.c.
EFI_STATUS RedfishNumericToHiiValue | ( | IN EDKII_REDFISH_VALUE * | RedfishValue, |
OUT HII_STATEMENT_VALUE * | Value | ||
) |
Convert numeric value in Redfish format to HII value.
[in] | RedfishValue | Value in Redfish format to be converted. |
[out] | Value | HII value returned. |
EFI_SUCCESS | HII value is returned successfully. |
Others | Errors occur |
Definition at line 1016 of file RedfishPlatformConfigDxe.c.
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.
ImageHandle | The firmware allocated handle for the UEFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The operation completed successfully. |
Others | An unexpected error occurred. |
Definition at line 2666 of file RedfishPlatformConfigDxe.c.
EFI_STATUS EFIAPI RedfishPlatformConfigDxeUnload | ( | IN EFI_HANDLE | ImageHandle | ) |
Unloads an image.
ImageHandle | Handle that identifies the image to be unloaded. |
EFI_SUCCESS | The image has been unloaded. |
EFI_INVALID_PARAMETER | ImageHandle is not a valid image handle. |
Definition at line 2603 of file RedfishPlatformConfigDxe.c.
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.
[in] | PackageType | Package type of the notification. |
[in] | PackageGuid | If 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] | Package | Points to the package referred to by the notification Handle The handle of the package list which contains the specified package. |
[in] | Handle | The HII handle. |
[in] | NotifyType | The type of change concerning the database. See EFI_HII_DATABASE_NOTIFY_TYPE. |
Definition at line 2426 of file RedfishPlatformConfigDxe.c.
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.
[in] | RedfishPlatformConfigPrivate | Private instance. |
[in] | Schema | Redfish schema string. |
[in] | ConfigureLang | Configure language that refers to this statement. |
[out] | Statement | Statement instance |
EFI_SUCCESS | HII value is returned successfully. |
Others | Errors occur |
Definition at line 1568 of file RedfishPlatformConfigDxe.c.
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.
[in] | This | Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. |
[in] | Schema | The Redfish schema to query. |
[in] | Version | The Redfish version to query. |
[in] | ConfigureLang | The target value which match this configure Language. |
[out] | AttributeValue | The attribute value. |
EFI_SUCCESS | Value is returned successfully. |
Others | Some error happened. |
Definition at line 2307 of file RedfishPlatformConfigDxe.c.
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.
[in] | This | Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. |
[in] | Schema | The Redfish schema to query. |
[in] | Version | The Redfish version to query. |
[in] | RegexPattern | The target Configure Language pattern. This is used for regular expression matching. |
[out] | ConfigureLangList | The list of Configure Language. |
[out] | Count | The number of Configure Language in ConfigureLangList. |
EFI_SUCCESS | ConfigureLangList is returned successfully. |
Others | Some error happened. |
Definition at line 2001 of file RedfishPlatformConfigDxe.c.
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.
[in] | This | Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. |
[in] | Schema | The Redfish schema to query. |
[in] | Version | The Redfish version to query. |
[in] | ConfigureLang | The target value which match this configure Language. |
[in] | DefaultClass | The UEFI defined default class. Please refer to UEFI spec. 33.2.5.8 "defaults" for details. |
[out] | Value | The returned value. |
EFI_SUCCESS | Value is returned successfully. |
Others | Some error happened. |
Definition at line 2227 of file RedfishPlatformConfigDxe.c.
EFI_STATUS EFIAPI RedfishPlatformConfigProtocolGetSupportedSchema | ( | IN EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL * | This, |
OUT CHAR8 ** | SupportedSchema | ||
) |
Get the list of supported Redfish schema from platform configuration.
[in] | This | Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. |
[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(). |
EFI_SUCCESS | Schema is returned successfully. |
Others | Some error happened. |
Definition at line 2125 of file RedfishPlatformConfigDxe.c.
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.
[in] | This | Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. |
[in] | Schema | The Redfish schema to query. |
[in] | Version | The Redfish version to query. |
[in] | ConfigureLang | The target value which match this configure Language. |
[out] | Value | The returned value. |
EFI_SUCCESS | Value is returned successfully. |
Others | Some error happened. |
Definition at line 1637 of file RedfishPlatformConfigDxe.c.
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.
[in] | This | Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. |
[in] | Schema | The Redfish schema to query. |
[in] | Version | The Redfish version to query. |
[in] | ConfigureLang | The target value which match this configure Language. |
[in] | Value | The value to set. |
EFI_SUCCESS | Value is returned successfully. |
Others | Some error happened. |
Definition at line 1901 of file RedfishPlatformConfigDxe.c.
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.
[in] | HiiFormset | HII form-set instance |
[in] | HiiForm | HII form instance |
[in] | HiiStatement | HII statement that keeps new value. |
[in] | Value | New value to apply. |
EFI_SUCCESS | HII value is returned successfully. |
Others | Errors occur |
Definition at line 1707 of file RedfishPlatformConfigDxe.c.
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.
[in] | RedfishPlatformConfigPrivate | Private instance. |
[in] | Schema | Redfish schema string. |
[in] | ConfigureLang | Configure language that refers to this statement. |
[in] | StatementValue | Statement value. |
EFI_SUCCESS | HII value is returned successfully. |
Others | Errors occur |
Definition at line 1753 of file RedfishPlatformConfigDxe.c.
This is a EFI_REGULAR_EXPRESSION_PROTOCOL notification event handler.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | Pointer to the notification function's context. |
Definition at line 2568 of file RedfishPlatformConfigDxe.c.
VOID ReleaseRedfishStack | ( | IN REDFISH_STACK * | Stack | ) |
Release stack buffer.
[in] | Stack | Pointer to stack instance. |
Definition at line 61 of file RedfishPlatformConfigDxe.c.
CHAR8 * StrToAsciiStr | ( | IN EFI_STRING | UnicodeString | ) |
Convert input unicode string to ascii string. It's caller's responsibility to free returned buffer using FreePool().
[in] | UnicodeString | Unicode string to be converted. |
CHAR8 | * Ascii string on return. |
Definition at line 1491 of file RedfishPlatformConfigDxe.c.
EFI_STRING StrToUnicodeStr | ( | IN CHAR8 * | AsciiString | ) |
Convert input ascii string to unicode string. It's caller's responsibility to free returned buffer using FreePool().
[in] | AsciiString | Ascii string to be converted. |
CHAR16 | * Unicode string on return. |
Definition at line 1454 of file RedfishPlatformConfigDxe.c.
REDFISH_PLATFORM_CONFIG_PRIVATE* mRedfishPlatformConfigPrivate = NULL |
Definition at line 15 of file RedfishPlatformConfigDxe.c.