13 SETUP_DRIVER_SIGNATURE,
26 BROWSER_EXTENSION2_VERSION_1_1,
43UINTN gBrowserContextCount = 0;
50BOOLEAN mSystemSubmit =
FALSE;
51BOOLEAN gResetRequiredFormLevel;
52BOOLEAN gResetRequiredSystemLevel =
FALSE;
54BOOLEAN gFlagReconnect;
55BOOLEAN gCallbackReconnect;
56BROWSER_SETTING_SCOPE gBrowserSettingScope = FormSetLevel;
57BOOLEAN mBrowserScopeFirstSet =
TRUE;
65CHAR16 *mUnknownString = L
"!";
69extern UINT16 mCurrentFormId;
95 if (MenuList ==
NULL) {
99 MenuList->Signature = FORM_ENTRY_INFO_SIGNATURE;
101 MenuList->HiiHandle = HiiHandle;
103 MenuList->FormId = FormId;
104 MenuList->QuestionId = QuestionId;
109 InsertTailList (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, &MenuList->Link);
132 Link =
GetFirstNode (&gCurrentSelection->FormSet->FormListHead);
133 Form = FORM_BROWSER_FORM_FROM_LINK (Link);
158 EFI_FORM_ID FirstFormId;
162 Link =
GetFirstNode (&mPrivateData.FormBrowserEx2.FormViewHistoryHead);
163 while (!
IsNull (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, Link)) {
164 MenuList = FORM_ENTRY_INFO_FROM_LINK (Link);
165 Link =
GetNextNode (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, Link);
170 if (RetMenu !=
NULL) {
179 if (MenuList->HiiHandle == HiiHandle) {
185 }
else if (
CompareGuid (&MenuList->FormSetGuid, FormSetGuid)) {
186 if (MenuList->FormId == FormId) {
188 }
else if ((FormId == 0) || (MenuList->FormId == 0)) {
190 if (((FormId == 0) && (FirstFormId == MenuList->FormId)) || ((MenuList->FormId == 0) && (FirstFormId == FormId))) {
215 IN BROWSER_SETTING_SCOPE SettingLevel
221 ASSERT (SettingLevel == FormLevel || SettingLevel == FormSetLevel);
223 if (CurrentMenu ==
NULL) {
228 Link = &CurrentMenu->Link;
230 while (Link->BackLink != &mPrivateData.FormBrowserEx2.FormViewHistoryHead) {
231 ParentMenu = FORM_ENTRY_INFO_FROM_LINK (Link->BackLink);
233 if (SettingLevel == FormLevel) {
240 if (!
CompareGuid (&CurrentMenu->FormSetGuid, &ParentMenu->FormSetGuid)) {
247 Link = Link->BackLink;
253 if (Link->BackLink == &mPrivateData.FormBrowserEx2.FormViewHistoryHead) {
274 MenuList = FORM_ENTRY_INFO_FROM_LINK (MenuListHead->ForwardLink);
304 while (!
IsNull (CurrentMenuListHead, Link)) {
305 MenuList = FORM_ENTRY_INFO_FROM_LINK (Link);
309 ASSERT (NewMenuEntry !=
NULL);
310 NewMenuEntry->Signature = FORM_ENTRY_INFO_SIGNATURE;
311 NewMenuEntry->HiiHandle = MenuList->HiiHandle;
312 CopyMem (&NewMenuEntry->FormSetGuid, &MenuList->FormSetGuid, sizeof (
EFI_GUID));
313 NewMenuEntry->FormId = MenuList->FormId;
314 NewMenuEntry->QuestionId = MenuList->QuestionId;
336 OldFormset = mSystemLevelFormSet;
342 ASSERT (HiiHandles !=
NULL);
347 for (Index = 0; HiiHandles[Index] !=
NULL; Index++) {
359 ASSERT (LocalFormSet !=
NULL);
360 mSystemLevelFormSet = LocalFormSet;
362 ZeroMem (&ZeroGuid,
sizeof (ZeroGuid));
364 if (EFI_ERROR (Status) ||
IsListEmpty (&LocalFormSet->FormListHead)) {
375 if (EFI_ERROR (Status)) {
386 mSystemLevelFormSet = OldFormset;
400 IN UINT32 BrowserStatus,
403 IN CHAR16 *ErrorString
411 if (OpCode !=
NULL) {
413 ASSERT (Statement !=
NULL);
414 Statement->OpCode = OpCode;
415 gDisplayFormData.HighLightedStatement = Statement;
422 gDisplayFormData.ErrorString = ErrorString;
423 gDisplayFormData.BrowserStatus = BrowserStatus;
425 if (HiiHandle !=
NULL) {
426 gDisplayFormData.HiiHandle = HiiHandle;
429 mFormDisplay->FormDisplay (&gDisplayFormData, &UserInputData);
431 gDisplayFormData.BrowserStatus = BROWSER_SUCCESS;
432 gDisplayFormData.ErrorString =
NULL;
434 if (OpCode !=
NULL) {
438 return UserInputData.Action;
473 IN UINT16 FormId OPTIONAL,
475 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
488 if (mFormDisplay ==
NULL) {
489 DEBUG ((DEBUG_ERROR,
"Fatal Error! EDKII_FORM_DISPLAY_ENGINE_PROTOCOL not found!"));
490 return EFI_UNSUPPORTED;
498 gFlagReconnect =
FALSE;
499 gResetRequiredFormLevel =
FALSE;
500 gExitRequired =
FALSE;
501 gCallbackReconnect =
FALSE;
506 for (Index = 0; Index < HandleCount; Index++) {
508 ASSERT (Selection !=
NULL);
510 Selection->Handle = Handles[Index];
511 if (FormSetGuid !=
NULL) {
513 Selection->FormId = FormId;
515 CopyMem (&Selection->FormSetGuid, &gEfiHiiPlatformSetupFormsetGuid, sizeof (
EFI_GUID));
520 ASSERT (FormSet !=
NULL);
533 Status =
InitializeFormSet (Selection->Handle, &Selection->FormSetGuid, FormSet);
534 if (EFI_ERROR (Status) ||
IsListEmpty (&FormSet->FormListHead)) {
539 Selection->FormSet = FormSet;
540 mSystemLevelFormSet = FormSet;
545 gCurrentSelection = Selection;
549 gCurrentSelection =
NULL;
550 mSystemLevelFormSet =
NULL;
555 if ((gFlagReconnect || gCallbackReconnect) && !
CompareGuid (&FormSet->Guid, &Selection->FormSetGuid)) {
561 gFlagReconnect =
FALSE;
562 gCallbackReconnect =
FALSE;
574 if (EFI_ERROR (Status)) {
577 }
while (Selection->Action == UI_ACTION_REFRESH_FORMSET);
582 if (ActionRequest !=
NULL) {
583 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
584 if (gResetRequiredFormLevel) {
585 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_RESET;
589 mFormDisplay->ExitDisplay ();
594 while (!
IsListEmpty (&mPrivateData.FormBrowserEx2.FormViewHistoryHead)) {
595 MenuList = FORM_ENTRY_INFO_FROM_LINK (mPrivateData.FormBrowserEx2.FormViewHistoryHead.ForwardLink);
629 IN OUT EFI_STRING *ResultsData,
630 IN BOOLEAN RetrieveData,
647 if (EFI_ERROR (Status)) {
655 StrPtr =
StrStr (ConfigResp, L
"PATH");
656 ASSERT (StrPtr !=
NULL);
657 StrPtr =
StrStr (StrPtr, L
"&");
664 if (*ResultsDataSize >= BufferSize) {
665 StrCpyS (*ResultsData, *ResultsDataSize /
sizeof (CHAR16), StrPtr);
668 *ResultsDataSize = BufferSize;
675 ASSERT (BrowserStorage !=
NULL);
676 TmpSize =
StrLen (*ResultsData);
677 BufferSize = (TmpSize +
StrLen (BrowserStorage->ConfigHdr) + 2) *
sizeof (CHAR16);
678 MaxLen = BufferSize /
sizeof (CHAR16);
680 ASSERT (ConfigResp !=
NULL);
682 StrCpyS (ConfigResp, MaxLen, BrowserStorage->ConfigHdr);
683 StrCatS (ConfigResp, MaxLen, L
"&");
684 StrCatS (ConfigResp, MaxLen, *ResultsData);
691 if (EFI_ERROR (Status)) {
731 IN OUT EFI_STRING ResultsData,
732 IN BOOLEAN RetrieveData,
734 IN CONST CHAR16 *VariableName OPTIONAL
744 if ((ResultsDataSize ==
NULL) || (ResultsData ==
NULL)) {
745 return EFI_INVALID_PARAMETER;
748 TotalSize = *ResultsDataSize;
753 if (VariableGuid !=
NULL) {
758 while (!
IsNull (&gBrowserStorageList, Link)) {
759 Storage = BROWSER_STORAGE_FROM_LINK (Link);
768 if ((Storage->Type == EFI_HII_VARSTORE_BUFFER) ||
769 (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
774 if (VariableName ==
NULL) {
775 return EFI_NOT_FOUND;
778 if (
StrCmp (Storage->Name, (CHAR16 *)VariableName) != 0) {
783 if ((Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) ||
784 (Storage->Type == EFI_HII_VARSTORE_BUFFER))
786 if ((mSystemLevelFormSet ==
NULL) || (mSystemLevelFormSet->HiiHandle ==
NULL)) {
787 return EFI_NOT_FOUND;
790 if (Storage->HiiHandle != mSystemLevelFormSet->HiiHandle) {
795 Status =
ProcessStorage (&TotalSize, &ResultsData, RetrieveData, Storage);
796 if (EFI_ERROR (Status)) {
800 if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
813 return EFI_NOT_FOUND;
819 if (mSystemLevelFormSet ==
NULL) {
820 return EFI_NOT_READY;
826 Link =
GetFirstNode (&mSystemLevelFormSet->StorageListHead);
827 if (
IsNull (&mSystemLevelFormSet->StorageListHead, Link)) {
828 return EFI_UNSUPPORTED;
831 FormsetStorage = FORMSET_STORAGE_FROM_LINK (Link);
833 Status =
ProcessStorage (&TotalSize, &ResultsData, RetrieveData, FormsetStorage->BrowserStorage);
834 if (EFI_ERROR (Status)) {
840 Status = TotalSize <= *ResultsDataSize ?
EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;
841 *ResultsDataSize = TotalSize;
861 if (mFormDisplay !=
NULL) {
865 gBS->LocateProtocol (
866 &gEdkiiFormDisplayEngineProtocolGuid,
868 (VOID **)&mFormDisplay
895 Status =
gBS->LocateProtocol (
896 &gEfiHiiDatabaseProtocolGuid,
898 (VOID **)&mHiiDatabase
902 Status =
gBS->LocateProtocol (
903 &gEfiHiiConfigRoutingProtocolGuid,
905 (VOID **)&mHiiConfigRouting
909 Status =
gBS->LocateProtocol (
910 &gEfiDevicePathFromTextProtocolGuid,
912 (VOID **)&mPathFromText
918 mPrivateData.Handle =
NULL;
919 Status =
gBS->InstallProtocolInterface (
920 &mPrivateData.Handle,
921 &gEfiFormBrowser2ProtocolGuid,
923 &mPrivateData.FormBrowser2
932 mPrivateData.Handle =
NULL;
933 Status =
gBS->InstallProtocolInterface (
934 &mPrivateData.Handle,
935 &gEdkiiFormBrowserEx2ProtocolGuid,
937 &mPrivateData.FormBrowserEx2
941 Status =
gBS->InstallProtocolInterface (
942 &mPrivateData.Handle,
943 &gEdkiiFormBrowserExProtocolGuid,
945 &mPrivateData.FormBrowserEx
951 Status =
gBS->LocateProtocol (
952 &gEdkiiFormDisplayEngineProtocolGuid,
954 (VOID **)&mFormDisplay
957 if (EFI_ERROR (Status)) {
959 &gEdkiiFormDisplayEngineProtocolGuid,
986 EFI_STRING_ID StringId;
989 ASSERT (StringId != 0);
1005 IN EFI_STRING_ID StringId,
1011 NullChar = CHAR_NULL;
1028 IN EFI_STRING_ID Token,
1034 if (HiiHandle ==
NULL) {
1039 if (String ==
NULL) {
1041 ASSERT (String !=
NULL);
1044 return (CHAR16 *)String;
1056 IN OUT CHAR16 **Dest,
1060 if (*Dest !=
NULL) {
1065 ASSERT (*Dest !=
NULL);
1077 IN OUT CHAR16 **Dest,
1084 if (*Dest ==
NULL) {
1089 MaxLen = (
StrSize (*Dest) +
StrSize (Src) - 1) /
sizeof (CHAR16);
1116 IN OUT CHAR16 **Value,
1123 if ((GetValueFrom != GetSetValueWithEditBuffer) && (GetValueFrom != GetSetValueWithBuffer)) {
1124 return EFI_INVALID_PARAMETER;
1130 while (!
IsNull (&Storage->NameValueListHead, Link)) {
1131 Node = NAME_VALUE_NODE_FROM_LINK (Link);
1133 if (
StrCmp (Name, Node->Name) == 0) {
1134 if (GetValueFrom == GetSetValueWithEditBuffer) {
1143 Link =
GetNextNode (&Storage->NameValueListHead, Link);
1146 return EFI_NOT_FOUND;
1175 if ((SetValueTo != GetSetValueWithEditBuffer) && (SetValueTo != GetSetValueWithBuffer)) {
1176 return EFI_INVALID_PARAMETER;
1180 while (!
IsNull (&Storage->NameValueListHead, Link)) {
1181 Node = NAME_VALUE_NODE_FROM_LINK (Link);
1183 if (
StrCmp (Name, Node->Name) == 0) {
1184 if (SetValueTo == GetSetValueWithEditBuffer) {
1185 Buffer = Node->EditValue;
1187 Buffer = Node->Value;
1190 if (Buffer !=
NULL) {
1195 ASSERT (Buffer !=
NULL);
1196 if (SetValueTo == GetSetValueWithEditBuffer) {
1197 Node->EditValue = Buffer;
1199 Node->Value = Buffer;
1202 if (ReturnNode !=
NULL) {
1209 Link =
GetNextNode (&Storage->NameValueListHead, Link);
1212 return EFI_NOT_FOUND;
1230 IN CHAR16 **ConfigResp,
1231 IN CHAR16 *ConfigRequest,
1232 IN BOOLEAN GetEditBuf
1236 EFI_STRING Progress;
1244 switch (Storage->Type) {
1245 case EFI_HII_VARSTORE_BUFFER:
1246 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
1247 SourceBuf = GetEditBuf ? Storage->EditBuffer : Storage->Buffer;
1248 Status = mHiiConfigRouting->BlockToConfig (
1258 case EFI_HII_VARSTORE_NAME_VALUE:
1261 ASSERT (FormsetStorage !=
NULL);
1265 while (!
IsNull (&Storage->NameValueListHead, Link)) {
1266 Node = NAME_VALUE_NODE_FROM_LINK (Link);
1268 if (
StrStr (ConfigRequest, Node->Name) !=
NULL) {
1279 Link =
GetNextNode (&Storage->NameValueListHead, Link);
1284 case EFI_HII_VARSTORE_EFI_VARIABLE:
1286 Status = EFI_INVALID_PARAMETER;
1306 IN CHAR16 *ConfigResp
1310 EFI_STRING Progress;
1318 switch (Storage->Type) {
1319 case EFI_HII_VARSTORE_BUFFER:
1320 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
1321 BufferSize = Storage->Size;
1322 Status = mHiiConfigRouting->ConfigToBlock (
1325 Storage->EditBuffer,
1331 case EFI_HII_VARSTORE_NAME_VALUE:
1332 StrPtr =
StrStr (ConfigResp, L
"PATH");
1333 if (StrPtr ==
NULL) {
1337 StrPtr =
StrStr (ConfigResp, L
"&");
1338 while (StrPtr !=
NULL) {
1342 StrPtr = StrPtr + 1;
1344 StrPtr =
StrStr (StrPtr, L
"=");
1345 if (StrPtr ==
NULL) {
1354 StrPtr = StrPtr + 1;
1356 StrPtr =
StrStr (StrPtr, L
"&");
1357 if (StrPtr !=
NULL) {
1366 case EFI_HII_VARSTORE_EFI_VARIABLE:
1368 Status = EFI_INVALID_PARAMETER;
1394 StartBit = Question->BitVarOffset % 8;
1395 EndBit = StartBit + Question->BitStorageWidth - 1;
1397 CopyMem ((UINT8 *)&BufferValue, Buffer, Question->StorageWidth);
1406 CopyMem ((UINT8 *)&Question->HiiValue.Value, (UINT8 *)&RetVal, Question->StorageWidth);
1421 IN OUT UINT8 *Buffer,
1430 StartBit = Question->BitVarOffset % 8;
1431 EndBit = StartBit + Question->BitStorageWidth - 1;
1433 CopyMem ((UINT8 *)&Operand, Buffer, Question->StorageWidth);
1437 CopyMem (Buffer, (UINT8 *)&RetVal, Question->StorageWidth);
1456 BOOLEAN IsBufferStorage;
1471 IsString = (BOOLEAN)((Question->HiiValue.Type == EFI_IFR_TYPE_STRING) ?
TRUE :
FALSE);
1472 if ((Question->Storage->Type == EFI_HII_VARSTORE_BUFFER) ||
1473 (Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
1475 IsBufferStorage =
TRUE;
1477 IsBufferStorage =
FALSE;
1483 if (Question->BufferValue !=
NULL) {
1487 Dst = Question->BufferValue;
1492 if (Question->QuestionReferToBitField) {
1494 if (Buffer ==
NULL) {
1495 return EFI_OUT_OF_RESOURCES;
1500 Dst = (UINT8 *)&Question->HiiValue.Value;
1508 while (*StringPtr != L
'\0' && *StringPtr != L
'&') {
1512 TempChar = *StringPtr;
1515 LengthStr =
StrLen (Value);
1523 if (LengthStr > (
UINTN)Question->StorageWidth * 2) {
1524 Length = (
UINTN)Question->StorageWidth * 2;
1530 if (!IsBufferStorage && IsString) {
1535 DstBuf = (CHAR16 *)Dst;
1536 ZeroMem (TemStr,
sizeof (TemStr));
1537 for (Index = 0; Index < Length; Index += 4) {
1538 StrnCpyS (TemStr,
sizeof (TemStr) /
sizeof (CHAR16), Value + Index, 4);
1545 DstBuf[Index/4] = L
'\0';
1547 ZeroMem (TemStr,
sizeof (TemStr));
1548 for (Index = 0; Index < Length; Index++) {
1549 TemStr[0] = Value[LengthStr - Index - 1];
1551 if ((Index & 1) == 0) {
1552 Dst[Index/2] = DigitUint8;
1554 Dst[Index/2] = (UINT8)((DigitUint8 << 4) + Dst[Index/2]);
1559 *StringPtr = TempChar;
1561 if ((Buffer !=
NULL) && Question->QuestionReferToBitField) {
1597 CHAR16 *ConfigRequest;
1602 BOOLEAN IsBufferStorage;
1609 if (GetValueFrom >= GetSetValueWithMax) {
1610 return EFI_INVALID_PARAMETER;
1616 if (Question->ValueExpression !=
NULL) {
1618 if (!EFI_ERROR (Status)) {
1619 if (Question->ValueExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
1620 ASSERT (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER && Question->HiiValue.Buffer !=
NULL);
1621 if (Question->StorageWidth > Question->ValueExpression->Result.BufferLen) {
1622 CopyMem (Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->ValueExpression->Result.BufferLen);
1623 Question->HiiValue.BufferLen = Question->ValueExpression->Result.BufferLen;
1625 CopyMem (Question->HiiValue.Buffer, Question->ValueExpression->Result.Buffer, Question->StorageWidth);
1626 Question->HiiValue.BufferLen = Question->StorageWidth;
1629 FreePool (Question->ValueExpression->Result.Buffer);
1632 Question->HiiValue.Type = Question->ValueExpression->Result.Type;
1642 if ((Question->ReadExpression !=
NULL) && (Form->FormType == STANDARD_MAP_FORM_TYPE)) {
1644 if (!EFI_ERROR (Status) &&
1645 ((Question->ReadExpression->Result.Type < EFI_IFR_TYPE_OTHER) || (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER)))
1650 if (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
1651 ASSERT (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER && Question->HiiValue.Buffer !=
NULL);
1652 if (Question->StorageWidth > Question->ReadExpression->Result.BufferLen) {
1653 CopyMem (Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->ReadExpression->Result.BufferLen);
1654 Question->HiiValue.BufferLen = Question->ReadExpression->Result.BufferLen;
1656 CopyMem (Question->HiiValue.Buffer, Question->ReadExpression->Result.Buffer, Question->StorageWidth);
1657 Question->HiiValue.BufferLen = Question->StorageWidth;
1660 FreePool (Question->ReadExpression->Result.Buffer);
1663 Question->HiiValue.Type = Question->ReadExpression->Result.Type;
1672 Storage = Question->Storage;
1673 QuestionValue = &Question->HiiValue.Value;
1674 if (Storage ==
NULL) {
1678 if ((Question->Operand == EFI_IFR_DATE_OP) || (Question->Operand == EFI_IFR_TIME_OP)) {
1682 switch (Question->Flags & EFI_QF_DATE_STORAGE) {
1683 case QF_DATE_STORAGE_TIME:
1684 Status =
gRT->GetTime (&EfiTime,
NULL);
1687 case QF_DATE_STORAGE_WAKEUP:
1688 Status =
gRT->GetWakeupTime (&Enabled, &Pending, &EfiTime);
1691 case QF_DATE_STORAGE_NORMAL:
1699 if (EFI_ERROR (Status)) {
1700 if (Question->Operand == EFI_IFR_DATE_OP) {
1701 QuestionValue->date.Year = 0xff;
1702 QuestionValue->date.Month = 0xff;
1703 QuestionValue->date.Day = 0xff;
1705 QuestionValue->time.Hour = 0xff;
1706 QuestionValue->time.Minute = 0xff;
1707 QuestionValue->time.Second = 0xff;
1713 if (Question->Operand == EFI_IFR_DATE_OP) {
1714 QuestionValue->date.Year = EfiTime.Year;
1715 QuestionValue->date.Month = EfiTime.Month;
1716 QuestionValue->date.Day = EfiTime.Day;
1718 QuestionValue->time.Hour = EfiTime.Hour;
1719 QuestionValue->time.Minute = EfiTime.Minute;
1720 QuestionValue->time.Second = EfiTime.Second;
1730 StorageWidth = Question->StorageWidth;
1731 if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
1732 if (Question->BufferValue !=
NULL) {
1733 Dst = Question->BufferValue;
1735 Dst = (UINT8 *)QuestionValue;
1738 Status =
gRT->GetVariable (
1739 Question->VariableName,
1754 if (Question->BufferValue !=
NULL) {
1758 Dst = Question->BufferValue;
1763 Dst = (UINT8 *)&Question->HiiValue.Value;
1766 if ((Storage->Type == EFI_HII_VARSTORE_BUFFER) ||
1767 (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
1769 IsBufferStorage =
TRUE;
1771 IsBufferStorage =
FALSE;
1774 if ((GetValueFrom == GetSetValueWithEditBuffer) || (GetValueFrom == GetSetValueWithBuffer)) {
1775 if (IsBufferStorage) {
1776 if (GetValueFrom == GetSetValueWithEditBuffer) {
1781 if (Question->QuestionReferToBitField) {
1784 CopyMem (Dst, Storage->EditBuffer + Question->VarStoreInfo.VarOffset, StorageWidth);
1791 if (Question->QuestionReferToBitField) {
1794 CopyMem (Dst, Storage->Buffer + Question->VarStoreInfo.VarOffset, StorageWidth);
1799 Status =
GetValueByName (Storage, Question->VariableName, &Value, GetValueFrom);
1800 if (EFI_ERROR (Status)) {
1804 ASSERT (Value !=
NULL);
1810 ASSERT (FormsetStorage !=
NULL);
1815 if (IsBufferStorage) {
1816 Length =
StrLen (FormsetStorage->ConfigHdr);
1817 Length +=
StrLen (Question->BlockName);
1819 Length =
StrLen (FormsetStorage->ConfigHdr);
1820 Length +=
StrLen (Question->VariableName) + 1;
1824 MaxLen = Length + 1;
1826 ASSERT (ConfigRequest !=
NULL);
1828 StrCpyS (ConfigRequest, MaxLen, FormsetStorage->ConfigHdr);
1829 if (IsBufferStorage) {
1830 StrCatS (ConfigRequest, MaxLen, Question->BlockName);
1832 StrCatS (ConfigRequest, MaxLen, L
"&");
1833 StrCatS (ConfigRequest, MaxLen, Question->VariableName);
1839 Status = mHiiConfigRouting->ExtractConfig (
1846 if (EFI_ERROR (Status)) {
1853 if (IsBufferStorage) {
1854 Value =
StrStr (Result, L
"&VALUE");
1855 if (Value ==
NULL) {
1857 return EFI_NOT_FOUND;
1865 Value = Result + Length;
1868 if (*Value !=
'=') {
1870 return EFI_NOT_FOUND;
1879 if (EFI_ERROR (Status)) {
1887 if (IsBufferStorage) {
1888 CopyMem (Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Dst, StorageWidth);
1890 SetValueByName (Storage, Question->VariableName, Value, GetSetValueWithEditBuffer,
NULL);
1893 if (Result !=
NULL) {
1934 BOOLEAN IsBufferStorage;
1946 if (SetValueTo >= GetSetValueWithMax) {
1947 return EFI_INVALID_PARAMETER;
1953 if (Question->ValueExpression !=
NULL) {
1960 if ((Question->WriteExpression !=
NULL) && (Form->FormType == STANDARD_MAP_FORM_TYPE)) {
1962 if (EFI_ERROR (Status)) {
1970 Storage = Question->Storage;
1971 QuestionValue = &Question->HiiValue.Value;
1972 if (Storage ==
NULL) {
1976 if ((Question->Operand == EFI_IFR_DATE_OP) || (Question->Operand == EFI_IFR_TIME_OP)) {
1980 switch (Question->Flags & EFI_QF_DATE_STORAGE) {
1981 case QF_DATE_STORAGE_TIME:
1982 Status =
gRT->GetTime (&EfiTime,
NULL);
1985 case QF_DATE_STORAGE_WAKEUP:
1986 Status =
gRT->GetWakeupTime (&Enabled, &Pending, &EfiTime);
1989 case QF_DATE_STORAGE_NORMAL:
1997 if (EFI_ERROR (Status)) {
2001 if (Question->Operand == EFI_IFR_DATE_OP) {
2002 EfiTime.Year = QuestionValue->date.Year;
2003 EfiTime.Month = QuestionValue->date.Month;
2004 EfiTime.Day = QuestionValue->date.Day;
2006 EfiTime.Hour = QuestionValue->time.Hour;
2007 EfiTime.Minute = QuestionValue->time.Minute;
2008 EfiTime.Second = QuestionValue->time.Second;
2011 if ((Question->Flags & EFI_QF_DATE_STORAGE) == QF_DATE_STORAGE_TIME) {
2012 Status =
gRT->SetTime (&EfiTime);
2014 Status =
gRT->SetWakeupTime (
TRUE, &EfiTime);
2024 StorageWidth = Question->StorageWidth;
2025 if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
2026 if (Question->BufferValue !=
NULL) {
2027 Src = Question->BufferValue;
2029 Src = (UINT8 *)QuestionValue;
2032 Status =
gRT->SetVariable (
2033 Question->VariableName,
2035 Storage->Attributes,
2045 if (Question->BufferValue !=
NULL) {
2046 Src = Question->BufferValue;
2048 Src = (UINT8 *)&Question->HiiValue.Value;
2051 if ((Storage->Type == EFI_HII_VARSTORE_BUFFER) ||
2052 (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
2054 IsBufferStorage =
TRUE;
2056 IsBufferStorage =
FALSE;
2059 IsString = (BOOLEAN)((Question->HiiValue.Type == EFI_IFR_TYPE_STRING) ?
TRUE :
FALSE);
2061 if ((SetValueTo == GetSetValueWithEditBuffer) || (SetValueTo == GetSetValueWithBuffer)) {
2062 if (IsBufferStorage) {
2063 if (SetValueTo == GetSetValueWithEditBuffer) {
2068 if (Question->QuestionReferToBitField) {
2069 SetBitsQuestionValue (Question, Storage->EditBuffer + Question->VarStoreInfo.VarOffset, (UINT32)(*Src));
2071 CopyMem (Storage->EditBuffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
2073 }
else if (SetValueTo == GetSetValueWithBuffer) {
2078 if (Question->QuestionReferToBitField) {
2079 SetBitsQuestionValue (Question, Storage->Buffer + Question->VarStoreInfo.VarOffset, (UINT32)(*Src));
2081 CopyMem (Storage->Buffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
2090 BufferLen = ((
StrLen ((CHAR16 *)Src) * 4) + 1) *
sizeof (CHAR16);
2092 ASSERT (Value !=
NULL);
2096 TemName = (CHAR16 *)Src;
2098 for ( ; *TemName != L
'\0'; TemName++) {
2101 BufferLen - ((
UINTN)TemString - (
UINTN)Value),
2102 PREFIX_ZERO | RADIX_HEX,
2106 TemString +=
StrnLenS (TemString, (BufferLen - ((
UINTN)TemString - (
UINTN)Value)) /
sizeof (CHAR16));
2109 BufferLen = StorageWidth * 2 + 1;
2111 ASSERT (Value !=
NULL);
2115 TemBuffer = Src + StorageWidth - 1;
2117 for (Index = 0; Index < StorageWidth; Index++, TemBuffer--) {
2120 BufferLen *
sizeof (CHAR16) - ((
UINTN)TemString - (
UINTN)Value),
2121 PREFIX_ZERO | RADIX_HEX,
2125 TemString +=
StrnLenS (TemString, BufferLen - ((
UINTN)TemString - (
UINTN)Value) /
sizeof (CHAR16));
2129 Status =
SetValueByName (Storage, Question->VariableName, Value, SetValueTo, &Node);
2131 if (EFI_ERROR (Status)) {
2135 }
else if (SetValueTo == GetSetValueWithHiiDriver) {
2140 if (IsBufferStorage) {
2141 Length =
StrLen (Question->BlockName) + 7;
2143 Length =
StrLen (Question->VariableName) + 2;
2146 if (!IsBufferStorage && IsString) {
2147 Length += (
StrLen ((CHAR16 *)Src) * 4);
2149 Length += (StorageWidth * 2);
2153 ASSERT (FormsetStorage !=
NULL);
2154 MaxLen =
StrLen (FormsetStorage->ConfigHdr) + Length + 1;
2156 ASSERT (ConfigResp !=
NULL);
2158 StrCpyS (ConfigResp, MaxLen, FormsetStorage->ConfigHdr);
2159 if (IsBufferStorage) {
2160 StrCatS (ConfigResp, MaxLen, Question->BlockName);
2161 StrCatS (ConfigResp, MaxLen, L
"&VALUE=");
2163 StrCatS (ConfigResp, MaxLen, L
"&");
2164 StrCatS (ConfigResp, MaxLen, Question->VariableName);
2165 StrCatS (ConfigResp, MaxLen, L
"=");
2168 Value = ConfigResp +
StrLen (ConfigResp);
2170 if (!IsBufferStorage && IsString) {
2174 TemName = (CHAR16 *)Src;
2176 for ( ; *TemName != L
'\0'; TemName++) {
2179 MaxLen *
sizeof (CHAR16) - ((
UINTN)TemString - (
UINTN)ConfigResp),
2180 PREFIX_ZERO | RADIX_HEX,
2184 TemString +=
StrnLenS (TemString, MaxLen - ((
UINTN)TemString - (
UINTN)ConfigResp) /
sizeof (CHAR16));
2190 TemBuffer = Src + StorageWidth - 1;
2192 for (Index = 0; Index < StorageWidth; Index++, TemBuffer--) {
2195 MaxLen *
sizeof (CHAR16) - ((
UINTN)TemString - (
UINTN)ConfigResp),
2196 PREFIX_ZERO | RADIX_HEX,
2200 TemString +=
StrnLenS (TemString, MaxLen - ((
UINTN)TemString - (
UINTN)ConfigResp) /
sizeof (CHAR16));
2207 for (TemString = Value; *Value != L
'\0'; Value++) {
2208 if ((*Value >= L
'A') && (*Value <= L
'Z')) {
2209 *Value = (CHAR16)(*Value - L
'A' + L
'a');
2216 Status = mHiiConfigRouting->RouteConfig (
2221 if (EFI_ERROR (Status)) {
2231 CopyMem (Storage->Buffer + Question->VarStoreInfo.VarOffset, Src, StorageWidth);
2261 UINT32 BrowserStatus;
2264 BrowserStatus = BROWSER_SUCCESS;
2268 case EFI_HII_EXPRESSION_INCONSISTENT_IF:
2269 ListHead = &Question->InconsistentListHead;
2272 case EFI_HII_EXPRESSION_WARNING_IF:
2273 ListHead = &Question->WarningListHead;
2276 case EFI_HII_EXPRESSION_NO_SUBMIT_IF:
2277 ListHead = &Question->NoSubmitListHead;
2282 return EFI_UNSUPPORTED;
2286 while (!
IsNull (ListHead, Link)) {
2287 Expression = FORM_EXPRESSION_FROM_LINK (Link);
2293 if (EFI_ERROR (Status)) {
2297 if (
IsTrue (&Expression->Result)) {
2299 case EFI_HII_EXPRESSION_INCONSISTENT_IF:
2300 BrowserStatus = BROWSER_INCONSISTENT_IF;
2303 case EFI_HII_EXPRESSION_WARNING_IF:
2304 BrowserStatus = BROWSER_WARNING_IF;
2307 case EFI_HII_EXPRESSION_NO_SUBMIT_IF:
2308 BrowserStatus = BROWSER_NO_SUBMIT_IF;
2313 if (Expression->Error != 0) {
2314 ErrorStr =
GetToken (Expression->Error, FormSet->HiiHandle);
2324 if (!((Type == EFI_HII_EXPRESSION_NO_SUBMIT_IF) && mSystemSubmit)) {
2329 PopupErrorMessage (BrowserStatus, FormSet->HiiHandle, Expression->OpCode, ErrorStr);
2332 if (ErrorStr !=
NULL) {
2336 if (Type == EFI_HII_EXPRESSION_WARNING_IF) {
2339 return EFI_NOT_READY;
2377 if (!
IsListEmpty (&Question->InconsistentListHead)) {
2378 Status =
ValidateQuestion (FormSet, Form, Question, EFI_HII_EXPRESSION_INCONSISTENT_IF);
2379 if (EFI_ERROR (Status)) {
2388 Status =
ValidateQuestion (FormSet, Form, Question, EFI_HII_EXPRESSION_WARNING_IF);
2419 while (!
IsNull (&FormSet->FormListHead, LinkForm)) {
2420 Form = FORM_BROWSER_FORM_FROM_LINK (LinkForm);
2421 LinkForm =
GetNextNode (&FormSet->FormListHead, LinkForm);
2423 if ((*CurrentForm !=
NULL) && (*CurrentForm != Form)) {
2428 while (!
IsNull (&Form->StatementListHead, Link)) {
2429 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
2430 Status =
ValidateQuestion (FormSet, Form, Question, EFI_HII_EXPRESSION_NO_SUBMIT_IF);
2431 if (EFI_ERROR (Status)) {
2432 if (*CurrentForm ==
NULL) {
2433 *CurrentForm = Form;
2436 if (Statement !=
NULL) {
2437 *Statement = Question;
2443 Link =
GetNextNode (&Form->StatementListHead, Link);
2466 IN CHAR16 *ConfigRequest,
2467 IN BOOLEAN SyncOrRestore
2471 EFI_STRING Progress;
2482 if ((Storage->Type == EFI_HII_VARSTORE_BUFFER) ||
2483 (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER))
2485 BufferSize = Storage->Size;
2487 if (SyncOrRestore) {
2488 Src = Storage->EditBuffer;
2489 Dst = Storage->Buffer;
2491 Src = Storage->Buffer;
2492 Dst = Storage->EditBuffer;
2495 if (ConfigRequest !=
NULL) {
2496 Status = mHiiConfigRouting->BlockToConfig (
2504 if (EFI_ERROR (Status)) {
2508 Status = mHiiConfigRouting->ConfigToBlock (
2515 if (Result !=
NULL) {
2519 CopyMem (Dst, Src, BufferSize);
2521 }
else if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
2523 while (!
IsNull (&Storage->NameValueListHead, Link)) {
2524 Node = NAME_VALUE_NODE_FROM_LINK (Link);
2526 if (((ConfigRequest !=
NULL) && (
StrStr (ConfigRequest, Node->Name) !=
NULL)) ||
2527 (ConfigRequest ==
NULL))
2529 if (SyncOrRestore) {
2536 Link =
GetNextNode (&Storage->NameValueListHead, Link);
2560 EFI_BROWSER_ACTION_REQUEST ActionRequest;
2562 if (FormSet->ConfigAccess ==
NULL) {
2567 while (!
IsNull (&Form->StatementListHead, Link)) {
2568 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
2569 Link =
GetNextNode (&Form->StatementListHead, Link);
2571 if ((Question->Storage ==
NULL) || (Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE)) {
2575 if ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != EFI_IFR_FLAG_CALLBACK) {
2579 if (Question->Operand == EFI_IFR_PASSWORD_OP) {
2583 if (!Question->ValueChanged) {
2592 if (Question->Operand == EFI_IFR_STRING_OP) {
2593 HiiSetString (FormSet->HiiHandle, Question->HiiValue.Value.
string, (CHAR16 *)Question->BufferValue,
NULL);
2596 if (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER) {
2602 ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
2603 FormSet->ConfigAccess->Callback (
2604 FormSet->ConfigAccess,
2605 EFI_BROWSER_ACTION_CHANGED,
2606 Question->QuestionId,
2607 Question->HiiValue.Type,
2631 EFI_BROWSER_ACTION_REQUEST ActionRequest;
2633 if (FormSet->ConfigAccess ==
NULL) {
2638 while (!
IsNull (&Form->StatementListHead, Link)) {
2639 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
2640 Link =
GetNextNode (&Form->StatementListHead, Link);
2642 if ((Question->Storage ==
NULL) || (Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE)) {
2646 if ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != EFI_IFR_FLAG_CALLBACK) {
2650 if (Question->Operand == EFI_IFR_PASSWORD_OP) {
2654 if (Question->HiiValue.Type == EFI_IFR_TYPE_BUFFER) {
2660 ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
2661 FormSet->ConfigAccess->Callback (
2662 FormSet->ConfigAccess,
2663 EFI_BROWSER_ACTION_SUBMITTED,
2664 Question->QuestionId,
2665 Question->HiiValue.Type,
2694 while (!
IsNull (&FormSet->FormListHead, Link)) {
2695 CurrentForm = FORM_BROWSER_FORM_FROM_LINK (Link);
2696 Link =
GetNextNode (&FormSet->FormListHead, Link);
2720 if (HiiHandle ==
NULL) {
2727 ASSERT (HiiHandles !=
NULL);
2729 for (Index = 0; HiiHandles[Index] !=
NULL; Index++) {
2730 if (HiiHandles[Index] == HiiHandle) {
2757 ASSERT (FormSet !=
NULL);
2763 if (!Find && (FormSet != gCurrentSelection->FormSet)) {
2793 while (!
IsNull (&Form->StatementListHead, Link)) {
2794 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
2795 Link =
GetNextNode (&Form->StatementListHead, Link);
2797 if (!Question->ValueChanged) {
2801 OldValue = Question->ValueChanged;
2811 if (SetFlag && OldValue && !Question->ValueChanged) {
2812 if ((Question->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) {
2813 gResetRequiredFormLevel =
TRUE;
2814 gResetRequiredSystemLevel =
TRUE;
2817 if ((Question->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) {
2818 gFlagReconnect =
TRUE;
2851 while (!
IsNull (&FormSet->FormListHead, Link)) {
2852 CurrentForm = FORM_BROWSER_FORM_FROM_LINK (Link);
2853 Link =
GetNextNode (&FormSet->FormListHead, Link);
2879 IN EFI_STRING Progress,
2892 ASSERT ((*Progress ==
'&') || (*Progress ==
'G'));
2896 *RetQuestion =
NULL;
2901 if (*Progress ==
'&') {
2907 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
2911 EndStr =
StrStr (Progress, L
"PATH=");
2912 ASSERT (EndStr !=
NULL);
2913 while (*EndStr !=
'&') {
2922 EndStr =
StrStr (Progress, L
"&OFFSET=");
2923 ASSERT (EndStr !=
NULL);
2927 Progress = EndStr + 1;
2933 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
2938 EndStr =
StrStr (Progress, L
"=");
2939 ASSERT (EndStr !=
NULL);
2946 EndStr =
StrStr (Progress, L
"&VALUE=");
2947 ASSERT (EndStr !=
NULL);
2955 while (!
IsNull (&FormSet->FormListHead, Link)) {
2956 Form = FORM_BROWSER_FORM_FROM_LINK (Link);
2957 Link =
GetNextNode (&FormSet->FormListHead, Link);
2963 while (!
IsNull (&Form->ConfigRequestHead, LinkStorage)) {
2964 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_LINK (LinkStorage);
2965 LinkStorage =
GetNextNode (&Form->ConfigRequestHead, LinkStorage);
2967 if (Storage != ConfigInfo->Storage) {
2971 if (
StrStr (ConfigInfo->ConfigRequest, Progress) !=
NULL) {
2980 if (*RetForm !=
NULL) {
2981 LinkStatement =
GetFirstNode (&Form->StatementListHead);
2982 while (!
IsNull (&Form->StatementListHead, LinkStatement)) {
2983 Statement = FORM_BROWSER_STATEMENT_FROM_LINK (LinkStatement);
2984 LinkStatement =
GetNextNode (&Form->StatementListHead, LinkStatement);
2986 if ((Statement->BlockName !=
NULL) && (
StrStr (Statement->BlockName, Progress) !=
NULL)) {
2987 *RetQuestion = Statement;
2991 if ((Statement->VariableName !=
NULL) && (
StrStr (Statement->VariableName, Progress) !=
NULL)) {
2992 *RetQuestion = Statement;
2998 if (*RetForm !=
NULL) {
3006 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
3012 return (BOOLEAN)(*RetForm !=
NULL);
3029 IN EFI_STRING ConfigRequest,
3030 IN EFI_STRING Progress,
3031 OUT EFI_STRING *RestoreConfigRequest,
3032 OUT EFI_STRING *SyncConfigRequest
3036 EFI_STRING ConfigHdrEndStr;
3037 EFI_STRING ElementStr;
3039 UINTN RestoreEleSize;
3042 ASSERT ((*Progress == L
'&') || (*Progress == L
'G'));
3047 if (*Progress == L
'G') {
3049 ASSERT (*RestoreConfigRequest !=
NULL);
3056 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
3061 EndStr =
StrStr (Progress, L
"=");
3062 ASSERT (EndStr !=
NULL);
3067 ConfigHdrEndStr =
StrStr (ConfigRequest, L
"PATH=");
3068 ASSERT (ConfigHdrEndStr !=
NULL);
3069 while (*ConfigHdrEndStr != L
'&') {
3077 EndStr =
StrStr (Progress, L
"&VALUE=");
3078 ASSERT (EndStr !=
NULL);
3083 ConfigHdrEndStr =
StrStr (ConfigRequest, L
"&OFFSET=");
3089 ElementStr =
StrStr (ConfigRequest, Progress);
3090 ASSERT (ElementStr !=
NULL);
3094 RestoreEleSize =
StrSize (ElementStr);
3095 TotalSize = (ConfigHdrEndStr - ConfigRequest) *
sizeof (CHAR16) + RestoreEleSize +
sizeof (CHAR16);
3097 ASSERT (*RestoreConfigRequest !=
NULL);
3098 StrnCpyS (*RestoreConfigRequest, TotalSize /
sizeof (CHAR16), ConfigRequest, ConfigHdrEndStr - ConfigRequest);
3099 StrCatS (*RestoreConfigRequest, TotalSize /
sizeof (CHAR16), ElementStr);
3103 SyncSize =
StrSize (ConfigRequest) - RestoreEleSize +
sizeof (CHAR16);
3105 ASSERT (*SyncConfigRequest !=
NULL);
3106 StrnCpyS (*SyncConfigRequest, SyncSize /
sizeof (CHAR16), ConfigRequest, SyncSize /
sizeof (CHAR16) - 1);
3111 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
3129 IN EFI_STRING_ID TitleId,
3134 CHAR16 *StringBuffer;
3137 FormTitle =
GetToken (TitleId, HiiHandle);
3140 ASSERT (StringBuffer !=
NULL);
3144 24 *
sizeof (CHAR16) +
StrSize (FormTitle),
3145 L
"Submit Fail For Form: %s.",
3168 IN EFI_STRING_ID TitleId,
3173 CHAR16 *StringBuffer;
3176 FormTitle =
GetToken (TitleId, HiiHandle);
3179 ASSERT (StringBuffer !=
NULL);
3183 24 *
sizeof (CHAR16) +
StrSize (FormTitle),
3184 L
"NO_SUBMIT_IF error For Form: %s.",
3211 IN BROWSER_SETTING_SCOPE SettingScope
3223 if (SettingScope >= MaxLevel) {
3224 return EFI_UNSUPPORTED;
3230 while (!
IsNull (&Form->ConfigRequestHead, Link)) {
3231 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_LINK (Link);
3232 Link =
GetNextNode (&Form->ConfigRequestHead, Link);
3234 if (ConfigInfo->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
3241 if (ConfigInfo->ElementCount == 0) {
3262 while (!
IsNull (&FormSet->StorageListHead, Link)) {
3263 Storage = FORMSET_STORAGE_FROM_LINK (Link);
3264 Link =
GetNextNode (&FormSet->StorageListHead, Link);
3266 if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
3273 if (Storage->ElementCount == 0) {
3281 while (!
IsNull (&FormSet->FormListHead, Link)) {
3282 Form = FORM_BROWSER_FORM_FROM_LINK (Link);
3283 Link =
GetNextNode (&FormSet->FormListHead, Link);
3292 }
else if (SettingScope == SystemLevel) {
3296 OldFormSet = mSystemLevelFormSet;
3302 while (!
IsNull (&gBrowserFormSetList, Link)) {
3303 LocalFormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
3309 mSystemLevelFormSet = LocalFormSet;
3322 mSystemLevelFormSet = OldFormSet;
3346 EFI_STRING ConfigResp;
3347 EFI_STRING Progress;
3350 BOOLEAN SubmitFormFail;
3352 SubmitFormFail =
FALSE;
3359 if (EFI_ERROR (Status)) {
3364 while (!
IsNull (&Form->ConfigRequestHead, Link)) {
3365 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_LINK (Link);
3366 Link =
GetNextNode (&Form->ConfigRequestHead, Link);
3368 Storage = ConfigInfo->Storage;
3369 if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
3376 if (ConfigInfo->ElementCount == 0) {
3384 if (EFI_ERROR (Status)) {
3391 Status = mHiiConfigRouting->RouteConfig (
3397 if (EFI_ERROR (Status)) {
3401 SubmitFormFail =
TRUE;
3402 GetSyncRestoreConfigRequest (ConfigInfo->Storage, ConfigInfo->ConfigRequest, Progress, &ConfigInfo->RestoreConfigRequest, &ConfigInfo->SyncConfigRequest);
3403 InsertTailList (&gBrowserSaveFailFormSetList, &ConfigInfo->SaveFailLink);
3418 if (!
IsListEmpty (&gBrowserSaveFailFormSetList)) {
3419 if (
ConfirmSaveFail (Form->FormTitle, FormSet->HiiHandle) == BROWSER_ACTION_DISCARD) {
3421 while (!
IsNull (&gBrowserSaveFailFormSetList, Link)) {
3422 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_SAVE_FAIL_LINK (Link);
3423 Link =
GetNextNode (&gBrowserSaveFailFormSetList, Link);
3429 FreePool (ConfigInfo->RestoreConfigRequest);
3430 ConfigInfo->RestoreConfigRequest =
NULL;
3431 if (ConfigInfo->SyncConfigRequest !=
NULL) {
3433 FreePool (ConfigInfo->SyncConfigRequest);
3434 ConfigInfo->SyncConfigRequest =
NULL;
3442 Status = EFI_UNSUPPORTED;
3448 while (!
IsListEmpty (&gBrowserSaveFailFormSetList)) {
3450 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_SAVE_FAIL_LINK (Link);
3463 if (!SubmitFormFail) {
3489 IN BOOLEAN SkipProcessFail
3494 EFI_STRING ConfigResp;
3495 EFI_STRING Progress;
3499 BOOLEAN HasInserted;
3501 BOOLEAN SubmitFormSetFail;
3502 BOOLEAN DiscardChange;
3504 HasInserted =
FALSE;
3505 SubmitFormSetFail =
FALSE;
3506 DiscardChange =
FALSE;
3514 if (EFI_ERROR (Status)) {
3515 if (SkipProcessFail) {
3519 FormSet->SaveFailForm = Form;
3520 FormSet->SaveFailStatement = Question;
3521 InsertHeadList (&gBrowserSaveFailFormSetList, &FormSet->SaveFailLink);
3533 while (!
IsNull (&FormSet->StorageListHead, Link)) {
3534 FormSetStorage = FORMSET_STORAGE_FROM_LINK (Link);
3535 Storage = FormSetStorage->BrowserStorage;
3536 Link =
GetNextNode (&FormSet->StorageListHead, Link);
3538 if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
3545 if (FormSetStorage->ElementCount == 0) {
3553 if (EFI_ERROR (Status)) {
3560 Status = mHiiConfigRouting->RouteConfig (
3565 if (EFI_ERROR (Status)) {
3569 SubmitFormSetFail =
TRUE;
3570 GetSyncRestoreConfigRequest (FormSetStorage->BrowserStorage, FormSetStorage->ConfigRequest, Progress, &FormSetStorage->RestoreConfigRequest, &FormSetStorage->SyncConfigRequest);
3571 InsertTailList (&FormSet->SaveFailStorageListHead, &FormSetStorage->SaveFailLink);
3578 ASSERT (Form !=
NULL && Question !=
NULL);
3579 FormSet->SaveFailForm = Form;
3580 FormSet->SaveFailStatement = Question;
3581 if (SkipProcessFail) {
3582 InsertTailList (&gBrowserSaveFailFormSetList, &FormSet->SaveFailLink);
3603 if (!SkipProcessFail) {
3607 if (
ConfirmSaveFail (Form->FormTitle, FormSet->HiiHandle) == BROWSER_ACTION_DISCARD) {
3608 DiscardChange =
TRUE;
3609 Link =
GetFirstNode (&FormSet->SaveFailStorageListHead);
3610 while (!
IsNull (&FormSet->SaveFailStorageListHead, Link)) {
3611 FormSetStorage = FORMSET_STORAGE_FROM_SAVE_FAIL_LINK (Link);
3612 Storage = FormSetStorage->BrowserStorage;
3613 Link =
GetNextNode (&FormSet->SaveFailStorageListHead, Link);
3619 FreePool (FormSetStorage->RestoreConfigRequest);
3620 FormSetStorage->RestoreConfigRequest =
NULL;
3621 if (FormSetStorage->SyncConfigRequest !=
NULL) {
3623 FreePool (FormSetStorage->SyncConfigRequest);
3624 FormSetStorage->SyncConfigRequest =
NULL;
3630 UiCopyMenuList (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, &Form->FormViewListHead);
3632 gCurrentSelection->Action = UI_ACTION_REFRESH_FORMSET;
3633 gCurrentSelection->Handle = FormSet->HiiHandle;
3634 CopyGuid (&gCurrentSelection->FormSetGuid, &FormSet->Guid);
3635 gCurrentSelection->FormId = Form->FormId;
3636 gCurrentSelection->QuestionId = Question->QuestionId;
3638 Status = EFI_UNSUPPORTED;
3644 while (!
IsListEmpty (&FormSet->SaveFailStorageListHead)) {
3645 Link =
GetFirstNode (&FormSet->SaveFailStorageListHead);
3646 FormSetStorage = FORMSET_STORAGE_FROM_SAVE_FAIL_LINK (Link);
3653 Status = EFI_UNSUPPORTED;
3660 if (DiscardChange) {
3662 while (!
IsNull (&FormSet->FormListHead, Link)) {
3663 Form = FORM_BROWSER_FORM_FROM_LINK (Link);
3664 Link =
GetNextNode (&FormSet->FormListHead, Link);
3680 if (!SubmitFormSetFail) {
3706 UINT32 UserSelection;
3709 mSystemSubmit =
TRUE;
3711 while (!
IsNull (&gBrowserFormSetList, Link)) {
3712 LocalFormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
3719 if (EFI_ERROR (Status)) {
3733 mSystemSubmit =
FALSE;
3741 while (!
IsNull (&gBrowserSaveFailFormSetList, Link)) {
3742 LocalFormSet = FORM_BROWSER_FORMSET_FROM_SAVE_FAIL_LINK (Link);
3743 Link =
GetNextNode (&gBrowserSaveFailFormSetList, Link);
3749 Form = LocalFormSet->SaveFailForm;
3750 Question = LocalFormSet->SaveFailStatement;
3755 if (
IsListEmpty (&LocalFormSet->SaveFailStorageListHead)) {
3761 UserSelection =
ConfirmSaveFail (Form->FormTitle, LocalFormSet->HiiHandle);
3764 if (UserSelection == BROWSER_ACTION_DISCARD) {
3765 if (
IsListEmpty (&LocalFormSet->SaveFailStorageListHead)) {
3766 StorageLink =
GetFirstNode (&LocalFormSet->StorageListHead);
3767 while (!
IsNull (&LocalFormSet->StorageListHead, StorageLink)) {
3768 FormSetStorage = FORMSET_STORAGE_FROM_LINK (StorageLink);
3769 StorageLink =
GetNextNode (&LocalFormSet->StorageListHead, StorageLink);
3774 StorageLink =
GetFirstNode (&LocalFormSet->SaveFailStorageListHead);
3775 while (!
IsNull (&LocalFormSet->SaveFailStorageListHead, StorageLink)) {
3776 FormSetStorage = FORMSET_STORAGE_FROM_SAVE_FAIL_LINK (StorageLink);
3777 StorageLink =
GetNextNode (&LocalFormSet->SaveFailStorageListHead, StorageLink);
3783 FreePool (FormSetStorage->RestoreConfigRequest);
3784 FormSetStorage->RestoreConfigRequest =
NULL;
3785 if ( FormSetStorage->SyncConfigRequest !=
NULL) {
3787 FreePool (FormSetStorage->SyncConfigRequest);
3788 FormSetStorage->SyncConfigRequest =
NULL;
3794 while (!
IsNull (&LocalFormSet->FormListHead, FormLink)) {
3795 Form = FORM_BROWSER_FORM_FROM_LINK (FormLink);
3796 FormLink =
GetNextNode (&LocalFormSet->FormListHead, FormLink);
3812 if (
IsListEmpty (&LocalFormSet->SaveFailStorageListHead)) {
3816 UiCopyMenuList (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, &Form->FormViewListHead);
3818 gCurrentSelection->Action = UI_ACTION_REFRESH_FORMSET;
3819 gCurrentSelection->Handle = LocalFormSet->HiiHandle;
3820 CopyGuid (&gCurrentSelection->FormSetGuid, &LocalFormSet->Guid);
3821 gCurrentSelection->FormId = Form->FormId;
3822 gCurrentSelection->QuestionId = Question->QuestionId;
3824 Status = EFI_UNSUPPORTED;
3832 while (!
IsListEmpty (&gBrowserSaveFailFormSetList)) {
3834 LocalFormSet = FORM_BROWSER_FORMSET_FROM_SAVE_FAIL_LINK (Link);
3837 while (!
IsListEmpty (&LocalFormSet->SaveFailStorageListHead)) {
3838 StorageLink =
GetFirstNode (&LocalFormSet->SaveFailStorageListHead);
3839 FormSetStorage = FORMSET_STORAGE_FROM_SAVE_FAIL_LINK (StorageLink);
3862 IN BROWSER_SETTING_SCOPE SettingScope
3867 switch (SettingScope) {
3881 Status = EFI_UNSUPPORTED;
3898 IN EFI_STRING ConfigString
3904 ASSERT (ConfigString !=
NULL);
3909 for (String = ConfigString, Lower =
FALSE; *String != L
'\0'; String++) {
3910 if (*String == L
'=') {
3912 }
else if (*String == L
'&') {
3914 }
else if (Lower && (*String >= L
'A') && (*String <= L
'F')) {
3915 *String = (CHAR16)(*String - L
'A' + L
'a');
3932 IN CHAR16 *ConfigResp
3935 CHAR16 *RequestElement;
3941 if (Question->Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
3942 RequestElement =
StrStr (ConfigResp, Question->VariableName);
3943 if (RequestElement !=
NULL) {
3947 RequestElement +=
StrLen (Question->VariableName) + 1;
3950 return RequestElement;
3965 RequestElement =
StrStr (ConfigResp, Question->BlockName);
3966 if (RequestElement !=
NULL) {
3970 RequestElement +=
StrLen (Question->BlockName) +
StrLen (L
"&VALUE=");
3971 return RequestElement;
3978 ASSERT (BlockData !=
NULL);
3980 RequestElement =
StrStr (ConfigResp, BlockData);
3983 if (RequestElement !=
NULL) {
3987 RequestElement +=
StrLen (Question->BlockName) +
StrLen (L
"&VALUE=");
3990 return RequestElement;
4017 Storage = Question->Storage;
4018 if ((Storage ==
NULL) || (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE)) {
4019 return EFI_NOT_FOUND;
4028 while (!
IsNull (&Form->ConfigRequestHead, Link)) {
4029 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_LINK (Link);
4030 Link =
GetNextNode (&Form->ConfigRequestHead, Link);
4032 if (Storage == ConfigInfo->Storage) {
4033 ConfigResp = ConfigInfo->ConfigAltResp;
4038 if (ConfigResp ==
NULL) {
4040 while (!
IsNull (&FormSet->StorageListHead, Link)) {
4041 FormSetStorage = FORMSET_STORAGE_FROM_LINK (Link);
4042 Link =
GetNextNode (&FormSet->StorageListHead, Link);
4044 if (Storage == FormSetStorage->BrowserStorage) {
4045 ConfigResp = FormSetStorage->ConfigAltResp;
4051 if (ConfigResp ==
NULL) {
4052 return EFI_NOT_FOUND;
4056 if (Value ==
NULL) {
4057 return EFI_NOT_FOUND;
4076 if (DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) {
4077 return EFI_BROWSER_ACTION_DEFAULT_STANDARD;
4078 }
else if (DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) {
4079 return EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING;
4080 }
else if (DefaultId == EFI_HII_DEFAULT_CLASS_SAFE) {
4081 return EFI_BROWSER_ACTION_DEFAULT_SAFE;
4082 }
else if ((DefaultId >= EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN) && (DefaultId < EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN + 0x1000)) {
4083 return EFI_BROWSER_ACTION_DEFAULT_PLATFORM + DefaultId - EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN;
4084 }
else if ((DefaultId >= EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN) && (DefaultId < EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN + 0x1000)) {
4085 return EFI_BROWSER_ACTION_DEFAULT_HARDWARE + DefaultId - EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN;
4086 }
else if ((DefaultId >= EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN) && (DefaultId < EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN + 0x1000)) {
4087 return EFI_BROWSER_ACTION_DEFAULT_FIRMWARE + DefaultId - EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN;
4112 ASSERT (Array !=
NULL);
4116 case EFI_IFR_TYPE_NUM_SIZE_8:
4117 Data = (UINT64)*(((UINT8 *)Array) + Index);
4120 case EFI_IFR_TYPE_NUM_SIZE_16:
4121 Data = (UINT64)*(((UINT16 *)Array) + Index);
4124 case EFI_IFR_TYPE_NUM_SIZE_32:
4125 Data = (UINT64)*(((UINT32 *)Array) + Index);
4128 case EFI_IFR_TYPE_NUM_SIZE_64:
4129 Data = (UINT64)*(((UINT64 *)Array) + Index);
4156 ASSERT (Array !=
NULL);
4159 case EFI_IFR_TYPE_NUM_SIZE_8:
4160 *(((UINT8 *)Array) + Index) = (UINT8)Value;
4163 case EFI_IFR_TYPE_NUM_SIZE_16:
4164 *(((UINT16 *)Array) + Index) = (UINT16)Value;
4167 case EFI_IFR_TYPE_NUM_SIZE_32:
4168 *(((UINT32 *)Array) + Index) = (UINT32)Value;
4171 case EFI_IFR_TYPE_NUM_SIZE_64:
4172 *(((UINT64 *)Array) + Index) = (UINT64)Value;
4201 while (!
IsNull (&Question->OptionListHead, Link)) {
4202 Option = QUESTION_OPTION_FROM_LINK (Link);
4208 if ((Option->SuppressExpression ==
NULL) ||
4215 Link =
GetNextNode (&Question->OptionListHead, Link);
4246 EFI_STRING StrValue;
4248 EFI_BROWSER_ACTION_REQUEST ActionRequest;
4252 UINT16 OriginalDefaultId;
4256 Status = EFI_NOT_FOUND;
4258 OriginalDefaultId = DefaultId;
4259 DefaultLink =
GetFirstNode (&FormSet->DefaultStoreListHead);
4264 if (Question->QuestionId == 0) {
4277 HiiValue = &Question->HiiValue;
4279 if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
4289 ConfigAccess = FormSet->ConfigAccess;
4291 if ((Action > 0) && ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) && (ConfigAccess !=
NULL)) {
4292 ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
4293 Status = ConfigAccess->Callback (
4296 Question->QuestionId,
4301 if (!EFI_ERROR (Status)) {
4302 if (HiiValue->Type == EFI_IFR_TYPE_STRING) {
4306 ASSERT (
StrLen (
NewString) *
sizeof (CHAR16) <= Question->StorageWidth);
4308 ZeroMem (Question->BufferValue, Question->StorageWidth);
4324 if (ConfigAccess !=
NULL) {
4326 if (!EFI_ERROR (Status)) {
4336 while (!
IsNull (&Question->DefaultListHead, Link)) {
4337 Default = QUESTION_DEFAULT_FROM_LINK (Link);
4339 if (Default->DefaultId == DefaultId) {
4340 if (Default->ValueExpression !=
NULL) {
4345 if (EFI_ERROR (Status)) {
4349 if (Default->ValueExpression->Result.Type == EFI_IFR_TYPE_BUFFER) {
4350 ASSERT (HiiValue->Type == EFI_IFR_TYPE_BUFFER && Question->BufferValue !=
NULL);
4351 if (Question->StorageWidth > Default->ValueExpression->Result.BufferLen) {
4352 CopyMem (Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Default->ValueExpression->Result.BufferLen);
4353 Question->HiiValue.BufferLen = Default->ValueExpression->Result.BufferLen;
4355 CopyMem (Question->HiiValue.Buffer, Default->ValueExpression->Result.Buffer, Question->StorageWidth);
4356 Question->HiiValue.BufferLen = Question->StorageWidth;
4359 FreePool (Default->ValueExpression->Result.Buffer);
4362 HiiValue->Type = Default->ValueExpression->Result.Type;
4368 if (Default->Value.Type == EFI_IFR_TYPE_BUFFER) {
4369 ASSERT (HiiValue->Buffer !=
NULL);
4370 CopyMem (HiiValue->Buffer, Default->Value.Buffer, Default->Value.BufferLen);
4376 if (HiiValue->Type == EFI_IFR_TYPE_STRING) {
4378 if (StrValue ==
NULL) {
4379 return EFI_NOT_FOUND;
4382 if (Question->StorageWidth >
StrSize (StrValue)) {
4383 ZeroMem (Question->BufferValue, Question->StorageWidth);
4386 CopyMem (Question->BufferValue, StrValue, Question->StorageWidth);
4393 Link =
GetNextNode (&Question->DefaultListHead, Link);
4400 if ((Question->Operand == EFI_IFR_ONE_OF_OP) && !
IsListEmpty (&Question->OptionListHead)) {
4401 if (DefaultId <= EFI_HII_DEFAULT_CLASS_MANUFACTURING) {
4406 while (!
IsNull (&Question->OptionListHead, Link)) {
4407 Option = QUESTION_OPTION_FROM_LINK (Link);
4408 Link =
GetNextNode (&Question->OptionListHead, Link);
4410 if ((Option->SuppressExpression !=
NULL) &&
4416 if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT) != 0)) ||
4417 ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Option->Flags & EFI_IFR_OPTION_DEFAULT_MFG) != 0))
4431 if (Question->Operand == EFI_IFR_CHECKBOX_OP) {
4432 if (DefaultId <= EFI_HII_DEFAULT_CLASS_MANUFACTURING) {
4436 if (((DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT) != 0)) ||
4437 ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) && ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) != 0))
4440 HiiValue->Value.b =
TRUE;
4452 while (!
IsNull (&FormSet->DefaultStoreListHead, DefaultLink)) {
4453 DefaultStore = FORMSET_DEFAULTSTORE_FROM_LINK (DefaultLink);
4454 DefaultLink =
GetNextNode (&FormSet->DefaultStoreListHead, DefaultLink);
4455 DefaultId = DefaultStore->DefaultId;
4456 if (DefaultId == OriginalDefaultId) {
4466 Status = EFI_NOT_FOUND;
4467 switch (Question->Operand) {
4468 case EFI_IFR_CHECKBOX_OP:
4469 HiiValue->Value.b =
FALSE;
4473 case EFI_IFR_NUMERIC_OP:
4477 if ((Question->Flags & EFI_IFR_DISPLAY) == 0) {
4481 switch (Question->Flags & EFI_IFR_NUMERIC_SIZE) {
4482 case EFI_IFR_NUMERIC_SIZE_1:
4483 if (((INT8)HiiValue->Value.u8 < (INT8)Question->Minimum) || ((INT8)HiiValue->Value.u8 > (INT8)Question->Maximum)) {
4484 HiiValue->Value.u8 = (UINT8)Question->Minimum;
4489 case EFI_IFR_NUMERIC_SIZE_2:
4490 if (((INT16)HiiValue->Value.u16 < (INT16)Question->Minimum) || ((INT16)HiiValue->Value.u16 > (INT16)Question->Maximum)) {
4491 HiiValue->Value.u16 = (UINT16)Question->Minimum;
4496 case EFI_IFR_NUMERIC_SIZE_4:
4497 if (((INT32)HiiValue->Value.u32 < (INT32)Question->Minimum) || ((INT32)HiiValue->Value.u32 > (INT32)Question->Maximum)) {
4498 HiiValue->Value.u32 = (UINT32)Question->Minimum;
4503 case EFI_IFR_NUMERIC_SIZE_8:
4504 if (((INT64)HiiValue->Value.u64 < (INT64)Question->Minimum) || ((INT64)HiiValue->Value.u64 > (INT64)Question->Maximum)) {
4505 HiiValue->Value.u64 = Question->Minimum;
4514 if ((HiiValue->Value.u64 < Question->Minimum) || (HiiValue->Value.u64 > Question->Maximum)) {
4515 HiiValue->Value.u64 = Question->Minimum;
4522 case EFI_IFR_ONE_OF_OP:
4528 while (!
IsNull (&Question->OptionListHead, Link)) {
4529 Option = QUESTION_OPTION_FROM_LINK (Link);
4530 Link =
GetNextNode (&Question->OptionListHead, Link);
4532 if ((Option->SuppressExpression !=
NULL) &&
4546 case EFI_IFR_ORDERED_LIST_OP:
4552 while (!
IsNull (&Question->OptionListHead, Link)) {
4554 Option = QUESTION_OPTION_FROM_LINK (Link);
4555 Link =
GetNextNode (&Question->OptionListHead, Link);
4557 if ((Option->SuppressExpression !=
NULL) &&
4563 SetArrayData (Question->BufferValue, Question->ValueType, Index, Option->Value.Value.u64);
4566 if (Index >= Question->MaxContainers) {
4593 IN UINT16 DefaultId,
4611 while (!
IsNull (&FormSet->StorageListHead, Link)) {
4612 FormSetStorage = FORMSET_STORAGE_FROM_LINK (Link);
4613 Storage = FormSetStorage->BrowserStorage;
4614 Link =
GetNextNode (&FormSet->StorageListHead, Link);
4615 if ((BrowserStorage !=
NULL) && (BrowserStorage != Storage)) {
4619 if ((Storage->Type != EFI_HII_VARSTORE_EFI_VARIABLE) &&
4620 (FormSetStorage->ElementCount != 0) &&
4621 FormSetStorage->HasCallAltCfg)
4631 while (!
IsNull (&Form->ConfigRequestHead, Link)) {
4632 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_LINK (Link);
4633 Link =
GetNextNode (&Form->ConfigRequestHead, Link);
4635 Storage = ConfigInfo->Storage;
4636 if ((BrowserStorage !=
NULL) && (BrowserStorage != Storage)) {
4640 if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
4647 if (ConfigInfo->ElementCount == 0) {
4654 Status = mHiiConfigRouting->ExtractConfig (
4656 ConfigInfo->ConfigRequest,
4660 if (EFI_ERROR (Status)) {
4668 Status = mHiiConfigRouting->GetAltConfig (
4678 if (EFI_ERROR (Status)) {
4682 ConfigInfo->ConfigAltResp = ConfigResp;
4701 while (!
IsNull (&Form->ConfigRequestHead, Link)) {
4702 ConfigInfo = FORM_BROWSER_CONFIG_REQUEST_FROM_LINK (Link);
4703 Link =
GetNextNode (&Form->ConfigRequestHead, Link);
4705 if (ConfigInfo->ConfigAltResp !=
NULL) {
4706 FreePool (ConfigInfo->ConfigAltResp);
4707 ConfigInfo->ConfigAltResp =
NULL;
4723 IN UINT16 DefaultId,
4736 while (!
IsNull (&FormSet->StorageListHead, Link)) {
4737 FormSetStorage = FORMSET_STORAGE_FROM_LINK (Link);
4738 Storage = FormSetStorage->BrowserStorage;
4739 Link =
GetNextNode (&FormSet->StorageListHead, Link);
4741 if ((BrowserStorage !=
NULL) && (BrowserStorage != Storage)) {
4745 if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
4752 if (FormSetStorage->ElementCount == 0) {
4756 FormSetStorage->HasCallAltCfg =
TRUE;
4761 Status = mHiiConfigRouting->ExtractConfig (
4763 FormSetStorage->ConfigRequest,
4767 if (EFI_ERROR (Status)) {
4775 Status = mHiiConfigRouting->GetAltConfig (
4786 if (EFI_ERROR (Status)) {
4790 FormSetStorage->ConfigAltResp = ConfigResp;
4809 while (!
IsNull (&FormSet->StorageListHead, Link)) {
4810 FormSetStorage = FORMSET_STORAGE_FROM_LINK (Link);
4811 Link =
GetNextNode (&FormSet->StorageListHead, Link);
4813 if (FormSetStorage->ConfigAltResp !=
NULL) {
4814 FreePool (FormSetStorage->ConfigAltResp);
4815 FormSetStorage->ConfigAltResp =
NULL;
4818 FormSetStorage->HasCallAltCfg =
FALSE;
4847 IN UINT16 DefaultId,
4848 IN BROWSER_SETTING_SCOPE SettingScope,
4849 IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope,
4851 IN BOOLEAN RetrieveValueFirst,
4852 IN BOOLEAN SkipGetAltCfg
4867 if ((SettingScope >= MaxLevel) || (GetDefaultValueScope >= GetDefaultForMax)) {
4868 return EFI_UNSUPPORTED;
4871 if ((GetDefaultValueScope == GetDefaultForStorage) && (Storage ==
NULL)) {
4872 return EFI_UNSUPPORTED;
4875 if (SettingScope == FormLevel) {
4879 if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
4887 while (!
IsNull (&Form->StatementListHead, Link)) {
4888 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
4889 Link =
GetNextNode (&Form->StatementListHead, Link);
4894 if ((GetDefaultValueScope == GetDefaultForStorage) && (Question->Storage != Storage)) {
4901 if ((GetDefaultValueScope == GetDefaultForNoStorage) && (Question->Storage !=
NULL)) {
4908 if (Question->Expression !=
NULL) {
4914 if (RetrieveValueFirst) {
4924 if (!RetrieveValueFirst || EFI_ERROR (Status)) {
4926 if (EFI_ERROR (Status)) {
4934 if ((Question->Storage !=
NULL) &&
4935 (Question->Storage->Type != EFI_HII_VARSTORE_EFI_VARIABLE))
4944 if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
4947 }
else if (SettingScope == FormSetLevel) {
4951 if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
4956 while (!
IsNull (&FormSet->FormListHead, FormLink)) {
4957 Form = FORM_BROWSER_FORM_FROM_LINK (FormLink);
4958 ExtractDefault (FormSet, Form, DefaultId, FormLevel, GetDefaultValueScope, Storage, RetrieveValueFirst, SkipGetAltCfg);
4959 FormLink =
GetNextNode (&FormSet->FormListHead, FormLink);
4965 if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
4968 }
else if (SettingScope == SystemLevel) {
4974 OldFormSet = mSystemLevelFormSet;
4980 while (!
IsNull (&gBrowserFormSetList, Link)) {
4981 LocalFormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
4987 mSystemLevelFormSet = LocalFormSet;
4989 ExtractDefault (LocalFormSet,
NULL, DefaultId, FormSetLevel, GetDefaultValueScope, Storage, RetrieveValueFirst, SkipGetAltCfg);
4992 mSystemLevelFormSet = OldFormSet;
5019 CHAR8 *BackUpBuffer;
5021 CHAR8 *BackUpBuffer2;
5023 BOOLEAN ValueChanged;
5029 if ((Question->Storage ==
NULL) && (Question->Operand != EFI_IFR_TIME_OP) && (Question->Operand != EFI_IFR_DATE_OP)) {
5033 BackUpBuffer =
NULL;
5034 BackUpBuffer2 =
NULL;
5035 ValueChanged =
FALSE;
5037 switch (Question->Operand) {
5038 case EFI_IFR_ORDERED_LIST_OP:
5039 BufferWidth = Question->StorageWidth;
5041 ASSERT (BackUpBuffer !=
NULL);
5044 case EFI_IFR_STRING_OP:
5045 case EFI_IFR_PASSWORD_OP:
5046 BufferWidth = (
UINTN)Question->Maximum * sizeof (CHAR16);
5048 ASSERT (BackUpBuffer !=
NULL);
5058 if (GetValueFrom == GetSetValueWithBothBuffer) {
5059 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithEditBuffer);
5062 switch (Question->Operand) {
5063 case EFI_IFR_ORDERED_LIST_OP:
5064 BufferWidth = Question->StorageWidth;
5066 ASSERT (BackUpBuffer2 !=
NULL);
5069 case EFI_IFR_STRING_OP:
5070 case EFI_IFR_PASSWORD_OP:
5071 BufferWidth = (
UINTN)Question->Maximum * sizeof (CHAR16);
5073 ASSERT (BackUpBuffer2 !=
NULL);
5083 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithBuffer);
5087 (
CompareMem (BackUpBuffer2, Question->BufferValue, BufferWidth) != 0))
5089 ValueChanged =
TRUE;
5096 (
CompareMem (BackUpBuffer, Question->BufferValue, BufferWidth) != 0))
5098 ValueChanged =
TRUE;
5103 if (BackUpBuffer !=
NULL) {
5104 CopyMem (Question->BufferValue, BackUpBuffer, BufferWidth);
5108 if (BackUpBuffer2 !=
NULL) {
5112 Question->ValueChanged = ValueChanged;
5114 return ValueChanged;
5142 while (!
IsNull (&Form->StatementListHead, Link)) {
5143 Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
5148 if ((Question->Operand == EFI_IFR_PASSWORD_OP) && ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == 0)) {
5149 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithHiiDriver);
5151 Status =
GetQuestionValue (FormSet, Form, Question, GetSetValueWithEditBuffer);
5154 if (EFI_ERROR (Status)) {
5158 if ((Question->Operand == EFI_IFR_STRING_OP) || (Question->Operand == EFI_IFR_PASSWORD_OP)) {
5159 HiiSetString (FormSet->HiiHandle, Question->HiiValue.Value.
string, (CHAR16 *)Question->BufferValue,
NULL);
5162 Link =
GetNextNode (&Form->StatementListHead, Link);
5191 while (!
IsNull (&FormSet->FormListHead, Link)) {
5192 Form = FORM_BROWSER_FORM_FROM_LINK (Link);
5198 if (EFI_ERROR (Status)) {
5202 Link =
GetNextNode (&FormSet->FormListHead, Link);
5208 FormSet->QuestionInited =
TRUE;
5223 IN CHAR16 *RequestElement
5229 ASSERT (Storage->ConfigRequest !=
NULL && RequestElement !=
NULL);
5231 NewStr =
StrStr (Storage->ConfigRequest, RequestElement);
5233 if (NewStr ==
NULL) {
5241 NewStr +=
StrLen (RequestElement);
5244 Storage->SpareStrLen +=
StrLen (RequestElement);
5257 CHAR16 *ConfigRequest
5260 CHAR16 *RequestElement;
5261 CHAR16 *NextRequestElement;
5267 if (ConfigRequest ==
NULL) {
5271 if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
5280 SearchKey = L
"&OFFSET";
5286 if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
5287 RequestElement =
StrStr (ConfigRequest, L
"PATH");
5288 ASSERT (RequestElement !=
NULL);
5289 RequestElement =
StrStr (RequestElement, SearchKey);
5291 RequestElement =
StrStr (ConfigRequest, SearchKey);
5294 while (RequestElement !=
NULL) {
5298 NextRequestElement =
StrStr (RequestElement + 1, SearchKey);
5303 if (NextRequestElement !=
NULL) {
5307 *NextRequestElement = L
'\0';
5312 if (NextRequestElement !=
NULL) {
5316 *NextRequestElement = L
'&';
5319 RequestElement = NextRequestElement;
5325 if (
StrCmp (Storage->BrowserStorage->ConfigRequest, Storage->ConfigHdr) == 0) {
5326 FreePool (Storage->BrowserStorage->ConfigRequest);
5327 Storage->BrowserStorage->ConfigRequest =
NULL;
5328 Storage->BrowserStorage->SpareStrLen = 0;
5347 while (!
IsNull (&FormSet->StorageListHead, Link)) {
5348 Storage = FORMSET_STORAGE_FROM_LINK (Link);
5349 Link =
GetNextNode (&FormSet->StorageListHead, Link);
5351 if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
5352 if ((Storage->ConfigRequest ==
NULL) || (Storage->BrowserStorage->ConfigRequest ==
NULL)) {
5357 }
else if ((Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER) ||
5358 (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE))
5360 if (Storage->BrowserStorage->ConfigRequest !=
NULL) {
5361 FreePool (Storage->BrowserStorage->ConfigRequest);
5362 Storage->BrowserStorage->ConfigRequest =
NULL;
5365 Storage->BrowserStorage->Initialized =
FALSE;
5383 CHAR16 *RequestElement
5399 IN OUT CHAR16 **ConfigRequest,
5401 IN CHAR16 *RequestElement
5409 StrLength =
StrLen (RequestElement);
5410 StringSize = (*ConfigRequest !=
NULL) ?
StrSize (*ConfigRequest) :
sizeof (CHAR16);
5411 MaxLen = StringSize /
sizeof (CHAR16) + *SpareStrLen;
5416 if (StrLength > *SpareStrLen) {
5420 MaxLen = StringSize /
sizeof (CHAR16) + CONFIG_REQUEST_STRING_INCREMENTAL;
5422 ASSERT (NewStr !=
NULL);
5424 if (*ConfigRequest !=
NULL) {
5425 CopyMem (NewStr, *ConfigRequest, StringSize);
5429 *ConfigRequest = NewStr;
5430 *SpareStrLen = CONFIG_REQUEST_STRING_INCREMENTAL;
5433 StrCatS (*ConfigRequest, MaxLen, RequestElement);
5434 *SpareStrLen -= StrLength;
5452 IN BOOLEAN RespString
5455 CHAR16 *RequestElement;
5456 CHAR16 *NextRequestElement;
5457 CHAR16 *NextElementBakup;
5461 CHAR16 *ConfigRequest;
5464 NextElementBakup =
NULL;
5467 if (Request !=
NULL) {
5468 ConfigRequest = Request;
5470 ConfigRequest = Storage->ConfigRequest;
5473 if (Storage->ConfigRequest ==
NULL) {
5478 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
5487 SearchKey = L
"&OFFSET";
5488 ValueKey = L
"&VALUE";
5494 if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
5495 RequestElement =
StrStr (ConfigRequest, L
"PATH");
5496 ASSERT (RequestElement !=
NULL);
5497 RequestElement =
StrStr (RequestElement, SearchKey);
5499 RequestElement =
StrStr (ConfigRequest, SearchKey);
5502 while (RequestElement !=
NULL) {
5506 NextRequestElement =
StrStr (RequestElement + 1, SearchKey);
5511 if (NextRequestElement !=
NULL) {
5512 if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
5513 NextElementBakup = NextRequestElement;
5514 NextRequestElement =
StrStr (RequestElement, ValueKey);
5515 ASSERT (NextRequestElement !=
NULL);
5521 *NextRequestElement = L
'\0';
5523 if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
5524 NextElementBakup = NextRequestElement;
5525 NextRequestElement =
StrStr (RequestElement, ValueKey);
5526 ASSERT (NextRequestElement !=
NULL);
5530 *NextRequestElement = L
'\0';
5542 if (NextRequestElement !=
NULL) {
5546 *NextRequestElement = L
'&';
5549 if (RespString && (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
5550 RequestElement = NextElementBakup;
5552 RequestElement = NextRequestElement;
5573 EFI_STRING Progress;
5576 EFI_STRING ConfigRequest;
5579 ConfigRequest =
NULL;
5581 switch (Storage->BrowserStorage->Type) {
5582 case EFI_HII_VARSTORE_EFI_VARIABLE:
5585 case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:
5586 if (Storage->BrowserStorage->ConfigRequest !=
NULL) {
5593 case EFI_HII_VARSTORE_BUFFER:
5594 case EFI_HII_VARSTORE_NAME_VALUE:
5598 if (Storage->ElementCount == 0) {
5605 if (Storage->BrowserStorage->Initialized) {
5610 Storage->BrowserStorage->Initialized =
TRUE;
5617 if (Storage->BrowserStorage->Type != EFI_HII_VARSTORE_NAME_VALUE) {
5623 StrLen =
StrSize (Storage->ConfigHdr) + 20 *
sizeof (CHAR16);
5625 ASSERT (ConfigRequest !=
NULL);
5629 L
"%s&OFFSET=0&WIDTH=%04x",
5631 Storage->BrowserStorage->Size
5634 ConfigRequest = Storage->ConfigRequest;
5637 if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
5641 Status =
gRT->GetVariable (Storage->BrowserStorage->Name, &(Storage->BrowserStorage->Guid),
NULL, (
UINTN *)(&(Storage->BrowserStorage->Size)), Storage->BrowserStorage->EditBuffer);
5642 if (EFI_ERROR (Status)) {
5643 ExtractDefault (FormSet,
NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForStorage, Storage->BrowserStorage,
TRUE,
TRUE);
5649 Status = mHiiConfigRouting->ExtractConfig (
5659 if (EFI_ERROR (Status)) {
5660 ExtractDefault (FormSet,
NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForStorage, Storage->BrowserStorage,
TRUE,
TRUE);
5665 StrPtr =
StrStr (Result, L
"&GUID=");
5666 if (StrPtr !=
NULL) {
5675 Storage->BrowserStorage->ConfigRequest =
AllocateCopyPool (
StrSize (Storage->ConfigRequest), Storage->ConfigRequest);
5682 if (Storage->BrowserStorage->Type != EFI_HII_VARSTORE_NAME_VALUE) {
5683 if (ConfigRequest !=
NULL) {
5711 while (!
IsNull (&NewFormSet->FormListHead, Link)) {
5712 Form = FORM_BROWSER_FORM_FROM_LINK (Link);
5713 Link =
GetNextNode (&NewFormSet->FormListHead, Link);
5718 QuestionLink =
GetFirstNode (&Form->StatementListHead);
5719 while (!
IsNull (&Form->StatementListHead, QuestionLink)) {
5720 Question = FORM_BROWSER_STATEMENT_FROM_LINK (QuestionLink);
5721 QuestionLink =
GetNextNode (&Form->StatementListHead, QuestionLink);
5723 if (Question->QuestionId == OldQuestion->QuestionId) {
5724 Question->ValueChanged =
TRUE;
5753 while (!
IsNull (&OldFormSet->FormListHead, Link)) {
5754 Form = FORM_BROWSER_FORM_FROM_LINK (Link);
5755 Link =
GetNextNode (&OldFormSet->FormListHead, Link);
5760 QuestionLink =
GetFirstNode (&Form->StatementListHead);
5761 while (!
IsNull (&Form->StatementListHead, QuestionLink)) {
5762 Question = FORM_BROWSER_STATEMENT_FROM_LINK (QuestionLink);
5763 QuestionLink =
GetNextNode (&Form->StatementListHead, QuestionLink);
5765 if (!Question->ValueChanged) {
5797 if (OldFormSet !=
NULL) {
5814 while (!
IsNull (&FormSet->StorageListHead, Link)) {
5815 Storage = FORMSET_STORAGE_FROM_LINK (Link);
5819 Link =
GetNextNode (&FormSet->StorageListHead, Link);
5847 OUT UINT8 **BinaryData
5857 UINT32 PackageListLength;
5860 UINT8 NumberOfClassGuid;
5861 BOOLEAN ClassGuidMatch;
5872 if (FormSetGuid ==
NULL) {
5873 ComparingGuid = &gZeroGuid;
5875 ComparingGuid = FormSetGuid;
5882 HiiPackageList =
NULL;
5883 Status = mHiiDatabase->ExportPackageLists (mHiiDatabase, Handle, &BufferSize, HiiPackageList);
5884 if (Status == EFI_BUFFER_TOO_SMALL) {
5886 ASSERT (HiiPackageList !=
NULL);
5888 Status = mHiiDatabase->ExportPackageLists (mHiiDatabase, Handle, &BufferSize, HiiPackageList);
5891 if (EFI_ERROR (Status)) {
5895 ASSERT (HiiPackageList !=
NULL);
5902 CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
5904 ClassGuidMatch =
FALSE;
5905 while (Offset < PackageListLength) {
5906 Package = ((UINT8 *)HiiPackageList) + Offset;
5909 if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
5914 while (Offset2 < PackageHeader.Length) {
5915 OpCodeData = Package + Offset2;
5931 NumberOfClassGuid = (UINT8)(((
EFI_IFR_FORM_SET *)OpCodeData)->Flags & 0x3);
5933 for (Index = 0; Index < NumberOfClassGuid; Index++) {
5934 if (
CompareGuid (ComparingGuid, ClassGuid + Index)) {
5935 ClassGuidMatch =
TRUE;
5940 if (ClassGuidMatch) {
5943 }
else if (ComparingGuid == &gEfiHiiPlatformSetupFormsetGuid) {
5944 ClassGuidMatch =
TRUE;
5952 if (Offset2 < PackageHeader.Length) {
5960 Offset += PackageHeader.Length;
5963 if (Offset >= PackageListLength) {
5968 return EFI_NOT_FOUND;
5971 if (FormSetGuid !=
NULL) {
5983 *BinaryLength = PackageHeader.Length - Offset2;
5988 if (*BinaryData ==
NULL) {
5989 return EFI_OUT_OF_RESOURCES;
6020 Status =
GetIfrBinaryData (Handle, FormSetGuid, &FormSet->IfrBinaryLength, &FormSet->IfrBinaryData);
6021 if (EFI_ERROR (Status)) {
6025 FormSet->Signature = FORM_BROWSER_FORMSET_SIGNATURE;
6026 FormSet->HiiHandle = Handle;
6028 FormSet->QuestionInited =
FALSE;
6033 Status = mHiiDatabase->GetPackageListHandle (mHiiDatabase, Handle, &DriverHandle);
6034 if (EFI_ERROR (Status)) {
6038 FormSet->DriverHandle = DriverHandle;
6039 Status =
gBS->HandleProtocol (
6041 &gEfiHiiConfigAccessProtocolGuid,
6042 (VOID **)&FormSet->ConfigAccess
6044 if (EFI_ERROR (Status)) {
6049 FormSet->ConfigAccess =
NULL;
6075 gBrowserContextCount++;
6076 if (gBrowserContextCount == 1) {
6084 ASSERT (Context !=
NULL);
6086 Context->Signature = BROWSER_CONTEXT_SIGNATURE;
6091 Context->Selection = gCurrentSelection;
6092 Context->ResetRequired = gResetRequiredFormLevel;
6093 Context->FlagReconnect = gFlagReconnect;
6094 Context->CallbackReconnect = gCallbackReconnect;
6095 Context->ExitRequired = gExitRequired;
6096 Context->HiiHandle = mCurrentHiiHandle;
6097 Context->FormId = mCurrentFormId;
6098 CopyGuid (&Context->FormSetGuid, &mCurrentFormSetGuid);
6099 Context->SystemLevelFormSet = mSystemLevelFormSet;
6100 Context->CurFakeQestId = mCurFakeQestId;
6101 Context->HiiPackageListUpdated = mHiiPackageListUpdated;
6102 Context->FinishRetrieveCall = mFinishRetrieveCall;
6108 while (!
IsListEmpty (&mPrivateData.FormBrowserEx2.FormViewHistoryHead)) {
6109 MenuList = FORM_ENTRY_INFO_FROM_LINK (mPrivateData.FormBrowserEx2.FormViewHistoryHead.ForwardLink);
6120 FormSet = FORM_BROWSER_FORMSET_FROM_LINK (gBrowserFormSetList.ForwardLink);
6146 ASSERT (gBrowserContextCount != 0);
6147 gBrowserContextCount--;
6148 if (gBrowserContextCount == 0) {
6158 Context = BROWSER_CONTEXT_FROM_LINK (Link);
6163 gCurrentSelection = Context->Selection;
6164 gResetRequiredFormLevel = Context->ResetRequired;
6165 gFlagReconnect = Context->FlagReconnect;
6166 gCallbackReconnect = Context->CallbackReconnect;
6167 gExitRequired = Context->ExitRequired;
6168 mCurrentHiiHandle = Context->HiiHandle;
6169 mCurrentFormId = Context->FormId;
6170 CopyGuid (&mCurrentFormSetGuid, &Context->FormSetGuid);
6171 mSystemLevelFormSet = Context->SystemLevelFormSet;
6172 mCurFakeQestId = Context->CurFakeQestId;
6173 mHiiPackageListUpdated = Context->HiiPackageListUpdated;
6174 mFinishRetrieveCall = Context->FinishRetrieveCall;
6179 while (!
IsListEmpty (&Context->FormHistoryList)) {
6180 MenuList = FORM_ENTRY_INFO_FROM_LINK (Context->FormHistoryList.ForwardLink);
6183 InsertTailList (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, &MenuList->Link);
6190 FormSet = FORM_BROWSER_FORMSET_FROM_LINK (Context->FormSetList.ForwardLink);
6200 gBS->FreePool (Context);
6220 while (!
IsNull (&gBrowserFormSetList, Link)) {
6221 FormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
6227 if (FormSet->HiiHandle == Handle) {
6255 if (mCurrentHiiHandle == Handle) {
6263 while (!
IsNull (&gBrowserContextList, Link)) {
6264 Context = BROWSER_CONTEXT_FROM_LINK (Link);
6265 if (Context->HiiHandle == Handle) {
6295 IN EFI_STRING PasswordString OPTIONAL
6300 EFI_BROWSER_ACTION_REQUEST ActionRequest;
6304 ConfigAccess = gCurrentSelection->FormSet->ConfigAccess;
6306 ASSERT (Question !=
NULL);
6308 if ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) {
6309 if (ConfigAccess ==
NULL) {
6310 return EFI_UNSUPPORTED;
6316 return EFI_UNSUPPORTED;
6322 if (PasswordString !=
NULL) {
6323 IfrTypeValue.
string =
NewString (PasswordString, gCurrentSelection->FormSet->HiiHandle);
6331 Status = ConfigAccess->Callback (
6333 EFI_BROWSER_ACTION_CHANGING,
6334 Question->QuestionId,
6335 Question->HiiValue.Type,
6343 if (PasswordString !=
NULL) {
6367 while (!
IsNull (&gBrowserHotKeyList, Link)) {
6368 HotKey = BROWSER_HOT_KEY_FROM_LINK (Link);
6369 if (HotKey->KeyData->ScanCode == KeyData->ScanCode) {
6395 IN BROWSER_SETTING_SCOPE Scope
6398 if (Scope >= MaxLevel) {
6399 return EFI_INVALID_PARAMETER;
6406 if (mBrowserScopeFirstSet ||
IsListEmpty (&gBrowserHotKeyList)) {
6407 gBrowserSettingScope = Scope;
6408 mBrowserScopeFirstSet =
FALSE;
6409 }
else if (Scope != gBrowserSettingScope) {
6410 return EFI_UNSUPPORTED;
6441 IN UINT16 DefaultId,
6442 IN EFI_STRING HelpString OPTIONAL
6450 if ((KeyData ==
NULL) || (KeyData->UnicodeChar != CHAR_NULL) ||
6451 ((Action != BROWSER_ACTION_UNREGISTER) && (HelpString ==
NULL)))
6453 return EFI_INVALID_PARAMETER;
6464 if (Action == BROWSER_ACTION_UNREGISTER) {
6465 if (HotKey !=
NULL) {
6478 return EFI_NOT_FOUND;
6482 if (HotKey !=
NULL) {
6483 return EFI_ALREADY_STARTED;
6490 ASSERT (HotKey !=
NULL);
6491 HotKey->Signature = BROWSER_HOT_KEY_SIGNATURE;
6498 HotKey->Action = Action;
6499 HotKey->DefaultId = DefaultId;
6500 if (HotKey->HelpString !=
NULL) {
6523 ExitHandlerFunction = Handler;
6543 switch (gBrowserSettingScope) {
6545 if (gCurrentSelection ==
NULL) {
6552 if (gCurrentSelection ==
NULL) {
6560 while (!
IsNull (&gBrowserFormSetList, Link)) {
6561 FormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
6601 if ((gBrowserSettingScope < SystemLevel) && (gCurrentSelection ==
NULL)) {
6602 return EFI_NOT_READY;
6608 if (gBrowserSettingScope < SystemLevel) {
6609 FormSet = gCurrentSelection->FormSet;
6610 Form = gCurrentSelection->Form;
6616 if ((Action & BROWSER_ACTION_DISCARD) != 0) {
6617 Status =
DiscardForm (FormSet, Form, gBrowserSettingScope);
6618 if (EFI_ERROR (Status)) {
6626 if ((Action & BROWSER_ACTION_DEFAULT) != 0) {
6628 if (EFI_ERROR (Status)) {
6638 if ((Action & BROWSER_ACTION_SUBMIT) != 0) {
6639 Status =
SubmitForm (FormSet, Form, gBrowserSettingScope);
6640 if (EFI_ERROR (Status)) {
6648 if ((Action & BROWSER_ACTION_RESET) != 0) {
6649 gResetRequiredFormLevel =
TRUE;
6650 gResetRequiredSystemLevel =
TRUE;
6656 if ((Action & BROWSER_ACTION_EXIT) != 0) {
6657 DiscardForm (FormSet, Form, gBrowserSettingScope);
6658 if (gBrowserSettingScope == SystemLevel) {
6659 if (ExitHandlerFunction !=
NULL) {
6660 ExitHandlerFunction ();
6664 gExitRequired =
TRUE;
6688 BOOLEAN IsDataChanged;
6689 UINT32 DataSavedAction;
6692 DataSavedAction = BROWSER_NO_CHANGES;
6693 IsDataChanged =
FALSE;
6695 while (!
IsNull (&gBrowserFormSetList, Link)) {
6696 FormSet = FORM_BROWSER_FORMSET_FROM_LINK (Link);
6703 IsDataChanged =
TRUE;
6711 if (!IsDataChanged) {
6712 return DataSavedAction;
6719 ConfirmRet = (UINT32)mFormDisplay->ConfirmDataChange ();
6721 if (ConfirmRet == BROWSER_ACTION_SUBMIT) {
6723 DataSavedAction = BROWSER_SAVE_CHANGES;
6725 }
else if (ConfirmRet == BROWSER_ACTION_DISCARD) {
6727 DataSavedAction = BROWSER_DISCARD_CHANGES;
6729 }
else if (ConfirmRet == BROWSER_ACTION_NONE) {
6730 DataSavedAction = BROWSER_KEEP_CURRENT;
6735 return DataSavedAction;
6751 return gResetRequiredSystemLevel;
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)
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
LIST_ENTRY *EFIAPI InsertHeadList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
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)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
#define INITIALIZE_LIST_HEAD_VARIABLE(ListHead)
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)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
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)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
BOOLEAN EFIAPI IsZeroGuid(IN CONST GUID *Guid)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS EvaluateExpression(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_EXPRESSION *Expression)
EXPRESS_RESULT EvaluateExpressionList(IN FORM_EXPRESSION_LIST *ExpList, IN BOOLEAN Evaluate, IN FORM_BROWSER_FORMSET *FormSet OPTIONAL, IN FORM_BROWSER_FORM *Form OPTIONAL)
BOOLEAN IsTrue(IN EFI_HII_VALUE *Result)
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)
FORMSET_STORAGE * GetFstStgFromBrsStg(IN BROWSER_STORAGE *Storage)
EFI_STATUS ParseOpCodes(IN FORM_BROWSER_FORMSET *FormSet)
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)
FORM_BROWSER_STATEMENT * GetBrowserStatement(IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement)
BOOLEAN FindNextMenu(IN OUT UI_MENU_SELECTION *Selection, IN BROWSER_SETTING_SCOPE SettingLevel)
VOID InitializeDisplayFormData(VOID)
BOOLEAN IsNvUpdateRequiredForForm(IN FORM_BROWSER_FORM *Form)
VOID UpdateStatementStatus(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope)
EFI_STATUS ProcessRetrieveForQuestion(IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess, IN FORM_BROWSER_STATEMENT *Statement, IN FORM_BROWSER_FORMSET *FormSet)
BOOLEAN ReconnectController(IN EFI_HANDLE DriverHandle)
EFI_STATUS SetupBrowser(IN OUT UI_MENU_SELECTION *Selection)
BOOLEAN IsNvUpdateRequiredForFormSet(IN FORM_BROWSER_FORMSET *FormSet)
EFI_STATUS SubmitForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope)
EFI_STATUS SubmitForFormSet(IN FORM_BROWSER_FORMSET *FormSet, IN BOOLEAN SkipProcessFail)
EFI_FORM_ID GetFirstFormId(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid)
EFI_STATUS DiscardForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope)
VOID SaveBrowserContext(VOID)
VOID AppendConfigRequest(IN OUT CHAR16 **ConfigRequest, IN OUT UINTN *SpareStrLen, IN CHAR16 *RequestElement)
VOID SendDiscardInfoToDriver(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
BOOLEAN ConfigRequestAdjust(IN BROWSER_STORAGE *Storage, IN CHAR16 *Request, IN BOOLEAN RespString)
FORM_ENTRY_INFO * UiFindMenuList(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, IN UINT16 FormId)
EFI_STATUS EFIAPI InitializeSetup(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID NewStringCpy(IN OUT CHAR16 **Dest, IN CHAR16 *Src)
EFI_STATUS SetValueByName(IN BROWSER_STORAGE *Storage, IN CHAR16 *Name, IN CHAR16 *Value, IN GET_SET_QUESTION_VALUE_WITH SetValueTo, OUT NAME_VALUE_NODE **ReturnNode)
VOID SubmitCallbackForForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
UINT32 ConfirmNoSubmitFail(IN EFI_STRING_ID TitleId, IN EFI_HII_HANDLE HiiHandle)
UINT32 ConfirmSaveFail(IN EFI_STRING_ID TitleId, IN EFI_HII_HANDLE HiiHandle)
VOID InitializeCurrentSetting(IN OUT FORM_BROWSER_FORMSET *FormSet)
FORM_ENTRY_INFO * UiFindParentMenu(IN FORM_ENTRY_INFO *CurrentMenu, IN BROWSER_SETTING_SCOPE SettingLevel)
BOOLEAN IsHiiHandleInBrowserContext(EFI_HII_HANDLE Handle)
EFI_STATUS LoadFormSetConfig(IN OUT UI_MENU_SELECTION *Selection, IN FORM_BROWSER_FORMSET *FormSet)
EFI_STATUS EFIAPI SetScope(IN BROWSER_SETTING_SCOPE Scope)
EFI_STATUS ValueChangedValidation(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question)
BOOLEAN FindQuestionFromProgress(IN FORM_BROWSER_FORMSET *FormSet, IN BROWSER_STORAGE *Storage, IN EFI_STRING Progress, OUT FORM_BROWSER_FORM **RetForm, OUT FORM_BROWSER_STATEMENT **RetQuestion)
INTN GetDefaultIdForCallBack(UINTN DefaultId)
EFI_STATUS InitializeFormSet(IN EFI_HII_HANDLE Handle, IN OUT EFI_GUID *FormSetGuid, OUT FORM_BROWSER_FORMSET *FormSet)
EFI_STATUS EFIAPI BrowserCallback(IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, IN OUT UINTN *ResultsDataSize, IN OUT EFI_STRING ResultsData, IN BOOLEAN RetrieveData, IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL)
BOOLEAN ElementValidation(BROWSER_STORAGE *BrowserStorage, CHAR16 *RequestElement)
UINT32 EFIAPI SaveReminder(VOID)
VOID UiFreeMenuList(LIST_ENTRY *MenuListHead)
VOID LoadStorage(IN FORM_BROWSER_FORMSET *FormSet, IN FORMSET_STORAGE *Storage)
VOID GetBitsQuestionValue(IN FORM_BROWSER_STATEMENT *Question, IN UINT8 *Buffer)
VOID ExtractAltCfgForForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN UINT16 DefaultId, IN BROWSER_STORAGE *BrowserStorage)
EFI_STATUS ConfigRespToStorage(IN BROWSER_STORAGE *Storage, IN CHAR16 *ConfigResp)
BOOLEAN ValidateFormSet(FORM_BROWSER_FORMSET *FormSet)
VOID RemoveConfigRequest(FORMSET_STORAGE *Storage, CHAR16 *ConfigRequest)
VOID CleanAltCfgForFormSet(IN FORM_BROWSER_FORMSET *FormSet)
VOID EFIAPI FormDisplayCallback(IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS DeleteString(IN EFI_STRING_ID StringId, IN EFI_HII_HANDLE HiiHandle)
CHAR16 * GetOffsetFromConfigResp(IN FORM_BROWSER_STATEMENT *Question, IN CHAR16 *ConfigResp)
VOID LoadAllHiiFormset(VOID)
EFI_STATUS GetQuestionDefault(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question, IN UINT16 DefaultId)
BOOLEAN EFIAPI IsResetRequired(VOID)
CHAR16 * GetToken(IN EFI_STRING_ID Token, IN EFI_HII_HANDLE HiiHandle)
EFI_STATUS ValidateQuestion(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN FORM_BROWSER_STATEMENT *Question, IN UINTN Type)
EFI_STATUS LoadFormConfig(IN OUT UI_MENU_SELECTION *Selection, IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
BOOLEAN ValidateHiiHandle(EFI_HII_HANDLE HiiHandle)
VOID SubmitCallback(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
EFI_STATUS GetDefaultValueFromAltCfg(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question)
EFI_STATUS NoSubmitCheck(IN FORM_BROWSER_FORMSET *FormSet, IN OUT FORM_BROWSER_FORM **CurrentForm, OUT FORM_BROWSER_STATEMENT **Statement)
EFI_STATUS EFIAPI ExecuteAction(IN UINT32 Action, IN UINT16 DefaultId)
BROWSER_HOT_KEY * GetHotKeyFromRegisterList(IN EFI_INPUT_KEY *KeyData)
VOID SyncStatusForQuestion(IN OUT FORM_BROWSER_FORMSET *NewFormSet, IN FORM_BROWSER_STATEMENT *OldQuestion)
VOID EFIAPI HiiToLower(IN EFI_STRING ConfigString)
EFI_STATUS ExtractDefault(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN UINT16 DefaultId, IN BROWSER_SETTING_SCOPE SettingScope, IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope, IN BROWSER_STORAGE *Storage OPTIONAL, IN BOOLEAN RetrieveValueFirst, IN BOOLEAN SkipGetAltCfg)
EFI_STATUS GetIfrBinaryData(IN EFI_HII_HANDLE Handle, IN OUT EFI_GUID *FormSetGuid, OUT UINTN *BinaryLength, OUT UINT8 **BinaryData)
EFI_STATUS EFIAPI SendForm(IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, IN EFI_HII_HANDLE *Handles, IN UINTN HandleCount, IN EFI_GUID *FormSetGuid OPTIONAL, IN UINT16 FormId OPTIONAL, IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL)
FORM_BROWSER_FORMSET * GetFormSetFromHiiHandle(EFI_HII_HANDLE Handle)
EFI_STATUS GetValueByName(IN BROWSER_STORAGE *Storage, IN CHAR16 *Name, IN OUT CHAR16 **Value, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
VOID GetSyncRestoreConfigRequest(IN BROWSER_STORAGE *Storage, IN EFI_STRING ConfigRequest, IN EFI_STRING Progress, OUT EFI_STRING *RestoreConfigRequest, OUT EFI_STRING *SyncConfigRequest)
EFI_STATUS SynchronizeStorage(OUT BROWSER_STORAGE *Storage, IN CHAR16 *ConfigRequest, IN BOOLEAN SyncOrRestore)
VOID SetBitsQuestionValue(IN FORM_BROWSER_STATEMENT *Question, IN OUT UINT8 *Buffer, IN UINT32 Value)
UINT64 GetArrayData(IN VOID *Array, IN UINT8 Type, IN UINTN Index)
EFI_STATUS EFIAPI PasswordCheck(IN FORM_DISPLAY_ENGINE_FORM *Form, IN FORM_DISPLAY_ENGINE_STATEMENT *Statement, IN EFI_STRING PasswordString OPTIONAL)
EFI_STATUS SubmitForForm(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
EFI_STATUS BufferToValue(IN OUT FORM_BROWSER_STATEMENT *Question, IN CHAR16 *Value)
UINT32 PopupErrorMessage(IN UINT32 BrowserStatus, IN EFI_HII_HANDLE HiiHandle, IN EFI_IFR_OP_HEADER *OpCode OPTIONAL, IN CHAR16 *ErrorString)
VOID SetArrayData(IN VOID *Array, IN UINT8 Type, IN UINTN Index, IN UINT64 Value)
QUESTION_OPTION * ValueToOption(IN FORM_BROWSER_STATEMENT *Question, IN EFI_HII_VALUE *OptionValue)
FORM_ENTRY_INFO * UiAddMenuList(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, IN UINT16 FormId, IN UINT16 QuestionId)
VOID UpdateFlagForForm(IN BOOLEAN SetFlag, IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
EFI_STATUS StorageToConfigResp(IN BROWSER_STORAGE *Storage, IN CHAR16 **ConfigResp, IN CHAR16 *ConfigRequest, IN BOOLEAN GetEditBuf)
BOOLEAN EFIAPI IsBrowserDataModified(VOID)
VOID EFIAPI RegiserExitHandler(IN EXIT_HANDLER Handler)
VOID ValueChangeResetFlagUpdate(IN BOOLEAN SetFlag, IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form)
VOID NewStringCat(IN OUT CHAR16 **Dest, IN CHAR16 *Src)
VOID CleanBrowserStorage(IN OUT FORM_BROWSER_FORMSET *FormSet)
BOOLEAN IsQuestionValueChanged(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
EFI_STATUS ProcessStorage(IN OUT UINTN *ResultsDataSize, IN OUT EFI_STRING *ResultsData, IN BOOLEAN RetrieveData, IN BROWSER_STORAGE *Storage)
EFI_STATUS SetQuestionValue(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH SetValueTo)
VOID CleanAltCfgForForm(IN FORM_BROWSER_FORM *Form)
EFI_STATUS GetQuestionValue(IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question, IN GET_SET_QUESTION_VALUE_WITH GetValueFrom)
EFI_STRING_ID NewString(IN CHAR16 *String, IN EFI_HII_HANDLE HiiHandle)
EFI_STATUS SubmitForSystem(VOID)
VOID RestoreBrowserContext(VOID)
EFI_STATUS EFIAPI RegisterHotKey(IN EFI_INPUT_KEY *KeyData, IN UINT32 Action, IN UINT16 DefaultId, IN EFI_STRING HelpString OPTIONAL)
VOID SyncStatusForFormSet(IN OUT FORM_BROWSER_FORMSET *NewFormSet, IN FORM_BROWSER_FORMSET *OldFormSet)
VOID UiCopyMenuList(OUT LIST_ENTRY *NewMenuListHead, IN LIST_ENTRY *CurrentMenuListHead)
VOID RemoveElement(IN OUT BROWSER_STORAGE *Storage, IN CHAR16 *RequestElement)
VOID ExtractAltCfgForFormSet(IN FORM_BROWSER_FORMSET *FormSet, IN UINT16 DefaultId, IN BROWSER_STORAGE *BrowserStorage)
GET_SET_QUESTION_VALUE_WITH
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
EFI_EVENT EFIAPI EfiCreateProtocolNotifyEvent(IN EFI_GUID *ProtocolGuid, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext OPTIONAL, OUT VOID **Registration)
EFI_STRING_ID string
EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION.