43 if (Buffer->Pool ==
NULL) {
48 Buffer->Size = StackSize;
87 return (Stack->Index == 0);
106 if (Stack->Index == Stack->Size) {
107 return EFI_OUT_OF_RESOURCES;
110 Stack->Pool[Stack->Index] = Data;
135 return Stack->Pool[Stack->Index];
160 if (FormPrivate ==
NULL) {
164 HiiFormsetPrivate = FormPrivate->ParentFormset;
166 if (
IsListEmpty (&HiiFormsetPrivate->HiiFormList)) {
170 HiiFormLink =
GetFirstNode (&HiiFormsetPrivate->HiiFormList);
171 while (!
IsNull (&HiiFormsetPrivate->HiiFormList, HiiFormLink)) {
172 HiiFormPrivate = REDFISH_PLATFORM_CONFIG_FORM_FROM_LINK (HiiFormLink);
173 HiiNextFormLink =
GetNextNode (&HiiFormsetPrivate->HiiFormList, HiiFormLink);
178 if (HiiFormPrivate == FormPrivate) {
179 HiiFormLink = HiiNextFormLink;
183 HiiStatementLink =
GetFirstNode (&HiiFormPrivate->StatementList);
184 while (!
IsNull (&HiiFormPrivate->StatementList, HiiStatementLink)) {
185 HiiStatementPrivate = REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK (HiiStatementLink);
186 HiiNextStatementLink =
GetNextNode (&HiiFormPrivate->StatementList, HiiStatementLink);
192 if ((HiiStatementPrivate->HiiStatement->
Operand == EFI_IFR_REF_OP) &&
193 (HiiStatementPrivate->HiiStatement->Value.Value.
ref.FormId == FormPrivate->HiiForm->FormId))
195 return HiiFormPrivate;
198 HiiStatementLink = HiiNextStatementLink;
201 HiiFormLink = HiiNextFormLink;
222 IN CHAR8 *Message OPTIONAL
228 return EFI_INVALID_PARAMETER;
231 switch (Value->Type) {
232 case EFI_IFR_TYPE_NUM_SIZE_8:
233 Data = Value->Value.u8;
235 case EFI_IFR_TYPE_NUM_SIZE_16:
236 Data = Value->Value.u16;
238 case EFI_IFR_TYPE_NUM_SIZE_32:
239 Data = Value->Value.u32;
241 case EFI_IFR_TYPE_NUM_SIZE_64:
242 Data = Value->Value.u64;
244 case EFI_IFR_TYPE_BOOLEAN:
245 Data = (Value->Value.b ? 1 : 0);
248 DEBUG ((ErrorLevel,
"%a: unsupported type: 0x%x\n", __func__, Value->Type));
249 return EFI_UNSUPPORTED;
252 if (IS_EMPTY_STRING (Message)) {
253 DEBUG ((ErrorLevel,
"0x%lx\n", Data));
255 DEBUG ((ErrorLevel,
"%a: 0x%lx\n", Message, Data));
278 IN CHAR8 *Message OPTIONAL
283 if ((HiiHandle ==
NULL) || (HiiStatement ==
NULL)) {
284 return EFI_INVALID_PARAMETER;
287 if (HiiStatement->Prompt == 0) {
288 return EFI_NOT_FOUND;
292 if (String ==
NULL) {
293 return EFI_NOT_FOUND;
296 if (IS_EMPTY_STRING (Message)) {
297 DEBUG ((ErrorLevel,
"%s\n", String));
299 DEBUG ((ErrorLevel,
"%a: %s\n", Message, String));
334 if (FormStack ==
NULL) {
341 FormPrivate = StatementPrivate->ParentForm;
343 if (EFI_ERROR (Status)) {
350 if (FormPrivate ==
NULL) {
355 if (EFI_ERROR (Status)) {
369 if (Buffer ==
NULL) {
377 while (FormPrivate !=
NULL) {
379 if (FormTitle !=
NULL) {
380 NewBufferSize =
AsciiStrSize (FormTitle) + OldBufferSize;
382 if (Buffer ==
NULL) {
386 OldBufferSize = NewBufferSize;
417 IN CHAR8 *ConfigLanguage
420 CHAR8 *attributeName;
426 if (IS_EMPTY_STRING (ConfigLanguage)) {
430 attributeName =
NULL;
435 if (ConfigLanguage[
StrLen - 1] ==
'/') {
439 DEBUG ((DEBUG_ERROR,
"%a: invalid format: %a\n", __func__, ConfigLanguage));
448 if (ConfigLanguage[Index] ==
'/') {
449 Pointer = &ConfigLanguage[Index + 1];
461 if (Pointer ==
NULL) {
465 AttrStrLen =
StrLen - Index;
468 return attributeName;
486 IN CHAR8 *SchemaName,
496 if ((HiiHandle ==
NULL) || (StatementPrivate ==
NULL) || (Values ==
NULL)) {
497 return EFI_INVALID_PARAMETER;
500 HiiStatement = StatementPrivate->HiiStatement;
501 ASSERT (HiiStatement !=
NULL);
504 return EFI_NOT_FOUND;
510 Values->ValueCount = 0;
513 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
522 Values->ValueCount += 1;
527 if (Values->ValueArray ==
NULL) {
528 Values->ValueCount = 0;
529 return EFI_OUT_OF_RESOURCES;
535 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
544 if (Option->Text != 0) {
571 if (HiiStatement ==
NULL) {
572 return RedfishAttributeTypeUnknown;
575 type = RedfishAttributeTypeUnknown;
576 switch (HiiStatement->Operand) {
577 case EFI_IFR_ONE_OF_OP:
578 case EFI_IFR_ORDERED_LIST_OP:
579 type = RedfishAttributeTypeEnumeration;
581 case EFI_IFR_STRING_OP:
582 type = RedfishAttributeTypeString;
584 case EFI_IFR_NUMERIC_OP:
585 type = RedfishAttributeTypeInteger;
587 case EFI_IFR_CHECKBOX_OP:
588 type = RedfishAttributeTypeBoolean;
590 case EFI_IFR_DATE_OP:
591 case EFI_IFR_TIME_OP:
593 DEBUG ((DEBUG_ERROR,
"%a: unsupported operand: 0x%x\n", __func__, HiiStatement->Operand));
614 switch (Value->Type) {
615 case EFI_IFR_TYPE_NUM_SIZE_8:
616 Temp = Value->Value.u8;
619 case EFI_IFR_TYPE_NUM_SIZE_16:
620 Temp = Value->Value.u16;
623 case EFI_IFR_TYPE_NUM_SIZE_32:
624 Temp = Value->Value.u32;
627 case EFI_IFR_TYPE_BOOLEAN:
628 Temp = Value->Value.b;
631 case EFI_IFR_TYPE_TIME:
632 case EFI_IFR_TYPE_DATE:
657 ASSERT (Array !=
NULL);
660 case EFI_IFR_TYPE_NUM_SIZE_8:
661 *(((UINT8 *)Array) + Index) = (UINT8)Value;
664 case EFI_IFR_TYPE_NUM_SIZE_16:
665 *(((UINT16 *)Array) + Index) = (UINT16)Value;
668 case EFI_IFR_TYPE_NUM_SIZE_32:
669 *(((UINT32 *)Array) + Index) = (UINT32)Value;
672 case EFI_IFR_TYPE_NUM_SIZE_64:
673 *(((UINT64 *)Array) + Index) = (UINT64)Value;
700 ASSERT (Array !=
NULL);
704 case EFI_IFR_TYPE_NUM_SIZE_8:
705 Data = (UINT64)*(((UINT8 *)Array) + Index);
708 case EFI_IFR_TYPE_NUM_SIZE_16:
709 Data = (UINT64)*(((UINT16 *)Array) + Index);
712 case EFI_IFR_TYPE_NUM_SIZE_32:
713 Data = (UINT64)*(((UINT32 *)Array) + Index);
716 case EFI_IFR_TYPE_NUM_SIZE_64:
717 Data = (UINT64)*(((UINT64 *)Array) + Index);
747 if (HiiStatement ==
NULL) {
751 if (HiiStatement->Operand != EFI_IFR_ORDERED_LIST_OP) {
760 while (!
IsNull (&HiiStatement->OptionListHead, Link)) {
761 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
764 if (Value == CurrentValue) {
768 Link =
GetNextNode (&HiiStatement->OptionListHead, Link);
795 if ((Value1 ==
NULL) || (Value2 ==
NULL)) {
799 switch (Value1->Type) {
800 case EFI_IFR_TYPE_NUM_SIZE_8:
801 Data1 = Value1->Value.u8;
803 case EFI_IFR_TYPE_NUM_SIZE_16:
804 Data1 = Value1->Value.u16;
806 case EFI_IFR_TYPE_NUM_SIZE_32:
807 Data1 = Value1->Value.u32;
809 case EFI_IFR_TYPE_NUM_SIZE_64:
810 Data1 = Value1->Value.u64;
812 case EFI_IFR_TYPE_BOOLEAN:
813 Data1 = (Value1->Value.b ? 1 : 0);
819 switch (Value2->Type) {
820 case EFI_IFR_TYPE_NUM_SIZE_8:
821 Data2 = Value2->Value.u8;
823 case EFI_IFR_TYPE_NUM_SIZE_16:
824 Data2 = Value2->Value.u16;
826 case EFI_IFR_TYPE_NUM_SIZE_32:
827 Data2 = Value2->Value.u32;
829 case EFI_IFR_TYPE_NUM_SIZE_64:
830 Data2 = Value2->Value.u64;
832 case EFI_IFR_TYPE_BOOLEAN:
833 Data2 = (Value2->Value.b ? 1 : 0);
839 Result = (Data1 == Data2 ? 0 : (Data1 > Data2 ? 1 : -1));
863 if ((HiiStatement ==
NULL) || (Value ==
NULL)) {
867 if (HiiStatement->Operand != EFI_IFR_ONE_OF_OP) {
876 while (!
IsNull (&HiiStatement->OptionListHead, Link)) {
877 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
883 Link =
GetNextNode (&HiiStatement->OptionListHead, Link);
905 IN EFI_STRING HiiString,
911 EFI_STRING TmpString;
914 if ((Statement ==
NULL) || IS_EMPTY_STRING (HiiString) || (Value ==
NULL)) {
915 return EFI_INVALID_PARAMETER;
918 if (Statement->HiiStatement->Operand != EFI_IFR_ONE_OF_OP) {
919 return EFI_UNSUPPORTED;
922 if (
IsListEmpty (&Statement->HiiStatement->OptionListHead)) {
923 return EFI_NOT_FOUND;
927 Link =
GetFirstNode (&Statement->HiiStatement->OptionListHead);
928 while (!
IsNull (&Statement->HiiStatement->OptionListHead, Link)) {
929 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
931 TmpString =
HiiGetRedfishString (Statement->ParentForm->ParentFormset->HiiHandle, Schema, Option->Text);
932 if (TmpString ==
NULL) {
933 TmpString =
HiiGetRedfishString (Statement->ParentForm->ParentFormset->HiiHandle, ENGLISH_LANGUAGE_CODE, Option->Text);
936 if (TmpString !=
NULL) {
937 if (
StrCmp (TmpString, HiiString) == 0) {
949 Link =
GetNextNode (&Statement->HiiStatement->OptionListHead, Link);
952 return EFI_NOT_FOUND;
971 if ((Value ==
NULL) || (RedfishValue ==
NULL)) {
972 return EFI_INVALID_PARAMETER;
975 switch (Value->Type) {
976 case EFI_IFR_TYPE_NUM_SIZE_8:
977 RedfishValue->Type = RedfishValueTypeInteger;
978 RedfishValue->Value.Integer = (INT64)Value->Value.u8;
980 case EFI_IFR_TYPE_NUM_SIZE_16:
981 RedfishValue->Type = RedfishValueTypeInteger;
982 RedfishValue->Value.Integer = (INT64)Value->Value.u16;
984 case EFI_IFR_TYPE_NUM_SIZE_32:
985 RedfishValue->Type = RedfishValueTypeInteger;
986 RedfishValue->Value.Integer = (INT64)Value->Value.u32;
988 case EFI_IFR_TYPE_NUM_SIZE_64:
989 RedfishValue->Type = RedfishValueTypeInteger;
990 RedfishValue->Value.Integer = (INT64)Value->Value.u64;
992 case EFI_IFR_TYPE_BOOLEAN:
993 RedfishValue->Type = RedfishValueTypeBoolean;
994 RedfishValue->Value.Boolean = Value->Value.b;
997 RedfishValue->Type = RedfishValueTypeUnknown;
998 DEBUG ((DEBUG_ERROR,
"%a: Unsupported value type: 0x%x\n", __func__, Value->Type));
1021 if ((Value ==
NULL) || (RedfishValue ==
NULL)) {
1022 return EFI_INVALID_PARAMETER;
1025 switch (RedfishValue->Type) {
1026 case RedfishValueTypeInteger:
1027 Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
1028 Value->Value.u64 = (UINT64)RedfishValue->Value.Integer;
1030 case RedfishValueTypeBoolean:
1031 Value->Type = EFI_IFR_TYPE_BOOLEAN;
1032 Value->Value.b = RedfishValue->Value.Boolean;
1035 Value->Type = EFI_IFR_TYPE_UNDEFINED;
1060 if ((OrderedListStatement ==
NULL) || (OrderedListStatement->Operand != EFI_IFR_ORDERED_LIST_OP)) {
1071 if (OrderedListStatement->Value.Buffer ==
NULL) {
1081 switch (OrderedListStatement->Value.BufferValueType) {
1082 case EFI_IFR_TYPE_NUM_SIZE_8:
1083 Value8 = (UINT8 *)OrderedListStatement->Value.Buffer;
1084 Count = OrderedListStatement->StorageWidth / sizeof (UINT8);
1085 for (Index = 0; Index < Count; Index++) {
1090 case EFI_IFR_TYPE_NUM_SIZE_16:
1091 Value16 = (UINT16 *)OrderedListStatement->Value.Buffer;
1092 Count = OrderedListStatement->StorageWidth / sizeof (UINT16);
1093 for (Index = 0; Index < Count; Index++) {
1098 case EFI_IFR_TYPE_NUM_SIZE_32:
1099 Value32 = (UINT32 *)OrderedListStatement->Value.Buffer;
1100 Count = OrderedListStatement->StorageWidth / sizeof (UINT32);
1101 for (Index = 0; Index < Count; Index++) {
1106 case EFI_IFR_TYPE_NUM_SIZE_64:
1107 Value64 = (UINT64 *)OrderedListStatement->Value.Buffer;
1108 Count = OrderedListStatement->StorageWidth / sizeof (UINT64);
1109 for (Index = 0; Index < Count; Index++) {
1115 Value8 = (UINT8 *)OrderedListStatement->Value.Buffer;
1116 Count = OrderedListStatement->StorageWidth / sizeof (UINT8);
1117 for (Index = 0; Index < Count; Index++) {
1145 EFI_STRING_ID *ReturnedArray;
1149 if ((HiiStatement ==
NULL) || (ReturnSize ==
NULL)) {
1155 if (HiiStatement->Operand != EFI_IFR_ORDERED_LIST_OP) {
1159 if (
IsListEmpty (&HiiStatement->OptionListHead)) {
1169 while (!
IsNull (&HiiStatement->OptionListHead, Link)) {
1171 Link =
GetNextNode (&HiiStatement->OptionListHead, Link);
1174 *ReturnSize = OptionCount;
1175 ReturnedArray =
AllocatePool (
sizeof (EFI_STRING_ID) * OptionCount);
1176 if (ReturnedArray ==
NULL) {
1177 DEBUG ((DEBUG_ERROR,
"%a: out of resource\n", __func__));
1182 for (Index = 0; Index < OptionCount; Index++) {
1187 return ReturnedArray;
1206 IN EFI_STRING HiiString,
1212 EFI_STRING TmpString;
1215 if ((Statement ==
NULL) || IS_EMPTY_STRING (HiiString) || (Value ==
NULL)) {
1216 return EFI_INVALID_PARAMETER;
1221 if (Statement->HiiStatement->Operand != EFI_IFR_ORDERED_LIST_OP) {
1222 return EFI_UNSUPPORTED;
1225 if (
IsListEmpty (&Statement->HiiStatement->OptionListHead)) {
1226 return EFI_NOT_FOUND;
1230 Link =
GetFirstNode (&Statement->HiiStatement->OptionListHead);
1231 while (!
IsNull (&Statement->HiiStatement->OptionListHead, Link)) {
1232 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
1234 TmpString =
HiiGetRedfishString (Statement->ParentForm->ParentFormset->HiiHandle, Schema, Option->Text);
1235 if (TmpString ==
NULL) {
1236 TmpString =
HiiGetRedfishString (Statement->ParentForm->ParentFormset->HiiHandle, ENGLISH_LANGUAGE_CODE, Option->Text);
1239 if (TmpString !=
NULL) {
1240 if (
StrCmp (TmpString, HiiString) == 0) {
1252 Link =
GetNextNode (&Statement->HiiStatement->OptionListHead, Link);
1255 return EFI_NOT_FOUND;
1274 IN CHAR8 *FullSchema,
1281 EFI_STRING_ID StringId;
1284 EFI_STRING_ID *StringIdArray;
1287 if ((HiiHandle ==
NULL) || (HiiStatement ==
NULL) || (Value ==
NULL) || (RedfishValue ==
NULL) || IS_EMPTY_STRING (FullSchema)) {
1288 return EFI_INVALID_PARAMETER;
1291 StringIdArray =
NULL;
1296 switch (HiiStatement->Operand) {
1297 case EFI_IFR_ONE_OF_OP:
1299 if (StringId == 0) {
1306 Status = EFI_DEVICE_ERROR;
1311 if (RedfishValue->Value.Buffer ==
NULL) {
1312 Status = EFI_OUT_OF_RESOURCES;
1316 RedfishValue->Type = RedfishValueTypeString;
1318 case EFI_IFR_STRING_OP:
1319 if (Value->Type != EFI_IFR_TYPE_STRING) {
1321 Status = EFI_DEVICE_ERROR;
1325 if (Value->Buffer ==
NULL) {
1326 RedfishValue->Value.Buffer =
AllocateCopyPool (
sizeof (NullChar), &NullChar);
1328 RedfishValue->Value.Buffer =
StrToAsciiStr ((EFI_STRING)Value->Buffer);
1331 if (RedfishValue->Value.Buffer ==
NULL) {
1332 Status = EFI_OUT_OF_RESOURCES;
1336 RedfishValue->Type = RedfishValueTypeString;
1338 case EFI_IFR_CHECKBOX_OP:
1345 if (Value->Type != EFI_IFR_TYPE_BOOLEAN) {
1346 Value->Type = EFI_IFR_TYPE_BOOLEAN;
1349 case EFI_IFR_NUMERIC_OP:
1351 if (EFI_ERROR (Status)) {
1352 DEBUG ((DEBUG_ERROR,
"%a: failed to convert HII value to Redfish value: %r\n", __func__, Status));
1357 case EFI_IFR_ACTION_OP:
1358 if (Value->Type != EFI_IFR_TYPE_ACTION) {
1360 Status = EFI_DEVICE_ERROR;
1367 RedfishValue->Type = RedfishValueTypeUnknown;
1369 case EFI_IFR_ORDERED_LIST_OP:
1371 if (StringIdArray ==
NULL) {
1377 Status = EFI_DEVICE_ERROR;
1381 RedfishValue->Value.StringArray =
AllocatePool (
sizeof (CHAR8 *) * Count);
1382 if (RedfishValue->Value.StringArray ==
NULL) {
1388 Status = EFI_OUT_OF_RESOURCES;
1392 for (Index = 0; Index < Count; Index++) {
1393 if (StringIdArray[Index] == 0) {
1402 ASSERT (RedfishValue->Value.StringArray[Index] !=
NULL);
1405 RedfishValue->ArrayCount = Count;
1406 RedfishValue->Type = RedfishValueTypeStringArray;
1410 case EFI_IFR_TEXT_OP:
1414 if (HiiStatement->ExtraData.TextTwo == 0x00) {
1415 Status = EFI_NOT_FOUND;
1420 if (RedfishValue->Value.Buffer ==
NULL) {
1427 if (RedfishValue->Value.Buffer ==
NULL) {
1428 Status = EFI_OUT_OF_RESOURCES;
1432 RedfishValue->Type = RedfishValueTypeString;
1435 DEBUG ((DEBUG_ERROR,
"%a: catch unsupported type: 0x%x! Please contact with author if we need to support this type.\n", __func__, HiiStatement->Operand));
1437 Status = EFI_UNSUPPORTED;
1455 IN CHAR8 *AsciiString
1462 if (AsciiString ==
NULL) {
1468 if (Buffer ==
NULL) {
1473 if (EFI_ERROR (Status)) {
1492 IN EFI_STRING UnicodeString
1499 if (UnicodeString ==
NULL) {
1503 StringLen =
HiiStrLen (UnicodeString) + 1;
1505 if (Buffer ==
NULL) {
1510 if (EFI_ERROR (Status)) {
1538 if (IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (Version)) {
1545 if (FullName ==
NULL) {
1546 DEBUG ((DEBUG_ERROR,
"%a: out-of-resource\n", __func__));
1550 AsciiSPrint (FullName, Size,
"%a%a.%a", CONFIGURE_LANGUAGE_PREFIX, Schema, Version);
1571 IN EFI_STRING ConfigureLang,
1578 if ((RedfishPlatformConfigPrivate ==
NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (ConfigureLang) || (Statement ==
NULL)) {
1579 return EFI_INVALID_PARAMETER;
1584 Status =
ProcessPendingList (&RedfishPlatformConfigPrivate->FormsetList, &RedfishPlatformConfigPrivate->PendingList);
1585 if (EFI_ERROR (Status)) {
1586 DEBUG ((DEBUG_ERROR,
"%a: ProcessPendingList failure: %r\n", __func__, Status));
1591 if (TargetStatement ==
NULL) {
1592 DEBUG ((DEBUG_ERROR,
"%a: No match HII statement is found by the given %s in schema %a\n", __func__, ConfigureLang, Schema));
1593 return EFI_NOT_FOUND;
1600 TargetStatement->ParentForm->ParentFormset->HiiFormSet,
1601 TargetStatement->ParentForm->HiiForm,
1602 TargetStatement->HiiStatement,
1603 GetSetValueWithBuffer
1605 if (EFI_ERROR (Status)) {
1606 DEBUG ((DEBUG_ERROR,
"%a: failed to get question current value: %r\n", __func__, Status));
1610 if (TargetStatement->HiiStatement->Value.
Type == EFI_IFR_TYPE_UNDEFINED) {
1611 return EFI_DEVICE_ERROR;
1617 *Statement = TargetStatement;
1641 IN EFI_STRING ConfigureLang,
1650 if ((This ==
NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (Version) || IS_EMPTY_STRING (ConfigureLang) || (Value ==
NULL)) {
1651 return EFI_INVALID_PARAMETER;
1654 RedfishPlatformConfigPrivate = REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS (This);
1655 Value->Type = RedfishValueTypeUnknown;
1656 Value->ArrayCount = 0;
1660 if (FullSchema ==
NULL) {
1661 return EFI_OUT_OF_RESOURCES;
1665 if (EFI_ERROR (Status)) {
1666 goto RELEASE_RESOURCE;
1669 if (TargetStatement->Suppressed) {
1670 Status = EFI_ACCESS_DENIED;
1671 goto RELEASE_RESOURCE;
1675 TargetStatement->ParentForm->ParentFormset->HiiHandle,
1677 TargetStatement->HiiStatement,
1678 &TargetStatement->HiiStatement->Value,
1681 if (EFI_ERROR (Status)) {
1682 DEBUG ((DEBUG_ERROR,
"%a: HiiValueToRedfishValue failed: %r\n", __func__, Status));
1687 if (FullSchema !=
NULL) {
1716 if ((HiiFormset ==
NULL) || (HiiForm ==
NULL) || (HiiStatement ==
NULL) || (Value ==
NULL)) {
1717 return EFI_INVALID_PARAMETER;
1726 if (EFI_ERROR (Status)) {
1727 DEBUG ((DEBUG_ERROR,
"%a: failed to set question value: %r\n", __func__, Status));
1732 if (EFI_ERROR (Status)) {
1733 DEBUG ((DEBUG_ERROR,
"%a: failed to submit form: %r\n", __func__, Status));
1756 IN EFI_STRING ConfigureLang,
1762 EFI_STRING TempBuffer;
1768 if ((RedfishPlatformConfigPrivate ==
NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (ConfigureLang) || (StatementValue ==
NULL)) {
1769 return EFI_INVALID_PARAMETER;
1775 Status =
ProcessPendingList (&RedfishPlatformConfigPrivate->FormsetList, &RedfishPlatformConfigPrivate->PendingList);
1776 if (EFI_ERROR (Status)) {
1777 DEBUG ((DEBUG_ERROR,
"%a: ProcessPendingList failure: %r\n", __func__, Status));
1782 if (TargetStatement ==
NULL) {
1783 DEBUG ((DEBUG_ERROR,
"%a: No match HII statement is found by the given %s in schema %a\n", __func__, ConfigureLang, Schema));
1784 return EFI_NOT_FOUND;
1787 if (StatementValue->Type != TargetStatement->HiiStatement->Value.
Type) {
1792 if ((TargetStatement->HiiStatement->
Operand == EFI_IFR_ONE_OF_OP) && (StatementValue->Type == EFI_IFR_TYPE_STRING)) {
1797 TempBuffer = (EFI_STRING)StatementValue->Buffer;
1798 StatementValue->Buffer =
NULL;
1799 StatementValue->BufferLen = 0;
1802 if (EFI_ERROR (Status)) {
1803 DEBUG ((DEBUG_ERROR,
"%a: failed to find option value by the given %s\n", __func__, TempBuffer));
1805 return EFI_NOT_FOUND;
1809 }
else if ((TargetStatement->HiiStatement->
Operand == EFI_IFR_ORDERED_LIST_OP) && (StatementValue->Type == EFI_IFR_TYPE_STRING)) {
1815 if (StringArray ==
NULL) {
1816 return EFI_OUT_OF_RESOURCES;
1822 CharArray = (CHAR8 **)StatementValue->Buffer;
1823 for (Index = 0; Index < StatementValue->BufferLen; Index++) {
1825 if (TempBuffer ==
NULL) {
1826 return EFI_OUT_OF_RESOURCES;
1830 if (EFI_ERROR (Status)) {
1839 StatementValue->Type = EFI_IFR_TYPE_BUFFER;
1840 StatementValue->Buffer = StringArray;
1841 StatementValue->BufferLen = TargetStatement->HiiStatement->
StorageWidth;
1842 StatementValue->BufferValueType = TargetStatement->HiiStatement->Value.
BufferValueType;
1843 }
else if ((TargetStatement->HiiStatement->
Operand == EFI_IFR_NUMERIC_OP) && (StatementValue->Type == EFI_IFR_TYPE_NUM_SIZE_64)) {
1848 StatementValue->Type = TargetStatement->HiiStatement->Value.
Type;
1850 DEBUG ((DEBUG_ERROR,
"%a: catch value type mismatch! input type: 0x%x but target value type: 0x%x\n", __func__, StatementValue->Type, TargetStatement->HiiStatement->Value.
Type));
1855 if ((TargetStatement->HiiStatement->
Operand == EFI_IFR_STRING_OP) && (StatementValue->Type == EFI_IFR_TYPE_STRING)) {
1859 StatementValue->Value.string =
HiiSetString (TargetStatement->ParentForm->ParentFormset->HiiHandle, 0x00, (EFI_STRING)StatementValue->Buffer,
NULL);
1860 if (StatementValue->Value.string == 0) {
1861 DEBUG ((DEBUG_ERROR,
"%a: can not create string id\n", __func__));
1862 return EFI_OUT_OF_RESOURCES;
1867 TargetStatement->ParentForm->ParentFormset->HiiFormSet,
1868 TargetStatement->ParentForm->HiiForm,
1869 TargetStatement->HiiStatement,
1872 if (EFI_ERROR (Status)) {
1873 DEBUG ((DEBUG_ERROR,
"%a: failed to save question value: %r\n", __func__, Status));
1876 if ((TargetStatement->HiiStatement->
Operand == EFI_IFR_STRING_OP) && (StatementValue->Type == EFI_IFR_TYPE_STRING)) {
1877 if (StatementValue->Value.string != 0) {
1879 HiiDeleteString (StatementValue->Value.string, TargetStatement->ParentForm->ParentFormset->HiiHandle);
1905 IN EFI_STRING ConfigureLang,
1914 if ((This ==
NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (Version) || IS_EMPTY_STRING (ConfigureLang)) {
1915 return EFI_INVALID_PARAMETER;
1918 if ((Value.Type == RedfishValueTypeUnknown) || (Value.Type >= RedfishValueTypeMax)) {
1919 return EFI_INVALID_PARAMETER;
1922 RedfishPlatformConfigPrivate = REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS (This);
1926 if (FullSchema ==
NULL) {
1927 return EFI_OUT_OF_RESOURCES;
1932 switch (Value.Type) {
1933 case RedfishValueTypeInteger:
1934 case RedfishValueTypeBoolean:
1936 if (EFI_ERROR (Status)) {
1937 DEBUG ((DEBUG_ERROR,
"%a: failed to convert Redfish value to Hii value: %r\n", __func__, Status));
1938 goto RELEASE_RESOURCE;
1942 case RedfishValueTypeString:
1943 if (Value.Value.Buffer ==
NULL) {
1944 Status = EFI_INVALID_PARAMETER;
1945 goto RELEASE_RESOURCE;
1948 NewValue.
Type = EFI_IFR_TYPE_STRING;
1949 NewValue.BufferLen = (UINT16)(
AsciiStrSize (Value.Value.Buffer) *
sizeof (CHAR16));
1952 Status = EFI_OUT_OF_RESOURCES;
1953 goto RELEASE_RESOURCE;
1957 case RedfishValueTypeStringArray:
1958 NewValue.
Type = EFI_IFR_TYPE_STRING;
1959 NewValue.BufferLen = (UINT16)Value.ArrayCount;
1960 NewValue.
Buffer = (UINT8 *)Value.Value.StringArray;
1968 if (EFI_ERROR (Status)) {
1969 DEBUG ((DEBUG_ERROR,
"%a: failed to set value to statement: %r\n", __func__, Status));
1974 if (FullSchema !=
NULL) {
1978 if ((Value.Type == RedfishValueTypeString) && (NewValue.
Buffer !=
NULL)) {
2005 IN EFI_STRING RegexPattern,
2006 OUT EFI_STRING **ConfigureLangList,
2015 EFI_STRING *TmpConfigureLangList;
2021 if ((This ==
NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (Version) || (Count ==
NULL) || (ConfigureLangList ==
NULL) || IS_EMPTY_STRING (RegexPattern)) {
2022 return EFI_INVALID_PARAMETER;
2025 ZeroMem (&StatementList,
sizeof (StatementList));
2027 *ConfigureLangList =
NULL;
2029 TmpConfigureLangList =
NULL;
2030 RedfishPlatformConfigPrivate = REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS (This);
2033 if (EFI_ERROR (Status)) {
2034 DEBUG ((DEBUG_ERROR,
"%a: ProcessPendingList failure: %r\n", __func__, Status));
2039 if (FullSchema ==
NULL) {
2040 return EFI_OUT_OF_RESOURCES;
2050 if (EFI_ERROR (Status)) {
2051 DEBUG ((DEBUG_ERROR,
"%a: GetStatementPrivateByConfigureLangRegex failure: %r\n", __func__, Status));
2052 goto RELEASE_RESOURCE;
2055 if (!
IsListEmpty (&StatementList.StatementList)) {
2056 TmpConfigureLangList =
AllocateZeroPool (
sizeof (CHAR16 *) * StatementList.Count);
2057 if (TmpConfigureLangList ==
NULL) {
2058 Status = EFI_OUT_OF_RESOURCES;
2059 goto RELEASE_RESOURCE;
2063 NextLink =
GetFirstNode (&StatementList.StatementList);
2064 while (!
IsNull (&StatementList.StatementList, NextLink)) {
2065 StatementRef = REDFISH_PLATFORM_CONFIG_STATEMENT_REF_FROM_LINK (NextLink);
2066 NextLink =
GetNextNode (&StatementList.StatementList, NextLink);
2068 ASSERT (StatementRef->Statement->Description != 0);
2069 if (StatementRef->Statement->Description != 0) {
2070 ASSERT (StatementRef->Statement->XuefiRedfishStr !=
NULL);
2071 TmpConfigureLangList[Index] =
AllocateCopyPool (
HiiStrSize (StatementRef->Statement->XuefiRedfishStr), (VOID *)StatementRef->Statement->XuefiRedfishStr);
2077 *Count = StatementList.Count;
2078 *ConfigureLangList = TmpConfigureLangList;
2080 DEBUG_REDFISH_THIS_MODULE (
2081 REDFISH_PLATFORM_CONFIG_DEBUG_CONFIG_LANG_REGEX,
2082 "%a: Number of configure language strings harvested: %d\n",
2087 DEBUG_REDFISH_THIS_MODULE_CODE (
2088 REDFISH_PLATFORM_CONFIG_DEBUG_CONFIG_LANG_REGEX,
2089 DEBUG_REDFISH (DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE,
"%a: Number of configure language strings harvested: %d\n", __func__, StatementList.Count);
2090 for (Index = 0; Index < *Count; Index++) {
2091 DEBUG_REDFISH (DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE,
" (%d) %s\n", Index, TmpConfigureLangList[Index]);
2098 if (FullSchema !=
NULL) {
2102 if (StatementList.Count > 0) {
2127 OUT CHAR8 **SupportedSchema
2137 CHAR8 *StringBuffer;
2140 if ((This ==
NULL) || (SupportedSchema ==
NULL)) {
2141 return EFI_INVALID_PARAMETER;
2144 *SupportedSchema =
NULL;
2146 RedfishPlatformConfigPrivate = REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS (This);
2149 if (EFI_ERROR (Status)) {
2150 DEBUG ((DEBUG_ERROR,
"%a: ProcessPendingList failure: %r\n", __func__, Status));
2155 return EFI_NOT_FOUND;
2165 HiiFormsetPrivate = REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK (HiiFormsetLink);
2167 if (HiiFormsetPrivate->SupportedSchema.Count > 0) {
2168 for (Index = 0; Index < HiiFormsetPrivate->SupportedSchema.Count; Index++) {
2169 StringSize +=
AsciiStrSize (HiiFormsetPrivate->SupportedSchema.SchemaList[Index]);
2173 HiiFormsetLink = HiiFormsetNextLink;
2176 if (StringSize == 0) {
2177 return EFI_NOT_FOUND;
2181 if (StringBuffer ==
NULL) {
2182 return EFI_OUT_OF_RESOURCES;
2189 HiiFormsetPrivate = REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK (HiiFormsetLink);
2191 if (HiiFormsetPrivate->SupportedSchema.Count > 0) {
2192 for (Index = 0; Index < HiiFormsetPrivate->SupportedSchema.Count; Index++) {
2193 AsciiStrCpyS (&StringBuffer[StringIndex], (StringSize - StringIndex), HiiFormsetPrivate->SupportedSchema.SchemaList[Index]);
2194 StringIndex +=
AsciiStrLen (HiiFormsetPrivate->SupportedSchema.SchemaList[Index]);
2195 StringBuffer[StringIndex] =
';';
2200 HiiFormsetLink = HiiFormsetNextLink;
2203 StringBuffer[--StringIndex] =
'\0';
2205 *SupportedSchema = StringBuffer;
2231 IN EFI_STRING ConfigureLang,
2232 IN UINT16 DefaultClass,
2242 if ((This ==
NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (Version) || IS_EMPTY_STRING (ConfigureLang) || (Value ==
NULL)) {
2243 return EFI_INVALID_PARAMETER;
2246 RedfishPlatformConfigPrivate = REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS (This);
2252 if (FullSchema ==
NULL) {
2253 return EFI_OUT_OF_RESOURCES;
2257 if (EFI_ERROR (Status)) {
2258 goto RELEASE_RESOURCE;
2261 if (TargetStatement->Suppressed) {
2262 Status = EFI_ACCESS_DENIED;
2263 goto RELEASE_RESOURCE;
2266 Status =
GetQuestionDefault (TargetStatement->ParentForm->ParentFormset->HiiFormSet, TargetStatement->ParentForm->HiiForm, TargetStatement->HiiStatement, DefaultClass, &DefaultValue);
2267 if (EFI_ERROR (Status)) {
2268 DEBUG ((DEBUG_ERROR,
"%a: GetQuestionDefault failed: %r\n", __func__, Status));
2269 goto RELEASE_RESOURCE;
2273 TargetStatement->ParentForm->ParentFormset->HiiHandle,
2275 TargetStatement->HiiStatement,
2279 if (EFI_ERROR (Status)) {
2280 DEBUG ((DEBUG_ERROR,
"%a: HiiValueToRedfishValue failed: %r\n", __func__, Status));
2285 if (FullSchema !=
NULL) {
2311 IN EFI_STRING ConfigureLang,
2322 if ((This ==
NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (Version) || IS_EMPTY_STRING (ConfigureLang) || (AttributeValue ==
NULL)) {
2323 return EFI_INVALID_PARAMETER;
2326 RedfishPlatformConfigPrivate = REDFISH_PLATFORM_CONFIG_PRIVATE_FROM_THIS (This);
2330 if (FullSchema ==
NULL) {
2331 return EFI_OUT_OF_RESOURCES;
2335 if (EFI_ERROR (Status)) {
2336 goto RELEASE_RESOURCE;
2339 if (TargetStatement->Description != 0) {
2340 AttributeValue->AttributeName =
HiiGetRedfishAsciiString (TargetStatement->ParentForm->ParentFormset->HiiHandle, FullSchema, TargetStatement->Description);
2342 if (Buffer !=
NULL) {
2343 FreePool (AttributeValue->AttributeName);
2344 AttributeValue->AttributeName = Buffer;
2347 AttributeValue->DisplayName =
HiiGetEnglishAsciiString (TargetStatement->ParentForm->ParentFormset->HiiHandle, TargetStatement->Description);
2350 if (TargetStatement->Help != 0) {
2351 AttributeValue->HelpText =
HiiGetEnglishAsciiString (TargetStatement->ParentForm->ParentFormset->HiiHandle, TargetStatement->Help);
2354 AttributeValue->ReadOnly = ((TargetStatement->Flags & EFI_IFR_FLAG_READ_ONLY) == 0 ?
FALSE :
TRUE);
2355 AttributeValue->ResetRequired = ((TargetStatement->Flags & EFI_IFR_FLAG_RESET_REQUIRED) == 0 ?
FALSE :
TRUE);
2357 AttributeValue->Suppress = TargetStatement->Suppressed;
2358 AttributeValue->GrayedOut = TargetStatement->GrayedOut;
2365 if (AttributeValue->MenuPath ==
NULL) {
2366 DEBUG ((DEBUG_ERROR,
"%a: failed to build menu path for \"%a\"\n", __func__, AttributeValue->AttributeName));
2373 if (AttributeValue->Type == RedfishAttributeTypeString) {
2374 AttributeValue->StrMaxSize = TargetStatement->StatementData.StrMaxSize;
2375 AttributeValue->StrMinSize = TargetStatement->StatementData.StrMinSize;
2376 }
else if (AttributeValue->Type == RedfishAttributeTypeInteger) {
2377 AttributeValue->NumMaximum = TargetStatement->StatementData.NumMaximum;
2378 AttributeValue->NumMinimum = TargetStatement->StatementData.NumMinimum;
2379 AttributeValue->NumStep = TargetStatement->StatementData.NumStep;
2385 if (TargetStatement->HiiStatement->
Operand == EFI_IFR_ONE_OF_OP) {
2386 Status =
OneOfStatementToAttributeValues (TargetStatement->ParentForm->ParentFormset->HiiHandle, FullSchema, TargetStatement, &AttributeValue->Values);
2387 if (EFI_ERROR (Status)) {
2388 DEBUG ((DEBUG_ERROR,
"%a: failed to convert one-of options to attribute values: %r\n", __func__, Status));
2394 if (FullSchema !=
NULL) {
2427 IN UINT8 PackageType,
2436 if ((NotifyType == EFI_HII_DATABASE_NOTIFY_NEW_PACK) || (NotifyType == EFI_HII_DATABASE_NOTIFY_ADD_PACK)) {
2441 if (EFI_ERROR (Status)) {
2442 DEBUG ((DEBUG_ERROR,
"%a: failed to notify updated formset of HII handle: 0x%x\n", __func__, Handle));
2445 }
else if (NotifyType == EFI_HII_DATABASE_NOTIFY_REMOVE_PACK) {
2450 if (EFI_ERROR (Status)) {
2451 DEBUG ((DEBUG_ERROR,
"%a: failed to notify deleted formset of HII handle: 0x%x\n", __func__, Handle));
2480 Status =
gBS->LocateProtocol (
2481 &gEfiHiiStringProtocolGuid,
2483 (VOID **)&mRedfishPlatformConfigPrivate->
HiiString
2485 if (EFI_ERROR (Status)) {
2486 DEBUG ((DEBUG_INFO,
"%a: locate EFI_HII_STRING_PROTOCOL failure: %r\n", __func__, Status));
2490 gBS->CloseEvent (Event);
2515 Status =
gBS->LocateProtocol (
2516 &gEfiHiiDatabaseProtocolGuid,
2518 (VOID **)&mRedfishPlatformConfigPrivate->
HiiDatabase
2520 if (EFI_ERROR (Status)) {
2521 DEBUG ((DEBUG_INFO,
"%a: locate EFI_HII_DATABASE_PROTOCOL failure: %r\n", __func__, Status));
2528 Status = mRedfishPlatformConfigPrivate->
HiiDatabase->RegisterPackageNotify (
2530 EFI_HII_PACKAGE_FORMS,
2533 EFI_HII_DATABASE_NOTIFY_NEW_PACK,
2536 if (EFI_ERROR (Status)) {
2537 DEBUG ((DEBUG_ERROR,
"%a: RegisterPackageNotify for EFI_HII_DATABASE_NOTIFY_NEW_PACK failure: %r\n", __func__, Status));
2543 Status = mRedfishPlatformConfigPrivate->
HiiDatabase->RegisterPackageNotify (
2545 EFI_HII_PACKAGE_FORMS,
2548 EFI_HII_DATABASE_NOTIFY_ADD_PACK,
2551 if (EFI_ERROR (Status)) {
2552 DEBUG ((DEBUG_ERROR,
"%a: RegisterPackageNotify for EFI_HII_DATABASE_NOTIFY_NEW_PACK failure: %r\n", __func__, Status));
2555 gBS->CloseEvent (Event);
2578 Status =
gBS->LocateProtocol (
2579 &gEfiRegularExpressionProtocolGuid,
2583 if (EFI_ERROR (Status)) {
2584 DEBUG ((DEBUG_INFO,
"%a: locate EFI_REGULAR_EXPRESSION_PROTOCOL failure: %r\n", __func__, Status));
2588 gBS->CloseEvent (Event);
2609 if (mRedfishPlatformConfigPrivate !=
NULL) {
2610 Status =
gBS->UninstallProtocolInterface (
2612 &gEdkIIRedfishPlatformConfigProtocolGuid,
2613 (VOID *)&mRedfishPlatformConfigPrivate->Protocol
2615 if (EFI_ERROR (Status)) {
2616 DEBUG ((DEBUG_ERROR,
"%a: can not uninstall gEdkIIRedfishPlatformConfigProtocolGuid: %r\n", __func__, Status));
2624 gBS->CloseEvent (mRedfishPlatformConfigPrivate->HiiDbNotify.
ProtocolEvent);
2628 gBS->CloseEvent (mRedfishPlatformConfigPrivate->HiiStringNotify.
ProtocolEvent);
2632 gBS->CloseEvent (mRedfishPlatformConfigPrivate->RegexNotify.
ProtocolEvent);
2639 mRedfishPlatformConfigPrivate->
HiiDatabase->UnregisterPackageNotify (
2646 FreePool (mRedfishPlatformConfigPrivate);
2647 mRedfishPlatformConfigPrivate =
NULL;
2674 if (mRedfishPlatformConfigPrivate ==
NULL) {
2675 DEBUG ((DEBUG_ERROR,
"%a: can not allocate pool for REDFISH_PLATFORM_CONFIG_PRIVATE\n", __func__));
2677 return EFI_OUT_OF_RESOURCES;
2683 mRedfishPlatformConfigPrivate->
ImageHandle = ImageHandle;
2684 mRedfishPlatformConfigPrivate->Protocol.Revision = REDFISH_PLATFORM_CONFIG_VERSION;
2695 Status =
gBS->InstallProtocolInterface (
2697 &gEdkIIRedfishPlatformConfigProtocolGuid,
2699 (VOID *)&mRedfishPlatformConfigPrivate->Protocol
2701 if (EFI_ERROR (Status)) {
2702 DEBUG ((DEBUG_ERROR,
"%a: can not install gEdkIIRedfishPlatformConfigProtocolGuid: %r\n", __func__, Status));
2710 &gEfiHiiDatabaseProtocolGuid,
2714 &mRedfishPlatformConfigPrivate->HiiDbNotify.
Registration
2717 DEBUG ((DEBUG_ERROR,
"%a: failed to create protocol notification for gEfiHiiDatabaseProtocolGuid\n", __func__));
2725 &gEfiHiiStringProtocolGuid,
2729 &mRedfishPlatformConfigPrivate->HiiStringNotify.
Registration
2732 DEBUG ((DEBUG_ERROR,
"%a: failed to create protocol notification for gEfiHiiStringProtocolGuid\n", __func__));
2740 &gEfiRegularExpressionProtocolGuid,
2744 &mRedfishPlatformConfigPrivate->RegexNotify.
Registration
2747 DEBUG ((DEBUG_ERROR,
"%a: failed to create protocol notification for gEfiRegularExpressionProtocolGuid\n", __func__));
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
RETURN_STATUS EFIAPI AsciiStrCatS(IN OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI ReallocatePool(IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EXPRESS_RESULT EvaluateExpressionList(IN FORM_EXPRESSION_LIST *ExpList, IN BOOLEAN Evaluate, IN FORM_BROWSER_FORMSET *FormSet OPTIONAL, IN FORM_BROWSER_FORM *Form OPTIONAL)
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
EFI_STRING_ID EFIAPI HiiSetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define DEBUG(Expression)
#define DEBUG_CODE(Expression)
UINTN EFI_HII_DATABASE_NOTIFY_TYPE
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
#define DEBUG_REDFISH_PLATFORM_CONFIG
Debug error level for Redfish Platform Configure Driver.
EFI_STATUS SubmitForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope)
EFI_STATUS GetQuestionDefault(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question, IN UINT16 DefaultId)
EFI_STATUS SetQuestionValue(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH SetValueTo)
EFI_STATUS GetQuestionValue(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
EFI_EVENT EFIAPI EfiCreateProtocolNotifyEvent(IN EFI_GUID *ProtocolGuid, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext OPTIONAL, OUT VOID **Registration)
UINT8 Operand
The operand (first byte) of this Statement or Question.
LIST_ENTRY OptionListHead
nested EFI_IFR_ONE_OF_OPTION list (HII_QUESTION_OPTION)
UINT16 StorageWidth
The storage width of this Question.
HII_EXPRESSION_LIST * SuppressExpression
Non-NULL indicates nested inside of SuppressIf.
UINT8 BufferValueType
Data type for buffer internal data, currently only for orderedlist.
EFI_EVENT ProtocolEvent
Protocol notification event.
VOID * Registration
Protocol notification registration.
EFI_HANDLE NotifyHandle
The notify handle.
EFI_REGULAR_EXPRESSION_PROTOCOL * RegularExpressionProtocol
Regular Expression Protocol.
EFI_HII_DATABASE_PROTOCOL * HiiDatabase
The HII database protocol.
LIST_ENTRY FormsetList
The list to keep cached HII formset.
LIST_ENTRY PendingList
The list to keep updated HII handle.
EFI_HII_STRING_PROTOCOL * HiiString
HII String Protocol.
EFI_HANDLE ImageHandle
Driver image handle.
EFI_HII_REF ref
EFI_IFR_TYPE_REF.