TianoCore EDK2 master
|
#include <Uefi.h>
#include <RedfishCommon.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/HiiUtilityLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
Go to the source code of this file.
Data Structures | |
struct | REDFISH_PLATFORM_CONFIG_PENDING_LIST |
struct | REDFISH_PLATFORM_CONFIG_SCHEMA |
struct | REDFISH_X_UEFI_STRINGS_ARRAY_ELEMENT |
struct | REDFISH_X_UEFI_STRINGS_ARRAY |
struct | REDFISH_X_UEFI_STRING_DATABASE |
struct | REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE |
struct | REDFISH_PLATFORM_CONFIG_FORM_PRIVATE |
struct | REDFISH_PLATFORM_CONFIG_STATEMENT_DATA |
struct | _REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE |
struct | REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_REF |
struct | REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_LIST |
Macros | |
#define | ENGLISH_LANGUAGE_CODE "en-US" |
#define | X_UEFI_SCHEMA_PREFIX "x-UEFI-redfish-" |
#define | MAX_X_UEFI_REDFISH_STRING_SIZE (128 * 2) |
#define | REDFISH_PLATFORM_CONFIG_PENDING_LIST_FROM_LINK(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_PENDING_LIST, Link) |
#define | X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER 1024 |
#define | REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE, Link) |
#define | REDFISH_PLATFORM_CONFIG_FORM_FROM_LINK(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_FORM_PRIVATE, Link) |
#define | REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE, Link) |
#define | REDFISH_PLATFORM_CONFIG_STATEMENT_REF_FROM_LINK(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_REF, Link) |
Typedefs | |
typedef struct _REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE | REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE |
This file defines the EDKII Redfish Platform Config Protocol private structure.
(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.h.
#define ENGLISH_LANGUAGE_CODE "en-US" |
Definition at line 31 of file RedfishPlatformConfigImpl.h.
#define MAX_X_UEFI_REDFISH_STRING_SIZE (128 * 2) |
Definition at line 34 of file RedfishPlatformConfigImpl.h.
#define REDFISH_PLATFORM_CONFIG_FORM_FROM_LINK | ( | a | ) | BASE_CR (a, REDFISH_PLATFORM_CONFIG_FORM_PRIVATE, Link) |
Definition at line 114 of file RedfishPlatformConfigImpl.h.
#define REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK | ( | a | ) | BASE_CR (a, REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE, Link) |
Definition at line 99 of file RedfishPlatformConfigImpl.h.
#define REDFISH_PLATFORM_CONFIG_PENDING_LIST_FROM_LINK | ( | a | ) | BASE_CR (a, REDFISH_PLATFORM_CONFIG_PENDING_LIST, Link) |
Definition at line 47 of file RedfishPlatformConfigImpl.h.
#define REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK | ( | a | ) | BASE_CR (a, REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE, Link) |
Definition at line 144 of file RedfishPlatformConfigImpl.h.
#define REDFISH_PLATFORM_CONFIG_STATEMENT_REF_FROM_LINK | ( | a | ) | BASE_CR (a, REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_REF, Link) |
Definition at line 154 of file RedfishPlatformConfigImpl.h.
#define X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER 1024 |
Definition at line 55 of file RedfishPlatformConfigImpl.h.
#define X_UEFI_SCHEMA_PREFIX "x-UEFI-redfish-" |
Definition at line 32 of file RedfishPlatformConfigImpl.h.
Definition at line 36 of file RedfishPlatformConfigImpl.h.
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 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.
Return the HII string length. We don't check word alignment of the input string as the 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 |
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 the 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. |
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 LoadFormsetList | ( | IN EFI_HII_HANDLE * | HiiHandle, |
OUT 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 |
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.
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.
BOOLEAN RedfishPlatformConfigDebugProp | ( | IN UINT64 | DebugType | ) |
Check if the debug property is enabled or not.
[in] | DebugType | Debug enablement type |
TRUE,the | debug property is enabled. FALSE, the debug property is not enabled. |
Definition at line 22 of file RedfishPlatformConfigCapability.c.
BOOLEAN RedfishPlatformConfigFeatureProp | ( | IN UINT64 | FeatureType | ) |
Check if the Platform Configure feature is enabled or not.
[in] | FeatureType | Redfish platform config feature enablement |
TRUE,the | feature is enabled. FALSE, the feature is not enabled. |
Definition at line 46 of file RedfishPlatformConfigCapability.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.