TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishPlatformConfigImpl.h File Reference

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
 

Functions

EFI_STATUS ReleaseFormsetList (IN LIST_ENTRY *FormsetList)
 
EFI_STATUS LoadFormsetList (IN EFI_HII_HANDLE *HiiHandle, OUT LIST_ENTRY *FormsetList)
 
EFI_STATUS NotifyFormsetUpdate (IN EFI_HII_HANDLE *HiiHandle, IN LIST_ENTRY *PendingList)
 
EFI_STATUS NotifyFormsetDeleted (IN EFI_HII_HANDLE *HiiHandle, IN LIST_ENTRY *PendingList)
 
REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATEGetStatementPrivateByConfigureLang (IN LIST_ENTRY *FormsetList, IN CHAR8 *Schema, IN EFI_STRING ConfigureLang)
 
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)
 
EFI_STATUS ProcessPendingList (IN LIST_ENTRY *FormsetList, IN LIST_ENTRY *PendingList)
 
EFI_STATUS HiiDeleteString (IN EFI_STRING_ID StringId, IN EFI_HII_HANDLE HiiHandle)
 
EFI_STRING HiiGetRedfishString (IN EFI_HII_HANDLE HiiHandle, IN CHAR8 *Language, IN EFI_STRING_ID StringId)
 
CHAR8 * HiiGetRedfishAsciiString (IN EFI_HII_HANDLE HiiHandle, IN CHAR8 *Language, IN EFI_STRING_ID StringId)
 
CHAR8 * HiiGetEnglishAsciiString (IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId)
 
EFI_STATUS ReleaseStatementList (IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_LIST *StatementList)
 
UINTN EFIAPI HiiStrLen (IN CONST CHAR16 *String)
 
UINTN EFIAPI HiiStrSize (IN CONST CHAR16 *String)
 
BOOLEAN RedfishPlatformConfigDebugProp (IN UINT64 DebugProp)
 
BOOLEAN RedfishPlatformConfigFeatureProp (IN UINT64 FeatureProp)
 

Detailed Description

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.

Macro Definition Documentation

◆ ENGLISH_LANGUAGE_CODE

#define ENGLISH_LANGUAGE_CODE   "en-US"

Definition at line 31 of file RedfishPlatformConfigImpl.h.

◆ MAX_X_UEFI_REDFISH_STRING_SIZE

#define MAX_X_UEFI_REDFISH_STRING_SIZE   (128 * 2)

Definition at line 34 of file RedfishPlatformConfigImpl.h.

◆ REDFISH_PLATFORM_CONFIG_FORM_FROM_LINK

#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.

◆ REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK

#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.

◆ REDFISH_PLATFORM_CONFIG_PENDING_LIST_FROM_LINK

#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.

◆ REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK

#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.

◆ REDFISH_PLATFORM_CONFIG_STATEMENT_REF_FROM_LINK

#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.

◆ X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER

#define X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER   1024

Definition at line 55 of file RedfishPlatformConfigImpl.h.

◆ X_UEFI_SCHEMA_PREFIX

#define X_UEFI_SCHEMA_PREFIX   "x-UEFI-redfish-"

Definition at line 32 of file RedfishPlatformConfigImpl.h.

Typedef Documentation

◆ REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE

Function Documentation

◆ GetStatementPrivateByConfigureLang()

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.

Parameters
[in]FormsetListForm-set list to search.
[in]SchemaSchema to be matched.
[in]ConfigureLangConfigure language.
Return values
REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE* Pointer to statement private instance.

Definition at line 689 of file RedfishPlatformConfigImpl.c.

◆ GetStatementPrivateByConfigureLangRegex()

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.

Parameters
[in]RegularExpressionProtocolRegular express protocol.
[in]FormsetListForm-set list to search.
[in]SchemaSchema to be matched.
[in]PatternRegular expression pattern.
[out]StatementListStatement list that match above pattern.
Return values
EFI_SUCCESSStatement list is returned.
EFI_INVALID_PARAMETERInput parameter is NULL.
EFI_NOT_READYRegular express protocol is NULL.
EFI_NOT_FOUNDNo statement is found.
EFI_OUT_OF_RESOURCESSystem is out of memory.

Definition at line 563 of file RedfishPlatformConfigImpl.c.

◆ HiiDeleteString()

EFI_STATUS HiiDeleteString ( IN EFI_STRING_ID  StringId,
IN EFI_HII_HANDLE  HiiHandle 
)

Delete a string from HII Package List by given HiiHandle.

Parameters
[in]StringIdId of the string in HII database.
[in]HiiHandleThe HII package list handle.
Return values
EFI_SUCCESSThe string was deleted successfully.
EFI_INVALID_PARAMETERStringId is zero.

Definition at line 240 of file RedfishPlatformConfigImpl.c.

◆ HiiGetEnglishAsciiString()

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().

Parameters
[in]HiiHandleA handle that was previously registered in the HII Database.
[in]StringIdThe identifier of the string to retrieved from the string package associated with HiiHandle.
Return values
NULLThe string specified by StringId is not present in the string package.
OtherThe string was returned.

