RedfishPkg: Rename x-uefi-redfish to x-UEFI-redfish

Rename x-uefi-redfish to x-UEFI-redfish to match the format of
UEFI configuration namespace prefix.

RFC: https://edk2.groups.io/g/rfc/message/849

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Co-authored-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
This commit is contained in:
Nickle Wang 2024-05-03 09:12:21 +08:00 committed by mergify[bot]
parent 248aa153f6
commit 24fa360857
8 changed files with 63 additions and 63 deletions

View File

@ -2,7 +2,7 @@
Definitions of RedfishPlatformConfigLib Definitions of RedfishPlatformConfigLib
(C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR> (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -82,7 +82,7 @@ RedfishPlatformConfigGetConfigureLang (
Get the list of supported Redfish schema from platform configuration. Get the list of supported Redfish schema from platform configuration.
@param[out] SupportedSchema The supported schema list which is separated by ';'. @param[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" 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 The SupportedSchema is allocated by the callee. It's caller's
responsibility to free this buffer using FreePool(). responsibility to free this buffer using FreePool().

View File

@ -2,7 +2,7 @@
This file defines the EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL interface. This file defines the EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL interface.
(C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR> (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -227,7 +227,7 @@ EFI_STATUS
@param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
@param[out] SupportedSchema The supported schema list which is separated by ';'. @param[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" 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 The SupportedSchema is allocated by the callee. It's caller's
responsibility to free this buffer using FreePool(). responsibility to free this buffer using FreePool().

View File

@ -2,7 +2,7 @@
Wrapper function to support Redfish Platform Config protocol. Wrapper function to support Redfish Platform Config protocol.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR> (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -191,7 +191,7 @@ RedfishPlatformConfigGetConfigureLang (
Get the list of supported Redfish schema from platform configuration. Get the list of supported Redfish schema from platform configuration.
@param[out] SupportedSchema The supported schema list which is separated by ';'. @param[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" 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 The SupportedSchema is allocated by the callee. It's caller's
responsibility to free this buffer using FreePool(). responsibility to free this buffer using FreePool().

View File

@ -195,10 +195,10 @@
gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDebugCategory|0|UINT64|0x00001012 gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDebugCategory|0|UINT64|0x00001012
# #
# Redfish RedfishPlatformConfigDxe Debug Properties # Redfish RedfishPlatformConfigDxe Debug Properties
# 0x00000001 x-uefi-redfish string database message enabled # 0x00000001 x-UEFI-redfish string database message enabled
# 0x00000002 Debug Message for dumping formset # 0x00000002 Debug Message for dumping formset
# 0x00000004 Debug Message for x-uefi-redfish searching result # 0x00000004 Debug Message for x-UEFI-redfish searching result
# 0x00000008 Debug Message for x-uefi-redfish Regular Expression searching result # 0x00000008 Debug Message for x-UEFI-redfish Regular Expression searching result
# #
gEfiRedfishPkgTokenSpaceGuid.PcdRedfishPlatformConfigDebugProperty|0|UINT32|0x00001013 gEfiRedfishPkgTokenSpaceGuid.PcdRedfishPlatformConfigDebugProperty|0|UINT32|0x00001013
# #

View File

@ -1419,7 +1419,7 @@ HiiValueToRedfishValue (
RedfishValue->Value.Buffer = HiiGetRedfishAsciiString (HiiHandle, FullSchema, HiiStatement->ExtraData.TextTwo); RedfishValue->Value.Buffer = HiiGetRedfishAsciiString (HiiHandle, FullSchema, HiiStatement->ExtraData.TextTwo);
if (RedfishValue->Value.Buffer == NULL) { if (RedfishValue->Value.Buffer == NULL) {
// //
// No x-uefi-redfish string defined. Try to get string in English. // No x-UEFI-redfish string defined. Try to get string in English.
// //
RedfishValue->Value.Buffer = HiiGetEnglishAsciiString (HiiHandle, HiiStatement->ExtraData.TextTwo); RedfishValue->Value.Buffer = HiiGetEnglishAsciiString (HiiHandle, HiiStatement->ExtraData.TextTwo);
} }
@ -2112,7 +2112,7 @@ RELEASE_RESOURCE:
@param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance. @param[in] This Pointer to EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL instance.
@param[out] SupportedSchema The supported schema list which is separated by ';'. @param[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" 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 The SupportedSchema is allocated by the callee. It's caller's
responsibility to free this buffer using FreePool(). responsibility to free this buffer using FreePool().

View File

@ -111,7 +111,7 @@ typedef struct {
#define REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_PRIVATE, Protocol) #define REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_PRIVATE, Protocol)
#define REGULAR_EXPRESSION_INCLUDE_ALL L".*" #define REGULAR_EXPRESSION_INCLUDE_ALL L".*"
#define CONFIGURE_LANGUAGE_PREFIX "x-uefi-redfish-" #define CONFIGURE_LANGUAGE_PREFIX "x-UEFI-redfish-"
#define REDFISH_PLATFORM_CONFIG_VERSION 0x00010000 #define REDFISH_PLATFORM_CONFIG_VERSION 0x00010000
#define REDFISH_MENU_PATH_SIZE 8 #define REDFISH_MENU_PATH_SIZE 8

View File

@ -657,7 +657,7 @@ GetStatementPrivateByConfigureLangRegex (
} }
} else { } else {
if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) { if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) {
DEBUG ((DEBUG_ERROR, "%a: HiiStatementPrivate->XuefiRedfishStr is NULL, x-uefi-string has something wrong.\n", __func__)); DEBUG ((DEBUG_ERROR, "%a: HiiStatementPrivate->XuefiRedfishStr is NULL, x-UEFI-string has something wrong.\n", __func__));
ASSERT (FALSE); ASSERT (FALSE);
} }
} }
@ -758,7 +758,7 @@ GetStatementPrivateByConfigureLang (
} }
} else { } else {
if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) { if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) {
DEBUG ((DEBUG_ERROR, "%a: HiiStatementPrivate->XuefiRedfishStr is NULL, x-uefi-string has something wrong.\n", __func__)); DEBUG ((DEBUG_ERROR, "%a: HiiStatementPrivate->XuefiRedfishStr is NULL, x-UEFI-string has something wrong.\n", __func__));
ASSERT (FALSE); ASSERT (FALSE);
} }
} }
@ -819,7 +819,7 @@ GetFormsetPrivateByHiiHandle (
} }
/** /**
Release x-uefi-string related information. Release x-UEFI-string related information.
@param[in] FormsetPrivate Pointer to HII form-set private instance. @param[in] FormsetPrivate Pointer to HII form-set private instance.
@ -842,7 +842,7 @@ ReleaseXuefiStringDatabase (
FreePool (FormsetPrivate->HiiPackageListHeader); FreePool (FormsetPrivate->HiiPackageListHeader);
} }
// Walk through x-uefi-redfish string database. // Walk through x-UEFI-redfish string database.
if (!IsListEmpty (&FormsetPrivate->XuefiRedfishStringDatabase)) { if (!IsListEmpty (&FormsetPrivate->XuefiRedfishStringDatabase)) {
EndDatabase = FALSE; EndDatabase = FALSE;
ThisDatabase = (REDFISH_X_UEFI_STRING_DATABASE *)GetFirstNode (&FormsetPrivate->XuefiRedfishStringDatabase); ThisDatabase = (REDFISH_X_UEFI_STRING_DATABASE *)GetFirstNode (&FormsetPrivate->XuefiRedfishStringDatabase);
@ -989,9 +989,9 @@ NewFormsetPrivate (
} }
/** /**
Create new x-uefi-redfish string array. Create new x-UEFI-redfish string array.
@param[in] XuefiRedfishStringDatabase The x-uefi-redfish string database. @param[in] XuefiRedfishStringDatabase The x-UEFI-redfish string database.
@retval EFI_OUT_OF_RESOURCES Not enough memory for creating a new array. @retval EFI_OUT_OF_RESOURCES Not enough memory for creating a new array.
EFI_SUCCESS New array is created successfully. EFI_SUCCESS New array is created successfully.
@ -1028,13 +1028,13 @@ NewRedfishXuefiStringArray (
} }
/** /**
Get the pointer of x-uefi-redfish database or create a new database. Get the pointer of x-UEFI-redfish database or create a new database.
@param[in] FormsetPrivate Pointer to HII form-set private instance. @param[in] FormsetPrivate Pointer to HII form-set private instance.
@param[in] HiiStringPackageHeader HII string package header. @param[in] HiiStringPackageHeader HII string package header.
@retval Pointer to REDFISH_X_UEFI_STRING_DATABASE. @retval Pointer to REDFISH_X_UEFI_STRING_DATABASE.
If NULL, it fails to obtain x-uefi-redfish database. If NULL, it fails to obtain x-UEFI-redfish database.
**/ **/
REDFISH_X_UEFI_STRING_DATABASE * REDFISH_X_UEFI_STRING_DATABASE *
@ -1068,7 +1068,7 @@ GetExistOrCreateXuefiStringDatabase (
} }
if (CreateNewOne) { if (CreateNewOne) {
DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " Creating x-uefi-redfish (%a) string database...\n", HiiStringPackageHeader->Language)); DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " Creating x-UEFI-redfish (%a) string database...\n", HiiStringPackageHeader->Language));
XuefiRedfishStringDatabase = (REDFISH_X_UEFI_STRING_DATABASE *)AllocateZeroPool (sizeof (REDFISH_X_UEFI_STRING_DATABASE)); XuefiRedfishStringDatabase = (REDFISH_X_UEFI_STRING_DATABASE *)AllocateZeroPool (sizeof (REDFISH_X_UEFI_STRING_DATABASE));
if (XuefiRedfishStringDatabase == NULL) { if (XuefiRedfishStringDatabase == NULL) {
DEBUG ((DEBUG_ERROR, " Failed to allocate REDFISH_X_UEFI_STRING_DATABASE.\n")); DEBUG ((DEBUG_ERROR, " Failed to allocate REDFISH_X_UEFI_STRING_DATABASE.\n"));
@ -1088,7 +1088,7 @@ GetExistOrCreateXuefiStringDatabase (
DEBUG (( DEBUG ((
DEBUG_REDFISH_PLATFORM_CONFIG, DEBUG_REDFISH_PLATFORM_CONFIG,
" x-uefi-redfish (%a):\n String array is added to XuefiRedfishStringDatabase, total %d arrays now.\n", " x-UEFI-redfish (%a):\n String array is added to XuefiRedfishStringDatabase, total %d arrays now.\n",
XuefiRedfishStringDatabase->XuefiRedfishLanguage, XuefiRedfishStringDatabase->XuefiRedfishLanguage,
XuefiRedfishStringDatabase->StringsArrayBlocks XuefiRedfishStringDatabase->StringsArrayBlocks
)); ));
@ -1101,14 +1101,14 @@ GetExistOrCreateXuefiStringDatabase (
} }
/** /**
Check and allocate a new x-uefi-redfish array if it is insufficient for the Check and allocate a new x-UEFI-redfish array if it is insufficient for the
newly added x-uefi-redfish string. newly added x-UEFI-redfish string.
@param[in] FormsetPrivate Pointer to HII form-set private instance. @param[in] FormsetPrivate Pointer to HII form-set private instance.
@param[in] XuefiRedfishStringDatabase Pointer to the x-uefi-redfish database. @param[in] XuefiRedfishStringDatabase Pointer to the x-UEFI-redfish database.
@param[in] StringId String ID added to database. @param[in] StringId String ID added to database.
@retval EFI_SUCCESS The size of x-uefi-string array is adjusted or @retval EFI_SUCCESS The size of x-UEFI-string array is adjusted or
is not required to be adjusted. is not required to be adjusted.
Otherwise, refer to the error code returned from NewRedfishXuefiStringArray(). Otherwise, refer to the error code returned from NewRedfishXuefiStringArray().
@ -1125,7 +1125,7 @@ RedfishXuefiStringAdjustArrays (
while (((StringId + X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) / X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) > (UINT16)XuefiRedfishStringDatabase->StringsArrayBlocks) { while (((StringId + X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) / X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) > (UINT16)XuefiRedfishStringDatabase->StringsArrayBlocks) {
Status = NewRedfishXuefiStringArray (XuefiRedfishStringDatabase); Status = NewRedfishXuefiStringArray (XuefiRedfishStringDatabase);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to adjust x-uefi-string array", __func__)); DEBUG ((DEBUG_ERROR, "%a: Failed to adjust x-UEFI-string array", __func__));
return Status; return Status;
} }
} }
@ -1134,7 +1134,7 @@ RedfishXuefiStringAdjustArrays (
} }
/** /**
Insert a x-uefi-redfish string to database. Insert a x-UEFI-redfish string to database.
@param[in] FormsetPrivate Pointer to HII form-set private instance. @param[in] FormsetPrivate Pointer to HII form-set private instance.
@param[in] HiiStringPackageHeader Pointer to HII string package. @param[in] HiiStringPackageHeader Pointer to HII string package.
@ -1161,19 +1161,19 @@ RedfishXuefiStringInsertDatabase (
XuefiRedfishStringDatabase = GetExistOrCreateXuefiStringDatabase (FormsetPrivate, HiiStringPackageHeader); XuefiRedfishStringDatabase = GetExistOrCreateXuefiStringDatabase (FormsetPrivate, HiiStringPackageHeader);
if (XuefiRedfishStringDatabase == NULL) { if (XuefiRedfishStringDatabase == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Failed to get REDFISH_X_UEFI_STRING_DATABASE of x-uefi-redfish language %a.\n", __func__, HiiStringPackageHeader->Language)); DEBUG ((DEBUG_ERROR, "%a: Failed to get REDFISH_X_UEFI_STRING_DATABASE of x-UEFI-redfish language %a.\n", __func__, HiiStringPackageHeader->Language));
ReleaseXuefiStringDatabase (FormsetPrivate); ReleaseXuefiStringDatabase (FormsetPrivate);
return EFI_LOAD_ERROR; return EFI_LOAD_ERROR;
} }
Status = RedfishXuefiStringAdjustArrays (FormsetPrivate, XuefiRedfishStringDatabase, StringId); Status = RedfishXuefiStringAdjustArrays (FormsetPrivate, XuefiRedfishStringDatabase, StringId);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to adjust x-uefi-redfish string array.\n", __func__)); DEBUG ((DEBUG_ERROR, "%a: Failed to adjust x-UEFI-redfish string array.\n", __func__));
ReleaseXuefiStringDatabase (FormsetPrivate); ReleaseXuefiStringDatabase (FormsetPrivate);
return EFI_LOAD_ERROR; return EFI_LOAD_ERROR;
} }
// Insert string to x-uefi-redfish string array. // Insert string to x-UEFI-redfish string array.
StringIdOffset = (UINTN)StringId; StringIdOffset = (UINTN)StringId;
ThisArray = (REDFISH_X_UEFI_STRINGS_ARRAY *)GetFirstNode (&XuefiRedfishStringDatabase->XuefiRedfishStringArrays); ThisArray = (REDFISH_X_UEFI_STRINGS_ARRAY *)GetFirstNode (&XuefiRedfishStringDatabase->XuefiRedfishStringArrays);
while (StringIdOffset >= X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) { while (StringIdOffset >= X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) {
@ -1187,7 +1187,7 @@ RedfishXuefiStringInsertDatabase (
DEBUG_REDFISH_THIS_MODULE ( DEBUG_REDFISH_THIS_MODULE (
REDFISH_PLATFORM_CONFIG_DEBUG_STRING_DATABASE, REDFISH_PLATFORM_CONFIG_DEBUG_STRING_DATABASE,
" Insert string ID: (%d) to database\n x-uefi-string: \"%s\"\n Language: %a.\n", " Insert string ID: (%d) to database\n x-UEFI-string: \"%s\"\n Language: %a.\n",
StringId, StringId,
StringTextPtr, StringTextPtr,
HiiStringPackageHeader->Language HiiStringPackageHeader->Language
@ -1196,14 +1196,14 @@ RedfishXuefiStringInsertDatabase (
} }
/** /**
Get x-uefi-redfish string and language by string ID. Get x-UEFI-redfish string and language by string ID.
@param[in] FormsetPrivate Pointer to HII form-set private instance. @param[in] FormsetPrivate Pointer to HII form-set private instance.
@param[in] HiiStringPackageHeader HII string package header. @param[in] HiiStringPackageHeader HII string package header.
@param[out] TotalStringAdded Return the total strings added to database. @param[out] TotalStringAdded Return the total strings added to database.
@retval TRUE x-uefi-redfish string and ID map is inserted to database. @retval 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. FALSE Something is wrong when insert x-UEFI-redfish string and ID map.
**/ **/
BOOLEAN BOOLEAN
@ -1288,7 +1288,7 @@ CreateXuefiLanguageStringIdMap (
Offset = sizeof (EFI_HII_STRING_BLOCK); Offset = sizeof (EFI_HII_STRING_BLOCK);
StringTextPtr = BlockHdr + Offset; StringTextPtr = BlockHdr + Offset;
// x-uefi-redfish string is always encoded as UCS and started with '/'. // x-UEFI-redfish string is always encoded as UCS and started with '/'.
if (*StringTextPtr == (UINT16)'/') { if (*StringTextPtr == (UINT16)'/') {
Status = RedfishXuefiStringInsertDatabase ( Status = RedfishXuefiStringInsertDatabase (
FormsetPrivate, FormsetPrivate,
@ -1297,7 +1297,7 @@ CreateXuefiLanguageStringIdMap (
(CHAR16 *)StringTextPtr (CHAR16 *)StringTextPtr
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to insert x-uefi-redfish string %s.\n", __func__, StringTextPtr)); DEBUG ((DEBUG_ERROR, "%a: Failed to insert x-UEFI-redfish string %s.\n", __func__, StringTextPtr));
return FALSE; return FALSE;
} }
@ -1398,13 +1398,13 @@ CreateXuefiLanguageStringIdMap (
} }
/** /**
Get x-uefi-redfish string and language by string ID. Get x-UEFI-redfish string and language by string ID.
@param[in] FormsetPrivate Pointer to HII form-set private instance. @param[in] FormsetPrivate Pointer to HII form-set private instance.
@param[in] StringId The HII string ID. @param[in] StringId The HII string ID.
@param[out] String Optionally return USC string. @param[out] String Optionally return USC string.
@param[out] Language Optionally return x-uefi-redfish language. @param[out] Language Optionally return x-UEFI-redfish language.
@param[out] XuefiStringDatabase Optionally return x-uefi-redfish database. @param[out] XuefiStringDatabase Optionally return x-UEFI-redfish database.
@retval EFI_SUCCESS String information is returned. @retval EFI_SUCCESS String information is returned.
EFI_INVALID_PARAMETER One of the given parameters to this function is EFI_INVALID_PARAMETER One of the given parameters to this function is
@ -1456,7 +1456,7 @@ GetXuefiStringAndLangByStringId (
// //
// NOTE: The string ID in the formset is a unique number. // NOTE: The string ID in the formset is a unique number.
// If the string in the array is NULL, then the matched string ID // If the string in the array is NULL, then the matched string ID
// should be in another x-uefi-redfish database. // should be in another x-UEFI-redfish database.
// //
if ((StringArray->ArrayEntryAddress + StringIndex)->UcsString != NULL) { if ((StringArray->ArrayEntryAddress + StringIndex)->UcsString != NULL) {
// //
@ -1489,7 +1489,7 @@ ErrorExit:;
} }
/** /**
Build a x-uefi-redfish database for the newly added x-uefi-redfish language. Build a x-UEFI-redfish database for the newly added x-UEFI-redfish language.
@param[in] FormsetPrivate Pointer to HII form-set private instance. @param[in] FormsetPrivate Pointer to HII form-set private instance.
@ -1510,7 +1510,7 @@ BuildXUefiRedfishStringDatabase (
UINTN TotalStringsAdded; UINTN TotalStringsAdded;
UINTN NumberPackageStrings; UINTN NumberPackageStrings;
DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: Building x-uefi-redfish string database, HII Formset GUID - %g.\n", __func__, FormsetPrivate->Guid)); DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: Building x-UEFI-redfish string database, HII Formset GUID - %g.\n", __func__, FormsetPrivate->Guid));
BufferSize = 0; BufferSize = 0;
Status = mRedfishPlatformConfigPrivate->HiiDatabase->ExportPackageLists ( Status = mRedfishPlatformConfigPrivate->HiiDatabase->ExportPackageLists (
@ -1555,7 +1555,7 @@ BuildXUefiRedfishStringDatabase (
StringIdMapIsBuilt = FALSE; StringIdMapIsBuilt = FALSE;
HiiStringPackageHeader = (EFI_HII_STRING_PACKAGE_HDR *)PackageHeader; HiiStringPackageHeader = (EFI_HII_STRING_PACKAGE_HDR *)PackageHeader;
// Check if this is the string package for x-uefi-redfish // Check if this is the string package for x-UEFI-redfish
for (SupportedSchemaLangCount = 0; for (SupportedSchemaLangCount = 0;
SupportedSchemaLangCount < FormsetPrivate->SupportedSchema.Count; SupportedSchemaLangCount < FormsetPrivate->SupportedSchema.Count;
SupportedSchemaLangCount++ SupportedSchemaLangCount++
@ -1578,9 +1578,9 @@ BuildXUefiRedfishStringDatabase (
if (StringIdMapIsBuilt == FALSE) { if (StringIdMapIsBuilt == FALSE) {
if (AsciiStrStr (HiiStringPackageHeader->Language, X_UEFI_SCHEMA_PREFIX) == NULL) { if (AsciiStrStr (HiiStringPackageHeader->Language, X_UEFI_SCHEMA_PREFIX) == NULL) {
DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " No need to build x-uefi-redfish string ID map for HII language %a\n", HiiStringPackageHeader->Language)); DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " No need to build x-UEFI-redfish string ID map for HII language %a\n", HiiStringPackageHeader->Language));
} else { } else {
DEBUG ((DEBUG_ERROR, " Failed to build x-uefi-redfish string ID map of HII language %a\n", HiiStringPackageHeader->Language)); DEBUG ((DEBUG_ERROR, " Failed to build x-UEFI-redfish string ID map of HII language %a\n", HiiStringPackageHeader->Language));
} }
} }
@ -1589,7 +1589,7 @@ BuildXUefiRedfishStringDatabase (
} }
} }
DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " Total %d x-uefi-redfish config language are added.\n", TotalStringsAdded)); DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " Total %d x-UEFI-redfish config language are added.\n", TotalStringsAdded));
} }
/** /**
@ -1599,7 +1599,7 @@ BuildXUefiRedfishStringDatabase (
@param[out] FormsetPrivate The formset private data. @param[out] FormsetPrivate The formset private data.
@retval EFI_STATUS The formset is loaded successfully. @retval EFI_STATUS The formset is loaded successfully.
@retval EFI_UNSUPPORTED This formset doesn't have any x-uefi-redfish configuration. @retval EFI_UNSUPPORTED This formset doesn't have any x-UEFI-redfish configuration.
**/ **/
EFI_STATUS EFI_STATUS
@ -1656,15 +1656,15 @@ LoadFormset (
Status = GetSupportedSchema (FormsetPrivate->HiiHandle, &FormsetPrivate->SupportedSchema); Status = GetSupportedSchema (FormsetPrivate->HiiHandle, &FormsetPrivate->SupportedSchema);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) { if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) {
DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: No x-uefi-redfish configuration found on the formset - %g\n", __func__, FormsetPrivate->Guid)); DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: No x-UEFI-redfish configuration found on the formset - %g\n", __func__, FormsetPrivate->Guid));
// //
// If there is no x-uefi-redfish language in this form-set, we don't add formset // If there is no x-UEFI-redfish language in this form-set, we don't add formset
// since we don't need to build menu path for attribute registry. // since we don't need to build menu path for attribute registry.
// //
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
} else { } else {
// Building x-uefi-redfish string database // Building x-UEFI-redfish string database
BuildXUefiRedfishStringDatabase (FormsetPrivate); BuildXUefiRedfishStringDatabase (FormsetPrivate);
} }
@ -1739,7 +1739,7 @@ LoadFormset (
} }
} }
// Get x-uefi-redfish string using String ID. // Get x-UEFI-redfish string using String ID.
Status = GetXuefiStringAndLangByStringId (FormsetPrivate, HiiStatementPrivate->Description, &String, NULL, NULL); Status = GetXuefiStringAndLangByStringId (FormsetPrivate, HiiStatementPrivate->Description, &String, NULL, NULL);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
HiiStatementPrivate->XuefiRedfishStr = String; HiiStatementPrivate->XuefiRedfishStr = String;
@ -1750,13 +1750,13 @@ LoadFormset (
} else { } else {
if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) { if (!RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) {
// //
// If there is no x-uefi-redfish language for this statement, we don't add this statement // If there is no x-UEFI-redfish language for this statement, we don't add this statement
// since we don't need to build menu path for attribute registry. // since we don't need to build menu path for attribute registry.
// //
FreePool (HiiStatementPrivate); FreePool (HiiStatementPrivate);
} else { } else {
// //
// This is not x-uefi-redfish string and we don't cache its string for searching Redfish configure language. // This is not x-UEFI-redfish string and we don't cache its string for searching Redfish configure language.
// When caller wants the string, we will read English string by calling HiiGetString(). // When caller wants the string, we will read English string by calling HiiGetString().
// //
HiiStatementPrivate->XuefiRedfishStr = NULL; HiiStatementPrivate->XuefiRedfishStr = NULL;
@ -2111,7 +2111,7 @@ ProcessPendingList (
Status = LoadFormsetList (Target->HiiHandle, FormsetList); Status = LoadFormsetList (Target->HiiHandle, FormsetList);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
if (Status == EFI_UNSUPPORTED) { if (Status == EFI_UNSUPPORTED) {
DEBUG ((DEBUG_ERROR, " The formset has no x-uefi-redfish configurations.\n")); DEBUG ((DEBUG_ERROR, " The formset has no x-UEFI-redfish configurations.\n"));
} else { } else {
DEBUG ((DEBUG_ERROR, " load formset from HII handle: 0x%x failed: %r\n", Target->HiiHandle, Status)); DEBUG ((DEBUG_ERROR, " load formset from HII handle: 0x%x failed: %r\n", Target->HiiHandle, Status));
} }

View File

@ -29,7 +29,7 @@
#define IS_EMPTY_STRING(a) (a == NULL || a[0] == L'\0') #define IS_EMPTY_STRING(a) (a == NULL || a[0] == L'\0')
#define ENGLISH_LANGUAGE_CODE "en-US" #define ENGLISH_LANGUAGE_CODE "en-US"
#define X_UEFI_SCHEMA_PREFIX "x-uefi-redfish-" #define X_UEFI_SCHEMA_PREFIX "x-UEFI-redfish-"
#define MAX_X_UEFI_REDFISH_STRING_SIZE (128 * 2)// 128 character in UCS. #define MAX_X_UEFI_REDFISH_STRING_SIZE (128 * 2)// 128 character in UCS.
@ -55,7 +55,7 @@ typedef struct {
#define X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER 1024 #define X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER 1024
// //
// Definition of x-uefi-redfish string element. // Definition of x-UEFI-redfish string element.
// //
typedef struct { typedef struct {
EFI_STRING_ID StringId; EFI_STRING_ID StringId;
@ -71,14 +71,14 @@ typedef struct {
} REDFISH_X_UEFI_STRINGS_ARRAY; } REDFISH_X_UEFI_STRINGS_ARRAY;
// //
// x-uefi-redfish string database, x-uefi-redfish language based. // x-UEFI-redfish string database, x-UEFI-redfish language based.
// //
typedef struct { typedef struct {
LIST_ENTRY NextXuefiRedfishLanguage; // Link to the next suppoted x-uefi-Redfish language. LIST_ENTRY NextXuefiRedfishLanguage; // Link to the next suppoted x-UEFI-Redfish language.
CHAR8 *XuefiRedfishLanguage; // x-uefi-redfish language. CHAR8 *XuefiRedfishLanguage; // x-UEFI-redfish language.
UINTN StringsArrayBlocks; // Number of the array blocks that accommodate X_UEFI_REDFISH_STRING_ARRAY_NUMBER UINTN StringsArrayBlocks; // Number of the array blocks that accommodate X_UEFI_REDFISH_STRING_ARRAY_NUMBER
// elements in each. // elements in each.
LIST_ENTRY XuefiRedfishStringArrays; // Link entry of x-uefi-redfish string array. LIST_ENTRY XuefiRedfishStringArrays; // Link entry of x-UEFI-redfish string array.
} REDFISH_X_UEFI_STRING_DATABASE; } REDFISH_X_UEFI_STRING_DATABASE;
// //
@ -93,7 +93,7 @@ typedef struct {
LIST_ENTRY HiiFormList; // Form list that keep form data under this formset. LIST_ENTRY HiiFormList; // Form list that keep form data under this formset.
CHAR16 *DevicePathStr; // Device path of this formset. CHAR16 *DevicePathStr; // Device path of this formset.
REDFISH_PLATFORM_CONFIG_SCHEMA SupportedSchema; // Schema that is supported in this formset. REDFISH_PLATFORM_CONFIG_SCHEMA SupportedSchema; // Schema that is supported in this formset.
LIST_ENTRY XuefiRedfishStringDatabase; // x-uefi-redfish string/Id data base; LIST_ENTRY XuefiRedfishStringDatabase; // x-UEFI-redfish string/Id data base;
} REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE; } REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE;
#define REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE, Link) #define REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK(a) BASE_CR (a, REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE, Link)
@ -133,7 +133,7 @@ struct _REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE {
HII_STATEMENT *HiiStatement; // Pointer to HII statement data. HII_STATEMENT *HiiStatement; // Pointer to HII statement data.
EFI_QUESTION_ID QuestionId; // Question ID of this statement. EFI_QUESTION_ID QuestionId; // Question ID of this statement.
EFI_STRING_ID Description; // String token of this question. EFI_STRING_ID Description; // String token of this question.
CHAR16 *XuefiRedfishStr; // x-uefi-redfish string of this question. CHAR16 *XuefiRedfishStr; // x-UEFI-redfish string of this question.
EFI_STRING_ID Help; // String token of help message. EFI_STRING_ID Help; // String token of help message.
UINT8 Flags; // The statement flag. UINT8 Flags; // The statement flag.
REDFISH_PLATFORM_CONFIG_STATEMENT_DATA StatementData; // The max/min for statement value. REDFISH_PLATFORM_CONFIG_STATEMENT_DATA StatementData; // The max/min for statement value.