11#define GUID_CONFIG_STRING_TYPE 0x00
12#define NAME_CONFIG_STRING_TYPE 0x01
13#define PATH_CONFIG_STRING_TYPE 0x02
15#define ACTION_SET_DEFAUTL_VALUE 0x01
16#define ACTION_VALIDATE_SETTING 0x02
18#define HII_LIB_DEFAULT_VARSTORE_SIZE 0x200
29 EFI_VARSTORE_ID VarStoreId;
71 ASSERT (Guid !=
NULL);
72 ASSERT (Handle !=
NULL);
78 HiiPackageList =
NULL;
81 ASSERT (Status != EFI_NOT_FOUND);
83 if (Status == EFI_BUFFER_TOO_SMALL) {
85 ASSERT (HiiPackageList !=
NULL);
90 if (EFI_ERROR (Status)) {
98 CopyGuid (Guid, &HiiPackageList->PackageListGuid);
155 ASSERT (PackageListGuid !=
NULL);
160 for (Length = 0,
VA_START (Args, DeviceHandle); (Package =
VA_ARG (Args, UINT32 *)) !=
NULL; ) {
187 if (PackageListHeader ==
NULL) {
194 CopyGuid (&PackageListHeader->PackageListGuid, PackageListGuid);
195 PackageListHeader->PackageLength = Length;
200 Data = (UINT8 *)(PackageListHeader + 1);
207 CopyMem (Data, Package + 1, Length);
216 CopyMem (Data, &mEndOfPakageList,
sizeof (mEndOfPakageList));
227 if (EFI_ERROR (Status)) {
259 ASSERT (HiiHandle !=
NULL);
291 UINTN HandleBufferLength;
301 HandleBufferLength = 0;
304 EFI_HII_PACKAGE_TYPE_ALL,
316 if (Status != EFI_BUFFER_TOO_SMALL) {
328 if (HiiHandleBuffer ==
NULL) {
340 EFI_HII_PACKAGE_TYPE_ALL,
345 if (EFI_ERROR (Status)) {
353 if (PackageListGuid ==
NULL) {
357 return HiiHandleBuffer;
359 for (Index1 = 0, Index2 = 0; HiiHandleBuffer[Index1] !=
NULL; Index1++) {
363 HiiHandleBuffer[Index2++] = HiiHandleBuffer[Index1];
368 HiiHandleBuffer[Index2] =
NULL;
369 return HiiHandleBuffer;
401 UINTN PackageListSize;
406 UINT8 *FormSetBuffer;
410 UINT32 PackageListLength;
414 FormSetBuffer =
NULL;
421 HiiPackageList =
NULL;
423 if (EFI_ERROR (Status) && (Status != EFI_BUFFER_TOO_SMALL)) {
428 if (HiiPackageList ==
NULL) {
429 return EFI_OUT_OF_RESOURCES;
438 Status = EFI_NOT_FOUND;
442 while (Offset < PackageListLength) {
443 Package = ((UINT8 *)HiiPackageList) + Offset;
445 Offset += PackageHeader.Length;
447 if (PackageHeader.Type != EFI_HII_PACKAGE_FORMS) {
455 while (Offset2 < PackageHeader.Length) {
456 OpCodeData = Package + Offset2;
463 if (FormSetBuffer !=
NULL) {
469 if (TempBuffer ==
NULL) {
470 Status = EFI_OUT_OF_RESOURCES;
475 FormSetBuffer =
NULL;
478 if (TempBuffer ==
NULL) {
479 Status = EFI_OUT_OF_RESOURCES;
487 FormSetBuffer = TempBuffer;
500 *BufferSize = TempSize;
520 IN EFI_STRING ConfigString
526 ASSERT (ConfigString !=
NULL);
531 for (String = ConfigString, Lower =
FALSE; *String != L
'\0'; String++) {
532 if (*String == L
'=') {
534 }
else if (*String == L
'&') {
536 }
else if (Lower && (*String >= L
'A') && (*String <= L
'F')) {
537 *String = (CHAR16)(*String - L
'A' + L
'a');
562 IN CONST EFI_STRING ConfigRequest,
568 EFI_STRING ConfigResp;
571 ASSERT (ConfigRequest !=
NULL);
572 ASSERT (Block !=
NULL);
585 if (EFI_ERROR (Status)) {
615 IN CONST CHAR16 *VariableName OPTIONAL,
616 IN CONST EFI_STRING SetResultsData OPTIONAL
620 UINTN ResultsDataSize;
621 EFI_STRING ResultsData;
622 CHAR16 TempResultsData;
627 if (mUefiFormBrowser2 ==
NULL) {
628 Status =
gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid,
NULL, (VOID **)&mUefiFormBrowser2);
629 if (EFI_ERROR (Status) || (mUefiFormBrowser2 ==
NULL)) {
636 if (SetResultsData !=
NULL) {
640 ResultsData = SetResultsData;
645 Status = mUefiFormBrowser2->BrowserCallback (
654 if (!EFI_ERROR (Status)) {
662 if (Status != EFI_BUFFER_TOO_SMALL) {
670 if (ResultsData ==
NULL) {
678 Status = mUefiFormBrowser2->BrowserCallback (
682 (BOOLEAN)(SetResultsData ==
NULL),
686 if (EFI_ERROR (Status)) {
725 IN CONST CHAR16 *Name OPTIONAL,
731 UINTN DevicePathSize;
733 CHAR16 *ReturnString;
744 NameLength =
StrLen (Name);
752 if (DriverHandle !=
NULL) {
754 if (DevicePath ==
NULL) {
768 MaxLen = 5 +
sizeof (
EFI_GUID) * 2 + 6 + NameLength * 4 + 6 + DevicePathSize * 2 + 1;
770 if (String ==
NULL) {
777 StrCpyS (String, MaxLen, L
"GUID=");
778 ReturnString = String;
779 String +=
StrLen (String);
785 for (Index = 0, Buffer = (UINT8 *)Guid; Index <
sizeof (
EFI_GUID); Index++) {
788 MaxLen *
sizeof (CHAR16) - ((
UINTN)String - (
UINTN)ReturnString),
789 PREFIX_ZERO | RADIX_HEX,
793 String +=
StrnLenS (String, MaxLen - ((
UINTN)String - (
UINTN)ReturnString) /
sizeof (CHAR16));
800 StrCatS (ReturnString, MaxLen, L
"&NAME=");
801 String +=
StrLen (String);
807 for ( ; *Name != L
'\0'; Name++) {
810 sizeof (CHAR16) * MaxLen - ((
UINTN)String - (
UINTN)ReturnString),
811 PREFIX_ZERO | RADIX_HEX,
815 String +=
StrnLenS (String, MaxLen - ((
UINTN)String - (
UINTN)ReturnString) /
sizeof (CHAR16));
822 StrCatS (ReturnString, MaxLen, L
"&PATH=");
823 String +=
StrLen (String);
828 for (Index = 0, Buffer = (UINT8 *)DevicePath; Index < DevicePathSize; Index++) {
831 sizeof (CHAR16) * MaxLen - ((
UINTN)String - (
UINTN)ReturnString),
832 PREFIX_ZERO | RADIX_HEX,
836 String +=
StrnLenS (String, MaxLen - ((
UINTN)String - (
UINTN)ReturnString) /
sizeof (CHAR16));
868 IN EFI_STRING String,
874 EFI_STRING ConfigHdr;
881 if ((String ==
NULL) || (Buffer ==
NULL)) {
882 return EFI_INVALID_PARAMETER;
892 for (Length = 0; *String != 0 && *String != L
'&'; String++, Length++) {
896 case GUID_CONFIG_STRING_TYPE:
897 case PATH_CONFIG_STRING_TYPE:
904 if (DataBuffer ==
NULL) {
905 return EFI_OUT_OF_RESOURCES;
911 ZeroMem (TemStr,
sizeof (TemStr));
912 for (Index = 0; Index < Length; Index++) {
913 TemStr[0] = ConfigHdr[Index];
915 if ((Index & 1) == 0) {
916 DataBuffer[Index/2] = DigitUint8;
918 DataBuffer[Index/2] = (UINT8)((DataBuffer[Index/2] << 4) + DigitUint8);
922 *Buffer = DataBuffer;
925 case NAME_CONFIG_STRING_TYPE:
934 if (DataBuffer ==
NULL) {
935 return EFI_OUT_OF_RESOURCES;
941 StringPtr = (CHAR16 *)DataBuffer;
942 ZeroMem (TemStr,
sizeof (TemStr));
943 for (Index = 0; Index < Length; Index += 4) {
944 StrnCpyS (TemStr,
sizeof (TemStr) /
sizeof (CHAR16), ConfigHdr + Index, 4);
951 StringPtr[Index/4] = L
'\0';
953 *Buffer = DataBuffer;
957 return EFI_INVALID_PARAMETER;
986 if (BlockArray ==
NULL) {
993 for (Link = BlockArray->Entry.ForwardLink; Link != &BlockArray->Entry; Link = Link->ForwardLink) {
995 if ((VarOffset >= BlockData->Offset) && ((VarOffset + VarWidth) <= (BlockData->Offset + BlockData->Width))) {
1023 IN EFI_STRING ValueString,
1024 OUT UINT8 **ValueData,
1028 EFI_STRING StringPtr;
1035 ASSERT (ValueString !=
NULL && ValueData !=
NULL && ValueLength !=
NULL);
1036 ASSERT (*ValueString != L
'\0');
1041 StringPtr = ValueString;
1042 while (*StringPtr != L
'\0' && *StringPtr != L
'&') {
1046 Length = StringPtr - ValueString;
1053 return EFI_OUT_OF_RESOURCES;
1059 ZeroMem (TemStr,
sizeof (TemStr));
1060 for (Index = 0; Index < Length; Index++) {
1061 TemStr[0] = ValueString[Length - Index - 1];
1063 if ((Index & 1) == 0) {
1064 Buf[Index/2] = DigitUint8;
1066 Buf[Index/2] = (UINT8)((DigitUint8 << 4) + Buf[Index/2]);
1074 *ValueLength = Length;
1090 IN CHAR16 *ConfigElement,
1092 OUT UINT64 *VarValue
1103 StringPtr =
StrStr (ConfigElement, VarName);
1104 ASSERT (StringPtr !=
NULL);
1109 StringPtr +=
StrLen (VarName) + 1;
1115 if (EFI_ERROR (Status)) {
1120 CopyMem (VarValue, TmpBuffer, (((Length + 1) / 2) <
sizeof (UINT64)) ? ((Length + 1) / 2) :
sizeof (UINT64));
1153 IN UINT8 *VarBuffer,
1155 IN CHAR16 *RequestElement,
1157 IN BOOLEAN NameValueType
1167 UINT32 PackageOffset;
1180 CHAR8 *VarStoreName;
1182 CHAR16 *QuestionName;
1189 BOOLEAN QuestionReferBitField;
1196 VarStoreName =
NULL;
1200 IfrNameValueStore =
NULL;
1201 IfrEfiVarStore =
NULL;
1203 ZeroMem (&VarBlockData,
sizeof (VarBlockData));
1206 QuestionReferBitField =
FALSE;
1212 while (PackageOffset < PackageListLength) {
1213 CopyMem (&PackageHeader, (UINT8 *)HiiPackageList + PackageOffset,
sizeof (PackageHeader));
1218 if (PackageHeader.Type == EFI_HII_PACKAGE_FORMS) {
1219 IfrOffset =
sizeof (PackageHeader);
1220 PackageData = (UINT8 *)HiiPackageList + PackageOffset;
1221 while (IfrOffset < PackageHeader.Length) {
1226 switch (IfrOpHdr->OpCode) {
1227 case EFI_IFR_VARSTORE_OP:
1231 if (VarStoreData.VarStoreId != 0) {
1240 VarStoreName = (CHAR8 *)IfrVarStore->Name;
1241 for (Index = 0; VarStoreName[Index] != 0; Index++) {
1242 if ((CHAR16)VarStoreName[Index] != VarName[Index]) {
1250 if ((VarStoreName[Index] != 0) || (VarName[Index] != 0)) {
1257 if (IfrVarStore !=
NULL) {
1258 VarStoreData.VarStoreId = IfrVarStore->VarStoreId;
1259 VarStoreData.Size = IfrVarStore->Size;
1263 case EFI_IFR_VARSTORE_NAME_VALUE_OP:
1267 if (VarStoreData.VarStoreId != 0) {
1276 IfrNameValueStore =
NULL;
1279 if (IfrNameValueStore !=
NULL) {
1280 VarStoreData.VarStoreId = IfrNameValueStore->VarStoreId;
1284 case EFI_IFR_VARSTORE_EFI_OP:
1288 if (VarStoreData.VarStoreId != 0) {
1304 VarStoreName = (CHAR8 *)IfrEfiVarStore->Name;
1305 for (Index = 0; VarStoreName[Index] != 0; Index++) {
1306 if ((CHAR16)VarStoreName[Index] != VarName[Index]) {
1314 if ((VarStoreName[Index] != 0) || (VarName[Index] != 0)) {
1315 IfrEfiVarStore =
NULL;
1318 IfrEfiVarStore =
NULL;
1321 if (IfrEfiVarStore !=
NULL) {
1325 VarStoreData.VarStoreId = IfrEfiVarStore->VarStoreId;
1326 VarStoreData.Size = IfrEfiVarStore->Size;
1330 case EFI_IFR_FORM_OP:
1331 case EFI_IFR_FORM_MAP_OP:
1335 if (VarStoreData.VarStoreId == 0) {
1340 case EFI_IFR_ONE_OF_OP:
1348 if (VarStoreData.VarStoreId == 0) {
1349 return EFI_INVALID_PARAMETER;
1356 if (IfrOneOf->Question.VarStoreId != VarStoreData.VarStoreId) {
1360 if (NameValueType) {
1361 QuestionName =
HiiGetString (HiiHandle, IfrOneOf->Question.VarStoreInfo.VarName,
NULL);
1362 ASSERT (QuestionName !=
NULL);
1364 if (
StrStr (RequestElement, QuestionName) ==
NULL) {
1372 if (EFI_ERROR (Status)) {
1379 if (QuestionReferBitField) {
1383 BitOffset = IfrOneOf->Question.VarStoreInfo.VarOffset;
1384 BitWidth = IfrOneOf->Flags & EDKII_IFR_NUMERIC_SIZE_BIT;
1385 Offset = BitOffset / 8;
1386 TotalBits = BitOffset % 8 + BitWidth;
1387 Width = (TotalBits % 8 == 0 ? TotalBits / 8 : TotalBits / 8 + 1);
1389 Offset = IfrOneOf->Question.VarStoreInfo.VarOffset;
1390 Width = (UINT16)(1 << (IfrOneOf->Flags & EFI_IFR_NUMERIC_SIZE));
1406 if ((Offset + Width) > VarStoreData.Size) {
1410 return EFI_INVALID_PARAMETER;
1417 if (QuestionReferBitField) {
1421 StartBit = BitOffset % 8;
1422 EndBit = StartBit + BitWidth - 1;
1423 CopyMem ((UINT8 *)&BufferValue, VarBuffer + Offset, Width);
1426 CopyMem (&VarValue, VarBuffer + Offset, Width);
1433 VarBlockData.OpCode = IfrOpHdr->OpCode;
1434 VarBlockData.Scope = IfrOpHdr->Scope;
1436 case EFI_IFR_NUMERIC_OP:
1444 if (VarStoreData.VarStoreId == 0) {
1445 return EFI_INVALID_PARAMETER;
1452 if (IfrNumeric->Question.VarStoreId != VarStoreData.VarStoreId) {
1456 if (NameValueType) {
1457 QuestionName =
HiiGetString (HiiHandle, IfrNumeric->Question.VarStoreInfo.VarName,
NULL);
1458 ASSERT (QuestionName !=
NULL);
1460 if (
StrStr (RequestElement, QuestionName) ==
NULL) {
1468 if (EFI_ERROR (Status)) {
1475 if (QuestionReferBitField) {
1479 BitOffset = IfrNumeric->Question.VarStoreInfo.VarOffset;
1480 BitWidth = IfrNumeric->Flags & EDKII_IFR_NUMERIC_SIZE_BIT;
1481 Offset = BitOffset / 8;
1482 TotalBits = BitOffset % 8 + BitWidth;
1483 Width = (TotalBits % 8 == 0 ? TotalBits / 8 : TotalBits / 8 + 1);
1485 Offset = IfrNumeric->Question.VarStoreInfo.VarOffset;
1486 Width = (UINT16)(1 << (IfrNumeric->Flags & EFI_IFR_NUMERIC_SIZE));
1502 if ((Offset + Width) > VarStoreData.Size) {
1506 return EFI_INVALID_PARAMETER;
1513 if (QuestionReferBitField) {
1517 StartBit = BitOffset % 8;
1518 EndBit = StartBit + BitWidth - 1;
1519 CopyMem ((UINT8 *)&BufferValue, VarBuffer + Offset, Width);
1522 CopyMem (&VarValue, VarBuffer + Offset, Width);
1526 if ( QuestionReferBitField) {
1531 if (((INT32)VarValue < (INT32)IfrNumeric->data.u32.MinValue) || ((INT32)VarValue > (INT32)IfrNumeric->data.u32.MaxValue)) {
1535 return EFI_INVALID_PARAMETER;
1538 if ((VarValue < IfrNumeric->data.u32.MinValue) || (VarValue > IfrNumeric->data.u32.MaxValue)) {
1542 return EFI_INVALID_PARAMETER;
1546 if ((IfrNumeric->Flags & EFI_IFR_DISPLAY) == 0) {
1547 switch (IfrNumeric->Flags & EFI_IFR_NUMERIC_SIZE) {
1548 case EFI_IFR_NUMERIC_SIZE_1:
1549 if (((INT8)VarValue < (INT8)IfrNumeric->data.u8.MinValue) || ((INT8)VarValue > (INT8)IfrNumeric->data.u8.MaxValue)) {
1553 return EFI_INVALID_PARAMETER;
1557 case EFI_IFR_NUMERIC_SIZE_2:
1558 if (((INT16)VarValue < (INT16)IfrNumeric->data.u16.MinValue) || ((INT16)VarValue > (INT16)IfrNumeric->data.u16.MaxValue)) {
1562 return EFI_INVALID_PARAMETER;
1566 case EFI_IFR_NUMERIC_SIZE_4:
1567 if (((INT32)VarValue < (INT32)IfrNumeric->data.u32.MinValue) || ((INT32)VarValue > (INT32)IfrNumeric->data.u32.MaxValue)) {
1571 return EFI_INVALID_PARAMETER;
1575 case EFI_IFR_NUMERIC_SIZE_8:
1576 if (((INT64)VarValue < (INT64)IfrNumeric->data.u64.MinValue) || ((INT64)VarValue > (INT64)IfrNumeric->data.u64.MaxValue)) {
1580 return EFI_INVALID_PARAMETER;
1586 switch (IfrNumeric->Flags & EFI_IFR_NUMERIC_SIZE) {
1587 case EFI_IFR_NUMERIC_SIZE_1:
1588 if (((UINT8)VarValue < IfrNumeric->data.u8.MinValue) || ((UINT8)VarValue > IfrNumeric->data.u8.MaxValue)) {
1592 return EFI_INVALID_PARAMETER;
1596 case EFI_IFR_NUMERIC_SIZE_2:
1597 if (((UINT16)VarValue < IfrNumeric->data.u16.MinValue) || ((UINT16)VarValue > IfrNumeric->data.u16.MaxValue)) {
1601 return EFI_INVALID_PARAMETER;
1605 case EFI_IFR_NUMERIC_SIZE_4:
1606 if (((UINT32)VarValue < IfrNumeric->data.u32.MinValue) || ((UINT32)VarValue > IfrNumeric->data.u32.MaxValue)) {
1610 return EFI_INVALID_PARAMETER;
1614 case EFI_IFR_NUMERIC_SIZE_8:
1615 if (((UINT64)VarValue < IfrNumeric->data.u64.MinValue) || ((UINT64)VarValue > IfrNumeric->data.u64.MaxValue)) {
1619 return EFI_INVALID_PARAMETER;
1628 case EFI_IFR_CHECKBOX_OP:
1636 if (VarStoreData.VarStoreId == 0) {
1637 return EFI_INVALID_PARAMETER;
1644 if (IfrCheckBox->Question.VarStoreId != VarStoreData.VarStoreId) {
1648 if (NameValueType) {
1649 QuestionName =
HiiGetString (HiiHandle, IfrCheckBox->Question.VarStoreInfo.VarName,
NULL);
1650 ASSERT (QuestionName !=
NULL);
1652 if (
StrStr (RequestElement, QuestionName) ==
NULL) {
1660 if (EFI_ERROR (Status)) {
1667 if (QuestionReferBitField) {
1671 BitOffset = IfrCheckBox->Question.VarStoreInfo.VarOffset;
1673 Offset = BitOffset / 8;
1674 TotalBits = BitOffset % 8 + BitWidth;
1675 Width = (TotalBits % 8 == 0 ? TotalBits / 8 : TotalBits / 8 + 1);
1677 Offset = IfrCheckBox->Question.VarStoreInfo.VarOffset;
1678 Width = (UINT16)
sizeof (BOOLEAN);
1694 if ((Offset + Width) > VarStoreData.Size) {
1698 return EFI_INVALID_PARAMETER;
1705 if (QuestionReferBitField) {
1709 StartBit = BitOffset % 8;
1710 EndBit = StartBit + BitWidth - 1;
1711 CopyMem ((UINT8 *)&BufferValue, VarBuffer + Offset, Width);
1714 CopyMem (&VarValue, VarBuffer + Offset, Width);
1722 return EFI_INVALID_PARAMETER;
1726 case EFI_IFR_STRING_OP:
1734 if (VarStoreData.VarStoreId == 0) {
1735 return EFI_INVALID_PARAMETER;
1742 if (IfrString->Question.VarStoreId != VarStoreData.VarStoreId) {
1749 Width = (UINT16)(IfrString->MaxSize * sizeof (UINT16));
1750 if (NameValueType) {
1751 QuestionName =
HiiGetString (HiiHandle, IfrString->Question.VarStoreInfo.VarName,
NULL);
1752 ASSERT (QuestionName !=
NULL);
1754 StringPtr =
StrStr (RequestElement, QuestionName);
1755 if (StringPtr ==
NULL) {
1765 StringPtr +=
StrLen (QuestionName);
1780 if (
StrLen (StringPtr) / 4 > IfrString->MaxSize) {
1781 return EFI_INVALID_PARAMETER;
1787 Offset = IfrString->Question.VarStoreInfo.VarOffset;
1801 if ((Offset + Width) > VarStoreData.Size) {
1805 return EFI_INVALID_PARAMETER;
1811 if (
StrLen ((CHAR16 *)(VarBuffer + Offset)) > IfrString->MaxSize) {
1812 return EFI_INVALID_PARAMETER;
1817 case EFI_IFR_ONE_OF_OPTION_OP:
1821 if (VarBlockData.Scope == 0) {
1829 if (VarBlockData.OpCode == EFI_IFR_ONE_OF_OP) {
1833 ASSERT (IfrOneOfOption->Type <= EFI_IFR_TYPE_NUM_SIZE_64);
1836 if (VarValue == TmpValue.u64) {
1841 VarBlockData.OpCode = 0;
1846 case EFI_IFR_END_OP:
1847 QuestionReferBitField =
FALSE;
1851 if (VarBlockData.Scope > 0) {
1852 VarBlockData.Scope--;
1858 if ((VarBlockData.Scope == 0) && (VarBlockData.OpCode == EFI_IFR_ONE_OF_OP)) {
1859 return EFI_INVALID_PARAMETER;
1863 case EFI_IFR_GUID_OP:
1865 QuestionReferBitField =
TRUE;
1873 if (VarBlockData.Scope > 0) {
1874 VarBlockData.Scope = (UINT8)(VarBlockData.Scope + IfrOpHdr->Scope);
1883 IfrOffset += IfrOpHdr->Length;
1895 PackageOffset += PackageHeader.Length;
1914 IN CHAR16 *ConfigElement,
1916 OUT UINT8 **VarBuffer
1921 EFI_STRING StringPtr;
1927 UINTN MaxBufferSize;
1937 NewBlockData =
NULL;
1940 MaxBufferSize = HII_LIB_DEFAULT_VARSTORE_SIZE;
1942 if (DataBuffer ==
NULL) {
1943 return EFI_OUT_OF_RESOURCES;
1950 if (BlockArray ==
NULL) {
1951 Status = EFI_OUT_OF_RESOURCES;
1957 StringPtr =
StrStr (ConfigElement, L
"&OFFSET=");
1958 ASSERT (StringPtr !=
NULL);
1965 while (*StringPtr != 0 &&
StrnCmp (StringPtr, L
"&OFFSET=",
StrLen (L
"&OFFSET=")) == 0) {
1969 StringPtr +=
StrLen (L
"&OFFSET=");
1975 if (EFI_ERROR (Status)) {
1983 (((Length + 1) / 2) <
sizeof (UINT16)) ? ((Length + 1) / 2) :
sizeof (UINT16)
1988 StringPtr += Length;
1989 if (
StrnCmp (StringPtr, L
"&WIDTH=",
StrLen (L
"&WIDTH=")) != 0) {
1990 Status = EFI_INVALID_PARAMETER;
1994 StringPtr +=
StrLen (L
"&WIDTH=");
2000 if (EFI_ERROR (Status)) {
2008 (((Length + 1) / 2) <
sizeof (UINT16)) ? ((Length + 1) / 2) :
sizeof (UINT16)
2013 StringPtr += Length;
2014 if ((*StringPtr != 0) && (*StringPtr != L
'&')) {
2015 Status = EFI_INVALID_PARAMETER;
2019 if (
StrnCmp (StringPtr, L
"&VALUE=",
StrLen (L
"&VALUE=")) != 0) {
2020 Status = EFI_INVALID_PARAMETER;
2024 StringPtr +=
StrLen (L
"&VALUE=");
2030 if (EFI_ERROR (Status)) {
2034 StringPtr += Length;
2035 if ((*StringPtr != 0) && (*StringPtr != L
'&')) {
2036 Status = EFI_INVALID_PARAMETER;
2043 if ((UINT32)Offset + Width > MaxBufferSize) {
2046 Offset + Width + HII_LIB_DEFAULT_VARSTORE_SIZE,
2049 if (DataBuffer ==
NULL) {
2050 Status = EFI_OUT_OF_RESOURCES;
2054 MaxBufferSize = Offset + Width + HII_LIB_DEFAULT_VARSTORE_SIZE;
2060 CopyMem (DataBuffer + Offset, TmpBuffer, Width);
2068 if (NewBlockData ==
NULL) {
2069 Status = EFI_OUT_OF_RESOURCES;
2073 NewBlockData->Offset = Offset;
2074 NewBlockData->Width = Width;
2079 for (Link = BlockArray->Entry.ForwardLink; Link != &BlockArray->Entry; Link = Link->ForwardLink) {
2081 if (NewBlockData->Offset == BlockData->Offset) {
2082 if (NewBlockData->Width > BlockData->Width) {
2083 BlockData->Width = NewBlockData->Width;
2088 }
else if (NewBlockData->Offset < BlockData->Offset) {
2100 if (Link == &BlockArray->Entry) {
2107 if (*StringPtr == 0) {
2119 Link = BlockArray->Entry.ForwardLink;
2120 while ((Link != &BlockArray->Entry) && (Link->ForwardLink != &BlockArray->Entry)) {
2123 if ((NewBlockData->Offset >= BlockData->Offset) && (NewBlockData->Offset <= (BlockData->Offset + BlockData->Width))) {
2124 if ((NewBlockData->Offset + NewBlockData->Width) > (BlockData->Offset + BlockData->Width)) {
2125 BlockData->Width = (UINT16)(NewBlockData->Offset + NewBlockData->Width - BlockData->Offset);
2133 Link = Link->ForwardLink;
2136 *VarBuffer = DataBuffer;
2137 *CurrentBlockArray = BlockArray;
2141 if (DataBuffer !=
NULL) {
2145 if (BlockArray !=
NULL) {
2178 IN EFI_STRING ConfigResp,
2191 BOOLEAN NameValueType;
2193 CurrentBlockArray =
NULL;
2201 if (
StrStr (ConfigResp, L
"&OFFSET=") !=
NULL) {
2203 if (EFI_ERROR (Status)) {
2207 NameValueType =
FALSE;
2212 StringPtr =
StrStr (ConfigResp, L
"PATH=");
2213 ASSERT (StringPtr !=
NULL);
2216 NameValueType =
TRUE;
2237 if (VarBuffer !=
NULL) {
2241 if (CurrentBlockArray !=
NULL) {
2245 while (!
IsListEmpty (&CurrentBlockArray->Entry)) {
2270 IN EFI_STRING ConfigRequest
2273 EFI_STRING TmpRequest;
2275 TmpRequest =
StrStr (ConfigRequest, L
"PATH=");
2276 ASSERT (TmpRequest !=
NULL);
2312 IN CONST EFI_STRING Request OPTIONAL,
2313 IN UINT16 DefaultId,
2317 EFI_STRING ConfigAltResp;
2318 EFI_STRING ConfigAltHdr;
2319 EFI_STRING ConfigResp;
2320 EFI_STRING Progress;
2321 EFI_STRING StringPtr;
2322 EFI_STRING StringHdr;
2333 UINTN PackageListLength;
2338 ConfigAltResp =
NULL;
2343 ConfigAltHdr =
NULL;
2344 HiiHandleBuffer =
NULL;
2346 TempDriverHandle =
NULL;
2348 HiiPackageList =
NULL;
2353 if ((ActionType != ACTION_SET_DEFAUTL_VALUE) && (ActionType != ACTION_VALIDATE_SETTING)) {
2360 if (Request !=
NULL) {
2374 if (EFI_ERROR (Status)) {
2378 StringPtr = ConfigAltResp;
2379 ASSERT (StringPtr !=
NULL);
2381 while (*StringPtr != L
'\0') {
2385 StringHdr = StringPtr;
2390 if (
StrnCmp (StringPtr, L
"GUID=",
StrLen (L
"GUID=")) != 0) {
2391 Status = EFI_INVALID_PARAMETER;
2395 StringPtr +=
StrLen (L
"GUID=");
2397 if (EFI_ERROR (Status)) {
2404 while (*StringPtr != L
'\0' &&
StrnCmp (StringPtr, L
"&NAME=",
StrLen (L
"&NAME=")) != 0) {
2408 if (*StringPtr == L
'\0') {
2409 Status = EFI_INVALID_PARAMETER;
2413 StringPtr +=
StrLen (L
"&NAME=");
2415 if (EFI_ERROR (Status)) {
2422 while (*StringPtr != L
'\0' &&
StrnCmp (StringPtr, L
"&PATH=",
StrLen (L
"&PATH=")) != 0) {
2426 if (*StringPtr == L
'\0') {
2427 Status = EFI_INVALID_PARAMETER;
2431 StringPtr +=
StrLen (L
"&PATH=");
2433 if (EFI_ERROR (Status)) {
2440 TempDevicePath = DevicePath;
2441 Status =
gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &TempDevicePath, &DriverHandle);
2442 if (EFI_ERROR (Status)) {
2450 if (HiiHandleBuffer ==
NULL) {
2451 Status = EFI_NOT_FOUND;
2455 for (Index = 0; HiiHandleBuffer[Index] !=
NULL; Index++) {
2457 if (TempDriverHandle == DriverHandle) {
2462 HiiHandle = HiiHandleBuffer[Index];
2465 if (HiiHandle ==
NULL) {
2472 goto NextConfigAltResp;
2478 PackageListLength = 0;
2479 HiiPackageList =
NULL;
2485 if (Status != EFI_BUFFER_TOO_SMALL) {
2486 Status = EFI_INVALID_PARAMETER;
2491 if (HiiPackageList ==
NULL) {
2492 Status = EFI_OUT_OF_RESOURCES;
2500 if (EFI_ERROR (Status)) {
2514 (ActionType == ACTION_SET_DEFAUTL_VALUE) ? &DefaultId :
NULL,
2521 if (EFI_ERROR (Status)) {
2523 goto NextConfigAltResp;
2530 goto NextConfigAltResp;
2537 if (ActionType == ACTION_SET_DEFAUTL_VALUE) {
2549 if (EFI_ERROR (Status)) {
2557 if (HiiPackageList !=
NULL) {
2559 HiiPackageList =
NULL;
2562 if (ConfigResp !=
NULL) {
2586 while (*StringPtr != L
'\0' && *StringPtr != L
'&') {
2590 if (*StringPtr == L
'\0') {
2598 MaxLen = 1 + StringPtr - StringHdr + 8 + 1;
2600 if (ConfigAltHdr ==
NULL) {
2601 Status = EFI_OUT_OF_RESOURCES;
2605 StrCpyS (ConfigAltHdr, MaxLen, L
"&");
2606 StrnCatS (ConfigAltHdr, MaxLen, StringHdr, StringPtr - StringHdr);
2607 StrCatS (ConfigAltHdr, MaxLen, L
"&ALTCFG=");
2612 while ((StringHdr =
StrStr (StringPtr, ConfigAltHdr)) !=
NULL) {
2613 StringPtr = StringHdr +
StrLen (ConfigAltHdr);
2614 if (*StringPtr == L
'\0') {
2623 if (*StringPtr == L
'\0') {
2630 StringPtr =
StrStr (StringPtr, L
"&GUID");
2631 if (StringPtr ==
NULL) {
2642 if (VarGuid !=
NULL) {
2646 if (VarName !=
NULL) {
2650 if (DevicePath !=
NULL) {
2654 if (ConfigResp !=
NULL) {
2658 if (ConfigAltResp !=
NULL) {
2662 if (HiiPackageList !=
NULL) {
2666 if (EFI_ERROR (Status)) {
2690 IN CONST EFI_STRING Request OPTIONAL
2715 IN CONST EFI_STRING Request OPTIONAL,
2757 IN CHAR16 *FirstString,
2758 IN CHAR16 *SecondString,
2759 IN CHAR16 *StartSearchString,
2760 IN CHAR16 *StopSearchString
2763 CHAR16 *EndFirstString;
2764 CHAR16 *EndSecondString;
2766 ASSERT (FirstString !=
NULL);
2767 ASSERT (SecondString !=
NULL);
2768 ASSERT (StartSearchString !=
NULL);
2769 ASSERT (StopSearchString !=
NULL);
2771 FirstString =
StrStr (FirstString, StartSearchString);
2772 if (FirstString ==
NULL) {
2776 SecondString =
StrStr (SecondString, StartSearchString);
2777 if (SecondString ==
NULL) {
2781 EndFirstString =
StrStr (FirstString, StopSearchString);
2782 if (EndFirstString ==
NULL) {
2786 EndSecondString =
StrStr (SecondString, StopSearchString);
2787 if (EndSecondString ==
NULL) {
2791 if ((EndFirstString - FirstString) != (EndSecondString - SecondString)) {
2795 return (BOOLEAN)(
StrnCmp (FirstString, SecondString, EndFirstString - FirstString) == 0);
2814 IN CONST EFI_STRING ConfigHdr,
2816 IN CONST CHAR16 *Name OPTIONAL
2819 EFI_STRING CompareConfigHdr;
2822 ASSERT (ConfigHdr !=
NULL);
2828 if (CompareConfigHdr ==
NULL) {
2840 if (Result && (Name !=
NULL)) {
2874 IN CONST CHAR16 *VariableName OPTIONAL,
2879 EFI_STRING ResultsData;
2881 EFI_STRING ConfigResp;
2889 if (ResultsData ==
NULL) {
2896 Size = (
StrLen (mConfigHdrTemplate) + 1) *
sizeof (CHAR16);
2897 Size = Size + (
StrLen (ResultsData) + 1) *
sizeof (CHAR16);
2899 UnicodeSPrint (ConfigResp, Size, L
"%s&%s", mConfigHdrTemplate, ResultsData);
2905 if (ConfigResp ==
NULL) {
2924 if (EFI_ERROR (Status)) {
2956 IN CONST CHAR16 *VariableName OPTIONAL,
2959 IN CONST CHAR16 *RequestElement OPTIONAL
2963 EFI_STRING ConfigRequest;
2964 EFI_STRING ConfigResp;
2965 EFI_STRING ResultsData;
2967 ASSERT (Buffer !=
NULL);
2972 if (RequestElement ==
NULL) {
2977 Size = (
StrLen (mConfigHdrTemplate) + 32 + 1) *
sizeof (CHAR16);
2979 UnicodeSPrint (ConfigRequest, Size, L
"%s&OFFSET=0&WIDTH=%016LX", mConfigHdrTemplate, (UINT64)BufferSize);
2985 Size =
StrLen (mConfigHdrTemplate) *
sizeof (CHAR16);
2986 Size = Size + (
StrLen (RequestElement) + 1) *
sizeof (CHAR16);
2988 UnicodeSPrint (ConfigRequest, Size, L
"%s%s", mConfigHdrTemplate, RequestElement);
2991 if (ConfigRequest ==
NULL) {
3000 if (ConfigResp ==
NULL) {
3010 return (BOOLEAN)(ResultsData !=
NULL);
3019#define HII_LIB_OPCODE_ALLOCATION_SIZE 0x200
3058 if (OpCodeBuffer ==
NULL) {
3063 if (OpCodeBuffer->Buffer ==
NULL) {
3069 OpCodeBuffer->Position = 0;
3070 return (VOID *)OpCodeBuffer;
3091 ASSERT (OpCodeHandle !=
NULL);
3094 if (OpCodeBuffer->Buffer !=
NULL) {
3111 IN VOID *OpCodeHandle
3127 IN VOID *OpCodeHandle
3145 IN VOID *OpCodeHandle,
3152 ASSERT (OpCodeHandle !=
NULL);
3155 if (OpCodeBuffer->Position + Size > OpCodeBuffer->BufferSize) {
3157 OpCodeBuffer->BufferSize,
3159 OpCodeBuffer->Buffer
3161 ASSERT (Buffer !=
NULL);
3162 OpCodeBuffer->Buffer = Buffer;
3166 Buffer = OpCodeBuffer->Buffer + OpCodeBuffer->Position;
3167 OpCodeBuffer->Position += Size;
3186 IN VOID *OpCodeHandle,
3187 IN VOID *OpCodeTemplate,
3197 ASSERT (OpCodeTemplate !=
NULL);
3198 ASSERT ((OpCodeSize + ExtensionSize) <= 0x7F);
3201 Header->OpCode = OpCode;
3202 Header->Scope = Scope;
3203 Header->Length = (UINT8)(OpCodeSize + ExtensionSize);
3205 return (UINT8 *)
CopyMem (Buffer, Header, OpCodeSize);
3221 IN VOID *OpCodeHandle,
3222 IN VOID *OpCodeTemplate,
3247 IN VOID *OpCodeHandle,
3248 IN UINT8 *RawBuffer,
3254 ASSERT (RawBuffer !=
NULL);
3257 return (UINT8 *)
CopyMem (Buffer, RawBuffer, RawBufferSize);
3276 IN VOID *OpCodeHandle,
3277 IN VOID *RawOpCodeHandle
3282 ASSERT (RawOpCodeHandle !=
NULL);
3285 return HiiCreateRawOpCodes (OpCodeHandle, RawOpCodeBuffer->Buffer, RawOpCodeBuffer->Position);
3302 IN VOID *OpCodeHandle
3330 IN VOID *OpCodeHandle,
3339 ASSERT (Type < EFI_IFR_TYPE_OTHER);
3341 ZeroMem (&OpCode,
sizeof (OpCode));
3342 OpCode.Option = StringId;
3343 OpCode.Flags = (UINT8)(Flags & (EFI_IFR_OPTION_DEFAULT | EFI_IFR_OPTION_DEFAULT_MFG));
3368 IN VOID *OpCodeHandle,
3369 IN UINT16 DefaultId,
3376 ASSERT (Type < EFI_IFR_TYPE_OTHER);
3378 ZeroMem (&OpCode,
sizeof (OpCode));
3380 OpCode.DefaultId = DefaultId;
3412 IN VOID *OpCodeHandle,
3414 IN CONST VOID *GuidOpCode OPTIONAL,
3421 ASSERT (Guid !=
NULL);
3422 ASSERT (OpCodeSize >=
sizeof (OpCode));
3424 ZeroMem (&OpCode,
sizeof (OpCode));
3432 OpCodeSize -
sizeof (OpCode),
3435 if ((OpCodePointer !=
NULL) && (GuidOpCode !=
NULL)) {
3436 CopyMem (OpCodePointer + 1, (
EFI_IFR_GUID *)GuidOpCode + 1, OpCodeSize -
sizeof (OpCode));
3439 return (UINT8 *)OpCodePointer;
3462 IN VOID *OpCodeHandle,
3463 IN EFI_QUESTION_ID QuestionId,
3464 IN EFI_STRING_ID Prompt,
3465 IN EFI_STRING_ID Help,
3466 IN UINT8 QuestionFlags,
3467 IN EFI_STRING_ID QuestionConfig
3472 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
3474 ZeroMem (&OpCode,
sizeof (OpCode));
3475 OpCode.Question.QuestionId = QuestionId;
3476 OpCode.Question.Header.Prompt = Prompt;
3477 OpCode.Question.Header.Help = Help;
3478 OpCode.Question.Flags = QuestionFlags;
3479 OpCode.QuestionConfig = QuestionConfig;
3505 IN VOID *OpCodeHandle,
3506 IN EFI_STRING_ID Prompt,
3507 IN EFI_STRING_ID Help,
3514 ASSERT (Scope <= 1);
3515 ASSERT ((Flags & (~(EFI_IFR_FLAGS_HORIZONTAL))) == 0);
3517 ZeroMem (&OpCode,
sizeof (OpCode));
3518 OpCode.Statement.Prompt = Prompt;
3519 OpCode.Statement.Help = Help;
3520 OpCode.Flags = Flags;
3525 EFI_IFR_SUBTITLE_OP,
3552 IN VOID *OpCodeHandle,
3553 IN EFI_FORM_ID FormId,
3554 IN EFI_STRING_ID Prompt,
3555 IN EFI_STRING_ID Help,
3556 IN UINT8 QuestionFlags,
3557 IN EFI_QUESTION_ID QuestionId
3562 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
3564 ZeroMem (&OpCode,
sizeof (OpCode));
3565 OpCode.Question.Header.Prompt = Prompt;
3566 OpCode.Question.Header.Help = Help;
3567 OpCode.Question.QuestionId = QuestionId;
3568 OpCode.Question.Flags = QuestionFlags;
3569 OpCode.FormId = FormId;
3606 IN VOID *OpCodeHandle,
3607 IN EFI_FORM_ID RefFormId,
3608 IN EFI_STRING_ID Prompt,
3609 IN EFI_STRING_ID Help,
3610 IN UINT8 QuestionFlags,
3611 IN EFI_QUESTION_ID QuestionId,
3612 IN EFI_QUESTION_ID RefQuestionId,
3614 IN EFI_STRING_ID RefDevicePath
3620 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
3622 ZeroMem (&OpCode,
sizeof (OpCode));
3623 OpCode.Question.Header.Prompt = Prompt;
3624 OpCode.Question.Header.Help = Help;
3625 OpCode.Question.QuestionId = QuestionId;
3626 OpCode.Question.Flags = QuestionFlags;
3627 OpCode.FormId = RefFormId;
3628 OpCode.QuestionId = RefQuestionId;
3629 OpCode.DevicePath = RefDevicePath;
3630 if (RefFormSetId !=
NULL) {
3631 CopyMem (&OpCode.FormSetId, RefFormSetId, sizeof (OpCode.FormSetId));
3639 if (RefDevicePath != 0) {
3641 }
else if (RefFormSetId !=
NULL) {
3643 }
else if (RefQuestionId != 0) {
3676 IN VOID *OpCodeHandle,
3677 IN EFI_QUESTION_ID QuestionId,
3678 IN EFI_VARSTORE_ID VarStoreId,
3679 IN UINT16 VarOffset,
3680 IN EFI_STRING_ID Prompt,
3681 IN EFI_STRING_ID Help,
3682 IN UINT8 QuestionFlags,
3683 IN UINT8 CheckBoxFlags,
3684 IN VOID *DefaultsOpCodeHandle OPTIONAL
3690 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
3692 ZeroMem (&OpCode,
sizeof (OpCode));
3693 OpCode.Question.QuestionId = QuestionId;
3694 OpCode.Question.VarStoreId = VarStoreId;
3695 OpCode.Question.VarStoreInfo.VarOffset = VarOffset;
3696 OpCode.Question.Header.Prompt = Prompt;
3697 OpCode.Question.Header.Help = Help;
3698 OpCode.Question.Flags = QuestionFlags;
3699 OpCode.Flags = CheckBoxFlags;
3701 if (DefaultsOpCodeHandle ==
NULL) {
3741 IN VOID *OpCodeHandle,
3742 IN EFI_QUESTION_ID QuestionId,
3743 IN EFI_VARSTORE_ID VarStoreId,
3744 IN UINT16 VarOffset,
3745 IN EFI_STRING_ID Prompt,
3746 IN EFI_STRING_ID Help,
3747 IN UINT8 QuestionFlags,
3748 IN UINT8 NumericFlags,
3752 IN VOID *DefaultsOpCodeHandle OPTIONAL
3759 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
3762 ZeroMem (&OpCode,
sizeof (OpCode));
3763 OpCode.Question.QuestionId = QuestionId;
3764 OpCode.Question.VarStoreId = VarStoreId;
3765 OpCode.Question.VarStoreInfo.VarOffset = VarOffset;
3766 OpCode.Question.Header.Prompt = Prompt;
3767 OpCode.Question.Header.Help = Help;
3768 OpCode.Question.Flags = QuestionFlags;
3769 OpCode.Flags = NumericFlags;
3771 switch (NumericFlags & EFI_IFR_NUMERIC_SIZE) {
3772 case EFI_IFR_NUMERIC_SIZE_1:
3773 OpCode.data.u8.MinValue = (UINT8)Minimum;
3774 OpCode.data.u8.MaxValue = (UINT8)Maximum;
3775 OpCode.data.u8.Step = (UINT8)Step;
3779 case EFI_IFR_NUMERIC_SIZE_2:
3780 OpCode.data.u16.MinValue = (UINT16)Minimum;
3781 OpCode.data.u16.MaxValue = (UINT16)Maximum;
3782 OpCode.data.u16.Step = (UINT16)Step;
3786 case EFI_IFR_NUMERIC_SIZE_4:
3787 OpCode.data.u32.MinValue = (UINT32)Minimum;
3788 OpCode.data.u32.MaxValue = (UINT32)Maximum;
3789 OpCode.data.u32.Step = (UINT32)Step;
3793 case EFI_IFR_NUMERIC_SIZE_8:
3794 OpCode.data.u64.MinValue = Minimum;
3795 OpCode.data.u64.MaxValue = Maximum;
3796 OpCode.data.u64.Step = Step;
3803 if (DefaultsOpCodeHandle ==
NULL) {
3842 IN VOID *OpCodeHandle,
3843 IN EFI_QUESTION_ID QuestionId,
3844 IN EFI_VARSTORE_ID VarStoreId,
3845 IN UINT16 VarOffset,
3846 IN EFI_STRING_ID Prompt,
3847 IN EFI_STRING_ID Help,
3848 IN UINT8 QuestionFlags,
3849 IN UINT8 StringFlags,
3852 IN VOID *DefaultsOpCodeHandle OPTIONAL
3858 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
3860 ZeroMem (&OpCode,
sizeof (OpCode));
3861 OpCode.Question.Header.Prompt = Prompt;
3862 OpCode.Question.Header.Help = Help;
3863 OpCode.Question.QuestionId = QuestionId;
3864 OpCode.Question.VarStoreId = VarStoreId;
3865 OpCode.Question.VarStoreInfo.VarOffset = VarOffset;
3866 OpCode.Question.Flags = QuestionFlags;
3867 OpCode.MinSize = MinSize;
3868 OpCode.MaxSize = MaxSize;
3869 OpCode.Flags = (UINT8)(StringFlags & EFI_IFR_STRING_MULTI_LINE);
3871 if (DefaultsOpCodeHandle ==
NULL) {
3909 IN VOID *OpCodeHandle,
3910 IN EFI_QUESTION_ID QuestionId,
3911 IN EFI_VARSTORE_ID VarStoreId,
3912 IN UINT16 VarOffset,
3913 IN EFI_STRING_ID Prompt,
3914 IN EFI_STRING_ID Help,
3915 IN UINT8 QuestionFlags,
3916 IN UINT8 OneOfFlags,
3917 IN VOID *OptionsOpCodeHandle,
3918 IN VOID *DefaultsOpCodeHandle OPTIONAL
3925 ASSERT (OptionsOpCodeHandle !=
NULL);
3926 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
3928 ZeroMem (&OpCode,
sizeof (OpCode));
3929 OpCode.Question.Header.Prompt = Prompt;
3930 OpCode.Question.Header.Help = Help;
3931 OpCode.Question.QuestionId = QuestionId;
3932 OpCode.Question.VarStoreId = VarStoreId;
3933 OpCode.Question.VarStoreInfo.VarOffset = VarOffset;
3934 OpCode.Question.Flags = QuestionFlags;
3935 OpCode.Flags = OneOfFlags;
3938 Length += (1 << (OneOfFlags & EFI_IFR_NUMERIC_SIZE)) * 3;
3943 if (DefaultsOpCodeHandle !=
NULL) {
3980 IN VOID *OpCodeHandle,
3981 IN EFI_QUESTION_ID QuestionId,
3982 IN EFI_VARSTORE_ID VarStoreId,
3983 IN UINT16 VarOffset,
3984 IN EFI_STRING_ID Prompt,
3985 IN EFI_STRING_ID Help,
3986 IN UINT8 QuestionFlags,
3987 IN UINT8 OrderedListFlags,
3989 IN UINT8 MaxContainers,
3990 IN VOID *OptionsOpCodeHandle,
3991 IN VOID *DefaultsOpCodeHandle OPTIONAL
3997 ASSERT (OptionsOpCodeHandle !=
NULL);
3998 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
4000 ZeroMem (&OpCode,
sizeof (OpCode));
4001 OpCode.Question.Header.Prompt = Prompt;
4002 OpCode.Question.Header.Help = Help;
4003 OpCode.Question.QuestionId = QuestionId;
4004 OpCode.Question.VarStoreId = VarStoreId;
4005 OpCode.Question.VarStoreInfo.VarOffset = VarOffset;
4006 OpCode.Question.Flags = QuestionFlags;
4007 OpCode.MaxContainers = MaxContainers;
4008 OpCode.Flags = OrderedListFlags;
4013 if (DefaultsOpCodeHandle !=
NULL) {
4038 IN VOID *OpCodeHandle,
4039 IN EFI_STRING_ID Prompt,
4040 IN EFI_STRING_ID Help,
4041 IN EFI_STRING_ID TextTwo
4046 ZeroMem (&OpCode,
sizeof (OpCode));
4047 OpCode.Statement.Prompt = Prompt;
4048 OpCode.Statement.Help = Help;
4049 OpCode.TextTwo = TextTwo;
4082 IN VOID *OpCodeHandle,
4083 IN EFI_QUESTION_ID QuestionId,
4084 IN EFI_VARSTORE_ID VarStoreId OPTIONAL,
4085 IN UINT16 VarOffset OPTIONAL,
4086 IN EFI_STRING_ID Prompt,
4087 IN EFI_STRING_ID Help,
4088 IN UINT8 QuestionFlags,
4090 IN VOID *DefaultsOpCodeHandle OPTIONAL
4096 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
4097 ASSERT ((DateFlags & (~(EFI_QF_DATE_YEAR_SUPPRESS | EFI_QF_DATE_MONTH_SUPPRESS | EFI_QF_DATE_DAY_SUPPRESS | EFI_QF_DATE_STORAGE))) == 0);
4099 ZeroMem (&OpCode,
sizeof (OpCode));
4100 OpCode.Question.Header.Prompt = Prompt;
4101 OpCode.Question.Header.Help = Help;
4102 OpCode.Question.QuestionId = QuestionId;
4103 OpCode.Question.VarStoreId = VarStoreId;
4104 OpCode.Question.VarStoreInfo.VarOffset = VarOffset;
4105 OpCode.Question.Flags = QuestionFlags;
4106 OpCode.Flags = DateFlags;
4108 if (DefaultsOpCodeHandle ==
NULL) {
4147 IN VOID *OpCodeHandle,
4148 IN EFI_QUESTION_ID QuestionId,
4149 IN EFI_VARSTORE_ID VarStoreId OPTIONAL,
4150 IN UINT16 VarOffset OPTIONAL,
4151 IN EFI_STRING_ID Prompt,
4152 IN EFI_STRING_ID Help,
4153 IN UINT8 QuestionFlags,
4155 IN VOID *DefaultsOpCodeHandle OPTIONAL
4161 ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
4162 ASSERT ((TimeFlags & (~(QF_TIME_HOUR_SUPPRESS | QF_TIME_MINUTE_SUPPRESS | QF_TIME_SECOND_SUPPRESS | QF_TIME_STORAGE))) == 0);
4164 ZeroMem (&OpCode,
sizeof (OpCode));
4165 OpCode.Question.Header.Prompt = Prompt;
4166 OpCode.Question.Header.Help = Help;
4167 OpCode.Question.QuestionId = QuestionId;
4168 OpCode.Question.VarStoreId = VarStoreId;
4169 OpCode.Question.VarStoreInfo.VarOffset = VarOffset;
4170 OpCode.Question.Flags = QuestionFlags;
4171 OpCode.Flags = TimeFlags;
4173 if (DefaultsOpCodeHandle ==
NULL) {
4205 IN EFI_FORM_ID FormId,
4221 UINTN UpdatePackageLength;
4225 BufferPos = (UINT8 *)(TempPackage + 1);
4230 GetFormSet = (BOOLEAN)((FormSetGuid ==
NULL) ?
TRUE :
FALSE);
4234 while (Offset < PackageHeader.Length) {
4235 CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
4236 BufferPos += IfrOpHdr->Length;
4237 UpdatePackageLength += IfrOpHdr->Length;
4242 if ((IfrOpHdr->OpCode == EFI_IFR_FORM_SET_OP) && (FormSetGuid !=
NULL)) {
4248 }
else if ((IfrOpHdr->OpCode == EFI_IFR_FORM_OP) || (IfrOpHdr->OpCode == EFI_IFR_FORM_MAP_OP)) {
4259 if (GetFormSet && GetForm) {
4261 if ((UpdateIfrOpHdr->Length == IfrOpHdr->Length) && \
4262 (
CompareMem (IfrOpHdr, UpdateIfrOpHdr, UpdateIfrOpHdr->Length) == 0))
4267 if (OpCodeBufferEnd !=
NULL) {
4268 Offset += IfrOpHdr->Length;
4271 while (Offset < PackageHeader.Length) {
4275 if ((UpdateIfrOpHdr->Length == IfrOpHdr->Length) && \
4276 (
CompareMem (IfrOpHdr, UpdateIfrOpHdr, UpdateIfrOpHdr->Length) == 0))
4284 Offset += IfrOpHdr->Length;
4288 if (Offset >= PackageHeader.Length) {
4292 return EFI_NOT_FOUND;
4300 CopyMem (BufferPos, OpCodeBufferStart->Buffer + AddSize, OpCodeBufferStart->Position - AddSize);
4301 BufferPos += OpCodeBufferStart->Position - AddSize;
4302 UpdatePackageLength += OpCodeBufferStart->Position - AddSize;
4304 if (OpCodeBufferEnd !=
NULL) {
4308 CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
4309 BufferPos += IfrOpHdr->Length;
4310 UpdatePackageLength += IfrOpHdr->Length;
4316 Offset += IfrOpHdr->Length;
4317 CopyMem (BufferPos, (UINT8 *)Package + Offset, PackageHeader.Length - Offset);
4318 UpdatePackageLength += PackageHeader.Length - Offset;
4331 Offset += IfrOpHdr->Length;
4339 return EFI_NOT_FOUND;
4345 PackageHeader.Length = (UINT32)UpdatePackageLength;
4413 IN EFI_FORM_ID FormId,
4414 IN VOID *StartOpCodeHandle,
4415 IN VOID *EndOpCodeHandle OPTIONAL
4420 UINT32 PackageListLength;
4424 UINT8 *UpdateBufferPos;
4435 ASSERT (HiiHandle !=
NULL);
4436 ASSERT (StartOpCodeHandle !=
NULL);
4437 UpdatePackageList =
NULL;
4439 HiiPackageList =
NULL;
4451 HiiPackageList =
NULL;
4456 if (Status != EFI_BUFFER_TOO_SMALL) {
4461 if (HiiPackageList ==
NULL) {
4462 Status = EFI_OUT_OF_RESOURCES;
4467 if (EFI_ERROR (Status)) {
4474 BufferSize += OpCodeBufferStart->Position;
4476 if (UpdatePackageList ==
NULL) {
4477 Status = EFI_OUT_OF_RESOURCES;
4485 if (TempPackage ==
NULL) {
4486 Status = EFI_OUT_OF_RESOURCES;
4490 UpdateBufferPos = (UINT8 *)UpdatePackageList;
4504 while (Offset < PackageListLength) {
4507 Offset += Package->Length;
4509 if (Package->Type == EFI_HII_PACKAGE_FORMS) {
4517 if (!EFI_ERROR (Status)) {
4525 Package = TempPackage;
4533 CopyMem (UpdateBufferPos, Package, PackageHeader.Length);
4534 UpdateBufferPos += PackageHeader.Length;
4541 BufferSize = UpdateBufferPos - (UINT8 *)UpdatePackageList;
4552 Status = EFI_NOT_FOUND;
4556 if (HiiPackageList !=
NULL) {
4560 if (UpdatePackageList !=
NULL) {
4564 if (TempPackage !=
NULL) {
UINT64 EFIAPI StrHexToUint64(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)
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)
INTN EFIAPI StrnCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString, IN UINTN Length)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
UINT32 EFIAPI WriteUnaligned32(OUT UINT32 *Buffer, IN UINT32 Value)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
RETURN_STATUS EFIAPI StrnCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
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)
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
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)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DevicePathFromHandle(IN EFI_HANDLE Handle)
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
VOID *EFIAPI ReallocatePool(IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STRING EFIAPI HiiConstructConfigHdr(IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL, IN EFI_HANDLE DriverHandle)
UINT8 *EFIAPI InternalHiiAppendOpCodes(IN VOID *OpCodeHandle, IN VOID *RawOpCodeHandle)
UINT8 *EFIAPI HiiCreateSubTitleOpCode(IN VOID *OpCodeHandle, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 Flags, IN UINT8 Scope)
UINT8 *EFIAPI InternalHiiGrowOpCodeHandle(IN VOID *OpCodeHandle, IN UINTN Size)
UINT8 *EFIAPI HiiCreateDateOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId OPTIONAL, IN UINT16 VarOffset OPTIONAL, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 DateFlags, IN VOID *DefaultsOpCodeHandle OPTIONAL)
EFI_STATUS GetValueFromRequest(IN CHAR16 *ConfigElement, IN CHAR16 *VarName, OUT UINT64 *VarValue)
UINT8 *EFIAPI HiiCreateNumericOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 NumericFlags, IN UINT64 Minimum, IN UINT64 Maximum, IN UINT64 Step, IN VOID *DefaultsOpCodeHandle OPTIONAL)
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 mHiiDefaultTypeToWidth[]
EFI_STATUS EFIAPI InternalHiiUpdateFormPackageData(IN EFI_GUID *FormSetGuid OPTIONAL, IN EFI_FORM_ID FormId, IN EFI_HII_PACKAGE_HEADER *Package, IN HII_LIB_OPCODE_BUFFER *OpCodeBufferStart, IN HII_LIB_OPCODE_BUFFER *OpCodeBufferEnd OPTIONAL, OUT EFI_HII_PACKAGE_HEADER *TempPackage)
#define HII_LIB_OPCODE_ALLOCATION_SIZE
UINT8 *EFIAPI HiiCreateDefaultOpCode(IN VOID *OpCodeHandle, IN UINT16 DefaultId, IN UINT8 Type, IN UINT64 Value)
BOOLEAN EFIAPI InternalHiiCompareSubString(IN CHAR16 *FirstString, IN CHAR16 *SecondString, IN CHAR16 *StartSearchString, IN CHAR16 *StopSearchString)
BOOLEAN EFIAPI HiiGetBrowserData(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN UINTN BufferSize, OUT UINT8 *Buffer)
EFI_STRING EFIAPI InternalHiiLowerConfigString(IN EFI_STRING ConfigString)
UINTN EFIAPI InternalHiiOpCodeHandlePosition(IN VOID *OpCodeHandle)
UINT8 *EFIAPI HiiCreateGotoOpCode(IN VOID *OpCodeHandle, IN EFI_FORM_ID FormId, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN EFI_QUESTION_ID QuestionId)
VOID *EFIAPI HiiAllocateOpCodeHandle(VOID)
EFI_STATUS GetBlockDataInfo(IN CHAR16 *ConfigElement, OUT IFR_BLOCK_DATA **CurrentBlockArray, OUT UINT8 **VarBuffer)
EFI_STATUS EFIAPI InternalHiiGetValueOfNumber(IN EFI_STRING ValueString, OUT UINT8 **ValueData, OUT UINTN *ValueLength)
UINT8 *EFIAPI HiiCreateTimeOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId OPTIONAL, IN UINT16 VarOffset OPTIONAL, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 TimeFlags, IN VOID *DefaultsOpCodeHandle OPTIONAL)
EFI_STATUS ValidateQuestionFromVfr(IN EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList, IN UINTN PackageListLength, IN EFI_GUID *VarGuid, IN CHAR16 *VarName, IN UINT8 *VarBuffer, IN IFR_BLOCK_DATA *CurrentBlockArray, IN CHAR16 *RequestElement, IN EFI_HII_HANDLE HiiHandle, IN BOOLEAN NameValueType)
VOID EFIAPI HiiFreeOpCodeHandle(VOID *OpCodeHandle)
UINT8 *EFIAPI InternalHiiCreateOpCode(IN VOID *OpCodeHandle, IN VOID *OpCodeTemplate, IN UINT8 OpCode, IN UINTN OpCodeSize)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
UINT8 *EFIAPI HiiCreateGuidOpCode(IN VOID *OpCodeHandle, IN CONST EFI_GUID *Guid, IN CONST VOID *GuidOpCode OPTIONAL, IN UINTN OpCodeSize)
UINT8 *EFIAPI HiiCreateStringOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 StringFlags, IN UINT8 MinSize, IN UINT8 MaxSize, IN VOID *DefaultsOpCodeHandle OPTIONAL)
UINT8 *EFIAPI HiiCreateCheckBoxOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 CheckBoxFlags, IN VOID *DefaultsOpCodeHandle OPTIONAL)
BOOLEAN EFIAPI HiiSetBrowserData(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN UINTN BufferSize, IN CONST UINT8 *Buffer, IN CONST CHAR16 *RequestElement OPTIONAL)
EFI_STATUS InternalHiiGetBufferFromString(IN EFI_STRING String, IN UINT8 Flag, OUT UINT8 **Buffer)
EFI_HII_HANDLE *EFIAPI HiiGetHiiHandles(IN CONST EFI_GUID *PackageListGuid OPTIONAL)
BOOLEAN EFIAPI InternalHiiIfrValueAction(IN CONST EFI_STRING Request OPTIONAL, IN UINT16 DefaultId, IN UINT8 ActionType)
UINT8 *EFIAPI HiiCreateEndOpCode(IN VOID *OpCodeHandle)
EFI_STRING EFIAPI InternalHiiBlockToConfig(IN CONST EFI_STRING ConfigRequest, IN CONST UINT8 *Block, IN UINTN BlockSize)
EFI_STATUS EFIAPI InternalHiiExtractGuidFromHiiHandle(IN EFI_HII_HANDLE Handle, OUT EFI_GUID *Guid)
UINT8 *EFIAPI HiiCreateOneOfOptionOpCode(IN VOID *OpCodeHandle, IN UINT16 StringId, IN UINT8 Flags, IN UINT8 Type, IN UINT64 Value)
EFI_STATUS EFIAPI InternalHiiValidateCurrentSetting(IN EFI_STRING ConfigResp, IN EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList, IN UINTN PackageListLength, IN EFI_GUID *VarGuid, IN CHAR16 *VarName, IN EFI_HII_HANDLE HiiHandle)
BOOLEAN BlockArrayCheck(IN IFR_BLOCK_DATA *BlockArray, IN UINT16 VarOffset, IN UINT16 VarWidth)
UINT8 *EFIAPI HiiCreateRawOpCodes(IN VOID *OpCodeHandle, IN UINT8 *RawBuffer, IN UINTN RawBufferSize)
EFI_STATUS EFIAPI HiiUpdateForm(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid OPTIONAL, IN EFI_FORM_ID FormId, IN VOID *StartOpCodeHandle, IN VOID *EndOpCodeHandle OPTIONAL)
BOOLEAN EFIAPI HiiIsConfigHdrMatch(IN CONST EFI_STRING ConfigHdr, IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL)
UINT8 *EFIAPI HiiCreateOneOfOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 OneOfFlags, IN VOID *OptionsOpCodeHandle, IN VOID *DefaultsOpCodeHandle OPTIONAL)
UINT8 *EFIAPI InternalHiiOpCodeHandleBuffer(IN VOID *OpCodeHandle)
BOOLEAN GetElementsFromRequest(IN EFI_STRING ConfigRequest)
EFI_STRING EFIAPI InternalHiiBrowserCallback(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN CONST EFI_STRING SetResultsData OPTIONAL)
UINT8 *EFIAPI InternalHiiCreateOpCodeExtended(IN VOID *OpCodeHandle, IN VOID *OpCodeTemplate, IN UINT8 OpCode, IN UINTN OpCodeSize, IN UINTN ExtensionSize, IN UINT8 Scope)
UINT8 *EFIAPI HiiCreateGotoExOpCode(IN VOID *OpCodeHandle, IN EFI_FORM_ID RefFormId, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN EFI_QUESTION_ID QuestionId, IN EFI_QUESTION_ID RefQuestionId, IN EFI_GUID *RefFormSetId OPTIONAL, IN EFI_STRING_ID RefDevicePath)
UINT8 *EFIAPI HiiCreateActionOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN EFI_STRING_ID QuestionConfig)
UINT8 *EFIAPI HiiCreateOrderedListOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 OrderedListFlags, IN UINT8 DataType, IN UINT8 MaxContainers, IN VOID *OptionsOpCodeHandle, IN VOID *DefaultsOpCodeHandle OPTIONAL)
EFI_STATUS EFIAPI HiiGetFormSetFromHiiHandle(IN EFI_HII_HANDLE Handle, OUT EFI_IFR_FORM_SET **Buffer, OUT UINTN *BufferSize)
UINT8 *EFIAPI HiiCreateTextOpCode(IN VOID *OpCodeHandle, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN EFI_STRING_ID TextTwo)
BOOLEAN EFIAPI HiiValidateSettings(IN CONST EFI_STRING Request OPTIONAL)
BOOLEAN EFIAPI HiiSetToDefaults(IN CONST EFI_STRING Request OPTIONAL, IN UINT16 DefaultId)
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
#define EDKII_IFR_DISPLAY_BIT
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,...)
#define VA_ARG(Marker, TYPE)
#define VA_START(Marker, Parameter)
#define OFFSET_OF(TYPE, Field)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define BASE_CR(Record, TYPE, Field)
#define ASSERT_EFI_ERROR(StatusParameter)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_HII_CONFIG_ROUTING_PROTOCOL * gHiiConfigRouting
EFI_HII_DATABASE_PROTOCOL * gHiiDatabase