TianoCore EDK2 master
|
Go to the source code of this file.
Variables | |
REDFISH_PLATFORM_CONFIG_PRIVATE * | mRedfishPlatformConfigPrivate |
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 RedfishPlatformConfigImpl.c.
VOID BuildXUefiRedfishStringDatabase | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate | ) |
Build a x-UEFI-redfish database for the newly added x-UEFI-redfish language.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
Definition at line 1498 of file RedfishPlatformConfigImpl.c.
BOOLEAN CheckSupportedSchema | ( | IN REDFISH_PLATFORM_CONFIG_SCHEMA * | SupportedSchema, |
IN CHAR8 * | Schema | ||
) |
Check and see if this is supported schema or not.
[in] | SupportedSchema | The list of supported schema. |
[in] | Schema | Schema string to be checked. |
BOOLEAN | TRUE if this is supported schema. FALSE otherwise. |
Definition at line 431 of file RedfishPlatformConfigImpl.c.
BOOLEAN CreateXuefiLanguageStringIdMap | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate, |
IN EFI_HII_STRING_PACKAGE_HDR * | HiiStringPackageHeader, | ||
OUT UINTN * | TotalStringAdded | ||
) |
Get x-UEFI-redfish string and language by string ID.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
[in] | HiiStringPackageHeader | HII string package header. |
[out] | TotalStringAdded | Return the total strings added to database. |
TRUE | x-UEFI-redfish string and ID map is inserted to database. FALSE Something is wrong when insert x-UEFI-redfish string and ID map. |
Definition at line 1210 of file RedfishPlatformConfigImpl.c.
EFI_STATUS DumpFormset | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate | ) |
Debug dump HII form-set data.
[in] | FormsetPrivate | HII form-set private instance. |
EFI_SUCCESS | Dump form-set successfully |
Others | Errors occur |
Definition at line 60 of file RedfishPlatformConfigImpl.c.
EFI_STATUS DumpFormsetList | ( | IN LIST_ENTRY * | FormsetList | ) |
Debug dump HII form-set list.
[in] | FormsetList | Form-set list instance |
EFI_SUCCESS | Dump list successfully |
Others | Errors occur |
Definition at line 114 of file RedfishPlatformConfigImpl.c.
EFI_STATUS DumpHiiString | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN EFI_STRING_ID | StringId | ||
) |
Debug dump HII string.
[in] | HiiHandle | HII handle instance |
[in] | StringId | HII string to dump |
EFI_SUCCESS | Dump HII string successfully |
Others | Errors occur |
Definition at line 27 of file RedfishPlatformConfigImpl.c.
REDFISH_X_UEFI_STRING_DATABASE * GetExistOrCreateXuefiStringDatabase | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate, |
IN EFI_HII_STRING_PACKAGE_HDR * | HiiStringPackageHeader | ||
) |
Get the pointer of x-UEFI-redfish database or create a new database.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
[in] | HiiStringPackageHeader | HII string package header. |
Pointer | to REDFISH_X_UEFI_STRING_DATABASE. If NULL, it fails to obtain x-UEFI-redfish database. |
Definition at line 1041 of file RedfishPlatformConfigImpl.c.
REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * GetFormsetPrivateByHiiHandle | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN LIST_ENTRY * | FormsetList | ||
) |
Get form-set private instance by the given HII handle.
[in] | HiiHandle | HII handle instance. |
[in] | FormsetList | Form-set list to search. |
REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE | * Pointer to form-set private instance. |
Definition at line 789 of file RedfishPlatformConfigImpl.c.
REDFISH_PLATFORM_CONFIG_PENDING_LIST * GetPendingList | ( | IN EFI_HII_HANDLE * | HiiHandle, |
IN LIST_ENTRY * | PendingList | ||
) |
Get all pending list.
[in] | HiiHandle | HII handle instance. |
[in] | PendingList | Pending list to keep pending data. |
REDFISH_PLATFORM_CONFIG_PENDING_LIST | * Pointer to pending list data. |
Definition at line 1910 of file RedfishPlatformConfigImpl.c.
REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE * GetStatementPrivateByConfigureLang | ( | IN LIST_ENTRY * | FormsetList, |
IN CHAR8 * | Schema, | ||
IN EFI_STRING | ConfigureLang | ||
) |
Get statement private instance by the given configure language.
[in] | FormsetList | Form-set list to search. |
[in] | Schema | Schema to be matched. |
[in] | ConfigureLang | Configure language. |
REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE | * Pointer to statement private instance. |
Definition at line 689 of file RedfishPlatformConfigImpl.c.
EFI_STATUS GetStatementPrivateByConfigureLangRegex | ( | IN EFI_REGULAR_EXPRESSION_PROTOCOL * | RegularExpressionProtocol, |
IN LIST_ENTRY * | FormsetList, | ||
IN CHAR8 * | Schema, | ||
IN EFI_STRING | Pattern, | ||
OUT REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_LIST * | StatementList | ||
) |
Search and find statement private instance by given regular expression pattern which describes the Configure Language.
[in] | RegularExpressionProtocol | Regular express protocol. |
[in] | FormsetList | Form-set list to search. |
[in] | Schema | Schema to be matched. |
[in] | Pattern | Regular expression pattern. |
[out] | StatementList | Statement list that match above pattern. |
EFI_SUCCESS | Statement list is returned. |
EFI_INVALID_PARAMETER | Input parameter is NULL. |
EFI_NOT_READY | Regular express protocol is NULL. |
EFI_NOT_FOUND | No statement is found. |
EFI_OUT_OF_RESOURCES | System is out of memory. |
Definition at line 563 of file RedfishPlatformConfigImpl.c.
EFI_STATUS GetSupportedSchema | ( | IN EFI_HII_HANDLE | HiiHandle, |
OUT REDFISH_PLATFORM_CONFIG_SCHEMA * | SupportedSchema | ||
) |
Get the list of supported schema from the given HII handle.
[in] | HiiHandle | HII handle instance. |
[out] | SupportedSchema | Supported schema on this HII handle. |
EFI_SUCCESS | Schema list is returned. |
EFI_INVALID_PARAMETER | HiiHandle is NULL or SupportedSchema is NULL. |
EFI_NOT_FOUND | No supported schema found. |
EFI_OUT_OF_RESOURCES | System is out of memory. |
Definition at line 468 of file RedfishPlatformConfigImpl.c.
EFI_STATUS GetXuefiStringAndLangByStringId | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate, |
IN EFI_STRING_ID | StringId, | ||
OUT CHAR16 **String | OPTIONAL, | ||
OUT CHAR8 **Language | OPTIONAL, | ||
OUT REDFISH_X_UEFI_STRING_DATABASE **XuefiStringDatabase | OPTIONAL | ||
) |
Get x-UEFI-redfish string and language by string ID.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
[in] | StringId | The HII string ID. |
[out] | String | Optionally return USC string. |
[out] | Language | Optionally return x-UEFI-redfish language. |
[out] | XuefiStringDatabase | Optionally return x-UEFI-redfish database. |
EFI_SUCCESS | String information is returned. EFI_INVALID_PARAMETER One of the given parameters to this function is invalid. EFI_NOT_FOUND String is not found. |
Definition at line 1416 of file RedfishPlatformConfigImpl.c.
EFI_STATUS HiiDeleteString | ( | IN EFI_STRING_ID | StringId, |
IN EFI_HII_HANDLE | HiiHandle | ||
) |
Delete a string from HII Package List by given HiiHandle.
[in] | StringId | Id of the string in HII database. |
[in] | HiiHandle | The HII package list handle. |
EFI_SUCCESS | The string was deleted successfully. |
EFI_INVALID_PARAMETER | StringId is zero. |
Definition at line 240 of file RedfishPlatformConfigImpl.c.
CHAR8 * HiiGetEnglishAsciiString | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN EFI_STRING_ID | StringId | ||
) |
Get ASCII string from HII database in English language. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool().
[in] | HiiHandle | A handle that was previously registered in the HII Database. |
[in] | StringId | The identifier of the string to retrieved from the string package associated with HiiHandle. |
NULL | The string specified by StringId is not present in the string package. |
Other | The string was returned. |
Definition at line 401 of file RedfishPlatformConfigImpl.c.
CHAR8 * HiiGetRedfishAsciiString | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN CHAR8 * | Language, | ||
IN EFI_STRING_ID | StringId | ||
) |
Retrieves a ASCII string from a string package in a given language. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool().
If HiiHandle is NULL, then ASSERT(). If StringId is 0, then ASSET.
[in] | HiiHandle | A handle that was previously registered in the HII Database. |
[in] | Language | The specified configure language to get string. |
[in] | StringId | The identifier of the string to retrieved from the string package associated with HiiHandle. |
NULL | The string specified by StringId is not present in the string package. |
Other | The string was returned. |
Definition at line 366 of file RedfishPlatformConfigImpl.c.
EFI_STRING HiiGetRedfishString | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN CHAR8 * | Language, | ||
IN EFI_STRING_ID | StringId | ||
) |
Retrieves a unicode string from a string package in a given language. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool().
If HiiHandle is NULL, then ASSERT(). If StringId is 0, then ASSET.
[in] | HiiHandle | A handle that was previously registered in the HII Database. |
[in] | Language | The specified configure language to get string. |
[in] | StringId | The identifier of the string to retrieved from the string package associated with HiiHandle. |
NULL | The string specified by StringId is not present in the string package. |
Other | The string was returned. |
Definition at line 275 of file RedfishPlatformConfigImpl.c.
Compare two HII strings. We don't check word alignment of the input string as same as the checking in StrLen function, because the HII string in the database is compact at the byte alignment.
[in] | FirstString | Input UCS format of string to search. |
[in] | SecondString | Input UCS format of string to look for in FirstString; |
0 | The strings are identical. !0 The strings are not identical. |
Definition at line 210 of file RedfishPlatformConfigImpl.c.
Return the HII string length. We don't check word alignment of the input string as same as the checking in StrLen function, because the HII string in the database is compact at the byte alignment.
[in] | String | Input UCS format string. |
Length | of the string. |
Definition at line 160 of file RedfishPlatformConfigImpl.c.
Return the HII string size. We don't check word alignment of the input string as same as the checking in StrLen function, because the HII string in the database is compact at the byte alignment.
[in] | String | Input UCS format string. |
Size | of the string. |
Definition at line 187 of file RedfishPlatformConfigImpl.c.
EFI_STATUS LoadFormset | ( | IN EFI_HII_HANDLE | HiiHandle, |
OUT REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate | ||
) |
Load the HII formset from the given HII handle.
[in] | HiiHandle | Target HII handle to load. |
[out] | FormsetPrivate | The formset private data. |
EFI_STATUS | The formset is loaded successfully. |
EFI_UNSUPPORTED | This formset doesn't have any x-UEFI-redfish configuration. |
Definition at line 1606 of file RedfishPlatformConfigImpl.c.
EFI_STATUS LoadFormsetList | ( | IN EFI_HII_HANDLE * | HiiHandle, |
OUT LIST_ENTRY * | FormsetList | ||
) |
Load formset list on given HII handle.
[in] | HiiHandle | HII handle to load formset list. |
[out] | FormsetList | Pointer to formset list returned on given handle. |
EFI_STATUS |
Definition at line 1809 of file RedfishPlatformConfigImpl.c.
REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * NewFormsetPrivate | ( | VOID | ) |
Create new form-set instance.
REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE | * Pointer to newly created form-set private instance. |
Definition at line 971 of file RedfishPlatformConfigImpl.c.
EFI_STATUS NewRedfishXuefiStringArray | ( | IN REDFISH_X_UEFI_STRING_DATABASE * | XuefiRedfishStringDatabase | ) |
Create new x-UEFI-redfish string array.
[in] | XuefiRedfishStringDatabase | The x-UEFI-redfish string database. |
EFI_OUT_OF_RESOURCES | Not enough memory for creating a new array. EFI_SUCCESS New array is created successfully. |
Definition at line 1001 of file RedfishPlatformConfigImpl.c.
EFI_STATUS NotifyFormsetDeleted | ( | IN EFI_HII_HANDLE * | HiiHandle, |
IN LIST_ENTRY * | PendingList | ||
) |
When HII database is updated and form-set is deleted. Keep deleted HII handle into pending list so we can process them later.
[in] | HiiHandle | HII handle instance. |
[in] | PendingList | Pending list to keep HII handle which is recently updated. |
EFI_SUCCESS | HII handle is saved in pending list. |
EFI_INVALID_PARAMETER | HiiHandle is NULL or PendingList is NULL. |
EFI_OUT_OF_RESOURCES | System is out of memory. |
Definition at line 2006 of file RedfishPlatformConfigImpl.c.
EFI_STATUS NotifyFormsetUpdate | ( | IN EFI_HII_HANDLE * | HiiHandle, |
IN LIST_ENTRY * | PendingList | ||
) |
When HII database is updated. Keep updated HII handle into pending list so we can process them later.
[in] | HiiHandle | HII handle instance. |
[in] | PendingList | Pending list to keep HII handle which is recently updated. |
EFI_SUCCESS | HII handle is saved in pending list. |
EFI_INVALID_PARAMETER | HiiHandle is NULL or PendingList is NULL. |
EFI_OUT_OF_RESOURCES | System is out of memory. |
Definition at line 1953 of file RedfishPlatformConfigImpl.c.
EFI_STATUS ProcessPendingList | ( | IN LIST_ENTRY * | FormsetList, |
IN LIST_ENTRY * | PendingList | ||
) |
There are HII database update and we need to process them accordingly so that we won't use stale data. This function will parse updated HII handle again in order to get updated data-set.
[in] | FormsetList | List to keep HII form-set. |
[in] | PendingList | List to keep HII handle that is updated. |
EFI_SUCCESS | HII handle is saved in pending list. |
EFI_INVALID_PARAMETER | FormsetList is NULL or PendingList is NULL. |
Definition at line 2059 of file RedfishPlatformConfigImpl.c.
EFI_STATUS RedfishXuefiStringAdjustArrays | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate, |
IN REDFISH_X_UEFI_STRING_DATABASE * | XuefiRedfishStringDatabase, | ||
IN EFI_STRING_ID | StringId | ||
) |
Check and allocate a new x-UEFI-redfish array if it is insufficient for the newly added x-UEFI-redfish string.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
[in] | XuefiRedfishStringDatabase | Pointer to the x-UEFI-redfish database. |
[in] | StringId | String ID added to database. |
EFI_SUCCESS | The size of x-UEFI-string array is adjusted or is not required to be adjusted. Otherwise, refer to the error code returned from NewRedfishXuefiStringArray(). |
Definition at line 1117 of file RedfishPlatformConfigImpl.c.
EFI_STATUS RedfishXuefiStringInsertDatabase | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate, |
IN EFI_HII_STRING_PACKAGE_HDR * | HiiStringPackageHeader, | ||
IN EFI_STRING_ID | StringId, | ||
IN CHAR16 * | StringTextPtr | ||
) |
Insert a x-UEFI-redfish string to database.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
[in] | HiiStringPackageHeader | Pointer to HII string package. |
[in] | StringId | The HII string ID |
[in] | StringTextPtr | Pointer to HII string text. |
EFI_SUCCESS | The HII string is added to database. EFI_LOAD_ERROR Something wrong when insert an HII string to database. |
Definition at line 1150 of file RedfishPlatformConfigImpl.c.
EFI_STATUS ReleaseFormset | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate | ) |
Release formset and all the forms and statements that belong to this formset.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
EFI_STATUS |
Definition at line 894 of file RedfishPlatformConfigImpl.c.
EFI_STATUS ReleaseFormsetList | ( | IN LIST_ENTRY * | FormsetList | ) |
Release formset list and all the forms that belong to this formset.
[in] | FormsetList | Pointer to formset list that needs to be released. |
EFI_STATUS |
Definition at line 1867 of file RedfishPlatformConfigImpl.c.
EFI_STATUS ReleaseStatementList | ( | IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_LIST * | StatementList | ) |
Release all resource in statement list.
[in] | StatementList | Statement list to be released. |
EFI_SUCCESS | All resource are released. |
EFI_INVALID_PARAMETER | StatementList is NULL. |
Definition at line 2143 of file RedfishPlatformConfigImpl.c.
EFI_STATUS ReleaseXuefiStringDatabase | ( | IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE * | FormsetPrivate | ) |
Release x-UEFI-string related information.
[in] | FormsetPrivate | Pointer to HII form-set private instance. |
EFI_STATUS |
Definition at line 830 of file RedfishPlatformConfigImpl.c.
|
extern |
Definition at line 15 of file RedfishPlatformConfigDxe.c.