Definition at line 401 of file RedfishPlatformConfigImpl.c.

◆ HiiGetRedfishAsciiString()

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.

Parameters
[in]HiiHandleA handle that was previously registered in the HII Database.
[in]LanguageThe specified configure language to get string.
[in]StringIdThe identifier of the string to retrieved from the string package associated with HiiHandle.
Return values
NULLThe string specified by StringId is not present in the string package.
OtherThe string was returned.

Definition at line 366 of file RedfishPlatformConfigImpl.c.

◆ HiiGetRedfishString()

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.

Parameters
[in]HiiHandleA handle that was previously registered in the HII Database.
[in]LanguageThe specified configure language to get string.
[in]StringIdThe identifier of the string to retrieved from the string package associated with HiiHandle.
Return values
NULLThe string specified by StringId is not present in the string package.
OtherThe string was returned.

Definition at line 275 of file RedfishPlatformConfigImpl.c.

◆ HiiStrLen()

UINTN EFIAPI HiiStrLen ( IN CONST CHAR16 *  String)

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.

Parameters
[in]StringInput UCS format string.
Return values
Lengthof

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.

Parameters
[in]StringInput UCS format string.
Return values
Lengthof the string.

Definition at line 160 of file RedfishPlatformConfigImpl.c.

◆ HiiStrSize()

UINTN EFIAPI HiiStrSize ( IN CONST CHAR16 *  String)

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.

Parameters
[in]StringInput UCS format string.
Return values
Sizeof 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.

Parameters
[in]StringInput UCS format string.
Return values
Sizeof the string.

Definition at line 187 of file RedfishPlatformConfigImpl.c.

◆ LoadFormsetList()

EFI_STATUS LoadFormsetList ( IN EFI_HII_HANDLE HiiHandle,
OUT LIST_ENTRY FormsetList 
)

Release formset list and all the forms that belong to this formset.

Parameters
[in]FormsetListPointer to formset list that needs to be released.
Return values
EFI_STATUS

Load formset list on given HII handle.

Parameters
[in]HiiHandleHII handle to load formset list.
[out]FormsetListPointer to formset list returned on given handle.
Return values
EFI_STATUS

Definition at line 1809 of file RedfishPlatformConfigImpl.c.

◆ NotifyFormsetDeleted()

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.

Parameters
[in]HiiHandleHII handle instance.
[in]PendingListPending list to keep HII handle which is recently updated.
Return values
EFI_SUCCESSHII handle is saved in pending list.
EFI_INVALID_PARAMETERHiiHandle is NULL or PendingList is NULL.
EFI_OUT_OF_RESOURCESSystem is out of memory.

Definition at line 2006 of file RedfishPlatformConfigImpl.c.

◆ NotifyFormsetUpdate()

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.

Parameters
[in]HiiHandleHII handle instance.
[in]PendingListPending list to keep HII handle which is recently updated.
Return values
EFI_SUCCESSHII handle is saved in pending list.
EFI_INVALID_PARAMETERHiiHandle is NULL or PendingList is NULL.
EFI_OUT_OF_RESOURCESSystem is out of memory.

Definition at line 1953 of file RedfishPlatformConfigImpl.c.

◆ ProcessPendingList()

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.

Parameters
[in]FormsetListList to keep HII form-set.
[in]PendingListList to keep HII handle that is updated.
Return values
EFI_SUCCESSHII handle is saved in pending list.
EFI_INVALID_PARAMETERFormsetList is NULL or PendingList is NULL.

Definition at line 2059 of file RedfishPlatformConfigImpl.c.

◆ RedfishPlatformConfigDebugProp()

BOOLEAN RedfishPlatformConfigDebugProp ( IN UINT64  DebugType)

Check if the debug property is enabled or not.

Parameters
[in]DebugTypeDebug enablement type
Return values
TRUE,thedebug property is enabled. FALSE, the debug property is not enabled.

Definition at line 22 of file RedfishPlatformConfigCapability.c.

◆ RedfishPlatformConfigFeatureProp()

BOOLEAN RedfishPlatformConfigFeatureProp ( IN UINT64  FeatureType)

Check if the Platform Configure feature is enabled or not.

Parameters
[in]FeatureTypeRedfish platform config feature enablement
Return values
TRUE,thefeature is enabled. FALSE, the feature is not enabled.

Definition at line 46 of file RedfishPlatformConfigCapability.c.

◆ ReleaseFormsetList()

EFI_STATUS ReleaseFormsetList ( IN LIST_ENTRY FormsetList)

Release formset list and all the forms that belong to this formset.

Parameters
[in]FormsetListPointer to formset list that needs to be released.
Return values
EFI_STATUS

Definition at line 1867 of file RedfishPlatformConfigImpl.c.

◆ ReleaseStatementList()

EFI_STATUS ReleaseStatementList ( IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_LIST StatementList)

Release all resource in statement list.

Parameters
[in]StatementListStatement list to be released.
Return values
EFI_SUCCESSAll resource are released.
EFI_INVALID_PARAMETERStatementList is NULL.

Definition at line 2143 of file RedfishPlatformConfigImpl.c.