14CHAR16 *mUnknownString = L
"!";
15CHAR16 *gEmptyString = L
"";
20UINTN mExpressionEvaluationStackOffset = 0;
73 while (!
IsNull (&Storage->NameValueList, Link)) {
74 Node = HII_NAME_VALUE_NODE_FROM_LINK (Link);
76 if (
StrCmp (Name, Node->Name) == 0) {
84 return EFI_OUT_OF_RESOURCES;
89 if (ReturnNode !=
NULL) {
123 StartBit = Question->BitVarOffset % 8;
124 EndBit = StartBit + Question->BitStorageWidth - 1;
126 CopyMem ((UINT8 *)&BufferValue, Buffer, Question->StorageWidth);
135 CopyMem ((UINT8 *)&QuestionValue->Value, (UINT8 *)&RetVal, Question->StorageWidth);
150 IN OUT UINT8 *Buffer,
159 StartBit = Question->BitVarOffset % 8;
160 EndBit = StartBit + Question->BitStorageWidth - 1;
162 CopyMem ((UINT8 *)&Operand, Buffer, Question->StorageWidth);
164 CopyMem (Buffer, (UINT8 *)&RetVal, Question->StorageWidth);
185 BOOLEAN IsBufferStorage;
200 IsString = (BOOLEAN)((QuestionValue->Type == EFI_IFR_TYPE_STRING) ?
TRUE :
FALSE);
201 if ((Question->Storage->Type == EFI_HII_VARSTORE_BUFFER) ||
202 (Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
204 IsBufferStorage =
TRUE;
206 IsBufferStorage =
FALSE;
212 if ((QuestionValue->Type == EFI_IFR_TYPE_STRING) || (QuestionValue->Type == EFI_IFR_TYPE_BUFFER)) {
216 if (QuestionValue->Buffer ==
NULL) {
217 return EFI_OUT_OF_RESOURCES;
220 Dst = QuestionValue->Buffer;
225 if (Question->QuestionReferToBitField) {
227 if (Buffer ==
NULL) {
228 return EFI_OUT_OF_RESOURCES;
233 Dst = (UINT8 *)&QuestionValue->Value;
241 while (*StringPtr != L
'\0' && *StringPtr != L
'&') {
245 TempChar = *StringPtr;
248 LengthStr =
StrLen (Value);
256 if (LengthStr > (
UINTN)Question->StorageWidth * 2) {
257 Length = (
UINTN)Question->StorageWidth * 2;
263 if (!IsBufferStorage && IsString) {
268 DstBuf = (CHAR16 *)Dst;
269 ZeroMem (TemStr,
sizeof (TemStr));
270 for (Index = 0; Index < Length; Index += 4) {
271 StrnCpyS (TemStr,
sizeof (TemStr) /
sizeof (CHAR16), Value + Index, 4);
278 DstBuf[Index/4] = L
'\0';
280 ZeroMem (TemStr,
sizeof (TemStr));
281 for (Index = 0; Index < Length; Index++) {
282 TemStr[0] = Value[LengthStr - Index - 1];
284 if ((Index & 1) == 0) {
285 Dst[Index/2] = DigitUint8;
287 Dst[Index/2] = (UINT8)((DigitUint8 << 4) + Dst[Index/2]);
292 *StringPtr = TempChar;
294 if ((Buffer !=
NULL) && Question->QuestionReferToBitField) {
314 IN EFI_STRING_ID Token,
320 if (HiiHandle ==
NULL) {
325 if (String ==
NULL) {
327 if (String ==
NULL) {
332 return (CHAR16 *)String;
345 IN EFI_STRING ConfigString
354 for (String = ConfigString, Lower =
FALSE; *String != L
'\0'; String++) {
355 if (*String == L
'=') {
357 }
else if (*String == L
'&') {
359 }
else if (Lower && (*String >= L
'A') && (*String <= L
'F')) {
360 *String = (CHAR16)(*String - L
'A' + L
'a');
379 switch (Result->Type) {
380 case EFI_IFR_TYPE_BOOLEAN:
381 return Result->Value.b;
383 case EFI_IFR_TYPE_NUM_SIZE_8:
384 return (BOOLEAN)(Result->Value.u8 != 0);
386 case EFI_IFR_TYPE_NUM_SIZE_16:
387 return (BOOLEAN)(Result->Value.u16 != 0);
389 case EFI_IFR_TYPE_NUM_SIZE_32:
390 return (BOOLEAN)(Result->Value.u32 != 0);
392 case EFI_IFR_TYPE_NUM_SIZE_64:
393 return (BOOLEAN)(Result->Value.u64 != 0);
418 EFI_STRING_ID StringId;
447 ListHead = &Question->NoSubmitListHead;
449 while (!
IsNull (ListHead, Link)) {
450 Expression = HII_EXPRESSION_FROM_LINK (Link);
456 if (EFI_ERROR (Status)) {
461 return EFI_NOT_READY;
495 while (!
IsNull (&FormSet->FormListHead, LinkForm)) {
496 Form = HII_FORM_FROM_LINK (LinkForm);
497 LinkForm =
GetNextNode (&FormSet->FormListHead, LinkForm);
499 if ((*CurrentForm !=
NULL) && (*CurrentForm != Form)) {
505 Question = HII_STATEMENT_FROM_LINK (Link);
507 if (EFI_ERROR (Status)) {
508 if (*CurrentForm ==
NULL) {
512 if (Statement !=
NULL) {
513 *Statement = Question;
535 IN OUT CHAR16 **Dest,
574 IN CHAR16 **ConfigResp,
575 IN CHAR16 *ConfigRequest
584 EFI_STRING TempConfigRequest;
585 UINTN RequestStrSize;
589 if (Storage->ConfigHdr ==
NULL) {
590 return EFI_INVALID_PARAMETER;
593 if (ConfigRequest !=
NULL) {
595 if (TempConfigRequest ==
NULL) {
596 return EFI_OUT_OF_RESOURCES;
599 RequestStrSize = (
StrLen (Storage->ConfigHdr) +
StrLen (Storage->ConfigRequest) + 1) *
sizeof (CHAR16);
601 if (TempConfigRequest ==
NULL) {
602 return EFI_OUT_OF_RESOURCES;
610 Storage->ConfigRequest
614 switch (Storage->Type) {
615 case EFI_HII_VARSTORE_BUFFER:
616 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
618 Status =
gBS->LocateProtocol (
619 &gEfiHiiConfigRoutingProtocolGuid,
621 (VOID **)&HiiConfigRouting
623 if (EFI_ERROR (Status)) {
627 SourceBuf = Storage->Buffer;
628 Status = HiiConfigRouting->BlockToConfig (
638 case EFI_HII_VARSTORE_NAME_VALUE:
644 while (!
IsNull (&Storage->NameValueList, Link)) {
645 Node = HII_NAME_VALUE_NODE_FROM_LINK (Link);
647 if (
StrStr (TempConfigRequest, Node->Name) !=
NULL) {
654 Link =
GetNextNode (&Storage->NameValueList, Link);
659 case EFI_HII_VARSTORE_EFI_VARIABLE:
661 Status = EFI_INVALID_PARAMETER;
681 IN CHAR16 *ConfigResp
694 switch (Storage->Type) {
695 case EFI_HII_VARSTORE_BUFFER:
696 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
698 Status =
gBS->LocateProtocol (
699 &gEfiHiiConfigRoutingProtocolGuid,
701 (VOID **)&HiiConfigRouting
703 if (EFI_ERROR (Status)) {
707 BufferSize = Storage->Size;
708 Status = HiiConfigRouting->ConfigToBlock (
717 case EFI_HII_VARSTORE_NAME_VALUE:
718 StrPtr =
StrStr (ConfigResp, L
"PATH");
719 if (StrPtr ==
NULL) {
723 StrPtr =
StrStr (ConfigResp, L
"&");
724 while (StrPtr !=
NULL) {
730 StrPtr =
StrStr (StrPtr, L
"=");
731 if (StrPtr ==
NULL) {
742 StrPtr =
StrStr (StrPtr, L
"&");
743 if (StrPtr !=
NULL) {
752 case EFI_HII_VARSTORE_EFI_VARIABLE:
754 Status = EFI_INVALID_PARAMETER;
785 OUT UINT8 **BinaryData
795 UINT32 PackageListLength;
798 UINT8 NumberOfClassGuid;
799 BOOLEAN ClassGuidMatch;
811 if (FormSetGuid ==
NULL) {
812 ComparingGuid = &gZeroGuid;
814 ComparingGuid = FormSetGuid;
820 Status =
gBS->LocateProtocol (
821 &gEfiHiiDatabaseProtocolGuid,
823 (VOID **)&HiiDatabase
825 if (EFI_ERROR (Status)) {
831 HiiPackageList =
NULL;
832 Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
833 if (Status == EFI_BUFFER_TOO_SMALL) {
835 if (HiiPackageList ==
NULL) {
836 return EFI_OUT_OF_RESOURCES;
839 Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
842 if (EFI_ERROR (Status)) {
843 if (HiiPackageList !=
NULL) {
856 CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
858 ClassGuidMatch =
FALSE;
859 while (Offset < PackageListLength) {
860 Package = ((UINT8 *)HiiPackageList) + Offset;
863 if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
869 while (Offset2 < PackageHeader.Length) {
870 OpCodeData = Package + Offset2;
889 for (Index = 0; Index < NumberOfClassGuid; Index++) {
890 if (
CompareGuid (ComparingGuid, ClassGuid + Index)) {
891 ClassGuidMatch =
TRUE;
896 if (ClassGuidMatch) {
899 }
else if (ComparingGuid == &gEfiHiiPlatformSetupFormsetGuid) {
900 ClassGuidMatch =
TRUE;
908 if (Offset2 < PackageHeader.Length) {
916 Offset += PackageHeader.Length;
919 if (Offset >= PackageListLength) {
925 return EFI_NOT_FOUND;
928 if (FormSetGuid !=
NULL) {
941 *BinaryLength = PackageHeader.Length - Offset2;
944 if (*BinaryData ==
NULL) {
945 return EFI_OUT_OF_RESOURCES;
961 IN CHAR16 *RequestElement
977 IN OUT CHAR16 **ConfigRequest,
979 IN CHAR16 *RequestElement
987 StrLength =
StrLen (RequestElement);
988 StringSize = (*ConfigRequest !=
NULL) ?
StrSize (*ConfigRequest) :
sizeof (CHAR16);
989 MaxLen = StringSize /
sizeof (CHAR16) + *SpareStrLen;
994 if (StrLength > *SpareStrLen) {
998 MaxLen = StringSize /
sizeof (CHAR16) + CONFIG_REQUEST_STRING_INCREMENTAL;
1000 if (NewStr ==
NULL) {
1004 if (*ConfigRequest !=
NULL) {
1005 CopyMem (NewStr, *ConfigRequest, StringSize);
1011 *ConfigRequest = NewStr;
1012 *SpareStrLen = CONFIG_REQUEST_STRING_INCREMENTAL;
1015 StrCatS (*ConfigRequest, MaxLen, RequestElement);
1016 *SpareStrLen -= StrLength;
1034 IN BOOLEAN RespString
1037 CHAR16 *RequestElement;
1038 CHAR16 *NextRequestElement;
1039 CHAR16 *NextElementBackup;
1043 CHAR16 *ConfigRequest;
1046 NextElementBackup =
NULL;
1049 if (Request !=
NULL) {
1050 ConfigRequest = Request;
1052 ConfigRequest = Storage->ConfigRequest;
1055 if (Storage->ConfigRequest ==
NULL) {
1057 if (Storage->ConfigRequest ==
NULL) {
1064 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
1073 SearchKey = L
"&OFFSET";
1074 ValueKey = L
"&VALUE";
1080 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
1081 RequestElement =
StrStr (ConfigRequest, L
"PATH");
1082 if (RequestElement ==
NULL) {
1086 RequestElement =
StrStr (RequestElement, SearchKey);
1088 RequestElement =
StrStr (ConfigRequest, SearchKey);
1091 while (RequestElement !=
NULL) {
1095 NextRequestElement =
StrStr (RequestElement + 1, SearchKey);
1100 if (NextRequestElement !=
NULL) {
1101 if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
1102 NextElementBackup = NextRequestElement;
1103 NextRequestElement =
StrStr (RequestElement, ValueKey);
1104 if (NextRequestElement ==
NULL) {
1112 *NextRequestElement = L
'\0';
1114 if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
1115 NextElementBackup = NextRequestElement;
1116 NextRequestElement =
StrStr (RequestElement, ValueKey);
1117 if (NextRequestElement ==
NULL) {
1124 *NextRequestElement = L
'\0';
1136 if (NextRequestElement !=
NULL) {
1140 *NextRequestElement = L
'&';
1143 if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
1144 RequestElement = NextElementBackup;
1146 RequestElement = NextRequestElement;
1167 EFI_STRING Progress;
1170 EFI_STRING ConfigRequest;
1171 UINTN RequestStrSize;
1174 ConfigRequest =
NULL;
1176 switch (Storage->Type) {
1177 case EFI_HII_VARSTORE_EFI_VARIABLE:
1180 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
1182 if (Storage->ConfigRequest !=
NULL) {
1190 case EFI_HII_VARSTORE_BUFFER:
1191 case EFI_HII_VARSTORE_NAME_VALUE:
1195 if (Storage->ElementCount == 0) {
1205 if (Storage->Type != EFI_HII_VARSTORE_NAME_VALUE) {
1211 RequestStrSize =
StrSize (Storage->ConfigHdr) + 20 *
sizeof (CHAR16);
1213 if (ConfigRequest ==
NULL) {
1220 L
"%s&OFFSET=0&WIDTH=%04x",
1225 RequestStrSize = (
StrLen (Storage->ConfigHdr) +
StrLen (Storage->ConfigRequest) + 1) *
sizeof (CHAR16);
1227 if (ConfigRequest ==
NULL) {
1236 Storage->ConfigRequest
1243 Status =
gBS->LocateProtocol (
1244 &gEfiHiiConfigRoutingProtocolGuid,
1246 (VOID **)&HiiConfigRouting
1248 if (EFI_ERROR (Status)) {
1252 Status = HiiConfigRouting->ExtractConfig (
1258 if (!EFI_ERROR (Status)) {
1262 StrPtr =
StrStr (Result, L
"&GUID=");
1263 if (StrPtr !=
NULL) {
1272 if (Storage->ConfigRequest ==
NULL) {
1273 if (ConfigRequest !=
NULL) {
1280 if (Storage->Type != EFI_HII_VARSTORE_NAME_VALUE) {
1281 if (ConfigRequest !=
NULL) {
1301 switch (Value->Type) {
1302 case EFI_IFR_TYPE_NUM_SIZE_8:
1303 Temp = Value->Value.u8;
1306 case EFI_IFR_TYPE_NUM_SIZE_16:
1307 Temp = Value->Value.u16;
1310 case EFI_IFR_TYPE_NUM_SIZE_32:
1311 Temp = Value->Value.u32;
1314 case EFI_IFR_TYPE_BOOLEAN:
1315 Temp = Value->Value.b;
1318 case EFI_IFR_TYPE_TIME:
1319 Temp = Value->Value.u32 & 0xffffff;
1322 case EFI_IFR_TYPE_DATE:
1323 Temp = Value->Value.u32;
1330 Value->Value.u64 = Temp;
1420 IN OUT CHAR16 **Value
1426 if ((Storage ==
NULL) || (Value ==
NULL)) {
1427 return EFI_INVALID_PARAMETER;
1433 while (!
IsNull (&Storage->NameValueList, Link)) {
1434 Node = HII_NAME_VALUE_NODE_FROM_LINK (Link);
1436 if (
StrCmp (Name, Node->Name) == 0) {
1441 Link =
GetNextNode (&Storage->NameValueList, Link);
1444 return EFI_NOT_FOUND;
1476 CHAR16 *ConfigRequest;
1481 BOOLEAN IsBufferStorage;
1485 if ((FormSet ==
NULL) || (Form ==
NULL) || (Question ==
NULL)) {
1486 return EFI_INVALID_PARAMETER;
1493 if (GetValueFrom >= GetSetValueWithMax) {
1494 return EFI_INVALID_PARAMETER;
1500 if (Question->ValueExpression !=
NULL) {
1502 if (!EFI_ERROR (Status)) {
1503 if (Question->ValueExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
1504 ASSERT (Question->Value.Type == EFI_IFR_TYPE_BUFFER && Question->Value.Buffer !=
NULL);
1505 if (Question->StorageWidth > Question->ValueExpression->Result.BufferLen) {
1506 CopyMem (Question->Value.Buffer, Question->ValueExpression->Result.Buffer, Question->ValueExpression->Result.BufferLen);
1507 Question->Value.BufferLen = Question->ValueExpression->Result.BufferLen;
1509 CopyMem (Question->Value.Buffer, Question->ValueExpression->Result.Buffer, Question->StorageWidth);
1510 Question->Value.BufferLen = Question->StorageWidth;
1513 FreePool (Question->ValueExpression->Result.Buffer);
1516 Question->Value.Type = Question->ValueExpression->Result.Type;
1526 if ((Question->ReadExpression !=
NULL) && (Form->FormType == STANDARD_MAP_FORM_TYPE)) {
1528 if (!EFI_ERROR (Status) &&
1529 ((Question->ReadExpression->Result.Type < EFI_IFR_TYPE_OTHER) || (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER)))
1534 if (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
1535 ASSERT (Question->Value.Type == EFI_IFR_TYPE_BUFFER && Question->Value.Buffer !=
NULL);
1536 if (Question->StorageWidth > Question->ReadExpression->Result.BufferLen) {
1537 CopyMem (Question->Value.Buffer, Question->ReadExpression->Result.Buffer, Question->ReadExpression->Result.BufferLen);
1538 Question->Value.BufferLen = Question->ReadExpression->Result.BufferLen;
1540 CopyMem (Question->Value.Buffer, Question->ReadExpression->Result.Buffer, Question->StorageWidth);
1541 Question->Value.BufferLen = Question->StorageWidth;
1544 FreePool (Question->ReadExpression->Result.Buffer);
1547 Question->Value.Type = Question->ReadExpression->Result.Type;
1556 Storage = Question->Storage;
1557 QuestionValue = &Question->Value.Value;
1558 if (Storage ==
NULL) {
1562 if ((Question->Operand == EFI_IFR_DATE_OP) || (Question->Operand == EFI_IFR_TIME_OP)) {
1566 switch (Question->ExtraData.Flags & EFI_QF_DATE_STORAGE) {
1567 case QF_DATE_STORAGE_TIME:
1568 Status =
gRT->GetTime (&EfiTime,
NULL);
1571 case QF_DATE_STORAGE_WAKEUP:
1572 Status =
gRT->GetWakeupTime (&Enabled, &Pending, &EfiTime);
1575 case QF_DATE_STORAGE_NORMAL:
1583 if (EFI_ERROR (Status)) {
1584 if (Question->Operand == EFI_IFR_DATE_OP) {
1585 QuestionValue->date.Year = 0xff;
1586 QuestionValue->date.Month = 0xff;
1587 QuestionValue->date.Day = 0xff;
1589 QuestionValue->time.Hour = 0xff;
1590 QuestionValue->time.Minute = 0xff;
1591 QuestionValue->time.Second = 0xff;
1597 if (Question->Operand == EFI_IFR_DATE_OP) {
1598 QuestionValue->date.Year = EfiTime.Year;
1599 QuestionValue->date.Month = EfiTime.Month;
1600 QuestionValue->date.Day = EfiTime.Day;
1602 QuestionValue->time.Hour = EfiTime.Hour;
1603 QuestionValue->time.Minute = EfiTime.Minute;
1604 QuestionValue->time.Second = EfiTime.Second;
1614 StorageWidth = Question->StorageWidth;
1615 if (Storage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
1616 if (Question->Value.Buffer !=
NULL) {
1617 Dst = Question->Value.Buffer;
1619 Dst = (UINT8 *)QuestionValue;
1622 Status =
gRT->GetVariable (
1623 Question->VariableName,
1638 if (Question->Value.Buffer !=
NULL) {
1642 Dst = Question->Value.Buffer;
1647 Dst = (UINT8 *)&Question->Value.Value;
1650 if ((Storage->
Type == EFI_HII_VARSTORE_BUFFER) ||
1651 (Storage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
1653 IsBufferStorage =
TRUE;
1655 IsBufferStorage =
FALSE;
1658 if (GetValueFrom == GetSetValueWithBuffer ) {
1659 if (IsBufferStorage) {
1664 if (Question->QuestionReferToBitField) {
1667 CopyMem (Dst, Storage->
Buffer + Question->VarStoreInfo.VarOffset, StorageWidth);
1671 Status =
GetValueByName (Storage, Question->VariableName, &Value);
1672 if (EFI_ERROR (Status)) {
1676 ASSERT (Value !=
NULL);
1682 ASSERT (FormsetStorage !=
NULL);
1687 if (IsBufferStorage) {
1689 Length +=
StrLen (Question->BlockName);
1692 Length +=
StrLen (Question->VariableName) + 1;
1696 MaxLen = Length + 1;
1697 ConfigRequest =
AllocatePool (MaxLen *
sizeof (CHAR16));
1698 ASSERT (ConfigRequest !=
NULL);
1701 if (IsBufferStorage) {
1702 StrCatS (ConfigRequest, MaxLen, Question->BlockName);
1704 StrCatS (ConfigRequest, MaxLen, L
"&");
1705 StrCatS (ConfigRequest, MaxLen, Question->VariableName);
1708 Status =
gBS->LocateProtocol (
1709 &gEfiHiiConfigRoutingProtocolGuid,
1711 (VOID **)&HiiConfigRouting
1713 if (EFI_ERROR (Status)) {
1720 Status = HiiConfigRouting->ExtractConfig (
1727 if (EFI_ERROR (Status)) {
1734 if (IsBufferStorage) {
1735 Value =
StrStr (Result, L
"&VALUE");
1736 if (Value ==
NULL) {
1738 return EFI_NOT_FOUND;
1746 Value = Result + Length;
1749 if (*Value !=
'=') {
1751 return EFI_NOT_FOUND;
1760 if (EFI_ERROR (Status)) {
1768 if (IsBufferStorage) {
1769 CopyMem (Storage->
Buffer + Question->VarStoreInfo.VarOffset, Dst, StorageWidth);
1774 if (Result !=
NULL) {
1793 if (String ==
NULL) {
1797 while (*String != 0) {
1798 if ((*String >=
'a') && (*String <=
'z')) {
1799 *String = (UINT16)((*String) & ((UINT16) ~0x20));
1823 if (Value ==
NULL) {
1827 switch (Value->Type) {
1828 case EFI_IFR_TYPE_BUFFER:
1829 case EFI_IFR_TYPE_DATE:
1830 case EFI_IFR_TYPE_TIME:
1831 case EFI_IFR_TYPE_REF:
1853 if (Value ==
NULL) {
1857 switch (Value->Type) {
1858 case EFI_IFR_TYPE_NUM_SIZE_8:
1859 case EFI_IFR_TYPE_NUM_SIZE_16:
1860 case EFI_IFR_TYPE_NUM_SIZE_32:
1861 case EFI_IFR_TYPE_NUM_SIZE_64:
1862 case EFI_IFR_TYPE_BOOLEAN:
1886 if (Value ==
NULL) {
1890 switch (Value->Type) {
1891 case EFI_IFR_TYPE_BUFFER:
1892 return Value->Buffer;
1894 case EFI_IFR_TYPE_DATE:
1895 return (UINT8 *)(&Value->Value.date);
1897 case EFI_IFR_TYPE_TIME:
1898 return (UINT8 *)(&Value->Value.time);
1900 case EFI_IFR_TYPE_REF:
1901 return (UINT8 *)(&Value->Value.ref);
1924 if (Value ==
NULL) {
1928 switch (Value->Type) {
1929 case EFI_IFR_TYPE_BUFFER:
1930 return Value->BufferLen;
1932 case EFI_IFR_TYPE_DATE:
1935 case EFI_IFR_TYPE_TIME:
1938 case EFI_IFR_TYPE_REF:
1961 if (Value ==
NULL) {
1967 switch (Value->Type) {
1968 case EFI_IFR_TYPE_NUM_SIZE_8:
1969 RetVal = Value->Value.u8;
1972 case EFI_IFR_TYPE_NUM_SIZE_16:
1973 RetVal = Value->Value.u16;
1976 case EFI_IFR_TYPE_NUM_SIZE_32:
1977 RetVal = Value->Value.u32;
1980 case EFI_IFR_TYPE_BOOLEAN:
1981 RetVal = Value->Value.b;
1984 case EFI_IFR_TYPE_DATE:
1985 RetVal = *(UINT64 *)&Value->Value.date;
1988 case EFI_IFR_TYPE_TIME:
1989 RetVal = (*(UINT64 *)&Value->Value.time) & 0xffffff;
1993 RetVal = Value->Value.u64;
2033 if ((Value1 ==
NULL) || (Value2 ==
NULL) || (Result ==
NULL)) {
2034 return EFI_INVALID_PARAMETER;
2037 if ((Value1->Type == EFI_IFR_TYPE_STRING) && (Value2->Type == EFI_IFR_TYPE_STRING)) {
2038 if ((Value1->Value.string == 0) || (Value2->Value.string == 0)) {
2042 return EFI_INVALID_PARAMETER;
2045 if (Value1->Value.string == Value2->Value.string) {
2055 return EFI_NOT_FOUND;
2061 return EFI_NOT_FOUND;
2064 *Result =
StrCmp (Str1, Str2);
2081 Len = Buf1Len > Buf2Len ? Buf2Len : Buf1Len;
2083 if ((*Result == 0) && (Buf1Len != Buf2Len)) {
2088 *Result = Buf1Len > Buf2Len ? 1 : -1;
2101 }
else if (Temp64 < 0) {
2110 return EFI_UNSUPPORTED;
2127 EFI_USER_PROFILE_HANDLE UserProfileHandle;
2128 EFI_USER_INFO_HANDLE UserInfoHandle;
2132 UINTN AccessControlDataSize;
2136 if (mUserManager ==
NULL) {
2137 Status =
gBS->LocateProtocol (
2138 &gEfiUserManagerProtocolGuid,
2140 (VOID **)&mUserManager
2142 if (EFI_ERROR (Status)) {
2152 Status = mUserManager->Current (mUserManager, &UserProfileHandle);
2160 for (UserInfoHandle =
NULL; ;) {
2161 Status = mUserManager->GetNextInfo (mUserManager, UserProfileHandle, &UserInfoHandle);
2162 if (EFI_ERROR (Status)) {
2167 Status = mUserManager->GetInfo (mUserManager, UserProfileHandle, UserInfoHandle,
NULL, &UserInfoSize);
2168 if (Status != EFI_BUFFER_TOO_SMALL) {
2173 if (UserInfo ==
NULL) {
2177 Status = mUserManager->GetInfo (mUserManager, UserProfileHandle, UserInfoHandle, UserInfo, &UserInfoSize);
2178 if (EFI_ERROR (Status) ||
2198 UserPermissionsGuid = (
EFI_GUID *)(AccessControl + 1);
2200 while (AccessControlDataSize >=
sizeof (
EFI_GUID)) {
2206 UserPermissionsGuid++;
2207 AccessControlDataSize -=
sizeof (
EFI_GUID);
2211 RemainSize -= AccessControl->
Size;
2234 IN UINT16 QuestionId
2240 if ((QuestionId == 0) || (Form ==
NULL)) {
2248 while (!
IsNull (&Form->StatementListHead, Link)) {
2249 Question = HII_STATEMENT_FROM_LINK (Link);
2255 Link =
GetNextNode (&Form->StatementListHead, Link);
2276 IN UINT16 QuestionId
2282 if ((FormSet ==
NULL) || (Form ==
NULL)) {
2290 if (Question !=
NULL) {
2298 while (!
IsNull (&FormSet->FormListHead, Link)) {
2299 Form = HII_FORM_FROM_LINK (Link);
2302 if (Question !=
NULL) {
2307 if (Question->
Storage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
2314 Link =
GetNextNode (&FormSet->FormListHead, Link);
2336 if (Value ==
NULL) {
2337 return EFI_INVALID_PARAMETER;
2341 &mExpressionEvaluationStack,
2342 &mExpressionEvaluationStackPointer,
2343 &mExpressionEvaluationStackEnd,
2363 if (Value ==
NULL) {
2364 return EFI_INVALID_PARAMETER;
2368 mExpressionEvaluationStack + mExpressionEvaluationStackOffset,
2369 &mExpressionEvaluationStackPointer,
2384 UINTN TempStackOffset;
2386 TempStackOffset = mExpressionEvaluationStackOffset;
2387 mExpressionEvaluationStackOffset = mExpressionEvaluationStackPointer - mExpressionEvaluationStack;
2388 return TempStackOffset;
2402 mExpressionEvaluationStackOffset = StackOffset;
2426 CHAR16 *PrintFormat;
2431 if ((FormSet ==
NULL) || (Result ==
NULL)) {
2432 return EFI_INVALID_PARAMETER;
2436 if (EFI_ERROR (Status)) {
2440 switch (Value.Type) {
2441 case EFI_IFR_TYPE_NUM_SIZE_8:
2442 case EFI_IFR_TYPE_NUM_SIZE_16:
2443 case EFI_IFR_TYPE_NUM_SIZE_32:
2444 case EFI_IFR_TYPE_NUM_SIZE_64:
2448 case EFI_IFR_STRING_SIGNED_DEC:
2449 PrintFormat = L
"%ld";
2452 case EFI_IFR_STRING_LOWERCASE_HEX:
2453 PrintFormat = L
"%lx";
2456 case EFI_IFR_STRING_UPPERCASE_HEX:
2457 PrintFormat = L
"%lX";
2461 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2465 UnicodeSPrint (Buffer, BufferSize, PrintFormat, Value.Value.u64);
2469 case EFI_IFR_TYPE_STRING:
2473 case EFI_IFR_TYPE_BOOLEAN:
2474 String = (Value.Value.b) ? L
"True" : L
"False";
2477 case EFI_IFR_TYPE_BUFFER:
2478 case EFI_IFR_TYPE_DATE:
2479 case EFI_IFR_TYPE_TIME:
2480 case EFI_IFR_TYPE_REF:
2485 if (Value.Type == EFI_IFR_TYPE_BUFFER) {
2486 SrcBuf = Value.Buffer;
2492 PrintFormat = L
"%a";
2495 PrintFormat = L
"%s";
2498 UnicodeSPrint (Buffer,
sizeof (Buffer), PrintFormat, SrcBuf);
2500 if (Value.Type == EFI_IFR_TYPE_BUFFER) {
2507 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2511 Result->Type = EFI_IFR_TYPE_STRING;
2512 Result->Value.string =
NewHiiString (String, FormSet->HiiHandle);
2537 if ((FormSet ==
NULL) || (Result ==
NULL)) {
2538 return EFI_INVALID_PARAMETER;
2542 if (EFI_ERROR (Status)) {
2546 if ((Value.Type >= EFI_IFR_TYPE_OTHER) && !
IsTypeInBuffer (&Value)) {
2547 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2552 if (Value.Type == EFI_IFR_TYPE_STRING) {
2553 String =
GetTokenString (Value.Value.string, FormSet->HiiHandle);
2554 if (String ==
NULL) {
2555 return EFI_NOT_FOUND;
2559 StringPtr =
StrStr (String, L
"0X");
2560 if (StringPtr !=
NULL) {
2575 if (Value.Type == EFI_IFR_TYPE_BUFFER) {
2579 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2584 if (Value.Type == EFI_IFR_TYPE_BUFFER) {
2591 Result->Type = EFI_IFR_TYPE_NUM_SIZE_64;
2622 if ((FormSet ==
NULL) || (Result ==
NULL)) {
2623 return EFI_INVALID_PARAMETER;
2634 ZeroMem (Value,
sizeof (Value));
2637 if (EFI_ERROR (Status)) {
2642 if (EFI_ERROR (Status)) {
2646 for (Index = 0; Index < 2; Index++) {
2647 if ((Value[Index].Type != EFI_IFR_TYPE_STRING) && !
IsTypeInBuffer (&Value[Index])) {
2648 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2653 if (Value[Index].Type == EFI_IFR_TYPE_STRING) {
2654 String[Index] =
GetTokenString (Value[Index].Value.string, FormSet->HiiHandle);
2655 if (String[Index] ==
NULL) {
2656 Status = EFI_NOT_FOUND;
2662 if (Value[0].Type == EFI_IFR_TYPE_STRING) {
2664 MaxLen = (
StrSize (String[1]) + Size) /
sizeof (CHAR16);
2666 ASSERT (StringPtr !=
NULL);
2667 StrCpyS (StringPtr, MaxLen, String[1]);
2668 StrCatS (StringPtr, MaxLen, String[0]);
2670 Result->Type = EFI_IFR_TYPE_STRING;
2671 Result->Value.string =
NewHiiString (StringPtr, FormSet->HiiHandle);
2673 Result->Type = EFI_IFR_TYPE_BUFFER;
2676 Result->BufferLen = (UINT16)(Length0 + Length1);
2679 ASSERT (Result->Buffer !=
NULL);
2682 ASSERT (TmpBuf !=
NULL);
2683 CopyMem (Result->Buffer, TmpBuf, Length0);
2685 ASSERT (TmpBuf !=
NULL);
2686 CopyMem (&Result->Buffer[Length0], TmpBuf, Length1);
2690 if (Value[0].Buffer !=
NULL) {
2694 if (Value[1].Buffer !=
NULL) {
2698 if (String[0] !=
NULL) {
2702 if (String[1] !=
NULL) {
2706 if (StringPtr !=
NULL) {
2734 if ((FormSet ==
NULL) || (Result ==
NULL)) {
2735 return EFI_INVALID_PARAMETER;
2745 ZeroMem (Value,
sizeof (Value));
2748 if (EFI_ERROR (Status)) {
2753 if (EFI_ERROR (Status)) {
2757 for (Index = 0; Index < 2; Index++) {
2758 if (Value[Index].Type != EFI_IFR_TYPE_STRING) {
2759 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2764 String[Index] =
GetTokenString (Value[Index].Value.string, FormSet->HiiHandle);
2765 if (String[Index] ==
NULL) {
2766 Status = EFI_NOT_FOUND;
2771 Result->Type = EFI_IFR_TYPE_BOOLEAN;
2772 Result->Value.b = mUnicodeCollation->MetaiMatch (mUnicodeCollation, String[0], String[1]);
2775 if (String[0] !=
NULL) {
2779 if (String[1] !=
NULL) {
2812 UINTN RegExSyntaxTypeListSize;
2814 UINTN CapturesCount;
2816 if ((FormSet ==
NULL) || (SyntaxType ==
NULL) || (Result ==
NULL)) {
2817 return EFI_INVALID_PARAMETER;
2826 HandleBuffer =
NULL;
2827 RegExSyntaxTypeList =
NULL;
2829 ZeroMem (Value,
sizeof (Value));
2832 if (EFI_ERROR (Status)) {
2837 if (EFI_ERROR (Status)) {
2841 for (Index = 0; Index < 2; Index++) {
2842 if (Value[Index].Type != EFI_IFR_TYPE_STRING) {
2843 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2848 String[Index] =
GetTokenString (Value[Index].Value.string, FormSet->HiiHandle);
2849 if (String[Index] ==
NULL) {
2850 Status = EFI_NOT_FOUND;
2856 HandleBuffer =
NULL;
2857 Status =
gBS->LocateHandle (
2859 &gEfiRegularExpressionProtocolGuid,
2864 if (Status == EFI_BUFFER_TOO_SMALL) {
2866 if (HandleBuffer ==
NULL) {
2867 Status = EFI_OUT_OF_RESOURCES;
2871 Status =
gBS->LocateHandle (
2873 &gEfiRegularExpressionProtocolGuid,
2880 if (EFI_ERROR (Status)) {
2881 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2886 ASSERT (HandleBuffer !=
NULL);
2887 for ( Index = 0; Index < BufferSize /
sizeof (
EFI_HANDLE); Index++) {
2888 Status =
gBS->HandleProtocol (
2889 HandleBuffer[Index],
2890 &gEfiRegularExpressionProtocolGuid,
2891 (VOID **)&RegularExpressionProtocol
2893 if (EFI_ERROR (Status)) {
2897 RegExSyntaxTypeListSize = 0;
2898 RegExSyntaxTypeList =
NULL;
2900 Status = RegularExpressionProtocol->GetInfo (
2901 RegularExpressionProtocol,
2902 &RegExSyntaxTypeListSize,
2905 if (Status == EFI_BUFFER_TOO_SMALL) {
2906 RegExSyntaxTypeList =
AllocatePool (RegExSyntaxTypeListSize);
2907 if (RegExSyntaxTypeList ==
NULL) {
2908 Status = EFI_OUT_OF_RESOURCES;
2912 Status = RegularExpressionProtocol->GetInfo (
2913 RegularExpressionProtocol,
2914 &RegExSyntaxTypeListSize,
2917 }
else if (EFI_ERROR (Status)) {
2921 for (GuidIndex = 0; GuidIndex < RegExSyntaxTypeListSize /
sizeof (
EFI_GUID); GuidIndex++) {
2922 if (
CompareGuid (&RegExSyntaxTypeList[GuidIndex], SyntaxType)) {
2926 Result->Type = EFI_IFR_TYPE_BOOLEAN;
2927 Status = RegularExpressionProtocol->MatchString (
2928 RegularExpressionProtocol,
2940 if (RegExSyntaxTypeList !=
NULL) {
2949 Result->Type = EFI_IFR_TYPE_UNDEFINED;
2953 if (String[0] !=
NULL) {
2957 if (String[1] !=
NULL) {
2961 if (RegExSyntaxTypeList !=
NULL) {
2965 if (HandleBuffer !=
NULL) {
2997 if ((FormSet ==
NULL) || (Result ==
NULL)) {
2998 return EFI_INVALID_PARAMETER;
3001 ZeroMem (Value,
sizeof (Value));
3003 if (Format > EFI_IFR_FF_CASE_INSENSITIVE) {
3004 return EFI_INVALID_PARAMETER;
3008 if (EFI_ERROR (Status)) {
3013 if (EFI_ERROR (Status)) {
3018 if (EFI_ERROR (Status)) {
3022 if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
3023 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3027 Base = (
UINTN)Value[0].Value.u64;
3035 for (Index = 0; Index < 2; Index++) {
3036 if (Value[Index + 1].Type != EFI_IFR_TYPE_STRING) {
3037 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3042 String[Index] =
GetTokenString (Value[Index + 1].Value.string, FormSet->HiiHandle);
3043 if (String[Index] ==
NULL) {
3044 Status = EFI_NOT_FOUND;
3048 if (Format == EFI_IFR_FF_CASE_INSENSITIVE) {
3056 Result->Type = EFI_IFR_TYPE_NUM_SIZE_64;
3057 if (Base >=
StrLen (String[1])) {
3058 Result->Value.u64 = 0xFFFFFFFFFFFFFFFFULL;
3060 StringPtr =
StrStr (String[1] + Base, String[0]);
3061 Result->Value.u64 = (StringPtr ==
NULL) ? 0xFFFFFFFFFFFFFFFFULL : (StringPtr - String[1]);
3065 if (String[0] !=
NULL) {
3069 if (String[1] !=
NULL) {
3101 if ((FormSet ==
NULL) || (Result ==
NULL)) {
3102 return EFI_INVALID_PARAMETER;
3105 ZeroMem (Value,
sizeof (Value));
3108 if (EFI_ERROR (Status)) {
3113 if (EFI_ERROR (Status)) {
3118 if (EFI_ERROR (Status)) {
3122 if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
3123 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3127 Length = (
UINTN)Value[0].Value.u64;
3129 if (Value[1].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
3130 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3134 Base = (
UINTN)Value[1].Value.u64;
3136 if ((Value[2].Type != EFI_IFR_TYPE_STRING) && !
IsTypeInBuffer (&Value[2])) {
3137 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3141 if (Value[2].Type == EFI_IFR_TYPE_STRING) {
3142 String =
GetTokenString (Value[2].Value.string, FormSet->HiiHandle);
3143 if (String ==
NULL) {
3144 return EFI_NOT_FOUND;
3147 if ((Length == 0) || (Base >=
StrLen (String))) {
3148 SubString = gEmptyString;
3150 SubString = String + Base;
3151 if ((Base + Length) <
StrLen (String)) {
3152 SubString[Length] = L
'\0';
3156 Result->Type = EFI_IFR_TYPE_STRING;
3157 Result->Value.string =
NewHiiString (SubString, FormSet->HiiHandle);
3164 Result->Type = EFI_IFR_TYPE_BUFFER;
3165 if ((Length == 0) || (Base >= BufferLen)) {
3166 Result->BufferLen = 0;
3167 Result->Buffer =
NULL;
3169 Result->BufferLen = (UINT16)((BufferLen - Base) < Length ? (BufferLen - Base) : Length);
3171 ASSERT (Result->Buffer !=
NULL);
3172 CopyMem (Result->Buffer, &Buffer[Base], Result->BufferLen);
3175 if (Value[2].Type == EFI_IFR_TYPE_BUFFER) {
3208 if ((FormSet ==
NULL) || (Result ==
NULL)) {
3209 return EFI_INVALID_PARAMETER;
3212 ZeroMem (Value,
sizeof (Value));
3215 if (EFI_ERROR (Status)) {
3220 if (EFI_ERROR (Status)) {
3225 if (EFI_ERROR (Status)) {
3229 if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
3230 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3234 Count = (
UINTN)Value[0].Value.u64;
3242 for (Index = 0; Index < 2; Index++) {
3243 if (Value[Index + 1].Type != EFI_IFR_TYPE_STRING) {
3244 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3249 String[Index] =
GetTokenString (Value[Index + 1].Value.string, FormSet->HiiHandle);
3250 if (String[Index] ==
NULL) {
3251 Status = EFI_NOT_FOUND;
3256 Delimiter = String[0];
3257 SubString = String[1];
3259 SubString =
StrStr (SubString, Delimiter);
3260 if (SubString !=
NULL) {
3264 SubString = SubString +
StrLen (Delimiter);
3272 if (SubString ==
NULL) {
3276 SubString = gEmptyString;
3281 StringPtr =
StrStr (SubString, Delimiter);
3282 if (StringPtr !=
NULL) {
3287 Result->Type = EFI_IFR_TYPE_STRING;
3288 Result->Value.string =
NewHiiString (SubString, FormSet->HiiHandle);
3291 if (String[0] !=
NULL) {
3295 if (String[1] !=
NULL) {
3329 if ((FormSet ==
NULL) || (Result ==
NULL)) {
3330 return EFI_INVALID_PARAMETER;
3333 ZeroMem (Value,
sizeof (Value));
3336 if (EFI_ERROR (Status)) {
3341 if (EFI_ERROR (Status)) {
3346 if (EFI_ERROR (Status)) {
3350 if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
3351 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3355 Base = (
UINTN)Value[0].Value.u64;
3363 for (Index = 0; Index < 2; Index++) {
3364 if (Value[Index + 1].Type != EFI_IFR_TYPE_STRING) {
3365 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3370 String[Index] =
GetTokenString (Value[Index + 1].Value.string, FormSet->HiiHandle);
3371 if (String[Index] ==
NULL) {
3372 Status = EFI_NOT_FOUND;
3377 if (Base >=
StrLen (String[1])) {
3378 Result->Type = EFI_IFR_TYPE_UNDEFINED;
3384 StringPtr = String[1] + Base;
3385 Charset = String[0];
3386 while (*StringPtr != 0 && !Found) {
3388 while (Charset[Index] != 0) {
3389 if ((*StringPtr >= Charset[Index]) && (*StringPtr <= Charset[Index + 1])) {
3390 if (Flags == EFI_IFR_FLAGS_FIRST_MATCHING) {
3395 if (Flags == EFI_IFR_FLAGS_FIRST_NON_MATCHING) {
3412 Result->Type = EFI_IFR_TYPE_NUM_SIZE_64;
3413 Result->Value.u64 = StringPtr - String[1];
3416 if (String[0] !=
NULL) {
3420 if (String[1] !=
NULL) {
3451 while (!
IsNull (&Form->RuleListHead, Link)) {
3452 Expression = HII_EXPRESSION_FROM_LINK (Link);
3454 if ((Expression->
Type == EFI_HII_EXPRESSION_RULE) && (Expression->ExtraData.
RuleId == RuleId)) {
3478 if (mUnicodeCollation !=
NULL) {
3487 Status =
gBS->LocateProtocol (
3488 &gEfiUnicodeCollation2ProtocolGuid,
3490 (VOID **)&mUnicodeCollation
3515 UINT32 PackageListLength;
3523 if (FormSetGuid ==
NULL) {
3528 HiiPackageList =
NULL;
3534 Status =
gBS->LocateProtocol (
3535 &gEfiHiiDatabaseProtocolGuid,
3537 (VOID **)&HiiDatabase
3539 if (EFI_ERROR (Status)) {
3543 Status = HiiDatabase->ExportPackageLists (HiiDatabase, HiiHandle, &BufferSize, HiiPackageList);
3544 if (Status == EFI_BUFFER_TOO_SMALL) {
3546 if (HiiPackageList ==
NULL) {
3547 ASSERT (HiiPackageList !=
NULL);
3551 Status = HiiDatabase->ExportPackageLists (HiiDatabase, HiiHandle, &BufferSize, HiiPackageList);
3561 if (EFI_ERROR (Status)) {
3562 if (HiiPackageList !=
NULL) {
3574 PackageListLength = HiiPackageList->PackageLength;
3576 while (Offset < PackageListLength) {
3577 Package = ((UINT8 *)HiiPackageList) + Offset;
3579 Offset += PackageHeader->Length;
3581 if (PackageHeader->Type == EFI_HII_PACKAGE_FORMS) {
3586 while (Offset2 < PackageHeader->Length) {
3587 OpCodeData = Package + Offset2;
3639 if ((DevicePath ==
NULL) || (FormsetGuid ==
NULL)) {
3643 TmpDevicePath = DevicePath;
3647 Status =
gBS->LocateDevicePath (
3648 &gEfiDevicePathProtocolGuid,
3659 Status =
gBS->LocateProtocol (
3660 &gEfiHiiDatabaseProtocolGuid,
3662 (VOID **)&HiiDatabase
3664 if (EFI_ERROR (Status)) {
3672 if (HiiHandles ==
NULL) {
3680 for (Index = 0; HiiHandles[Index] !=
NULL; Index++) {
3681 Status = HiiDatabase->GetPackageListHandle (
3686 if (!EFI_ERROR (Status) && (Handle == DriverHandle)) {
3688 HiiHandle = HiiHandles[Index];
3692 if (HiiHandle !=
NULL) {
3719 IN EFI_QUESTION_ID QuestionId,
3734 if ((DevicePath ==
NULL) && (InputHiiHandle ==
NULL)) {
3736 (DevicePath !=
NULL && InputHiiHandle ==
NULL) ||
3737 (DevicePath ==
NULL && InputHiiHandle !=
NULL)
3742 if ((FormSetGuid ==
NULL) || (Value ==
NULL)) {
3754 if (DevicePath !=
NULL) {
3756 if (HiiHandle ==
NULL) {
3760 HiiHandle = InputHiiHandle;
3763 ASSERT (HiiHandle !=
NULL);
3769 ASSERT (FormSet !=
NULL);
3772 if (EFI_ERROR (Status)) {
3783 if (Question ==
NULL) {
3793 Form = HII_FORM_FROM_LINK (Link);
3796 if (Question !=
NULL) {
3804 ASSERT (Form !=
NULL);
3809 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
3810 if (EFI_ERROR (Status)) {
3821 if (FormSet !=
NULL) {
3847 if ((StatementValue ==
NULL) || (HiiValue ==
NULL)) {
3848 return EFI_INVALID_PARAMETER;
3853 HiiValue->Type = StatementValue->Type;
3854 HiiValue->BufferLen = StatementValue->BufferLen;
3855 if ((StatementValue->Buffer !=
NULL) && (StatementValue->BufferLen > 0)) {
3856 HiiValue->Buffer =
AllocateCopyPool (HiiValue->BufferLen, StatementValue->Buffer);
3878 if (HiiValue ==
NULL) {
3879 return EFI_INVALID_PARAMETER;
3882 if (HiiValue->Buffer ==
NULL) {
3945 if ((FormSet ==
NULL) || (Form ==
NULL) || (Expression ==
NULL)) {
3946 return EFI_INVALID_PARAMETER;
3951 PathFromText =
NULL;
3958 ASSERT (Expression !=
NULL);
3959 Expression->Result.Type = EFI_IFR_TYPE_OTHER;
3962 while (!
IsNull (&Expression->OpCodeListHead, Link)) {
3963 OpCode = HII_EXPRESSION_OPCODE_FROM_LINK (Link);
3965 Link =
GetNextNode (&Expression->OpCodeListHead, Link);
3972 Value->Type = EFI_IFR_TYPE_BOOLEAN;
3975 switch (OpCode->Operand) {
3979 case EFI_IFR_EQ_ID_VAL_OP:
3981 if (Question ==
NULL) {
3982 Value->Type = EFI_IFR_TYPE_UNDEFINED;
3989 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
3990 if (EFI_ERROR (Status)) {
3991 Value->Type = EFI_IFR_TYPE_UNDEFINED;
3996 if (EFI_ERROR (Status)) {
3997 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4003 if (Status == EFI_UNSUPPORTED) {
4005 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4009 if (EFI_ERROR (Status)) {
4013 Value->Value.b = (BOOLEAN)((Result == 0) ?
TRUE :
FALSE);
4016 case EFI_IFR_EQ_ID_ID_OP:
4018 if (Question ==
NULL) {
4019 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4026 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
4027 if (EFI_ERROR (Status)) {
4028 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4033 if (EFI_ERROR (Status)) {
4034 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4038 Question2 =
QuestionIdInFormset (FormSet, Form, OpCode->ExtraData.EqIdIdData.QuestionId2);
4039 if (Question2 ==
NULL) {
4041 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4048 Status =
GetQuestionValue (FormSet, Form, Question2, GetSetValueWithBuffer);
4049 if (EFI_ERROR (Status)) {
4050 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4055 if (EFI_ERROR (Status)) {
4057 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4061 Status =
CompareHiiValue (&Data1, &Data2, &Result, FormSet->HiiHandle);
4064 if (Status == EFI_UNSUPPORTED) {
4065 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4070 if (EFI_ERROR (Status)) {
4074 Value->Value.b = (BOOLEAN)((Result == 0) ?
TRUE :
FALSE);
4077 case EFI_IFR_EQ_ID_VAL_LIST_OP:
4079 if (Question ==
NULL) {
4080 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4087 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
4088 if (EFI_ERROR (Status)) {
4089 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4093 Value->Value.b =
FALSE;
4094 for (Index = 0; Index < OpCode->ExtraData.EqIdListData.ListLength; Index++) {
4095 if (Question->Value.Value.u16 == OpCode->ExtraData.EqIdListData.ValueList[Index]) {
4096 Value->Value.b =
TRUE;
4103 case EFI_IFR_DUP_OP:
4105 if (EFI_ERROR (Status)) {
4112 case EFI_IFR_QUESTION_REF1_OP:
4113 case EFI_IFR_THIS_OP:
4115 if (Question ==
NULL) {
4116 Status = EFI_NOT_FOUND;
4123 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
4124 if (EFI_ERROR (Status)) {
4131 case EFI_IFR_SECURITY_OP:
4135 case EFI_IFR_GET_OP:
4139 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4140 Value->Value.u8 = 0;
4141 if (OpCode->ExtraData.GetSetData.VarStorage !=
NULL) {
4142 switch (OpCode->ExtraData.GetSetData.VarStorage->
Type) {
4143 case EFI_HII_VARSTORE_BUFFER:
4144 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
4148 Value->Type = OpCode->ExtraData.GetSetData.ValueType;
4149 CopyMem (&Value->Value, OpCode->ExtraData.GetSetData.VarStorage->
EditBuffer + OpCode->ExtraData.GetSetData.VarStoreInfo.VarOffset, OpCode->ExtraData.GetSetData.ValueWidth);
4151 case EFI_HII_VARSTORE_NAME_VALUE:
4152 if (OpCode->ExtraData.GetSetData.ValueType != EFI_IFR_TYPE_STRING) {
4156 Status =
GetValueByName (OpCode->ExtraData.GetSetData.VarStorage, OpCode->ExtraData.GetSetData.ValueName, &StrPtr);
4157 if (!EFI_ERROR (Status)) {
4158 ASSERT (StrPtr !=
NULL);
4159 TempLength =
StrLen (StrPtr);
4160 if (OpCode->ExtraData.GetSetData.ValueWidth >= ((TempLength + 1) / 2)) {
4161 Value->Type = OpCode->ExtraData.GetSetData.ValueType;
4162 TempBuffer = (UINT8 *)&Value->Value;
4163 ZeroMem (TempStr,
sizeof (TempStr));
4164 for (Index = 0; Index < TempLength; Index++) {
4165 TempStr[0] = StrPtr[TempLength - Index - 1];
4167 if ((Index & 1) == 0) {
4168 TempBuffer[Index/2] = DigitUint8;
4170 TempBuffer[Index/2] = (UINT8)((DigitUint8 << 4) + TempBuffer[Index/2]);
4178 case EFI_HII_VARSTORE_EFI_VARIABLE:
4182 TempLength = OpCode->ExtraData.GetSetData.ValueWidth;
4183 Value->Type = OpCode->ExtraData.GetSetData.ValueType;
4184 Status =
gRT->GetVariable (
4185 OpCode->ExtraData.GetSetData.ValueName,
4186 &OpCode->ExtraData.GetSetData.VarStorage->
Guid,
4191 if (EFI_ERROR (Status)) {
4192 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4193 Value->Value.u8 = 0;
4201 Status = EFI_UNSUPPORTED;
4208 if ((OpCode->ExtraData.GetSetData.ValueType != EFI_IFR_TYPE_DATE) && (OpCode->ExtraData.GetSetData.ValueType != EFI_IFR_TYPE_TIME)) {
4212 Status = EFI_UNSUPPORTED;
4216 Status =
gRT->GetTime (&EfiTime,
NULL);
4217 if (!EFI_ERROR (Status)) {
4218 if (OpCode->ExtraData.GetSetData.ValueType == EFI_IFR_TYPE_DATE) {
4219 switch (OpCode->ExtraData.GetSetData.VarStoreInfo.VarOffset) {
4221 Value->Type = EFI_IFR_TYPE_NUM_SIZE_16;
4222 Value->Value.u16 = EfiTime.Year;
4225 Value->Type = EFI_IFR_TYPE_NUM_SIZE_8;
4226 Value->Value.u8 = EfiTime.Month;
4229 Value->Type = EFI_IFR_TYPE_NUM_SIZE_8;
4230 Value->Value.u8 = EfiTime.Day;
4236 Status = EFI_INVALID_PARAMETER;
4240 switch (OpCode->ExtraData.GetSetData.VarStoreInfo.VarOffset) {
4242 Value->Type = EFI_IFR_TYPE_NUM_SIZE_8;
4243 Value->Value.u8 = EfiTime.Hour;
4246 Value->Type = EFI_IFR_TYPE_NUM_SIZE_8;
4247 Value->Value.u8 = EfiTime.Minute;
4250 Value->Type = EFI_IFR_TYPE_NUM_SIZE_8;
4251 Value->Value.u8 = EfiTime.Second;
4257 Status = EFI_INVALID_PARAMETER;
4266 case EFI_IFR_QUESTION_REF3_OP:
4272 if (EFI_ERROR (Status)) {
4279 if ((Value->Type > EFI_IFR_TYPE_NUM_SIZE_64) || (Value->Value.u64 > 0xffff)) {
4280 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4284 if (OpCode->ExtraData.QuestionRef3Data.
DevicePath != 0) {
4285 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4287 Status =
gBS->LocateProtocol (
4288 &gEfiDevicePathFromTextProtocolGuid,
4290 (VOID **)&PathFromText
4292 if (EFI_ERROR (Status)) {
4297 if ((StrPtr !=
NULL) && (PathFromText !=
NULL)) {
4298 DevicePath = PathFromText->ConvertTextToDevicePath (StrPtr);
4300 Value = &QuestionVal;
4303 if (DevicePath !=
NULL) {
4308 if (StrPtr !=
NULL) {
4313 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4317 Value = &QuestionVal;
4320 if (Question ==
NULL) {
4321 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4328 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
4329 if (EFI_ERROR (Status)) {
4330 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4342 case EFI_IFR_RULE_REF_OP:
4347 if (RuleExpression ==
NULL) {
4348 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4356 if (EFI_ERROR (Status) || (RuleExpression->
Result.Type == EFI_IFR_TYPE_UNDEFINED)) {
4357 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4361 Value = &RuleExpression->
Result;
4364 case EFI_IFR_STRING_REF1_OP:
4365 Value->Type = EFI_IFR_TYPE_STRING;
4366 Value->Value.string = OpCode->ExtraData.
Value.Value.
string;
4372 case EFI_IFR_TRUE_OP:
4373 case EFI_IFR_FALSE_OP:
4374 case EFI_IFR_ONE_OP:
4375 case EFI_IFR_ONES_OP:
4376 case EFI_IFR_UINT8_OP:
4377 case EFI_IFR_UINT16_OP:
4378 case EFI_IFR_UINT32_OP:
4379 case EFI_IFR_UINT64_OP:
4380 case EFI_IFR_UNDEFINED_OP:
4381 case EFI_IFR_VERSION_OP:
4382 case EFI_IFR_ZERO_OP:
4383 Value = &OpCode->ExtraData.
Value;
4389 case EFI_IFR_LENGTH_OP:
4391 if (EFI_ERROR (Status)) {
4395 if ((Value->Type != EFI_IFR_TYPE_STRING) && !
IsTypeInBuffer (Value)) {
4396 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4400 if (Value->Type == EFI_IFR_TYPE_STRING) {
4401 StrPtr =
GetTokenString (Value->Value.string, FormSet->HiiHandle);
4402 if (StrPtr ==
NULL) {
4403 Status = EFI_INVALID_PARAMETER;
4407 Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
4408 Value->Value.u64 =
StrLen (StrPtr);
4411 Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
4418 case EFI_IFR_NOT_OP:
4420 if (EFI_ERROR (Status)) {
4424 if (Value->Type != EFI_IFR_TYPE_BOOLEAN) {
4425 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4429 Value->Value.b = (BOOLEAN)(!Value->Value.b);
4432 case EFI_IFR_QUESTION_REF2_OP:
4437 if (EFI_ERROR (Status)) {
4444 if ((Value->Type > EFI_IFR_TYPE_NUM_SIZE_64) || (Value->Value.u64 > 0xffff)) {
4445 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4450 if (Question ==
NULL) {
4451 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4458 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
4459 if (EFI_ERROR (Status)) {
4460 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4467 case EFI_IFR_STRING_REF2_OP:
4472 if (EFI_ERROR (Status)) {
4479 if ((Value->Type > EFI_IFR_TYPE_NUM_SIZE_64) || (Value->Value.u64 > 0xffff)) {
4480 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4484 Value->Type = EFI_IFR_TYPE_STRING;
4486 if (StrPtr ==
NULL) {
4490 Value->Value.string =
NewHiiString (gEmptyString, FormSet->HiiHandle);
4492 Index = (UINT16)Value->Value.u64;
4493 Value->Value.string = Index;
4499 case EFI_IFR_TO_BOOLEAN_OP:
4504 if (EFI_ERROR (Status)) {
4511 if (Value->Type <= EFI_IFR_TYPE_DATE) {
4518 Value->Type = EFI_IFR_TYPE_BOOLEAN;
4519 }
else if (Value->Type == EFI_IFR_TYPE_STRING) {
4525 StrPtr =
GetTokenString (Value->Value.string, FormSet->HiiHandle);
4526 if (StrPtr ==
NULL) {
4527 Status = EFI_INVALID_PARAMETER;
4532 if (
StrCmp (StrPtr, L
"TRUE") == 0) {
4533 Value->Value.b =
TRUE;
4534 Value->Type = EFI_IFR_TYPE_BOOLEAN;
4535 }
else if (
StrCmp (StrPtr, L
"FALSE") == 0) {
4536 Value->Value.b =
FALSE;
4537 Value->Type = EFI_IFR_TYPE_BOOLEAN;
4539 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4543 }
else if (Value->Type == EFI_IFR_TYPE_BUFFER) {
4548 for (Index = 0; Index < Value->BufferLen; Index++) {
4549 if (Value->Buffer[Index] != 0) {
4554 if (Index >= Value->BufferLen) {
4555 Value->Value.b =
FALSE;
4557 Value->Value.b =
TRUE;
4560 Value->Type = EFI_IFR_TYPE_BOOLEAN;
4566 case EFI_IFR_TO_STRING_OP:
4570 case EFI_IFR_TO_UINT_OP:
4574 case EFI_IFR_TO_LOWER_OP:
4575 case EFI_IFR_TO_UPPER_OP:
4577 if (EFI_ERROR (Status)) {
4582 if (EFI_ERROR (Status)) {
4586 if (Value->Type != EFI_IFR_TYPE_STRING) {
4587 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4591 StrPtr =
GetTokenString (Value->Value.string, FormSet->HiiHandle);
4592 if (StrPtr ==
NULL) {
4593 Status = EFI_NOT_FOUND;
4597 if (OpCode->Operand == EFI_IFR_TO_LOWER_OP) {
4598 mUnicodeCollation->StrLwr (mUnicodeCollation, StrPtr);
4600 mUnicodeCollation->StrUpr (mUnicodeCollation, StrPtr);
4603 Value->Value.string =
NewHiiString (StrPtr, FormSet->HiiHandle);
4607 case EFI_IFR_BITWISE_NOT_OP:
4612 if (EFI_ERROR (Status)) {
4616 if (Value->Type > EFI_IFR_TYPE_DATE) {
4617 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4621 Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
4622 Value->Value.u64 = ~HiiValueToUINT64(Value);
4625 case EFI_IFR_SET_OP:
4630 if (EFI_ERROR (Status)) {
4634 Data1.Type = EFI_IFR_TYPE_BOOLEAN;
4635 Data1.Value.b =
FALSE;
4639 if (OpCode->ExtraData.GetSetData.VarStorage !=
NULL) {
4640 switch (OpCode->ExtraData.GetSetData.VarStorage->
Type) {
4641 case EFI_HII_VARSTORE_BUFFER:
4642 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
4643 CopyMem (OpCode->ExtraData.GetSetData.VarStorage->
EditBuffer + OpCode->ExtraData.GetSetData.VarStoreInfo.VarOffset, &Value->Value, OpCode->ExtraData.GetSetData.ValueWidth);
4644 Data1.Value.b =
TRUE;
4646 case EFI_HII_VARSTORE_NAME_VALUE:
4647 if (OpCode->ExtraData.GetSetData.ValueType != EFI_IFR_TYPE_STRING) {
4648 NameValue =
AllocatePool ((OpCode->ExtraData.GetSetData.ValueWidth * 2 + 1) * sizeof (CHAR16));
4649 ASSERT (NameValue !=
NULL);
4653 TempBuffer = (UINT8 *)&Value->Value + OpCode->ExtraData.GetSetData.ValueWidth - 1;
4655 for (Index = 0; Index < OpCode->ExtraData.GetSetData.ValueWidth; Index++, TempBuffer--) {
4658 (OpCode->ExtraData.GetSetData.ValueWidth * 2 + 1) * sizeof (CHAR16) - ((
UINTN)StrPtr - (
UINTN)NameValue),
4659 PREFIX_ZERO | RADIX_HEX,
4663 StrPtr +=
StrnLenS (StrPtr, OpCode->ExtraData.GetSetData.ValueWidth * 2 + 1 - ((
UINTN)StrPtr - (
UINTN)NameValue) / sizeof (CHAR16));
4666 Status =
SetValueByName (OpCode->ExtraData.GetSetData.VarStorage, OpCode->ExtraData.GetSetData.ValueName, NameValue,
NULL);
4668 if (!EFI_ERROR (Status)) {
4669 Data1.Value.b =
TRUE;
4674 case EFI_HII_VARSTORE_EFI_VARIABLE:
4675 Status =
gRT->SetVariable (
4676 OpCode->ExtraData.GetSetData.ValueName,
4677 &OpCode->ExtraData.GetSetData.VarStorage->
Guid,
4678 OpCode->ExtraData.GetSetData.VarStorage->
Attributes,
4679 OpCode->ExtraData.GetSetData.ValueWidth,
4682 if (!EFI_ERROR (Status)) {
4683 Data1.Value.b =
TRUE;
4691 Status = EFI_UNSUPPORTED;
4698 if ((OpCode->ExtraData.GetSetData.ValueType != EFI_IFR_TYPE_DATE) && (OpCode->ExtraData.GetSetData.ValueType != EFI_IFR_TYPE_TIME)) {
4702 Status = EFI_UNSUPPORTED;
4706 Status =
gRT->GetTime (&EfiTime,
NULL);
4707 if (!EFI_ERROR (Status)) {
4708 if (OpCode->ExtraData.GetSetData.ValueType == EFI_IFR_TYPE_DATE) {
4709 switch (OpCode->ExtraData.GetSetData.VarStoreInfo.VarOffset) {
4711 EfiTime.Year = Value->Value.u16;
4714 EfiTime.Month = Value->Value.u8;
4717 EfiTime.Day = Value->Value.u8;
4723 Status = EFI_INVALID_PARAMETER;
4727 switch (OpCode->ExtraData.GetSetData.VarStoreInfo.VarOffset) {
4729 EfiTime.Hour = Value->Value.u8;
4732 EfiTime.Minute = Value->Value.u8;
4735 EfiTime.Second = Value->Value.u8;
4741 Status = EFI_INVALID_PARAMETER;
4746 Status =
gRT->SetTime (&EfiTime);
4747 if (!EFI_ERROR (Status)) {
4748 Data1.Value.b =
TRUE;
4759 case EFI_IFR_ADD_OP:
4760 case EFI_IFR_SUBTRACT_OP:
4761 case EFI_IFR_MULTIPLY_OP:
4762 case EFI_IFR_DIVIDE_OP:
4763 case EFI_IFR_MODULO_OP:
4764 case EFI_IFR_BITWISE_AND_OP:
4765 case EFI_IFR_BITWISE_OR_OP:
4766 case EFI_IFR_SHIFT_LEFT_OP:
4767 case EFI_IFR_SHIFT_RIGHT_OP:
4772 if (EFI_ERROR (Status)) {
4780 if (EFI_ERROR (Status)) {
4784 if (Data2.Type > EFI_IFR_TYPE_DATE) {
4785 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4789 if (Data1.Type > EFI_IFR_TYPE_DATE) {
4790 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4794 Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
4796 switch (OpCode->Operand) {
4797 case EFI_IFR_ADD_OP:
4801 case EFI_IFR_SUBTRACT_OP:
4805 case EFI_IFR_MULTIPLY_OP:
4809 case EFI_IFR_DIVIDE_OP:
4813 case EFI_IFR_MODULO_OP:
4815 Value->Value.u64 = TempValue;
4818 case EFI_IFR_BITWISE_AND_OP:
4822 case EFI_IFR_BITWISE_OR_OP:
4826 case EFI_IFR_SHIFT_LEFT_OP:
4830 case EFI_IFR_SHIFT_RIGHT_OP:
4840 case EFI_IFR_AND_OP:
4846 if (EFI_ERROR (Status)) {
4854 if (EFI_ERROR (Status)) {
4858 if (Data2.Type != EFI_IFR_TYPE_BOOLEAN) {
4859 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4863 if (Data1.Type != EFI_IFR_TYPE_BOOLEAN) {
4864 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4868 if (OpCode->Operand == EFI_IFR_AND_OP) {
4869 Value->Value.b = (BOOLEAN)(Data1.Value.b && Data2.Value.b);
4871 Value->Value.b = (BOOLEAN)(Data1.Value.b || Data2.Value.b);
4876 case EFI_IFR_EQUAL_OP:
4877 case EFI_IFR_NOT_EQUAL_OP:
4878 case EFI_IFR_GREATER_EQUAL_OP:
4879 case EFI_IFR_GREATER_THAN_OP:
4880 case EFI_IFR_LESS_EQUAL_OP:
4881 case EFI_IFR_LESS_THAN_OP:
4886 if (EFI_ERROR (Status)) {
4894 if (EFI_ERROR (Status)) {
4898 if ((Data2.Type > EFI_IFR_TYPE_BOOLEAN) &&
4899 (Data2.Type != EFI_IFR_TYPE_STRING) &&
4902 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4906 if ((Data1.Type > EFI_IFR_TYPE_BOOLEAN) &&
4907 (Data1.Type != EFI_IFR_TYPE_STRING) &&
4910 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4914 Status =
CompareHiiValue (&Data1, &Data2, &Result, FormSet->HiiHandle);
4915 if (Data1.Type == EFI_IFR_TYPE_BUFFER) {
4919 if (Data2.Type == EFI_IFR_TYPE_BUFFER) {
4923 if (Status == EFI_UNSUPPORTED) {
4924 Value->Type = EFI_IFR_TYPE_UNDEFINED;
4929 if (EFI_ERROR (Status)) {
4933 switch (OpCode->Operand) {
4934 case EFI_IFR_EQUAL_OP:
4935 Value->Value.b = (BOOLEAN)((Result == 0) ?
TRUE :
FALSE);
4938 case EFI_IFR_NOT_EQUAL_OP:
4939 Value->Value.b = (BOOLEAN)((Result != 0) ?
TRUE :
FALSE);
4942 case EFI_IFR_GREATER_EQUAL_OP:
4943 Value->Value.b = (BOOLEAN)((Result >= 0) ?
TRUE :
FALSE);
4946 case EFI_IFR_GREATER_THAN_OP:
4947 Value->Value.b = (BOOLEAN)((Result > 0) ?
TRUE :
FALSE);
4950 case EFI_IFR_LESS_EQUAL_OP:
4951 Value->Value.b = (BOOLEAN)((Result <= 0) ?
TRUE :
FALSE);
4954 case EFI_IFR_LESS_THAN_OP:
4955 Value->Value.b = (BOOLEAN)((Result < 0) ?
TRUE :
FALSE);
4964 case EFI_IFR_MATCH_OP:
4966 if (EFI_ERROR (Status)) {
4970 Status =
IfrMatch (FormSet, Value);
4973 case EFI_IFR_MATCH2_OP:
4974 Status =
IfrMatch2 (FormSet, &OpCode->ExtraData.
Guid, Value);
4977 case EFI_IFR_CATENATE_OP:
4984 case EFI_IFR_CONDITIONAL_OP:
4989 if (EFI_ERROR (Status)) {
4997 if (EFI_ERROR (Status)) {
5005 if (EFI_ERROR (Status)) {
5009 if (Data1.Type != EFI_IFR_TYPE_BOOLEAN) {
5010 Value->Type = EFI_IFR_TYPE_UNDEFINED;
5014 if (Data1.Value.b) {
5022 case EFI_IFR_FIND_OP:
5023 Status =
IfrFind (FormSet, OpCode->ExtraData.
Format, Value);
5026 case EFI_IFR_MID_OP:
5027 Status =
IfrMid (FormSet, Value);
5030 case EFI_IFR_TOKEN_OP:
5031 Status =
IfrToken (FormSet, Value);
5034 case EFI_IFR_SPAN_OP:
5035 Status =
IfrSpan (FormSet, OpCode->ExtraData.
Flags, Value);
5038 case EFI_IFR_MAP_OP:
5043 if (EFI_ERROR (Status)) {
5051 Status = EFI_INVALID_PARAMETER;
5060 SubExpression = HII_EXPRESSION_FROM_LINK (SubExpressionLink);
5065 if (EFI_ERROR (Status)) {
5078 Status = EFI_INVALID_PARAMETER;
5082 SubExpression = HII_EXPRESSION_FROM_LINK (SubExpressionLink);
5084 if (EFI_ERROR (Status)) {
5088 Value = &SubExpression->
Result;
5097 Status = EFI_INVALID_PARAMETER;
5111 Value->Type = EFI_IFR_TYPE_UNDEFINED;
5112 Value->Value.u8 = 0;
5121 if (EFI_ERROR (Status) || (Value->Type == EFI_IFR_TYPE_UNDEFINED)) {
5126 if (EFI_ERROR (Status)) {
5136 if (EFI_ERROR (Status)) {
5144 Status = EFI_INVALID_PARAMETER;
5149 if (!EFI_ERROR (Status)) {
5173 ASSERT (Array !=
NULL);
5176 case EFI_IFR_TYPE_NUM_SIZE_8:
5177 *(((UINT8 *)Array) + Index) = (UINT8)Value;
5180 case EFI_IFR_TYPE_NUM_SIZE_16:
5181 *(((UINT16 *)Array) + Index) = (UINT16)Value;
5184 case EFI_IFR_TYPE_NUM_SIZE_32:
5185 *(((UINT32 *)Array) + Index) = (UINT32)Value;
5188 case EFI_IFR_TYPE_NUM_SIZE_64:
5189 *(((UINT64 *)Array) + Index) = (UINT64)Value;
5228 while (!
IsNull (&Question->OptionListHead, Link)) {
5229 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
5245 Link =
GetNextNode (&Question->OptionListHead, Link);
5263 IN CHAR16 *ConfigResp
5266 CHAR16 *RequestElement;
5272 if (Question->Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
5273 RequestElement =
StrStr (ConfigResp, Question->VariableName);
5274 if (RequestElement !=
NULL) {
5278 RequestElement +=
StrLen (Question->VariableName) + 1;
5281 return RequestElement;
5296 RequestElement =
StrStr (ConfigResp, Question->BlockName);
5297 if (RequestElement !=
NULL) {
5301 RequestElement +=
StrLen (Question->BlockName) +
StrLen (L
"&VALUE=");
5302 return RequestElement;
5309 ASSERT (BlockData !=
NULL);
5311 RequestElement =
StrStr (ConfigResp, BlockData);
5314 if (RequestElement !=
NULL) {
5318 RequestElement +=
StrLen (Question->BlockName) +
StrLen (L
"&VALUE=");
5321 return RequestElement;
5349 Storage = Question->Storage;
5350 if ((Storage ==
NULL) || (Storage->
Type == EFI_HII_VARSTORE_EFI_VARIABLE)) {
5351 return EFI_NOT_FOUND;
5360 while (!
IsNull (&Form->ConfigRequestHead, Link)) {
5361 ConfigInfo = HII_FORM_CONFIG_REQUEST_FROM_LINK (Link);
5362 Link =
GetNextNode (&Form->ConfigRequestHead, Link);
5364 if (Storage == ConfigInfo->Storage) {
5370 if (ConfigResp ==
NULL) {
5371 return EFI_NOT_FOUND;
5375 if (Value ==
NULL) {
5376 return EFI_NOT_FOUND;
5395 if (DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) {
5396 return EFI_BROWSER_ACTION_DEFAULT_STANDARD;
5397 }
else if (DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) {
5398 return EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING;
5399 }
else if (DefaultId == EFI_HII_DEFAULT_CLASS_SAFE) {
5400 return EFI_BROWSER_ACTION_DEFAULT_SAFE;
5401 }
else if ((DefaultId >= EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN) && (DefaultId < EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN + 0x1000)) {
5402 return EFI_BROWSER_ACTION_DEFAULT_PLATFORM + DefaultId - EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN;
5403 }
else if ((DefaultId >= EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN) && (DefaultId < EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN + 0x1000)) {
5404 return EFI_BROWSER_ACTION_DEFAULT_HARDWARE + DefaultId - EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN;
5405 }
else if ((DefaultId >= EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN) && (DefaultId < EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN + 0x1000)) {
5406 return EFI_BROWSER_ACTION_DEFAULT_FIRMWARE + DefaultId - EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN;
5429 IN UINT16 DefaultId,
5439 EFI_STRING StrValue;
5441 EFI_BROWSER_ACTION_REQUEST ActionRequest;
5444 UINT16 OriginalDefaultId;
5448 if ((FormSet ==
NULL) || (Form ==
NULL) || (Question ==
NULL) || (DefaultValue ==
NULL)) {
5449 return EFI_INVALID_PARAMETER;
5452 Status = EFI_NOT_FOUND;
5454 ConfigAccess =
NULL;
5455 OriginalDefaultId = DefaultId;
5456 DefaultLink =
GetFirstNode (&FormSet->DefaultStoreListHead);
5461 if (Question->QuestionId == 0) {
5462 DEBUG ((DEBUG_ERROR,
"%a: Question has no storage, skip it\n", __func__));
5476 HiiValue = DefaultValue;
5478 if (HiiValue->
Type == EFI_IFR_TYPE_BUFFER) {
5482 DefaultValue->BufferLen = Question->Value.BufferLen;
5484 ASSERT (DefaultValue->Buffer !=
NULL);
5485 if (DefaultValue->Buffer ==
NULL) {
5486 return EFI_OUT_OF_RESOURCES;
5498 if (HiiValue->
Type != EFI_IFR_TYPE_STRING) {
5499 ConfigAccess = FormSet->ConfigAccess;
5501 if ((Action > 0) && ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) && (ConfigAccess !=
NULL)) {
5502 ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
5503 Status = ConfigAccess->Callback (
5506 Question->QuestionId,
5511 if (!EFI_ERROR (Status)) {
5520 if (ConfigAccess !=
NULL) {
5522 if (!EFI_ERROR (Status)) {
5532 while (!
IsNull (&Question->DefaultListHead, Link)) {
5533 Default = HII_QUESTION_DEFAULT_FROM_LINK (Link);
5535 if (Default->DefaultId == DefaultId) {
5541 if (EFI_ERROR (Status)) {
5546 ASSERT (HiiValue->
Type == EFI_IFR_TYPE_BUFFER && DefaultValue->Buffer !=
NULL);
5563 if (Default->
Value.
Type == EFI_IFR_TYPE_BUFFER) {
5571 if (HiiValue->
Type == EFI_IFR_TYPE_STRING) {
5573 if (StrValue ==
NULL) {
5574 return EFI_NOT_FOUND;
5577 if (DefaultValue->BufferLen >
StrSize (StrValue)) {
5578 ZeroMem (DefaultValue->Buffer, DefaultValue->BufferLen);
5581 CopyMem (DefaultValue->Buffer, StrValue, DefaultValue->BufferLen);
5588 Link =
GetNextNode (&Question->DefaultListHead, Link);
5595 if ((Question->Operand == EFI_IFR_ONE_OF_OP) && !
IsListEmpty (&Question->OptionListHead)) {
5596 if (DefaultId <= EFI_HII_DEFAULT_CLASS_MANUFACTURING) {
5601 while (!
IsNull (&Question->OptionListHead, Link)) {
5602 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
5603 Link =
GetNextNode (&Question->OptionListHead, Link);
5611 if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT) != 0)) ||
5612 ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT_MFG) != 0))
5626 if (Question->Operand == EFI_IFR_CHECKBOX_OP) {
5627 if (DefaultId <= EFI_HII_DEFAULT_CLASS_MANUFACTURING) {
5631 if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Question->ExtraData.Flags & EFI_IFR_CHECKBOX_DEFAULT) != 0)) ||
5632 ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Question->ExtraData.Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) != 0))
5635 HiiValue->Value.b =
TRUE;
5647 while (!
IsNull (&FormSet->DefaultStoreListHead, DefaultLink)) {
5648 DefaultStore = HII_FORMSET_DEFAULTSTORE_FROM_LINK (DefaultLink);
5649 DefaultLink =
GetNextNode (&FormSet->DefaultStoreListHead, DefaultLink);
5650 DefaultId = DefaultStore->DefaultId;
5651 if (DefaultId == OriginalDefaultId) {
5661 Status = EFI_NOT_FOUND;
5662 switch (Question->Operand) {
5663 case EFI_IFR_CHECKBOX_OP:
5664 HiiValue->Value.b =
FALSE;
5668 case EFI_IFR_NUMERIC_OP:
5672 if ((Question->ExtraData.NumData.Flags & EFI_IFR_DISPLAY) == 0) {
5676 switch (Question->ExtraData.NumData.Flags & EFI_IFR_NUMERIC_SIZE) {
5677 case EFI_IFR_NUMERIC_SIZE_1:
5678 if (((INT8)HiiValue->Value.u8 < (INT8)Question->ExtraData.NumData.Minimum) || ((INT8)HiiValue->Value.u8 > (INT8)Question->ExtraData.NumData.Maximum)) {
5679 HiiValue->Value.u8 = (UINT8)Question->ExtraData.NumData.Minimum;
5684 case EFI_IFR_NUMERIC_SIZE_2:
5685 if (((INT16)HiiValue->Value.u16 < (INT16)Question->ExtraData.NumData.Minimum) || ((INT16)HiiValue->Value.u16 > (INT16)Question->ExtraData.NumData.Maximum)) {
5686 HiiValue->Value.u16 = (UINT16)Question->ExtraData.NumData.Minimum;
5691 case EFI_IFR_NUMERIC_SIZE_4:
5692 if (((INT32)HiiValue->Value.u32 < (INT32)Question->ExtraData.NumData.Minimum) || ((INT32)HiiValue->Value.u32 > (INT32)Question->ExtraData.NumData.Maximum)) {
5693 HiiValue->Value.u32 = (UINT32)Question->ExtraData.NumData.Minimum;
5698 case EFI_IFR_NUMERIC_SIZE_8:
5699 if (((INT64)HiiValue->Value.u64 < (INT64)Question->ExtraData.NumData.Minimum) || ((INT64)HiiValue->Value.u64 > (INT64)Question->ExtraData.NumData.Maximum)) {
5700 HiiValue->Value.u64 = Question->ExtraData.NumData.Minimum;
5709 if ((HiiValue->Value.u64 < Question->ExtraData.NumData.Minimum) || (HiiValue->Value.u64 > Question->ExtraData.NumData.Maximum)) {
5710 HiiValue->Value.u64 = Question->ExtraData.NumData.Minimum;
5717 case EFI_IFR_ONE_OF_OP:
5722 while (!
IsNull (&Question->OptionListHead, Link)) {
5723 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
5724 Link =
GetNextNode (&Question->OptionListHead, Link);
5739 case EFI_IFR_ORDERED_LIST_OP:
5745 while (!
IsNull (&Question->OptionListHead, Link)) {
5747 Option = HII_QUESTION_OPTION_FROM_LINK (Link);
5748 Link =
GetNextNode (&Question->OptionListHead, Link);
5756 SetArrayData (DefaultValue->Buffer, Question->Value.Type, Index, Option->Value.Value.u64);
5759 if (Index >= Question->ExtraData.OrderListData.MaxContainers) {
UINT64 EFIAPI StrHexToUint64(IN CONST CHAR16 *String)
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)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
UINT64 EFIAPI StrDecimalToUint64(IN CONST CHAR16 *String)
UINT32 EFIAPI BitFieldWrite32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
RETURN_STATUS EFIAPI StrCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
UINTN EFIAPI StrnLenS(IN CONST CHAR16 *String, IN UINTN MaxSize)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI MultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
UINT64 EFIAPI DivU64x32Remainder(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
RETURN_STATUS EFIAPI StrnCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
UINT32 EFIAPI BitFieldRead32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit)
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 ZeroMem(OUT VOID *Buffer, IN UINTN Length)
BOOLEAN EFIAPI IsZeroGuid(IN CONST GUID *Guid)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
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_HII_HANDLE *EFIAPI HiiGetHiiHandles(IN CONST EFI_GUID *PackageListGuid 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)
BOOLEAN GetQuestionValueFromForm(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_HII_HANDLE InputHiiHandle, IN EFI_GUID *FormSetGuid, IN EFI_QUESTION_ID QuestionId, OUT EFI_HII_VALUE *Value)
EFI_HII_HANDLE DevicePathToHiiHandle(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_GUID *FormsetGuid)
EFI_STATUS IfrToString(IN HII_FORMSET *FormSet, IN UINT8 Format, OUT EFI_HII_VALUE *Result)
BOOLEAN ElementValidation(IN HII_FORMSET_STORAGE *Storage, IN CHAR16 *RequestElement)
EFI_STATUS CompareHiiValue(IN EFI_HII_VALUE *Value1, IN EFI_HII_VALUE *Value2, OUT INTN *Result, IN EFI_HII_HANDLE HiiHandle OPTIONAL)
VOID AppendConfigRequest(IN OUT CHAR16 **ConfigRequest, IN OUT UINTN *SpareStrLen, IN CHAR16 *RequestElement)
EFI_STATUS EvaluateHiiExpression(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN OUT HII_EXPRESSION *Expression)
EFI_STATUS IfrMatch2(IN HII_FORMSET *FormSet, IN EFI_GUID *SyntaxType, OUT EFI_HII_VALUE *Result)
UINT8 * GetBufferForValue(IN EFI_HII_VALUE *Value)
BOOLEAN IsFormsetGuidInHiiHandle(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid)
HII_QUESTION_OPTION * ValueToOption(IN HII_STATEMENT *Question, IN HII_STATEMENT_VALUE *OptionValue)
EFI_STATUS IfrToUint(IN HII_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
EFI_STATUS NoSubmitCheck(IN HII_FORMSET *FormSet, IN OUT HII_FORM **CurrentForm, OUT HII_STATEMENT **Statement)
VOID RestoreExpressionEvaluationStackOffset(UINTN StackOffset)
VOID EFIAPI HiiStringToLowercase(IN EFI_STRING ConfigString)
HII_EXPRESSION * RuleIdToExpression(IN HII_FORM *Form, IN UINT8 RuleId)
EFI_STATUS PopExpression(OUT EFI_HII_VALUE *Value)
VOID ExtendValueToU64(IN HII_STATEMENT_VALUE *Value)
EFI_STATUS PushStack(IN OUT EFI_HII_VALUE **Stack, IN OUT EFI_HII_VALUE **StackPtr, IN OUT EFI_HII_VALUE **StackEnd, IN EFI_HII_VALUE *Data)
BOOLEAN IsTypeInUINT64(IN EFI_HII_VALUE *Value)
EFI_STATUS IfrCatenate(IN HII_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
VOID NewStringCopy(IN OUT CHAR16 **Dest, IN CHAR16 *Src)
EFI_STATUS IfrSpan(IN HII_FORMSET *FormSet, IN UINT8 Flags, OUT EFI_HII_VALUE *Result)
UINT64 HiiValueToUINT64(IN EFI_HII_VALUE *Value)
EFI_STRING_ID NewHiiString(IN CHAR16 *String, IN EFI_HII_HANDLE HiiHandle)
CHAR16 * GetOffsetFromConfigResp(IN HII_STATEMENT *Question, IN CHAR16 *ConfigResp)
EFI_STATUS SetValueByName(IN HII_FORMSET_STORAGE *Storage, IN CHAR16 *Name, IN CHAR16 *Value, OUT HII_NAME_VALUE_NODE **ReturnNode)
EFI_STATUS ValidateNoSubmit(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN HII_STATEMENT *Question)
VOID LoadFormSetStorage(IN HII_FORMSET *FormSet, IN HII_FORMSET_STORAGE *Storage)
EFI_STATUS IfrMatch(IN HII_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
BOOLEAN CheckUserPrivilege(IN EFI_GUID *Guid)
BOOLEAN IsTypeInBuffer(IN EFI_HII_VALUE *Value)
BOOLEAN ConfigRequestAdjust(IN HII_FORMSET_STORAGE *Storage, IN CHAR16 *Request, IN BOOLEAN RespString)
EFI_STATUS CreateFormSetFromHiiHandle(IN EFI_HII_HANDLE Handle, IN OUT EFI_GUID *FormSetGuid, OUT HII_FORMSET *FormSet)
EFI_STATUS StorageToConfigResp(IN HII_FORMSET_STORAGE *Storage, IN CHAR16 **ConfigResp, IN CHAR16 *ConfigRequest)
EFI_STATUS ReleaseHiiValue(IN EFI_HII_VALUE *HiiValue)
EFI_STATUS GetQuestionValue(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN OUT HII_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
VOID GetBitsQuestionValue(IN HII_STATEMENT *Question, IN UINT8 *Buffer, OUT HII_STATEMENT_VALUE *QuestionValue)
HII_STATEMENT * QuestionIdInFormset(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN UINT16 QuestionId)
EFI_STATUS GetIfrBinaryData(IN EFI_HII_HANDLE Handle, IN OUT EFI_GUID *FormSetGuid, OUT UINTN *BinaryLength, OUT UINT8 **BinaryData)
HII_STATEMENT * QuestionIdInForm(IN HII_FORM *Form, IN UINT16 QuestionId)
VOID InitializeFormSet(IN OUT HII_FORMSET *FormSet)
VOID IfrStrToUpper(IN CHAR16 *String)
INTN GetDefaultIdForCallBack(IN UINTN DefaultId)
EFI_STATUS HiiStatementValueToHiiValue(IN HII_STATEMENT_VALUE *StatementValue, OUT EFI_HII_VALUE *HiiValue)
EFI_STATUS GetValueByName(IN HII_FORMSET_STORAGE *Storage, IN CHAR16 *Name, IN OUT CHAR16 **Value)
EFI_STATUS GetQuestionDefault(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN HII_STATEMENT *Question, IN UINT16 DefaultId, OUT HII_STATEMENT_VALUE *DefaultValue)
EFI_STATUS ConfigRespToStorage(IN HII_FORMSET_STORAGE *Storage, IN CHAR16 *ConfigResp)
EFI_STATUS IfrFind(IN HII_FORMSET *FormSet, IN UINT8 Format, OUT EFI_HII_VALUE *Result)
EFI_STATUS GetDefaultValueFromAltCfg(IN HII_FORMSET *FormSet, IN HII_FORM *Form, IN HII_STATEMENT *Question, OUT HII_STATEMENT_VALUE *DefaultValue)
VOID SetArrayData(IN VOID *Array, IN UINT8 Type, IN UINTN Index, IN UINT64 Value)
CHAR16 * GetTokenString(IN EFI_STRING_ID Token, IN EFI_HII_HANDLE HiiHandle)
EFI_STATUS InitializeUnicodeCollationProtocol(VOID)
EFI_STATUS PushExpression(IN EFI_HII_VALUE *Value)
UINT16 GetLengthForValue(IN EFI_HII_VALUE *Value)
VOID NewStringCat(IN OUT CHAR16 **Dest, IN CHAR16 *Src)
BOOLEAN IsHiiValueTrue(IN EFI_HII_VALUE *Result)
EFI_STATUS BufferToQuestionValue(IN HII_STATEMENT *Question, IN CHAR16 *Value, OUT HII_STATEMENT_VALUE *QuestionValue)
UINTN SaveExpressionEvaluationStackOffset(VOID)
VOID SetBitsQuestionValue(IN HII_STATEMENT *Question, IN OUT UINT8 *Buffer, IN UINT32 Value)
EFI_STATUS IfrToken(IN HII_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
EFI_STATUS IfrMid(IN HII_FORMSET *FormSet, OUT EFI_HII_VALUE *Result)
EFI_STATUS PopStack(IN EFI_HII_VALUE *Stack, IN OUT EFI_HII_VALUE **StackPtr, OUT EFI_HII_VALUE *Data)
VOID DestroyFormSet(IN OUT FORM_BROWSER_FORMSET *FormSet)
FORMSET_STORAGE * GetFstStgFromVarId(IN FORM_BROWSER_FORMSET *FormSet, IN EFI_VARSTORE_ID VarStoreId)
RETURN_STATUS EFIAPI UnicodeValueToStringS(IN OUT CHAR16 *Buffer, IN UINTN BufferSize, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
EFI_RUNTIME_SERVICES * gRT
#define OFFSET_OF(TYPE, Field)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
#define MAXIMUM_VALUE_CHARACTERS
GET_SET_QUESTION_VALUE_WITH
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
#define EFI_USER_INFO_ACCESS_SETUP
#define EFI_USER_INFO_ACCESS_POLICY_RECORD
HII_FORMSET_STORAGE * Storage
Point to the storage that store this question.
EFI_QUESTION_ID QuestionId
Question id, the value of zero is reserved.
UINT32 Size
Specifies the size of the user access control record, in bytes, including this header.
UINT32 Type
Specifies the type of user access control.
LIST_ENTRY MapExpressionList
nested expressions inside of Map opcode.
EFI_HII_VALUE Result
Expression evaluation result.
UINT8 Type
Type for this expression.
Definition of HII_FORM_CONFIG_REQUEST.
CHAR16 * ConfigAltResp
Alt config response string for this ConfigRequest.
LIST_ENTRY StatementListHead
List of Statements and Questions (HII_STATEMENT)
UINT8 * Buffer
Buffer storage.
UINT8 * EditBuffer
Edit copy for Buffer Storage.
EFI_GUID Guid
VarStore Guid.
CHAR16 * ConfigHdr
<ConfigHdr>
LIST_ENTRY FormListHead
Form list (HII_FORM_BROWSER_FORM)
HII_EXPRESSION * ValueExpression
Not-NULL indicates default value is provided by EFI_IFR_VALUE.
HII_STATEMENT_VALUE Value
Default value.
HII_EXPRESSION_LIST * SuppressExpression
Non-NULL indicates nested inside of SuppressIf.
EFI_STRING_ID string
EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION.
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.