33 INTN ConditionalExprCount;
45 if (Statement ==
NULL) {
55 Statement->Signature = HII_STATEMENT_SIGNATURE;
61 CopyMem (&Statement->
Prompt, &StatementHdr->Prompt, sizeof (EFI_STRING_ID));
62 CopyMem (&Statement->Help, &StatementHdr->Help, sizeof (EFI_STRING_ID));
65 if (ConditionalExprCount > 0) {
77 Statement->
ExpressionList->Signature = HII_EXPRESSION_LIST_SIGNATURE;
109 IN UINT8 *OpCodeData,
122 if (Statement ==
NULL) {
127 CopyMem (&Statement->
QuestionId, &QuestionHdr->QuestionId, sizeof (EFI_QUESTION_ID));
128 CopyMem (&Statement->
VarStoreId, &QuestionHdr->VarStoreId, sizeof (EFI_VARSTORE_ID));
129 CopyMem (&Statement->
VarStoreInfo.VarOffset, &QuestionHdr->VarStoreInfo.VarOffset, sizeof (UINT16));
144 while (!
IsNull (&FormSet->StorageListHead, Link)) {
145 Storage = HII_STORAGE_FROM_LINK (Link);
152 Link =
GetNextNode (&FormSet->StorageListHead, Link);
162 if ((Statement->
Storage->
Type == EFI_HII_VARSTORE_NAME_VALUE) ||
163 (Statement->
Storage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE))
170 if (Statement->
Storage->
Type == EFI_HII_VARSTORE_NAME_VALUE) {
178 NameValueNode = HII_NAME_VALUE_NODE_FROM_LINK (Link);
194 if (NameValueNode ==
NULL) {
198 NameValueNode->Signature = HII_NAME_VALUE_NODE_SIGNATURE;
200 if (NameValueNode->Name ==
NULL) {
206 if (NameValueNode->Value ==
NULL) {
238 if (Expression ==
NULL) {
242 Expression->Signature = HII_EXPRESSION_SIGNATURE;
266 if ((Storage->Type == EFI_HII_VARSTORE_BUFFER) ||
267 (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
269 Name = Storage->Name;
277 FormSet->DriverHandle
280 if (Storage->ConfigHdr ==
NULL) {
281 return EFI_NOT_FOUND;
298 IN CHAR8 *AsciiString,
299 OUT CHAR16 *UnicodeString
305 while (AsciiString[Index] != 0) {
306 UnicodeString[Index] = (CHAR16)AsciiString[Index];
310 UnicodeString[Index] = L
'\0';
326 IN UINT8 StorageType,
331 CHAR8 *AsciiStorageName;
333 AsciiStorageName =
NULL;
336 if (Storage ==
NULL) {
340 Storage->Signature = HII_STORAGE_SIGNATURE;
341 Storage->
Type = StorageType;
343 switch (StorageType) {
344 case EFI_HII_VARSTORE_BUFFER:
366 case EFI_HII_VARSTORE_EFI_VARIABLE:
367 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
372 if (StorageType == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
391 case EFI_HII_VARSTORE_NAME_VALUE:
419 IN EFI_VARSTORE_ID VarStoreId
432 while (!
IsNull (&FormSet->StorageListHead, Link)) {
433 Storage = HII_STORAGE_FROM_LINK (Link);
440 Link =
GetNextNode (&FormSet->StorageListHead, Link);
443 return Found ? Storage :
NULL;
469 CHAR16 RequestElement[30];
474 Storage = Question->Storage;
475 if (Storage ==
NULL) {
476 return EFI_INVALID_PARAMETER;
479 if (Storage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
490 if ((Storage->
Type == EFI_HII_VARSTORE_BUFFER) ||
491 (Storage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
495 30 *
sizeof (CHAR16),
496 L
"&OFFSET=%04x&WIDTH=%04x",
497 Question->VarStoreInfo.VarOffset,
498 Question->StorageWidth
502 if (Question->BlockName ==
NULL) {
503 return EFI_OUT_OF_RESOURCES;
506 StrLen =
UnicodeSPrint (RequestElement, 30 *
sizeof (CHAR16), L
"&%s", Question->VariableName);
509 if ((Question->Operand == EFI_IFR_PASSWORD_OP) &&
510 ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK))
520 MaxLen = StringSize /
sizeof (CHAR16) + Storage->
SpareStrLen;
529 MaxLen = StringSize /
sizeof (CHAR16) + CONFIG_REQUEST_STRING_INCREMENTAL;
531 if (NewStr ==
NULL) {
532 return EFI_OUT_OF_RESOURCES;
543 Storage->
SpareStrLen = CONFIG_REQUEST_STRING_INCREMENTAL;
556 while (!
IsNull (&Form->ConfigRequestHead, Link)) {
557 ConfigInfo = HII_FORM_CONFIG_REQUEST_FROM_LINK (Link);
558 if ((ConfigInfo !=
NULL) && (ConfigInfo->Storage == Storage)) {
563 Link =
GetNextNode (&Form->ConfigRequestHead, Link);
568 if (ConfigInfo ==
NULL) {
569 return EFI_OUT_OF_RESOURCES;
572 ConfigInfo->Signature = HII_FORM_CONFIG_REQUEST_SIGNATURE;
576 return EFI_OUT_OF_RESOURCES;
579 ConfigInfo->SpareStrLen = 0;
580 ConfigInfo->Storage = Storage;
585 MaxLen = StringSize /
sizeof (CHAR16) + ConfigInfo->SpareStrLen;
590 if (
StrLen > ConfigInfo->SpareStrLen) {
594 MaxLen = StringSize /
sizeof (CHAR16) + CONFIG_REQUEST_STRING_INCREMENTAL;
596 if (NewStr ==
NULL) {
597 return EFI_OUT_OF_RESOURCES;
608 ConfigInfo->SpareStrLen = CONFIG_REQUEST_STRING_INCREMENTAL;
613 ConfigInfo->SpareStrLen -=
StrLen;
634 while (!
IsListEmpty (&Expression->OpCodeListHead)) {
636 OpCode = HII_EXPRESSION_OPCODE_FROM_LINK (Link);
639 if ((OpCode->Operand == EFI_IFR_EQ_ID_VAL_LIST_OP) && (OpCode->ExtraData.EqIdListData.ValueList !=
NULL)) {
640 FreePool (OpCode->ExtraData.EqIdListData.ValueList);
643 if (((OpCode->Operand == EFI_IFR_GET_OP) || (OpCode->Operand == EFI_IFR_SET_OP)) &&
644 (OpCode->ExtraData.GetSetData.ValueName !=
NULL))
646 FreePool (OpCode->ExtraData.GetSetData.ValueName);
652 SubExpression = HII_EXPRESSION_FROM_LINK (SubExpressionLink);
676 IN EFI_STRING_ID StringId,
682 NullChar = CHAR_NULL;
708 while (!
IsListEmpty (&Statement->DefaultListHead)) {
710 Default = HII_QUESTION_DEFAULT_FROM_LINK (Link);
723 while (!
IsListEmpty (&Statement->OptionListHead)) {
725 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
739 while (!
IsListEmpty (&Statement->InconsistentListHead)) {
741 Expression = HII_EXPRESSION_FROM_LINK (Link);
750 while (!
IsListEmpty (&Statement->NoSubmitListHead)) {
752 Expression = HII_EXPRESSION_FROM_LINK (Link);
761 while (!
IsListEmpty (&Statement->WarningListHead)) {
763 Expression = HII_EXPRESSION_FROM_LINK (Link);
769 if (Statement->ExpressionList !=
NULL) {
770 FreePool (Statement->ExpressionList);
773 if (Statement->VariableName !=
NULL) {
777 if (Statement->BlockName !=
NULL) {
781 if (Statement->Value.Buffer !=
NULL) {
785 if ((Statement->Operand == EFI_IFR_STRING_OP) || (Statement->Operand == EFI_IFR_PASSWORD_OP)) {
786 DeleteString (Statement->Value.Value.string, FormSet->HiiHandle);
813 Expression = HII_EXPRESSION_FROM_LINK (Link);
823 Statement = HII_STATEMENT_FROM_LINK (Link);
833 ConfigInfo = HII_FORM_CONFIG_REQUEST_FROM_LINK (Link);
841 if (Form->SuppressExpression !=
NULL) {
842 FreePool (Form->SuppressExpression);
865 if (((Operand >= EFI_IFR_EQ_ID_VAL_OP) && (Operand <= EFI_IFR_NOT_OP)) ||
866 ((Operand >= EFI_IFR_MATCH_OP) && (Operand <= EFI_IFR_SET_OP)) ||
867 ((Operand >= EFI_IFR_EQUAL_OP) && (Operand <= EFI_IFR_SPAN_OP)) ||
868 (Operand == EFI_IFR_CATENATE_OP) ||
869 (Operand == EFI_IFR_TO_LOWER_OP) ||
870 (Operand == EFI_IFR_TO_UPPER_OP) ||
871 (Operand == EFI_IFR_MAP_OP) ||
872 (Operand == EFI_IFR_VERSION_OP) ||
873 (Operand == EFI_IFR_SECURITY_OP) ||
874 (Operand == EFI_IFR_MATCH2_OP))
896 if ((Operand == EFI_IFR_SUBTITLE_OP) ||
897 (Operand == EFI_IFR_TEXT_OP) ||
898 (Operand == EFI_IFR_RESET_BUTTON_OP) ||
899 (Operand == EFI_IFR_REF_OP) ||
900 (Operand == EFI_IFR_ACTION_OP) ||
901 (Operand == EFI_IFR_NUMERIC_OP) ||
902 (Operand == EFI_IFR_ORDERED_LIST_OP) ||
903 (Operand == EFI_IFR_CHECKBOX_OP) ||
904 (Operand == EFI_IFR_STRING_OP) ||
905 (Operand == EFI_IFR_PASSWORD_OP) ||
906 (Operand == EFI_IFR_DATE_OP) ||
907 (Operand == EFI_IFR_TIME_OP) ||
908 (Operand == EFI_IFR_GUID_OP) ||
909 (Operand == EFI_IFR_ONE_OF_OP))
931 return Operand > EFI_IFR_MATCH2_OP ?
TRUE :
FALSE;
945 IN OUT UINT16 *NumberOfStatement,
946 IN OUT UINT16 *NumberOfExpression
949 UINT16 StatementCount;
950 UINT16 ExpressionCount;
959 while (Offset < FormSet->IfrBinaryLength) {
960 OpCodeData = FormSet->IfrBinaryData + Offset;
971 *NumberOfStatement = StatementCount;
972 *NumberOfExpression = ExpressionCount;
1005 UINT16 NumberOfStatement;
1006 UINT16 NumberOfExpression;
1007 EFI_IMAGE_ID *ImageId;
1008 BOOLEAN SuppressForQuestion;
1009 BOOLEAN SuppressForOption;
1010 UINT16 DepthOfDisable;
1011 BOOLEAN OpCodeDisabled;
1012 BOOLEAN SingleOpCodeExpression;
1013 BOOLEAN InScopeDefault;
1017 UINT8 MapScopeDepth;
1021 EFI_VARSTORE_ID TempVarstoreId;
1022 BOOLEAN InScopeDisable;
1023 INTN ConditionalExprCount;
1024 BOOLEAN InUnknownScope;
1028 BOOLEAN HaveInserted;
1030 BOOLEAN QuestionReferBitField;
1032 SuppressForQuestion =
FALSE;
1033 SuppressForOption =
FALSE;
1034 InScopeDisable =
FALSE;
1036 OpCodeDisabled =
FALSE;
1037 SingleOpCodeExpression =
FALSE;
1038 InScopeDefault =
FALSE;
1039 CurrentExpression =
NULL;
1040 CurrentDefault =
NULL;
1041 CurrentOption =
NULL;
1046 MapExpressionList =
NULL;
1048 ConditionalExprCount = 0;
1049 InUnknownScope =
FALSE;
1051 QuestionReferBitField =
FALSE;
1056 CountOpCodes (FormSet, &NumberOfStatement, &NumberOfExpression);
1066 CurrentStatement =
NULL;
1067 ParentStatement =
NULL;
1072 while (OpCodeOffset < FormSet->IfrBinaryLength) {
1073 OpCodeData = FormSet->IfrBinaryData + OpCodeOffset;
1076 OpCodeOffset += OpCodeLength;
1079 if (InUnknownScope) {
1080 if (Operand == EFI_IFR_END_OP) {
1083 if (UnknownDepth == 0) {
1084 InUnknownScope =
FALSE;
1097 InUnknownScope =
TRUE;
1111 if (OpCodeDisabled) {
1116 if (Operand == EFI_IFR_DISABLE_IF_OP) {
1118 }
else if (Operand == EFI_IFR_END_OP) {
1120 if (EFI_ERROR (Status)) {
1124 if (ScopeOpCode == EFI_IFR_DISABLE_IF_OP) {
1125 if (DepthOfDisable == 0) {
1126 InScopeDisable =
FALSE;
1127 OpCodeDisabled =
FALSE;
1139 if (ExpressionOpCode ==
NULL) {
1140 return EFI_OUT_OF_RESOURCES;
1143 ExpressionOpCode->Signature = HII_EXPRESSION_OPCODE_SIGNATURE;
1144 ExpressionOpCode->Operand = Operand;
1147 case EFI_IFR_EQ_ID_VAL_OP:
1151 ExpressionValue = &ExpressionOpCode->ExtraData.EqIdValData.
Value;
1152 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_16;
1156 case EFI_IFR_EQ_ID_ID_OP:
1157 CopyMem (&ExpressionOpCode->ExtraData.EqIdIdData.QuestionId1, &((
EFI_IFR_EQ_ID_ID *)OpCodeData)->QuestionId1, sizeof (EFI_QUESTION_ID));
1158 CopyMem (&ExpressionOpCode->ExtraData.EqIdIdData.QuestionId2, &((
EFI_IFR_EQ_ID_ID *)OpCodeData)->QuestionId2, sizeof (EFI_QUESTION_ID));
1161 case EFI_IFR_EQ_ID_VAL_LIST_OP:
1166 ExpressionOpCode->ExtraData.EqIdListData.ListLength * sizeof (UINT16),
1169 if (ExpressionOpCode->ExtraData.EqIdListData.ValueList ==
NULL) {
1170 return EFI_OUT_OF_RESOURCES;
1175 case EFI_IFR_TO_STRING_OP:
1176 case EFI_IFR_FIND_OP:
1181 case EFI_IFR_STRING_REF1_OP:
1183 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1184 ExpressionValue->Type = EFI_IFR_TYPE_STRING;
1188 case EFI_IFR_RULE_REF_OP:
1193 case EFI_IFR_SPAN_OP:
1198 case EFI_IFR_THIS_OP:
1200 if (ParentStatement !=
NULL) {
1206 case EFI_IFR_SECURITY_OP:
1211 case EFI_IFR_MATCH2_OP:
1216 case EFI_IFR_GET_OP:
1217 case EFI_IFR_SET_OP:
1219 CopyMem (&TempVarstoreId, &((
EFI_IFR_GET *)OpCodeData)->VarStoreId,
sizeof (TempVarstoreId));
1220 if (TempVarstoreId != 0) {
1221 if (FormSet->StorageListHead.ForwardLink !=
NULL) {
1223 while (!
IsNull (&FormSet->StorageListHead, Link)) {
1224 Storage = HII_STORAGE_FROM_LINK (Link);
1226 ExpressionOpCode->ExtraData.GetSetData.VarStorage = Storage;
1230 Link =
GetNextNode (&FormSet->StorageListHead, Link);
1234 if (ExpressionOpCode->ExtraData.GetSetData.VarStorage ==
NULL) {
1238 return EFI_INVALID_PARAMETER;
1242 ExpressionOpCode->ExtraData.GetSetData.ValueType = ((
EFI_IFR_GET *)OpCodeData)->VarStoreType;
1243 switch (ExpressionOpCode->ExtraData.GetSetData.ValueType) {
1244 case EFI_IFR_TYPE_BOOLEAN:
1245 case EFI_IFR_TYPE_NUM_SIZE_8:
1246 ExpressionOpCode->ExtraData.GetSetData.ValueWidth = 1;
1249 case EFI_IFR_TYPE_NUM_SIZE_16:
1250 case EFI_IFR_TYPE_STRING:
1251 ExpressionOpCode->ExtraData.GetSetData.ValueWidth = 2;
1254 case EFI_IFR_TYPE_NUM_SIZE_32:
1255 ExpressionOpCode->ExtraData.GetSetData.ValueWidth = 4;
1258 case EFI_IFR_TYPE_NUM_SIZE_64:
1259 ExpressionOpCode->ExtraData.GetSetData.ValueWidth = 8;
1262 case EFI_IFR_TYPE_DATE:
1263 ExpressionOpCode->ExtraData.GetSetData.ValueWidth = (UINT8)
sizeof (
EFI_IFR_DATE);
1266 case EFI_IFR_TYPE_TIME:
1267 ExpressionOpCode->ExtraData.GetSetData.ValueWidth = (UINT8)
sizeof (
EFI_IFR_TIME);
1270 case EFI_IFR_TYPE_REF:
1271 ExpressionOpCode->ExtraData.GetSetData.ValueWidth = (UINT8)
sizeof (
EFI_IFR_REF);
1274 case EFI_IFR_TYPE_OTHER:
1275 case EFI_IFR_TYPE_UNDEFINED:
1276 case EFI_IFR_TYPE_ACTION:
1277 case EFI_IFR_TYPE_BUFFER:
1282 return EFI_INVALID_PARAMETER;
1286 &ExpressionOpCode->ExtraData.GetSetData.VarStoreInfo.VarName,
1287 &((
EFI_IFR_GET *)OpCodeData)->VarStoreInfo.VarName,
1288 sizeof (EFI_STRING_ID)
1291 &ExpressionOpCode->ExtraData.GetSetData.VarStoreInfo.VarOffset,
1292 &((
EFI_IFR_GET *)OpCodeData)->VarStoreInfo.VarOffset,
1295 if ((ExpressionOpCode->ExtraData.GetSetData.VarStorage !=
NULL) &&
1296 ((ExpressionOpCode->ExtraData.GetSetData.VarStorage->
Type == EFI_HII_VARSTORE_NAME_VALUE) ||
1297 (ExpressionOpCode->ExtraData.GetSetData.VarStorage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE)))
1299 ExpressionOpCode->ExtraData.GetSetData.ValueName =
GetTokenString (ExpressionOpCode->ExtraData.GetSetData.VarStoreInfo.VarName, FormSet->HiiHandle);
1300 if (ExpressionOpCode->ExtraData.GetSetData.ValueName ==
NULL) {
1304 return EFI_INVALID_PARAMETER;
1310 case EFI_IFR_QUESTION_REF1_OP:
1315 case EFI_IFR_QUESTION_REF3_OP:
1330 case EFI_IFR_TRUE_OP:
1332 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1333 ExpressionValue->Type = EFI_IFR_TYPE_BOOLEAN;
1334 ExpressionValue->Value.b =
TRUE;
1337 case EFI_IFR_FALSE_OP:
1339 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1340 ExpressionValue->Type = EFI_IFR_TYPE_BOOLEAN;
1341 ExpressionValue->Value.b =
FALSE;
1344 case EFI_IFR_ONE_OP:
1346 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1347 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_8;
1348 ExpressionValue->Value.u8 = 1;
1351 case EFI_IFR_ZERO_OP:
1353 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1354 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_8;
1355 ExpressionValue->Value.u8 = 0;
1358 case EFI_IFR_ONES_OP:
1360 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1361 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_64;
1362 ExpressionValue->Value.u64 = 0xffffffffffffffffULL;
1365 case EFI_IFR_UINT8_OP:
1367 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1368 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_8;
1369 ExpressionValue->Value.u8 = ((
EFI_IFR_UINT8 *)OpCodeData)->Value;
1372 case EFI_IFR_UINT16_OP:
1374 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1375 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_16;
1379 case EFI_IFR_UINT32_OP:
1381 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1382 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_32;
1386 case EFI_IFR_UINT64_OP:
1388 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1389 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_64;
1393 case EFI_IFR_UNDEFINED_OP:
1394 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1395 ExpressionValue->Type = EFI_IFR_TYPE_UNDEFINED;
1398 case EFI_IFR_VERSION_OP:
1399 ExpressionValue = &ExpressionOpCode->ExtraData.
Value;
1400 ExpressionValue->Type = EFI_IFR_TYPE_NUM_SIZE_16;
1401 ExpressionValue->Value.u16 = EFI_IFR_SPECIFICATION_VERSION;
1411 if ((CurrentExpression ==
NULL) && (MapScopeDepth > 0)) {
1413 if (CurrentExpression ==
NULL) {
1419 SingleOpCodeExpression =
TRUE;
1424 if (Operand == EFI_IFR_MAP_OP) {
1428 if (MapExpressionList !=
NULL) {
1441 CurrentExpression =
NULL;
1443 }
else if (SingleOpCodeExpression) {
1449 SingleOpCodeExpression =
FALSE;
1451 if (InScopeDisable && (CurrentForm ==
NULL)) {
1456 if (EFI_ERROR (Status)) {
1463 CurrentExpression =
NULL;
1473 case EFI_IFR_FORM_SET_OP:
1479 return EFI_INVALID_PARAMETER;
1489 FormSet->NumberOfClassGuid = (UINT8)(((
EFI_IFR_FORM_SET *)OpCodeData)->Flags & 0x3);
1495 case EFI_IFR_FORM_OP:
1501 if (CurrentForm ==
NULL) {
1505 CurrentForm->Signature = HII_FORM_SIGNATURE;
1510 CurrentForm->
FormType = STANDARD_MAP_FORM_TYPE;
1515 if ( ConditionalExprCount > 0) {
1535 SuppressForQuestion =
TRUE;
1544 case EFI_IFR_FORM_MAP_OP:
1550 if (CurrentForm ==
NULL) {
1551 return EFI_OUT_OF_RESOURCES;
1554 CurrentForm->Signature = HII_FORM_SIGNATURE;
1566 return EFI_INVALID_PARAMETER;
1575 CurrentForm->
FormType = STANDARD_MAP_FORM_TYPE;
1591 if ( ConditionalExprCount > 0) {
1600 return EFI_OUT_OF_RESOURCES;
1612 SuppressForQuestion =
TRUE;
1624 case EFI_IFR_VARSTORE_OP:
1629 Storage =
CreateStorage (FormSet, EFI_HII_VARSTORE_BUFFER, OpCodeData);
1633 case EFI_IFR_VARSTORE_NAME_VALUE_OP:
1638 Storage =
CreateStorage (FormSet, EFI_HII_VARSTORE_NAME_VALUE, OpCodeData);
1642 case EFI_IFR_VARSTORE_EFI_OP:
1651 Storage =
CreateStorage (FormSet, EFI_HII_VARSTORE_EFI_VARIABLE, OpCodeData);
1656 Storage =
CreateStorage (FormSet, EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER, OpCodeData);
1665 case EFI_IFR_DEFAULTSTORE_OP:
1667 HaveInserted =
FALSE;
1669 if (DefaultStore ==
NULL) {
1670 return EFI_OUT_OF_RESOURCES;
1673 DefaultStore->Signature = HII_FORMSET_DEFAULTSTORE_SIGNATURE;
1680 if (!
IsListEmpty (&FormSet->DefaultStoreListHead)) {
1681 DefaultLink =
GetFirstNode (&FormSet->DefaultStoreListHead);
1682 while (!
IsNull (&FormSet->DefaultStoreListHead, DefaultLink)) {
1683 PreDefaultStore = HII_FORMSET_DEFAULTSTORE_FROM_LINK (DefaultLink);
1684 DefaultLink =
GetNextNode (&FormSet->DefaultStoreListHead, DefaultLink);
1685 if (DefaultStore->DefaultId < PreDefaultStore->DefaultId) {
1687 HaveInserted =
TRUE;
1693 if (!HaveInserted) {
1694 InsertTailList (&FormSet->DefaultStoreListHead, &DefaultStore->Link);
1702 case EFI_IFR_SUBTITLE_OP:
1704 CurrentStatement =
CreateStatement (OpCodeData, FormSet, CurrentForm);
1707 case EFI_IFR_TEXT_OP:
1709 CurrentStatement =
CreateStatement (OpCodeData, FormSet, CurrentForm);
1710 CopyMem (&CurrentStatement->ExtraData.TextTwo, &((
EFI_IFR_TEXT *)OpCodeData)->TextTwo, sizeof (EFI_STRING_ID));
1713 case EFI_IFR_RESET_BUTTON_OP:
1715 CurrentStatement =
CreateStatement (OpCodeData, FormSet, CurrentForm);
1722 case EFI_IFR_ACTION_OP:
1724 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1725 CurrentStatement->Value.
Type = EFI_IFR_TYPE_ACTION;
1731 CurrentStatement->ExtraData.QuestionConfig = 0;
1733 CopyMem (&CurrentStatement->ExtraData.QuestionConfig, &((
EFI_IFR_ACTION *)OpCodeData)->QuestionConfig, sizeof (EFI_STRING_ID));
1738 case EFI_IFR_REF_OP:
1740 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1741 StatementValue = &CurrentStatement->Value;
1742 StatementValue->
Type = EFI_IFR_TYPE_REF;
1744 CopyMem (&StatementValue->Value.
ref.FormId, &((
EFI_IFR_REF *)OpCodeData)->FormId, sizeof (EFI_FORM_ID));
1747 CopyMem (&StatementValue->Value.
ref.QuestionId, &((
EFI_IFR_REF2 *)OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
1753 CopyMem (&StatementValue->Value.
ref.DevicePath, &((
EFI_IFR_REF4 *)OpCodeData)->DevicePath, sizeof (EFI_STRING_ID));
1763 case EFI_IFR_ONE_OF_OP:
1764 case EFI_IFR_NUMERIC_OP:
1766 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1767 CurrentStatement->ExtraData.NumData.Flags = ((
EFI_IFR_ONE_OF *)OpCodeData)->Flags;
1768 StatementValue = &CurrentStatement->Value;
1770 if (QuestionReferBitField) {
1775 CurrentStatement->
BitStorageWidth = CurrentStatement->ExtraData.NumData.Flags & EDKII_IFR_NUMERIC_SIZE_BIT;
1779 CurrentStatement->
StorageWidth = (TotalBits % 8 == 0 ? TotalBits / 8 : TotalBits / 8 + 1);
1786 CurrentStatement->ExtraData.NumData.Step = ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u32.Step;
1799 ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u8.Step = (UINT8)CurrentStatement->ExtraData.NumData.Step;
1800 StatementValue->
Type = EFI_IFR_TYPE_NUM_SIZE_8;
1804 ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u16.MinValue = (UINT16)CurrentStatement->ExtraData.NumData.
Minimum;
1805 ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u16.MaxValue = (UINT16)CurrentStatement->ExtraData.NumData.
Maximum;
1806 ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u16.Step = (UINT16)CurrentStatement->ExtraData.NumData.Step;
1807 StatementValue->
Type = EFI_IFR_TYPE_NUM_SIZE_16;
1812 ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u32.MinValue = (UINT32)CurrentStatement->ExtraData.NumData.
Minimum;
1813 ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u32.MaxValue = (UINT32)CurrentStatement->ExtraData.NumData.
Maximum;
1814 ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u32.Step = (UINT32)CurrentStatement->ExtraData.NumData.Step;
1815 StatementValue->
Type = EFI_IFR_TYPE_NUM_SIZE_32;
1821 switch (CurrentStatement->ExtraData.NumData.Flags & EFI_IFR_NUMERIC_SIZE) {
1822 case EFI_IFR_NUMERIC_SIZE_1:
1825 CurrentStatement->ExtraData.NumData.Step = ((
EFI_IFR_NUMERIC *)OpCodeData)->data.u8.Step;
1826 CurrentStatement->
StorageWidth = (UINT16)
sizeof (UINT8);
1827 StatementValue->
Type = EFI_IFR_TYPE_NUM_SIZE_8;
1831 case EFI_IFR_NUMERIC_SIZE_2:
1834 CopyMem (&CurrentStatement->ExtraData.NumData.Step, &((
EFI_IFR_NUMERIC *)OpCodeData)->data.u16.Step, sizeof (UINT16));
1835 CurrentStatement->
StorageWidth = (UINT16)
sizeof (UINT16);
1836 StatementValue->
Type = EFI_IFR_TYPE_NUM_SIZE_16;
1840 case EFI_IFR_NUMERIC_SIZE_4:
1843 CopyMem (&CurrentStatement->ExtraData.NumData.Step, &((
EFI_IFR_NUMERIC *)OpCodeData)->data.u32.Step, sizeof (UINT32));
1844 CurrentStatement->
StorageWidth = (UINT16)
sizeof (UINT32);
1845 StatementValue->
Type = EFI_IFR_TYPE_NUM_SIZE_32;
1849 case EFI_IFR_NUMERIC_SIZE_8:
1852 CopyMem (&CurrentStatement->ExtraData.NumData.Step, &((
EFI_IFR_NUMERIC *)OpCodeData)->data.u64.Step, sizeof (UINT64));
1853 CurrentStatement->
StorageWidth = (UINT16)
sizeof (UINT64);
1854 StatementValue->
Type = EFI_IFR_TYPE_NUM_SIZE_64;
1866 if ((Operand == EFI_IFR_ONE_OF_OP) && (Scope != 0)) {
1867 SuppressForOption =
TRUE;
1872 case EFI_IFR_ORDERED_LIST_OP:
1874 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1877 CurrentStatement->Value.
Type = EFI_IFR_TYPE_BUFFER;
1881 SuppressForOption =
TRUE;
1886 case EFI_IFR_CHECKBOX_OP:
1888 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1889 CurrentStatement->ExtraData.Flags = ((
EFI_IFR_CHECKBOX *)OpCodeData)->Flags;
1890 CurrentStatement->
StorageWidth = (UINT16)
sizeof (BOOLEAN);
1891 CurrentStatement->Value.
Type = EFI_IFR_TYPE_BOOLEAN;
1893 if (QuestionReferBitField) {
1902 CurrentStatement->
StorageWidth = (TotalBits % 8 == 0 ? TotalBits / 8 : TotalBits / 8 + 1);
1909 case EFI_IFR_STRING_OP:
1911 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1918 CurrentStatement->ExtraData.StrData.MinSize = ((
EFI_IFR_STRING *)OpCodeData)->MinSize;
1919 CurrentStatement->ExtraData.StrData.MaxSize = ((
EFI_IFR_STRING *)OpCodeData)->MaxSize;
1920 CurrentStatement->ExtraData.StrData.Flags = ((
EFI_IFR_STRING *)OpCodeData)->Flags;
1921 CurrentStatement->
StorageWidth = (UINT16)((
UINTN)CurrentStatement->ExtraData.StrData.MaxSize *
sizeof (CHAR16));
1923 CurrentStatement->Value.
Type = EFI_IFR_TYPE_STRING;
1925 if (CurrentStatement->Value.
Buffer ==
NULL) {
1926 return EFI_OUT_OF_RESOURCES;
1929 CurrentStatement->Value.Value.
string =
NewHiiString ((CHAR16 *)CurrentStatement->Value.
Buffer, FormSet->HiiHandle);
1934 case EFI_IFR_PASSWORD_OP:
1936 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1943 CopyMem (&CurrentStatement->ExtraData.PwdData.MinSize, &((
EFI_IFR_PASSWORD *)OpCodeData)->MinSize, sizeof (UINT16));
1944 CopyMem (&CurrentStatement->ExtraData.PwdData.MaxSize, &((
EFI_IFR_PASSWORD *)OpCodeData)->MaxSize, sizeof (UINT16));
1945 CurrentStatement->
StorageWidth = (UINT16)((
UINTN)CurrentStatement->ExtraData.PwdData.MaxSize *
sizeof (CHAR16));
1947 CurrentStatement->Value.
Type = EFI_IFR_TYPE_STRING;
1949 if (CurrentStatement->Value.
Buffer ==
NULL) {
1950 return EFI_OUT_OF_RESOURCES;
1953 CurrentStatement->Value.Value.
string =
NewHiiString ((CHAR16 *)CurrentStatement->Value.
Buffer, FormSet->HiiHandle);
1958 case EFI_IFR_DATE_OP:
1960 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1961 CurrentStatement->ExtraData.Flags = ((
EFI_IFR_DATE *)OpCodeData)->Flags;
1962 CurrentStatement->Value.
Type = EFI_IFR_TYPE_DATE;
1964 if ((CurrentStatement->ExtraData.Flags & EFI_QF_DATE_STORAGE) == QF_DATE_STORAGE_NORMAL) {
1978 case EFI_IFR_TIME_OP:
1980 CurrentStatement =
CreateQuestion (OpCodeData, FormSet, CurrentForm);
1981 CurrentStatement->ExtraData.Flags = ((
EFI_IFR_TIME *)OpCodeData)->Flags;
1982 CurrentStatement->Value.
Type = EFI_IFR_TYPE_TIME;
1984 if ((CurrentStatement->ExtraData.Flags & QF_TIME_STORAGE) == QF_TIME_STORAGE_NORMAL) {
2001 case EFI_IFR_DEFAULT_OP:
2009 if (CurrentDefault ==
NULL) {
2010 return EFI_OUT_OF_RESOURCES;
2013 CurrentDefault->Signature = HII_QUESTION_DEFAULT_SIGNATURE;
2017 if (CurrentDefault->
Value.
Type == EFI_IFR_TYPE_BUFFER) {
2022 return EFI_OUT_OF_RESOURCES;
2025 if (ParentStatement->
Operand == EFI_IFR_ORDERED_LIST_OP) {
2026 ParentStatement->Value.BufferLen = CurrentDefault->
Value.BufferLen;
2043 InScopeDefault =
TRUE;
2051 case EFI_IFR_ONE_OF_OPTION_OP:
2053 if (ParentStatement ==
NULL) {
2057 CurrentDefault =
NULL;
2058 if (((ParentStatement->
Operand == EFI_IFR_ORDERED_LIST_OP) || (ParentStatement->
Operand == EFI_IFR_ONE_OF_OP)) &&
2059 ((((
EFI_IFR_ONE_OF_OPTION *)OpCodeData)->Flags & (EFI_IFR_OPTION_DEFAULT | EFI_IFR_OPTION_DEFAULT_MFG)) != 0))
2062 if (CurrentDefault ==
NULL) {
2063 return EFI_OUT_OF_RESOURCES;
2066 CurrentDefault->Signature = HII_QUESTION_DEFAULT_SIGNATURE;
2068 CurrentDefault->DefaultId = EFI_HII_DEFAULT_CLASS_STANDARD;
2070 CurrentDefault->DefaultId = EFI_HII_DEFAULT_CLASS_MANUFACTURING;
2073 if (ParentStatement->
Operand == EFI_IFR_ORDERED_LIST_OP) {
2074 CurrentDefault->
Value.
Type = EFI_IFR_TYPE_BUFFER;
2079 return EFI_OUT_OF_RESOURCES;
2098 if (CurrentOption ==
NULL) {
2099 return EFI_OUT_OF_RESOURCES;
2102 CurrentOption->Signature = HII_QUESTION_OPTION_SIGNATURE;
2111 if ( ConditionalExprCount > 0) {
2120 return EFI_OUT_OF_RESOURCES;
2136 if ((ParentStatement->
Operand == EFI_IFR_ORDERED_LIST_OP) && (ParentStatement->Value.
Buffer ==
NULL)) {
2138 switch (CurrentOption->Value.
Type) {
2139 case EFI_IFR_TYPE_NUM_SIZE_8:
2143 case EFI_IFR_TYPE_NUM_SIZE_16:
2147 case EFI_IFR_TYPE_NUM_SIZE_32:
2151 case EFI_IFR_TYPE_NUM_SIZE_64:
2165 return EFI_OUT_OF_RESOURCES;
2168 ParentStatement->Value.BufferLen = 0;
2178 case EFI_IFR_NO_SUBMIT_IF_OP:
2179 case EFI_IFR_INCONSISTENT_IF_OP:
2187 if (Operand == EFI_IFR_NO_SUBMIT_IF_OP) {
2188 CurrentExpression->
Type = EFI_HII_EXPRESSION_NO_SUBMIT_IF;
2191 CurrentExpression->
Type = EFI_HII_EXPRESSION_INCONSISTENT_IF;
2200 SingleOpCodeExpression =
TRUE;
2205 case EFI_IFR_WARNING_IF_OP:
2211 CopyMem (&CurrentExpression->ExtraData.WarningIfData.WarningIfError, &((
EFI_IFR_WARNING_IF *)OpCodeData)->Warning, sizeof (EFI_STRING_ID));
2212 CurrentExpression->ExtraData.WarningIfData.TimeOut = ((
EFI_IFR_WARNING_IF *)OpCodeData)->TimeOut;
2213 CurrentExpression->
Type = EFI_HII_EXPRESSION_WARNING_IF;
2221 SingleOpCodeExpression =
TRUE;
2226 case EFI_IFR_SUPPRESS_IF_OP:
2232 CurrentExpression->
Type = EFI_HII_EXPRESSION_SUPPRESS_IF;
2234 if (SuppressForOption) {
2236 }
else if (SuppressForQuestion) {
2247 SingleOpCodeExpression =
TRUE;
2252 case EFI_IFR_GRAY_OUT_IF_OP:
2258 CurrentExpression->
Type = EFI_HII_EXPRESSION_GRAY_OUT_IF;
2266 SingleOpCodeExpression =
TRUE;
2271 case EFI_IFR_DISABLE_IF_OP:
2278 if (CurrentExpression ==
NULL) {
2279 return EFI_OUT_OF_RESOURCES;
2282 CurrentExpression->Signature = HII_EXPRESSION_SIGNATURE;
2283 CurrentExpression->
Type = EFI_HII_EXPRESSION_DISABLE_IF;
2286 if (CurrentForm !=
NULL) {
2293 OpCodeDisabled =
FALSE;
2294 InScopeDisable =
TRUE;
2300 SingleOpCodeExpression =
TRUE;
2308 case EFI_IFR_VALUE_OP:
2311 CurrentExpression->
Type = EFI_HII_EXPRESSION_VALUE;
2313 if (InScopeDefault) {
2326 if (ParentStatement ==
NULL) {
2338 SingleOpCodeExpression =
TRUE;
2343 case EFI_IFR_RULE_OP:
2346 CurrentExpression->
Type = EFI_HII_EXPRESSION_RULE;
2356 SingleOpCodeExpression =
TRUE;
2361 case EFI_IFR_READ_OP:
2364 CurrentExpression->
Type = EFI_HII_EXPRESSION_READ;
2371 if (ParentStatement ==
NULL) {
2382 SingleOpCodeExpression =
TRUE;
2387 case EFI_IFR_WRITE_OP:
2390 CurrentExpression->
Type = EFI_HII_EXPRESSION_WRITE;
2397 if (ParentStatement ==
NULL) {
2408 SingleOpCodeExpression =
TRUE;
2416 case EFI_IFR_IMAGE_OP:
2423 switch (ScopeOpCode) {
2424 case EFI_IFR_FORM_SET_OP:
2426 ImageId = &FormSet->ImageId;
2429 case EFI_IFR_FORM_OP:
2430 case EFI_IFR_FORM_MAP_OP:
2432 if (CurrentForm !=
NULL) {
2433 ImageId = &CurrentForm->
ImageId;
2438 case EFI_IFR_ONE_OF_OPTION_OP:
2440 if (CurrentOption !=
NULL) {
2441 ImageId = &CurrentOption->ImageId;
2453 if (ParentStatement !=
NULL) {
2454 ImageId = &ParentStatement->
ImageId;
2466 case EFI_IFR_REFRESH_OP:
2468 if (ParentStatement !=
NULL) {
2477 case EFI_IFR_REFRESH_ID_OP:
2484 switch (ScopeOpCode) {
2485 case EFI_IFR_FORM_OP:
2486 case EFI_IFR_FORM_MAP_OP:
2488 if (CurrentForm !=
NULL) {
2496 if (ParentStatement !=
NULL) {
2497 if (ParentStatement->
Operand == EFI_IFR_NUMERIC_OP) {
2510 case EFI_IFR_MODAL_TAG_OP:
2512 if (CurrentForm !=
NULL) {
2521 case EFI_IFR_LOCKED_OP:
2528 switch (ScopeOpCode) {
2529 case EFI_IFR_FORM_OP:
2530 case EFI_IFR_FORM_MAP_OP:
2532 if (CurrentForm !=
NULL) {
2540 if (ParentStatement !=
NULL) {
2550 case EFI_IFR_GUID_OP:
2551 CurrentStatement =
CreateStatement (OpCodeData, FormSet, CurrentForm);
2554 QuestionReferBitField =
TRUE;
2562 case EFI_IFR_END_OP:
2563 QuestionReferBitField =
FALSE;
2565 if (EFI_ERROR (Status)) {
2577 switch (ScopeOpCode) {
2578 case EFI_IFR_FORM_SET_OP:
2583 FormSet->IfrBinaryLength = OpCodeOffset;
2586 case EFI_IFR_FORM_OP:
2587 case EFI_IFR_FORM_MAP_OP:
2592 SuppressForQuestion =
FALSE;
2595 case EFI_IFR_ONE_OF_OPTION_OP:
2599 CurrentOption =
NULL;
2602 case EFI_IFR_NO_SUBMIT_IF_OP:
2603 case EFI_IFR_INCONSISTENT_IF_OP:
2604 case EFI_IFR_WARNING_IF_OP:
2610 case EFI_IFR_SUPPRESS_IF_OP:
2611 if (SuppressForOption) {
2613 }
else if (SuppressForQuestion) {
2621 case EFI_IFR_GRAY_OUT_IF_OP:
2625 case EFI_IFR_DISABLE_IF_OP:
2626 if (CurrentForm !=
NULL) {
2630 InScopeDisable =
FALSE;
2631 OpCodeDisabled =
FALSE;
2634 case EFI_IFR_ONE_OF_OP:
2635 case EFI_IFR_ORDERED_LIST_OP:
2636 SuppressForOption =
FALSE;
2639 case EFI_IFR_DEFAULT_OP:
2640 InScopeDefault =
FALSE;
2643 case EFI_IFR_MAP_OP:
2649 if (Status == EFI_ACCESS_DENIED) {
2650 MapExpressionList =
NULL;
2657 if (EFI_ERROR (Status)) {
2661 if (MapScopeDepth > 0) {
2670 if (InScopeDisable && (CurrentForm ==
NULL)) {
2675 if (EFI_ERROR (Status)) {
2690 CurrentExpression =
NULL;
2709 ParentStatement = CurrentStatement;
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
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)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
RETURN_STATUS EFIAPI StrCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS PopMapExpressionList(OUT VOID **Pointer)
VOID ResetScopeStack(VOID)
VOID ExtendValueToU64(IN EFI_HII_VALUE *Value)
EFI_STATUS PushCurrentExpression(IN VOID *Pointer)
VOID ResetCurrentExpressionStack(VOID)
EFI_STATUS PushConditionalExpression(IN FORM_EXPRESSION *Pointer, IN EXPRESS_LEVEL Level)
EFI_STATUS PushScope(IN UINT8 Operand)
EFI_STATUS PopConditionalExpression(IN EXPRESS_LEVEL Level)
INTN GetConditionalExpressionCount(IN EXPRESS_LEVEL Level)
EFI_STATUS PopCurrentExpression(OUT VOID **Pointer)
EFI_STATUS PushMapExpressionList(IN VOID *Pointer)
EFI_STATUS PopScope(OUT UINT8 *Operand)
FORM_EXPRESSION ** GetConditionalExpressionList(IN EXPRESS_LEVEL Level)
VOID ResetMapExpressionListStack(VOID)
VOID AsciiToUnicode(IN CHAR8 *AsciiString, OUT CHAR16 *UnicodeString)
BOOLEAN IsStatementOpCode(IN UINT8 Operand)
VOID CountOpCodes(IN HII_FORMSET *FormSet, IN OUT UINT16 *NumberOfStatement, IN OUT UINT16 *NumberOfExpression)
HII_EXPRESSION * CreateExpression(IN OUT HII_FORM *Form, IN UINT8 *OpCode)
EFI_STATUS DeleteString(IN EFI_STRING_ID StringId, IN EFI_HII_HANDLE HiiHandle)
HII_FORMSET_STORAGE * GetFstStgFromVarId(IN HII_FORMSET *FormSet, IN EFI_VARSTORE_ID VarStoreId)
BOOLEAN IsExpressionOpCode(IN UINT8 Operand)
VOID DestroyExpression(IN HII_EXPRESSION *Expression)
BOOLEAN IsUnKnownOpCode(IN UINT8 Operand)
HII_FORMSET_STORAGE * CreateStorage(IN HII_FORMSET *FormSet, IN UINT8 StorageType, IN UINT8 *OpCodeData)
EFI_STATUS InitializeConfigHdr(IN HII_FORMSET *FormSet, IN OUT HII_FORMSET_STORAGE *Storage)
VOID DestroyForm(IN HII_FORMSET *FormSet, IN OUT HII_FORM *Form)
HII_STATEMENT * CreateStatement(IN UINT8 *OpCodeData, IN OUT HII_FORMSET *FormSet, IN OUT HII_FORM *Form)
EFI_STATUS ParseOpCodes(IN HII_FORMSET *FormSet)
HII_STATEMENT * CreateQuestion(IN UINT8 *OpCodeData, IN OUT HII_FORMSET *FormSet, IN OUT HII_FORM *Form)
VOID DestroyStatement(IN HII_FORMSET *FormSet, IN OUT HII_STATEMENT *Statement)
EFI_STATUS InitializeRequestElement(IN OUT HII_FORMSET *FormSet, IN OUT HII_STATEMENT *Question, IN OUT HII_FORM *Form)
VOID EFIAPI HiiStringToLowercase(IN EFI_STRING ConfigString)
EFI_STRING_ID NewHiiString(IN CHAR16 *String, IN EFI_HII_HANDLE HiiHandle)
CHAR16 * GetTokenString(IN EFI_STRING_ID Token, IN EFI_HII_HANDLE HiiHandle)
BOOLEAN IsHiiValueTrue(IN EFI_HII_VALUE *Result)
EFI_STRING EFIAPI HiiConstructConfigHdr(IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL, IN EFI_HANDLE DriverHandle)
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)
EFI_STATUS EvaluateHiiExpression(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN OUT HII_EXPRESSION *Expression)
#define EDKII_IFR_DISPLAY_BIT
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
#define OFFSET_OF(TYPE, Field)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_GUID MethodIdentifier
EFI_STRING_ID MethodTitle
UINT8 RefreshInterval
nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh
HII_VAR_STORE_INFO VarStoreInfo
UINT8 QuestionFlags
The flag of this Question.(Readonly, reset required, callback attribute....)
HII_EXPRESSION * ReadExpression
nested EFI_IFR_READ, provide this question value by read expression.
LIST_ENTRY InconsistentListHead
nested inconsistent expression list (HII_EXPRESSION)
HII_FORMSET_STORAGE * Storage
Point to the storage that store this question.
HII_EXPRESSION_LIST * ExpressionList
nesting inside of GrayedOutIf/DisableIf/SuppressIf
EFI_QUESTION_ID QuestionId
Question id, the value of zero is reserved.
UINT8 Operand
The operand (first byte) of this Statement or Question.
BOOLEAN Locked
Whether this statement is locked.
UINT16 BitStorageWidth
The Storage width of this Question in bit level.
UINT16 BitVarOffset
The storage offset of this Question in bit level.
LIST_ENTRY WarningListHead
nested warning expression list (HII_EXPRESSION)
BOOLEAN QuestionReferToBitField
Whether the question is stored in a bit field.
HII_EXPRESSION * ValueExpression
nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly
EFI_VARSTORE_ID VarStoreId
VarStore id, a value of zero indicates no variable storage.
CHAR16 * VariableName
Name/Value or EFI Variable name.
HII_EXPRESSION * WriteExpression
nested EFI_IFR_WRITE, evaluate write expression after this question value is set.
LIST_ENTRY DefaultListHead
nested EFI_IFR_DEFAULT list (HII_QUESTION_DEFAULT), provide default values
LIST_ENTRY OptionListHead
nested EFI_IFR_ONE_OF_OPTION list (HII_QUESTION_OPTION)
HII_STATEMENT * ParentStatement
Parent Statement of current statement.
EFI_IMAGE_ID ImageId
nested EFI_IFR_IMAGE
UINT16 StorageWidth
The storage width of this Question.
LIST_ENTRY NoSubmitListHead
nested nosubmit expression list (HII_EXPRESSION)
HII_EXPRESSION * Expression[1]
Array[Count] of expressions.
LIST_ENTRY MapExpressionList
nested expressions inside of Map opcode.
EFI_IFR_OP_HEADER * OpCode
Save the opcode buffer.
LIST_ENTRY OpCodeListHead
OpCodes consist of this expression (HII_EXPRESSION_OPCODE)
EFI_HII_VALUE Result
Expression evaluation result.
UINT8 Type
Type for this expression.
Definition of HII_FORM_CONFIG_REQUEST.
CHAR16 * ConfigRequest
<ConfigRequest> = <ConfigHdr> + <RequestElement>
UINTN ElementCount
Number of <RequestElement> in the <ConfigRequest>
LIST_ENTRY StatementListHead
List of Statements and Questions (HII_STATEMENT)
EFI_STRING_ID FormTitle
FormTile of normal form, or FormMapMethod title of formmap form.
HII_EXPRESSION_LIST * SuppressExpression
nesting inside of SuppressIf
EFI_IMAGE_ID ImageId
The image id.
UINT16 FormId
FormId of normal form or formmap form.
BOOLEAN ModalForm
Whether this is a modal form.
EFI_GUID RefreshGuid
Form refresh event guid.
LIST_ENTRY ConfigRequestHead
List of configrequest for all storage.
LIST_ENTRY RuleListHead
nested EFI_IFR_RULE list, pre-defined expressions attached to the form.
UINT16 FormType
Specific form type for the different form.
BOOLEAN Locked
Whether this form is locked.
UINT16 VarStoreId
VarStore ID.
UINT8 * Buffer
Buffer storage.
UINT16 Size
VarStore size.
EFI_GUID Guid
VarStore Guid.
CHAR16 * Name
VarStore name.
LIST_ENTRY NameValueList
List of NAME_VALUE_NODE.
UINTN ElementCount
Number of <RequestElement> in the <ConfigRequest>
UINTN SpareStrLen
Spare length of ConfigRequest string buffer.
CHAR16 * ConfigRequest
<ConfigRequest> = <ConfigHdr> + <RequestElement>
CHAR16 * ConfigHdr
<ConfigHdr>
HII_EXPRESSION * ValueExpression
Not-NULL indicates default value is provided by EFI_IFR_VALUE.
HII_STATEMENT_VALUE Value
Default value.
EFI_IFR_ONE_OF_OPTION * OpCode
OneOfOption Data.
HII_EXPRESSION_LIST * SuppressExpression
Non-NULL indicates nested inside of SuppressIf.
UINT8 BufferValueType
Data type for buffer internal data, currently only for orderedlist.
EFI_STRING_ID string
EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION.
EFI_HII_REF ref
EFI_IFR_TYPE_REF.
EFI_HII_VALUE Value
EFI_IFR_UINT64, EFI_IFR_UINT32, EFI_IFR_UINT16, EFI_IFR_UINT8, EFI_IFR_STRING_REF1.
EFI_GUID Guid
For EFI_IFR_SECURITY, EFI_IFR_MATCH2.
UINT8 RuleId
For EFI_IFR_RULE_REF.
UINT8 Flags
For EFI_IFR_SPAN.
EFI_STRING_ID DevicePath
For EFI_IFR_QUESTION_REF3_3.
EFI_QUESTION_ID QuestionId
For EFI_IFR_EQ_ID_VAL_LIST.
UINT8 Format
For EFI_IFR_TO_STRING, EFI_IFR_FIND.
UINT8 RuleId
For EFI_IFR_RULE only.
EFI_STRING_ID Error
For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only.
UINT64 Maximum
for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length
UINT8 MaxContainers
for EFI_IFR_ORDERED_LIST
UINT64 Minimum
for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value