32 OUT UINT8 **DevicePathData,
33 OUT EFI_STRING *NextString
38 UINT8 *DevicePathBuffer;
44 ASSERT (NextString !=
NULL && DevicePathData !=
NULL);
50 *DevicePathData =
NULL;
58 if (*String == L
'&') {
66 if (
StrnCmp (String, L
"KEYWORD=",
StrLen (L
"KEYWORD=")) != 0) {
67 return EFI_INVALID_PARAMETER;
72 *DevicePathData =
NULL;
81 String +=
StrLen (L
"PATH=");
83 return EFI_INVALID_PARAMETER;
93 for (Length = 0; *String != 0 && *String != L
'&'; String++, Length++) {
105 return EFI_INVALID_PARAMETER;
114 if (DevicePathBuffer ==
NULL) {
115 return EFI_OUT_OF_RESOURCES;
121 ZeroMem (TemStr,
sizeof (TemStr));
122 for (Index = 0; Index < Length; Index++) {
123 TemStr[0] = PathHdr[Index];
125 if ((Index & 1) == 0) {
126 DevicePathBuffer[Index/2] = DigitUint8;
128 DevicePathBuffer[Index/2] = (UINT8)((DevicePathBuffer[Index/2] << 4) + DigitUint8);
142 return EFI_INVALID_PARAMETER;
151 *DevicePathData = DevicePathBuffer;
171 IN EFI_STRING String,
172 OUT CHAR8 **NameSpace,
173 OUT EFI_STRING *NextString
179 ASSERT (NameSpace !=
NULL);
186 if (String ==
NULL) {
188 if (NextString !=
NULL) {
198 if (*String == L
'&') {
202 if (
StrnCmp (String, L
"NAMESPACE=",
StrLen (L
"NAMESPACE=")) != 0) {
203 return EFI_INVALID_PARAMETER;
206 String +=
StrLen (L
"NAMESPACE=");
208 TmpPtr =
StrStr (String, L
"&");
209 if (TmpPtr !=
NULL) {
213 if (NextString !=
NULL) {
214 *NextString = String +
StrLen (String);
221 NameSpaceSize =
StrLen (String) + 1;
223 if (*NameSpace ==
NULL) {
224 return EFI_OUT_OF_RESOURCES;
229 if (TmpPtr !=
NULL) {
251 IN EFI_STRING String,
252 OUT EFI_STRING *Keyword,
253 OUT EFI_STRING *NextString
258 ASSERT ((Keyword !=
NULL) && (NextString !=
NULL));
265 if (String ==
NULL) {
274 if (*String == L
'&') {
278 if (
StrnCmp (String, L
"KEYWORD=",
StrLen (L
"KEYWORD=")) != 0) {
279 return EFI_INVALID_PARAMETER;
282 String +=
StrLen (L
"KEYWORD=");
284 TmpPtr =
StrStr (String, L
"&");
285 if (TmpPtr !=
NULL) {
289 *NextString = String +
StrLen (String);
292 if (*Keyword ==
NULL) {
293 return EFI_OUT_OF_RESOURCES;
296 if (TmpPtr !=
NULL) {
318 IN EFI_STRING String,
319 OUT EFI_STRING *Value,
320 OUT EFI_STRING *NextString
325 ASSERT ((Value !=
NULL) && (NextString !=
NULL) && (String !=
NULL));
330 if (*String == L
'&') {
335 return EFI_INVALID_PARAMETER;
338 String +=
StrLen (L
"VALUE=");
340 TmpPtr =
StrStr (String, L
"&");
341 if (TmpPtr !=
NULL) {
345 *NextString = String +
StrLen (String);
348 if (*Value ==
NULL) {
349 return EFI_OUT_OF_RESOURCES;
352 if (TmpPtr !=
NULL) {
374 IN EFI_STRING String,
375 OUT UINT8 *FilterFlags,
376 OUT EFI_STRING *NextString
383 ASSERT ((FilterFlags !=
NULL) && (NextString !=
NULL));
388 if (String ==
NULL) {
399 if (*String == L
'&') {
403 if (
StrnCmp (String, L
"ReadOnly",
StrLen (L
"ReadOnly")) == 0) {
407 *FilterFlags |= EFI_KEYWORD_FILTER_READONY;
408 String +=
StrLen (L
"ReadOnly");
409 }
else if (
StrnCmp (String, L
"ReadWrite",
StrLen (L
"ReadWrite")) == 0) {
413 *FilterFlags |= EFI_KEYWORD_FILTER_REAWRITE;
414 String +=
StrLen (L
"ReadWrite");
415 }
else if (
StrnCmp (String, L
"Buffer",
StrLen (L
"Buffer")) == 0) {
419 *FilterFlags |= EFI_KEYWORD_FILTER_BUFFER;
420 String +=
StrLen (L
"Buffer");
421 }
else if (
StrnCmp (String, L
"Numeric",
StrLen (L
"Numeric")) == 0) {
425 String +=
StrLen (L
"Numeric");
426 if (*String != L
':') {
427 *FilterFlags |= EFI_KEYWORD_FILTER_NUMERIC;
432 *FilterFlags |= EFI_KEYWORD_FILTER_NUMERIC_1;
435 *FilterFlags |= EFI_KEYWORD_FILTER_NUMERIC_2;
438 *FilterFlags |= EFI_KEYWORD_FILTER_NUMERIC_4;
441 *FilterFlags |= EFI_KEYWORD_FILTER_NUMERIC_8;
465 PathPtr =
StrStr (String, L
"&PATH");
466 KeywordPtr =
StrStr (String, L
"&KEYWORD");
467 if ((PathPtr !=
NULL) && (KeywordPtr !=
NULL)) {
471 String = KeywordPtr > PathPtr ? PathPtr : KeywordPtr;
472 }
else if (PathPtr !=
NULL) {
477 }
else if (KeywordPtr !=
NULL) {
486 String +=
StrLen (String);
493 *NextString = String;
516 ASSERT (OpCodeData !=
NULL);
520 return (QuestionHdr->Flags & EFI_IFR_FLAG_READ_ONLY) != 0;
539 IN UINT8 *OpCodeData,
540 IN CHAR16 *KeywordRequest,
541 OUT CHAR16 **NextString,
542 OUT BOOLEAN *ReadOnly
553 RetVal = KEYWORD_HANDLER_NO_ERROR;
554 StringPtr = KeywordRequest;
558 if ((OpCodeHdr->OpCode == EFI_IFR_ONE_OF_OP) || (OpCodeHdr->OpCode == EFI_IFR_NUMERIC_OP)) {
569 while (
ExtractFilter (StringPtr, &FilterFlags, &NextFilter)) {
570 switch (FilterFlags) {
571 case EFI_KEYWORD_FILTER_READONY:
572 if ((QuestionHdr->Flags & EFI_IFR_FLAG_READ_ONLY) == 0) {
573 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
579 case EFI_KEYWORD_FILTER_REAWRITE:
580 if ((QuestionHdr->Flags & EFI_IFR_FLAG_READ_ONLY) != 0) {
581 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
587 case EFI_KEYWORD_FILTER_BUFFER:
591 if ((OpCodeHdr->OpCode == EFI_IFR_ONE_OF_OP) || (OpCodeHdr->OpCode == EFI_IFR_NUMERIC_OP) || (OpCodeHdr->OpCode == EFI_IFR_CHECKBOX_OP)) {
592 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
598 case EFI_KEYWORD_FILTER_NUMERIC:
599 if ((OpCodeHdr->OpCode != EFI_IFR_ONE_OF_OP) && (OpCodeHdr->OpCode != EFI_IFR_NUMERIC_OP) && (OpCodeHdr->OpCode != EFI_IFR_CHECKBOX_OP)) {
600 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
606 case EFI_KEYWORD_FILTER_NUMERIC_1:
607 case EFI_KEYWORD_FILTER_NUMERIC_2:
608 case EFI_KEYWORD_FILTER_NUMERIC_4:
609 case EFI_KEYWORD_FILTER_NUMERIC_8:
610 if ((OpCodeHdr->OpCode != EFI_IFR_ONE_OF_OP) && (OpCodeHdr->OpCode != EFI_IFR_NUMERIC_OP) && (OpCodeHdr->OpCode != EFI_IFR_CHECKBOX_OP)) {
611 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
618 if ((OpCodeHdr->OpCode == EFI_IFR_ONE_OF_OP) || (OpCodeHdr->OpCode == EFI_IFR_NUMERIC_OP)) {
619 switch (Flags & EFI_IFR_NUMERIC_SIZE) {
620 case EFI_IFR_NUMERIC_SIZE_1:
621 if (FilterFlags != EFI_KEYWORD_FILTER_NUMERIC_1) {
622 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
628 case EFI_IFR_NUMERIC_SIZE_2:
629 if (FilterFlags != EFI_KEYWORD_FILTER_NUMERIC_2) {
630 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
636 case EFI_IFR_NUMERIC_SIZE_4:
637 if (FilterFlags != EFI_KEYWORD_FILTER_NUMERIC_4) {
638 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
644 case EFI_IFR_NUMERIC_SIZE_8:
645 if (FilterFlags != EFI_KEYWORD_FILTER_NUMERIC_8) {
646 RetVal = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
668 StringPtr = NextFilter;
675 *NextString = StringPtr;
696 UINT8 *DevicePathPkg;
697 UINT8 *CurrentDevicePath;
698 UINTN DevicePathSize;
701 ASSERT (DevicePath !=
NULL);
703 for (Link = mPrivate.DatabaseList.ForwardLink; Link != &mPrivate.DatabaseList; Link = Link->ForwardLink) {
705 DevicePathPkg = TempDatabase->PackageList->DevicePathPkg;
706 if (DevicePathPkg !=
NULL) {
709 if ((
CompareMem (DevicePath, CurrentDevicePath, DevicePathSize) == 0)) {
736 OUT EFI_STRING *StringDest
742 ASSERT (StringSrc !=
NULL && BufferSize !=
NULL && StringDest !=
NULL);
744 StringSize =
sizeof (CHAR16);
745 StringPtr = StringSrc;
747 StringSize +=
sizeof (CHAR16);
748 StringPtr +=
sizeof (CHAR16);
752 if (*StringDest ==
NULL) {
753 return EFI_OUT_OF_RESOURCES;
756 CopyMem (*StringDest, StringSrc, StringSize);
758 *BufferSize = StringSize;
780 IN CHAR16 *KeywordValue,
781 OUT EFI_STRING_ID *StringId
785 EFI_STRING_ID CurrentStringId;
788 UINT8 *StringTextPtr;
797 CHAR8 *AsciiKeywordValue;
798 UINTN KeywordValueSize;
801 ASSERT (StringPackage !=
NULL && KeywordValue !=
NULL && StringId !=
NULL);
802 ASSERT (StringPackage->Signature == HII_STRING_PACKAGE_SIGNATURE);
807 BlockHdr = StringPackage->StringBlock;
814 KeywordValueSize =
StrLen (KeywordValue) + 1;
816 if (AsciiKeywordValue ==
NULL) {
817 return EFI_OUT_OF_RESOURCES;
822 while (*BlockHdr != EFI_HII_SIBT_END) {
824 case EFI_HII_SIBT_STRING_SCSU:
826 StringTextPtr = BlockHdr + Offset;
827 BlockSize += Offset +
AsciiStrSize ((CHAR8 *)StringTextPtr);
828 if (
AsciiStrCmp (AsciiKeywordValue, (CHAR8 *)StringTextPtr) == 0) {
829 *StringId = CurrentStringId;
836 case EFI_HII_SIBT_STRING_SCSU_FONT:
838 StringTextPtr = BlockHdr + Offset;
839 if (
AsciiStrCmp (AsciiKeywordValue, (CHAR8 *)StringTextPtr) == 0) {
840 *StringId = CurrentStringId;
844 BlockSize += Offset +
AsciiStrSize ((CHAR8 *)StringTextPtr);
848 case EFI_HII_SIBT_STRINGS_SCSU:
851 BlockSize += StringTextPtr - BlockHdr;
853 for (Index = 0; Index < StringCount; Index++) {
855 if (
AsciiStrCmp (AsciiKeywordValue, (CHAR8 *)StringTextPtr) == 0) {
856 *StringId = CurrentStringId;
860 StringTextPtr = StringTextPtr +
AsciiStrSize ((CHAR8 *)StringTextPtr);
866 case EFI_HII_SIBT_STRINGS_SCSU_FONT:
873 BlockSize += StringTextPtr - BlockHdr;
875 for (Index = 0; Index < StringCount; Index++) {
877 if (
AsciiStrCmp (AsciiKeywordValue, (CHAR8 *)StringTextPtr) == 0) {
878 *StringId = CurrentStringId;
882 StringTextPtr = StringTextPtr +
AsciiStrSize ((CHAR8 *)StringTextPtr);
888 case EFI_HII_SIBT_STRING_UCS2:
890 StringTextPtr = BlockHdr + Offset;
896 if (EFI_ERROR (Status)) {
900 ASSERT (String !=
NULL);
901 if (
StrCmp (KeywordValue, String) == 0) {
902 *StringId = CurrentStringId;
906 BlockSize += Offset + StringSize;
910 case EFI_HII_SIBT_STRING_UCS2_FONT:
912 StringTextPtr = BlockHdr + Offset;
918 if (EFI_ERROR (Status)) {
922 ASSERT (String !=
NULL);
923 if (
StrCmp (KeywordValue, String) == 0) {
924 *StringId = CurrentStringId;
928 BlockSize += Offset + StringSize;
932 case EFI_HII_SIBT_STRINGS_UCS2:
934 StringTextPtr = BlockHdr + Offset;
937 for (Index = 0; Index < StringCount; Index++) {
939 if (EFI_ERROR (Status)) {
943 ASSERT (String !=
NULL);
944 BlockSize += StringSize;
945 if (
StrCmp (KeywordValue, String) == 0) {
946 *StringId = CurrentStringId;
950 StringTextPtr = StringTextPtr + StringSize;
956 case EFI_HII_SIBT_STRINGS_UCS2_FONT:
958 StringTextPtr = BlockHdr + Offset;
965 for (Index = 0; Index < StringCount; Index++) {
967 if (EFI_ERROR (Status)) {
971 ASSERT (String !=
NULL);
972 BlockSize += StringSize;
973 if (
StrCmp (KeywordValue, String) == 0) {
974 *StringId = CurrentStringId;
978 StringTextPtr = StringTextPtr + StringSize;
984 case EFI_HII_SIBT_DUPLICATE:
989 case EFI_HII_SIBT_SKIP1:
991 CurrentStringId = (UINT16)(CurrentStringId + SkipCount);
995 case EFI_HII_SIBT_SKIP2:
997 CurrentStringId = (UINT16)(CurrentStringId + SkipCount);
1001 case EFI_HII_SIBT_EXT1:
1007 BlockSize += Length8;
1010 case EFI_HII_SIBT_EXT2:
1012 BlockSize += Ext2.Length;
1015 case EFI_HII_SIBT_EXT4:
1022 BlockSize += Length32;
1029 if (String !=
NULL) {
1034 BlockHdr = StringPackage->StringBlock + BlockSize;
1037 Status = EFI_NOT_FOUND;
1040 if (AsciiKeywordValue !=
NULL) {
1044 if (String !=
NULL) {
1066 IN EFI_STRING_ID StringId,
1067 OUT EFI_STRING *KeywordValue
1071 EFI_STRING_ID CurrentStringId;
1074 UINT8 *StringTextPtr;
1085 ASSERT (StringPackage !=
NULL);
1086 ASSERT (StringPackage->Signature == HII_STRING_PACKAGE_SIGNATURE);
1088 CurrentStringId = 1;
1095 BlockHdr = StringPackage->StringBlock;
1098 while (*BlockHdr != EFI_HII_SIBT_END) {
1099 switch (*BlockHdr) {
1100 case EFI_HII_SIBT_STRING_SCSU:
1102 StringTextPtr = BlockHdr + Offset;
1106 *KeywordValue =
AllocatePool (StringSize *
sizeof (CHAR16));
1107 if (*KeywordValue ==
NULL) {
1112 return CurrentStringId;
1113 }
else if (CurrentStringId == StringId) {
1117 BlockSize += Offset +
AsciiStrSize ((CHAR8 *)StringTextPtr);
1121 case EFI_HII_SIBT_STRING_SCSU_FONT:
1123 StringTextPtr = BlockHdr + Offset;
1127 *KeywordValue =
AllocatePool (StringSize *
sizeof (CHAR16));
1128 if (*KeywordValue ==
NULL) {
1133 return CurrentStringId;
1134 }
else if (CurrentStringId == StringId) {
1138 BlockSize += Offset +
AsciiStrSize ((CHAR8 *)StringTextPtr);
1142 case EFI_HII_SIBT_STRINGS_SCSU:
1145 BlockSize += StringTextPtr - BlockHdr;
1147 for (Index = 0; Index < StringCount; Index++) {
1150 *KeywordValue =
AllocatePool (StringSize *
sizeof (CHAR16));
1151 if (*KeywordValue ==
NULL) {
1156 return CurrentStringId;
1157 }
else if (CurrentStringId == StringId) {
1162 StringTextPtr = StringTextPtr +
AsciiStrSize ((CHAR8 *)StringTextPtr);
1168 case EFI_HII_SIBT_STRINGS_SCSU_FONT:
1175 BlockSize += StringTextPtr - BlockHdr;
1177 for (Index = 0; Index < StringCount; Index++) {
1180 *KeywordValue =
AllocatePool (StringSize *
sizeof (CHAR16));
1181 if (*KeywordValue ==
NULL) {
1186 return CurrentStringId;
1187 }
else if (CurrentStringId == StringId) {
1192 StringTextPtr = StringTextPtr +
AsciiStrSize ((CHAR8 *)StringTextPtr);
1198 case EFI_HII_SIBT_STRING_UCS2:
1200 StringTextPtr = BlockHdr + Offset;
1206 if (FindString && (String !=
NULL) && (*String != L
'\0')) {
1212 *KeywordValue = String;
1213 return CurrentStringId;
1214 }
else if (CurrentStringId == StringId) {
1218 BlockSize += Offset + StringSize;
1222 case EFI_HII_SIBT_STRING_UCS2_FONT:
1224 StringTextPtr = BlockHdr + Offset;
1231 *KeywordValue = String;
1232 return CurrentStringId;
1233 }
else if (CurrentStringId == StringId) {
1237 BlockSize += Offset + StringSize;
1241 case EFI_HII_SIBT_STRINGS_UCS2:
1243 StringTextPtr = BlockHdr + Offset;
1244 BlockSize += Offset;
1246 for (Index = 0; Index < StringCount; Index++) {
1250 *KeywordValue = String;
1251 return CurrentStringId;
1252 }
else if (CurrentStringId == StringId) {
1256 BlockSize += StringSize;
1257 StringTextPtr = StringTextPtr + StringSize;
1263 case EFI_HII_SIBT_STRINGS_UCS2_FONT:
1265 StringTextPtr = BlockHdr + Offset;
1266 BlockSize += Offset;
1272 for (Index = 0; Index < StringCount; Index++) {
1275 *KeywordValue = String;
1276 return CurrentStringId;
1277 }
else if (CurrentStringId == StringId) {
1281 BlockSize += StringSize;
1282 StringTextPtr = StringTextPtr + StringSize;
1288 case EFI_HII_SIBT_DUPLICATE:
1293 case EFI_HII_SIBT_SKIP1:
1295 CurrentStringId = (UINT16)(CurrentStringId + SkipCount);
1299 case EFI_HII_SIBT_SKIP2:
1301 CurrentStringId = (UINT16)(CurrentStringId + SkipCount);
1305 case EFI_HII_SIBT_EXT1:
1311 BlockSize += Length8;
1314 case EFI_HII_SIBT_EXT2:
1316 BlockSize += Ext2.Length;
1319 case EFI_HII_SIBT_EXT4:
1326 BlockSize += Length32;
1333 if (String !=
NULL) {
1338 BlockHdr = StringPackage->StringBlock + BlockSize;
1363 IN CHAR8 **NameSpace,
1364 IN CHAR16 *KeywordValue,
1365 OUT EFI_STRING_ID *StringId
1375 ASSERT (DatabaseRecord !=
NULL && NameSpace !=
NULL && KeywordValue !=
NULL);
1377 PackageListNode = DatabaseRecord->PackageList;
1378 RetVal = KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND;
1380 if (*NameSpace !=
NULL) {
1383 Name = UEFI_CONFIG_LANG;
1386 for (Link = PackageListNode->StringPkgHdr.ForwardLink; Link != &PackageListNode->StringPkgHdr; Link = Link->ForwardLink) {
1391 if (EFI_ERROR (Status)) {
1392 return KEYWORD_HANDLER_KEYWORD_NOT_FOUND;
1394 if (*NameSpace ==
NULL) {
1396 if (*NameSpace ==
NULL) {
1397 return KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR;
1401 return KEYWORD_HANDLER_NO_ERROR;
1423 if ((Operand == EFI_IFR_SUBTITLE_OP) ||
1424 (Operand == EFI_IFR_TEXT_OP) ||
1425 (Operand == EFI_IFR_RESET_BUTTON_OP) ||
1426 (Operand == EFI_IFR_REF_OP) ||
1427 (Operand == EFI_IFR_ACTION_OP) ||
1428 (Operand == EFI_IFR_NUMERIC_OP) ||
1429 (Operand == EFI_IFR_ORDERED_LIST_OP) ||
1430 (Operand == EFI_IFR_CHECKBOX_OP) ||
1431 (Operand == EFI_IFR_STRING_OP) ||
1432 (Operand == EFI_IFR_PASSWORD_OP) ||
1433 (Operand == EFI_IFR_DATE_OP) ||
1434 (Operand == EFI_IFR_TIME_OP) ||
1435 (Operand == EFI_IFR_GUID_OP) ||
1436 (Operand == EFI_IFR_ONE_OF_OP))
1458 if ((Operand == EFI_IFR_VARSTORE_OP) ||
1459 (Operand == EFI_IFR_VARSTORE_NAME_VALUE_OP) ||
1460 (Operand == EFI_IFR_VARSTORE_EFI_OP))
1480 IN EFI_STRING_ID KeywordStrId
1489 ASSERT (FormPackage !=
NULL);
1493 while (Offset < FormDataLen) {
1494 OpCodeData = FormPackage->IfrData + Offset;
1499 if (StatementHeader->Prompt == KeywordStrId) {
1504 Offset += OpCodeHeader->Length;
1522 IN EFI_VARSTORE_ID VarStoreId
1530 ASSERT (FormPackage !=
NULL);
1534 while (Offset < FormDataLen) {
1535 OpCodeData = FormPackage->IfrData + Offset;
1539 switch (OpCodeHeader->OpCode) {
1540 case EFI_IFR_VARSTORE_OP:
1547 case EFI_IFR_VARSTORE_NAME_VALUE_OP:
1554 case EFI_IFR_VARSTORE_EFI_OP:
1566 Offset += OpCodeHeader->Length;
1582 IN UINT8 *OpCodeData
1585 UINT8 *NextOpCodeData;
1587 ASSERT (OpCodeData !=
NULL);
1590 case EFI_IFR_REF_OP:
1593 case EFI_IFR_ONE_OF_OP:
1594 case EFI_IFR_NUMERIC_OP:
1595 switch (((
EFI_IFR_ONE_OF *)OpCodeData)->Flags & EFI_IFR_NUMERIC_SIZE) {
1596 case EFI_IFR_NUMERIC_SIZE_1:
1597 return (UINT16)
sizeof (UINT8);
1599 case EFI_IFR_NUMERIC_SIZE_2:
1600 return (UINT16)
sizeof (UINT16);
1602 case EFI_IFR_NUMERIC_SIZE_4:
1603 return (UINT16)
sizeof (UINT32);
1605 case EFI_IFR_NUMERIC_SIZE_8:
1606 return (UINT16)
sizeof (UINT64);
1613 case EFI_IFR_ORDERED_LIST_OP:
1618 ASSERT (((
EFI_IFR_OP_HEADER *)NextOpCodeData)->OpCode == EFI_IFR_ONE_OF_OPTION_OP);
1620 case EFI_IFR_TYPE_NUM_SIZE_8:
1623 case EFI_IFR_TYPE_NUM_SIZE_16:
1626 case EFI_IFR_TYPE_NUM_SIZE_32:
1629 case EFI_IFR_TYPE_NUM_SIZE_64:
1637 case EFI_IFR_CHECKBOX_OP:
1638 return (UINT16)
sizeof (BOOLEAN);
1640 case EFI_IFR_PASSWORD_OP:
1643 case EFI_IFR_STRING_OP:
1646 case EFI_IFR_DATE_OP:
1649 case EFI_IFR_TIME_OP:
1672 IN EFI_STRING ConfigString
1678 ASSERT (ConfigString !=
NULL);
1683 for (String = ConfigString, Lower =
FALSE; *String != L
'\0'; String++) {
1684 if (*String == L
'=') {
1686 }
else if (*String == L
'&') {
1688 }
else if (Lower && (*String >= L
'A') && (*String <= L
'F')) {
1689 *String = (CHAR16)(*String - L
'A' + L
'a');
1693 return ConfigString;
1715 IN UINT8 *OpCodeData,
1721 UINTN DevicePathSize;
1723 CHAR16 *ReturnString;
1732 ASSERT (OpCodeData !=
NULL);
1735 case EFI_IFR_VARSTORE_OP:
1740 case EFI_IFR_VARSTORE_NAME_VALUE_OP:
1745 case EFI_IFR_VARSTORE_EFI_OP:
1757 if (AsciiName !=
NULL) {
1760 ASSERT (Name !=
NULL);
1772 NameLength =
StrLen (Name);
1780 if (DriverHandle !=
NULL) {
1782 if (DevicePath ==
NULL) {
1796 MaxLen = 5 +
sizeof (
EFI_GUID) * 2 + 6 + NameLength * 4 + 6 + DevicePathSize * 2 + 1;
1798 if (String ==
NULL) {
1805 StrCpyS (String, MaxLen, L
"GUID=");
1806 ReturnString = String;
1807 String +=
StrLen (String);
1813 for (Index = 0, Buffer = (UINT8 *)Guid; Index <
sizeof (
EFI_GUID); Index++) {
1816 MaxLen *
sizeof (CHAR16) - ((
UINTN)String - (
UINTN)ReturnString),
1817 PREFIX_ZERO | RADIX_HEX,
1821 String +=
StrnLenS (String, MaxLen - ((
UINTN)String - (
UINTN)ReturnString) /
sizeof (CHAR16));
1828 StrCatS (ReturnString, MaxLen, L
"&NAME=");
1829 String +=
StrLen (String);
1835 for ( ; *Name != L
'\0'; Name++) {
1838 MaxLen *
sizeof (CHAR16) - ((
UINTN)String - (
UINTN)ReturnString),
1839 PREFIX_ZERO | RADIX_HEX,
1843 String +=
StrnLenS (String, MaxLen - ((
UINTN)String - (
UINTN)ReturnString) /
sizeof (CHAR16));
1850 StrCatS (ReturnString, MaxLen, L
"&PATH=");
1851 String +=
StrLen (String);
1856 for (Index = 0, Buffer = (UINT8 *)DevicePath; Index < DevicePathSize; Index++) {
1859 MaxLen *
sizeof (CHAR16) - ((
UINTN)String - (
UINTN)ReturnString),
1860 PREFIX_ZERO | RADIX_HEX,
1864 String +=
StrnLenS (String, MaxLen - ((
UINTN)String - (
UINTN)ReturnString) /
sizeof (CHAR16));
1905 Length =
StrLen (Name) + 1;
1913 Length = (7 + 4 + 7 + 4 + 1);
1920 ASSERT (StringPtr !=
NULL);
1928 (
StrLen (Name) + 1) *
sizeof (CHAR16),
1938 (7 + 4 + 7 + 4 + 1) *
sizeof (CHAR16),
1939 L
"OFFSET=%04X&WIDTH=%04X",
1960 IN EFI_STRING_ID NameId
1964 CHAR8 *PlatformLanguage;
1965 CHAR8 *SupportedLanguages;
1966 CHAR8 *BestLanguage;
1972 BestLanguage =
NULL;
1973 PlatformLanguage =
NULL;
1974 SupportedLanguages =
NULL;
1985 PlatformLanguage !=
NULL ? PlatformLanguage :
"",
1989 if (BestLanguage ==
NULL) {
1991 ASSERT (BestLanguage !=
NULL);
1995 Status = mPrivate.HiiString.GetString (
1996 &mPrivate.HiiString,
1998 DatabaseRecord->Handle,
2004 if (Status != EFI_BUFFER_TOO_SMALL) {
2013 Status = mPrivate.HiiString.GetString (
2014 &mPrivate.HiiString,
2016 DatabaseRecord->Handle,
2023 if (EFI_ERROR (Status)) {
2030 if (SupportedLanguages !=
NULL) {
2034 if (BestLanguage !=
NULL) {
2038 if (PlatformLanguage !=
NULL) {
2063 IN EFI_STRING_ID KeywordStrId,
2064 OUT UINT8 **OpCodeData,
2065 OUT EFI_STRING *ConfigRequest
2078 CHAR16 *RequestElement;
2082 ASSERT (DatabaseRecord !=
NULL && OpCodeData !=
NULL && ConfigRequest !=
NULL);
2089 PackageListNode = DatabaseRecord->PackageList;
2094 for (Link = PackageListNode->FormPkgHdr.ForwardLink; Link != &PackageListNode->FormPkgHdr; Link = Link->ForwardLink) {
2098 if (OpCode !=
NULL) {
2099 *OpCodeData = OpCode;
2104 if (Header->VarStoreId == 0) {
2109 ASSERT (Storage !=
NULL);
2112 Name =
GetNameFromId (DatabaseRecord, Header->VarStoreInfo.VarName);
2114 Offset = Header->VarStoreInfo.VarOffset;
2120 ASSERT (ConfigHdr !=
NULL);
2122 MaxLen =
StrLen (ConfigHdr) + 1 +
StrLen (RequestElement) + 1;
2123 *ConfigRequest =
AllocatePool (MaxLen *
sizeof (CHAR16));
2124 if (*ConfigRequest ==
NULL) {
2127 return EFI_OUT_OF_RESOURCES;
2130 StringPtr = *ConfigRequest;
2132 StrCpyS (StringPtr, MaxLen, ConfigHdr);
2134 StrCatS (StringPtr, MaxLen, L
"&");
2136 StrCatS (StringPtr, MaxLen, RequestElement);
2145 return EFI_NOT_FOUND;
2168 IN EFI_STRING_ID KeywordStrId,
2169 IN EFI_STRING ValueElement,
2170 OUT UINT8 **OpCodeData,
2171 OUT EFI_STRING *ConfigResp
2184 CHAR16 *RequestElement;
2188 ASSERT ((DatabaseRecord !=
NULL) && (OpCodeData !=
NULL) && (ConfigResp !=
NULL) && (ValueElement !=
NULL));
2195 PackageListNode = DatabaseRecord->PackageList;
2200 for (Link = PackageListNode->FormPkgHdr.ForwardLink; Link != &PackageListNode->FormPkgHdr; Link = Link->ForwardLink) {
2204 if (OpCode !=
NULL) {
2205 *OpCodeData = OpCode;
2210 ASSERT (Header->VarStoreId != 0);
2211 DEBUG ((DEBUG_INFO,
"Varstore Id: 0x%x\n", Header->VarStoreId));
2214 ASSERT (Storage !=
NULL);
2217 Name =
GetNameFromId (DatabaseRecord, Header->VarStoreInfo.VarName);
2219 Offset = Header->VarStoreInfo.VarOffset;
2226 ASSERT (ConfigHdr !=
NULL);
2230 if (*ConfigResp ==
NULL) {
2233 return EFI_OUT_OF_RESOURCES;
2236 StringPtr = *ConfigResp;
2238 StrCpyS (StringPtr, MaxLen, ConfigHdr);
2240 StrCatS (StringPtr, MaxLen, L
"&");
2242 StrCatS (StringPtr, MaxLen, RequestElement);
2244 StrCatS (StringPtr, MaxLen, L
"&");
2246 StrCatS (StringPtr, MaxLen, L
"VALUE=");
2248 StrCatS (StringPtr, MaxLen, ValueElement);
2257 return EFI_NOT_FOUND;
2275 IN CHAR16 *ConfigRequest,
2276 OUT CHAR16 **ValueElement
2281 EFI_STRING Progress;
2285 ASSERT ((ConfigRequest !=
NULL) && (ValueElement !=
NULL));
2287 Status = mPrivate.ConfigRouting.ExtractConfig (
2288 &mPrivate.ConfigRouting,
2289 (EFI_STRING)ConfigRequest,
2293 if (EFI_ERROR (Status)) {
2300 StringPtr =
StrStr (Result, L
"&VALUE=");
2301 ASSERT (StringPtr !=
NULL);
2302 StringEnd =
StrStr (StringPtr + 1, L
"&");
2303 if (StringEnd !=
NULL) {
2308 if (*ValueElement ==
NULL) {
2309 return EFI_OUT_OF_RESOURCES;
2312 if (StringEnd !=
NULL) {
2341 IN CHAR8 **NameSpace,
2342 IN CHAR16 *KeywordData,
2343 OUT UINT32 *ProgressErr,
2344 OUT EFI_STRING_ID *KeywordStringId,
2350 BOOLEAN FindNameSpace;
2352 UINT8 *DevicePathPkg;
2353 UINTN DevicePathSize;
2355 ASSERT ((NameSpace !=
NULL) && (KeywordData !=
NULL) && (ProgressErr !=
NULL) && (KeywordStringId !=
NULL) && (DataBaseRecord !=
NULL));
2357 FindNameSpace =
FALSE;
2359 if (*DevicePath !=
NULL) {
2364 if (Record ==
NULL) {
2369 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
2370 return EFI_INVALID_PARAMETER;
2377 switch (*ProgressErr) {
2378 case KEYWORD_HANDLER_NO_ERROR:
2379 *DataBaseRecord = Record;
2382 case KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND:
2383 return EFI_INVALID_PARAMETER;
2386 ASSERT (*ProgressErr == KEYWORD_HANDLER_KEYWORD_NOT_FOUND);
2387 return EFI_NOT_FOUND;
2393 for (Link = mPrivate.DatabaseList.ForwardLink; Link != &mPrivate.DatabaseList; Link = Link->ForwardLink) {
2397 if (*ProgressErr == KEYWORD_HANDLER_NO_ERROR) {
2398 *DataBaseRecord = Record;
2400 if ((DevicePathPkg = Record->PackageList->DevicePathPkg) !=
NULL) {
2404 if (*DevicePath ==
NULL) {
2405 return EFI_OUT_OF_RESOURCES;
2415 }
else if (*ProgressErr == KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR) {
2416 return EFI_OUT_OF_RESOURCES;
2417 }
else if (*ProgressErr == KEYWORD_HANDLER_KEYWORD_NOT_FOUND) {
2418 FindNameSpace =
TRUE;
2426 if (FindNameSpace) {
2427 return EFI_NOT_FOUND;
2429 return EFI_INVALID_PARAMETER;
2452 IN CHAR8 *NameSpace,
2454 IN EFI_STRING KeywordData,
2455 IN EFI_STRING ValueStr,
2456 IN BOOLEAN ReadOnly,
2457 OUT EFI_STRING *KeywordResp
2463 CHAR16 *UnicodeNameSpace;
2464 UINTN NameSpaceLength;
2466 ASSERT ((NameSpace !=
NULL) && (DevicePath !=
NULL) && (KeywordData !=
NULL) && (ValueStr !=
NULL) && (KeywordResp !=
NULL));
2476 RespStrLen = 10 + NameSpaceLength;
2477 UnicodeNameSpace =
AllocatePool ((NameSpaceLength + 1) *
sizeof (CHAR16));
2478 if (UnicodeNameSpace ==
NULL) {
2479 return EFI_OUT_OF_RESOURCES;
2496 RespStrLen +=
StrLen (PathHdr);
2502 RespStrLen += 8 +
StrLen (KeywordData);
2508 RespStrLen +=
StrLen (ValueStr);
2522 *KeywordResp =
AllocatePool (RespStrLen *
sizeof (CHAR16));
2523 if (*KeywordResp ==
NULL) {
2524 if (UnicodeNameSpace !=
NULL) {
2528 return EFI_OUT_OF_RESOURCES;
2531 RespStr = *KeywordResp;
2536 StrCpyS (RespStr, RespStrLen, L
"NAMESPACE=");
2538 StrCatS (RespStr, RespStrLen, UnicodeNameSpace);
2543 StrCatS (RespStr, RespStrLen, PathHdr);
2548 StrCatS (RespStr, RespStrLen, L
"KEYWORD=");
2550 StrCatS (RespStr, RespStrLen, KeywordData);
2555 StrCatS (RespStr, RespStrLen, ValueStr);
2561 StrCatS (RespStr, RespStrLen, L
"&READONLY");
2564 if (UnicodeNameSpace !=
NULL) {
2568 if (PathHdr !=
NULL) {
2589 IN OUT EFI_STRING *MultiKeywordResp,
2590 IN EFI_STRING *KeywordResp
2593 UINTN MultiKeywordRespLen;
2594 EFI_STRING StringPtr;
2596 if (*MultiKeywordResp ==
NULL) {
2597 *MultiKeywordResp = *KeywordResp;
2598 *KeywordResp =
NULL;
2602 MultiKeywordRespLen = (
StrLen (*MultiKeywordResp) + 1 +
StrLen (*KeywordResp) + 1) *
sizeof (CHAR16);
2606 MultiKeywordRespLen,
2609 if (StringPtr ==
NULL) {
2610 return EFI_OUT_OF_RESOURCES;
2613 *MultiKeywordResp = StringPtr;
2615 StrCatS (StringPtr, MultiKeywordRespLen /
sizeof (CHAR16), L
"&");
2617 StrCatS (StringPtr, MultiKeywordRespLen /
sizeof (CHAR16), *KeywordResp);
2640 IN CHAR8 *NameSpace,
2641 OUT EFI_STRING *MultiResp,
2642 OUT UINT32 *ProgressErr
2647 UINT8 *DevicePathPkg;
2652 CHAR8 *LocalNameSpace;
2653 EFI_STRING_ID NextStringId;
2656 CHAR16 *ConfigRequest;
2657 CHAR16 *ValueElement;
2658 CHAR16 *KeywordResp;
2659 CHAR16 *MultiKeywordResp;
2660 CHAR16 *KeywordData;
2662 BOOLEAN FindKeywordPackages;
2664 DataBaseRecord =
NULL;
2666 MultiKeywordResp =
NULL;
2668 LocalNameSpace =
NULL;
2669 ConfigRequest =
NULL;
2670 ValueElement =
NULL;
2672 FindKeywordPackages =
FALSE;
2674 if (NameSpace ==
NULL) {
2675 NameSpace = UEFI_CONFIG_LANG;
2681 for (Link = mPrivate.DatabaseList.ForwardLink; Link != &mPrivate.DatabaseList; Link = Link->ForwardLink) {
2683 if ((DevicePathPkg = DataBaseRecord->PackageList->DevicePathPkg) !=
NULL) {
2687 PackageListNode = DataBaseRecord->PackageList;
2689 for (StringLink = PackageListNode->StringPkgHdr.ForwardLink; StringLink != &PackageListNode->StringPkgHdr; StringLink = StringLink->ForwardLink) {
2696 FindKeywordPackages =
TRUE;
2701 if (LocalNameSpace ==
NULL) {
2702 return EFI_OUT_OF_RESOURCES;
2715 while ((NextStringId =
GetNextStringId (StringPackage, NextStringId, &KeywordData)) != 0) {
2720 if (EFI_ERROR (Status)) {
2731 if (EFI_ERROR (Status)) {
2732 if (Status != EFI_OUT_OF_RESOURCES) {
2753 ASSERT (DevicePath !=
NULL);
2766 if (EFI_ERROR (Status)) {
2774 if (ConfigRequest !=
NULL) {
2776 ConfigRequest =
NULL;
2779 if (ValueElement !=
NULL) {
2781 ValueElement =
NULL;
2784 if (KeywordResp !=
NULL) {
2790 if (LocalNameSpace !=
NULL) {
2792 LocalNameSpace =
NULL;
2801 if (MultiKeywordResp ==
NULL) {
2802 Status = EFI_NOT_FOUND;
2803 if (!FindKeywordPackages) {
2804 *ProgressErr = KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND;
2806 *ProgressErr = KEYWORD_HANDLER_KEYWORD_NOT_FOUND;
2812 *MultiResp = MultiKeywordResp;
2815 if (LocalNameSpace !=
NULL) {
2819 if (ConfigRequest !=
NULL) {
2823 if (ValueElement !=
NULL) {
2893 IN CONST EFI_STRING KeywordString,
2894 OUT EFI_STRING *Progress,
2895 OUT UINT32 *ProgressErr
2902 CHAR16 *NextStringPtr;
2903 CHAR16 *KeywordData;
2904 EFI_STRING_ID KeywordStringId;
2909 CHAR16 *MultiConfigResp;
2910 CHAR16 *ValueElement;
2912 EFI_STRING InternalProgress;
2914 CHAR16 *KeywordStartPos;
2916 if ((This ==
NULL) || (Progress ==
NULL) || (ProgressErr ==
NULL) || (KeywordString ==
NULL)) {
2917 return EFI_INVALID_PARAMETER;
2920 *Progress = KeywordString;
2921 *ProgressErr = KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR;
2923 MultiConfigResp =
NULL;
2927 ValueElement =
NULL;
2929 KeywordStartPos =
NULL;
2930 KeywordStringId = 0;
2936 ASSERT (TempString !=
NULL);
2937 StringPtr = TempString;
2939 while ((StringPtr !=
NULL) && (*StringPtr != L
'\0')) {
2944 if (EFI_ERROR (Status)) {
2945 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
2949 ASSERT (NameSpace !=
NULL);
2954 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
2955 Status = EFI_INVALID_PARAMETER;
2959 StringPtr = NextStringPtr;
2965 if (EFI_ERROR (Status)) {
2966 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
2970 StringPtr = NextStringPtr;
2975 KeywordStartPos = StringPtr;
2976 Status =
ExtractKeyword (StringPtr, &KeywordData, &NextStringPtr);
2977 if (EFI_ERROR (Status)) {
2981 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
2982 Status = EFI_INVALID_PARAMETER;
2986 StringPtr = NextStringPtr;
2991 Status =
ExtractValue (StringPtr, &ValueElement, &NextStringPtr);
2992 if (EFI_ERROR (Status)) {
2996 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
2997 Status = EFI_INVALID_PARAMETER;
3001 StringPtr = NextStringPtr;
3006 if ((StringPtr !=
NULL) && (
StrnCmp (StringPtr, L
"&READONLY",
StrLen (L
"&READONLY")) == 0)) {
3008 StringPtr +=
StrLen (L
"&READONLY");
3016 Status =
GetStringIdFromDatabase (&DevicePath, &NameSpace, KeywordData, &RetVal, &KeywordStringId, &DataBaseRecord);
3017 if (EFI_ERROR (Status)) {
3018 *ProgressErr = RetVal;
3025 Status =
ExtractConfigResp (DataBaseRecord, KeywordStringId, ValueElement, &OpCode, &ConfigResp);
3026 if (EFI_ERROR (Status)) {
3038 *ProgressErr = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;
3039 Status = EFI_INVALID_PARAMETER;
3044 *ProgressErr = KEYWORD_HANDLER_ACCESS_NOT_PERMITTED;
3045 Status = EFI_ACCESS_DENIED;
3053 if (EFI_ERROR (Status)) {
3067 ValueElement =
NULL;
3068 if (ConfigResp !=
NULL) {
3073 KeywordStartPos =
NULL;
3079 Status = mPrivate.ConfigRouting.RouteConfig (
3080 &mPrivate.ConfigRouting,
3081 (EFI_STRING)MultiConfigResp,
3084 if (EFI_ERROR (Status)) {
3085 Status = EFI_DEVICE_ERROR;
3089 *ProgressErr = KEYWORD_HANDLER_NO_ERROR;
3092 if (KeywordStartPos !=
NULL) {
3093 *Progress = KeywordString + (KeywordStartPos - TempString);
3095 *Progress = KeywordString + (StringPtr - TempString);
3098 ASSERT (TempString !=
NULL);
3100 if (NameSpace !=
NULL) {
3104 if (DevicePath !=
NULL) {
3108 if (KeywordData !=
NULL) {
3112 if (ValueElement !=
NULL) {
3116 if (ConfigResp !=
NULL) {
3120 if ((MultiConfigResp !=
NULL) && (MultiConfigResp != ConfigResp)) {
3200 IN CONST EFI_STRING NameSpaceId OPTIONAL,
3201 IN CONST EFI_STRING KeywordString OPTIONAL,
3202 OUT EFI_STRING *Progress,
3203 OUT UINT32 *ProgressErr,
3204 OUT EFI_STRING *Results
3212 CHAR16 *NextStringPtr;
3213 CHAR16 *KeywordData;
3214 EFI_STRING_ID KeywordStringId;
3216 CHAR16 *ConfigRequest;
3217 CHAR16 *ValueElement;
3220 CHAR16 *KeywordResp;
3221 CHAR16 *MultiKeywordResp;
3224 if ((This ==
NULL) || (Progress ==
NULL) || (ProgressErr ==
NULL) || (Results ==
NULL)) {
3225 return EFI_INVALID_PARAMETER;
3228 *ProgressErr = KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR;
3233 ConfigRequest =
NULL;
3234 StringPtr = KeywordString;
3236 MultiKeywordResp =
NULL;
3237 KeywordStringId = 0;
3243 if (NameSpaceId !=
NULL) {
3245 ASSERT (TempString !=
NULL);
3252 if (TempString !=
NULL) {
3257 if (EFI_ERROR (Status)) {
3258 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
3265 if (NameSpace !=
NULL) {
3267 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
3268 return EFI_INVALID_PARAMETER;
3272 if (KeywordString !=
NULL) {
3277 ASSERT (TempString !=
NULL);
3278 StringPtr = TempString;
3280 while (*StringPtr != L
'\0') {
3285 if (EFI_ERROR (Status)) {
3286 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
3290 StringPtr = NextStringPtr;
3297 Status =
ExtractKeyword (StringPtr, &KeywordData, &NextStringPtr);
3298 if (EFI_ERROR (Status)) {
3302 *ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
3303 Status = EFI_INVALID_PARAMETER;
3310 Status =
GetStringIdFromDatabase (&DevicePath, &NameSpace, KeywordData, &RetVal, &KeywordStringId, &DataBaseRecord);
3311 if (EFI_ERROR (Status)) {
3312 *ProgressErr = RetVal;
3320 if (EFI_ERROR (Status)) {
3328 if (EFI_ERROR (Status)) {
3329 if (Status != EFI_OUT_OF_RESOURCES) {
3330 Status = EFI_DEVICE_ERROR;
3336 StringPtr = NextStringPtr;
3341 RetVal =
ValidateFilter (OpCode, StringPtr, &NextStringPtr, &ReadOnly);
3342 if (RetVal != KEYWORD_HANDLER_NO_ERROR) {
3343 *ProgressErr = RetVal;
3344 Status = EFI_INVALID_PARAMETER;
3348 StringPtr = NextStringPtr;
3353 Status =
GenerateKeywordResp (NameSpace, DevicePath, KeywordData, ValueElement, ReadOnly, &KeywordResp);
3362 if (EFI_ERROR (Status)) {
3369 *Results = MultiKeywordResp;
3380 ValueElement =
NULL;
3381 ConfigRequest =
NULL;
3382 if (KeywordResp !=
NULL) {
3392 if (EFI_ERROR (Status)) {
3396 *Results = MultiKeywordResp;
3399 *ProgressErr = KEYWORD_HANDLER_NO_ERROR;
3402 *Progress = KeywordString + (StringPtr - TempString);
3404 if (TempString !=
NULL) {
3408 if (NameSpace !=
NULL) {
3412 if (DevicePath !=
NULL) {
3416 if (KeywordData !=
NULL) {
UINT64 EFIAPI StrHexToUint64(IN CONST CHAR16 *String)
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
INTN EFIAPI AsciiStrCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString)
INTN EFIAPI AsciiStrnCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString, IN UINTN Length)
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
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)
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
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)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
HII_DATABASE_RECORD * GetRecordFromDevicePath(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_STATUS GetStringIdFromDatabase(IN EFI_DEVICE_PATH_PROTOCOL **DevicePath, IN CHAR8 **NameSpace, IN CHAR16 *KeywordData, OUT UINT32 *ProgressErr, OUT EFI_STRING_ID *KeywordStringId, OUT HII_DATABASE_RECORD **DataBaseRecord)
BOOLEAN IsStatementOpCode(IN UINT8 Operand)
EFI_STATUS ExtractValue(IN EFI_STRING String, OUT EFI_STRING *Value, OUT EFI_STRING *NextString)
EFI_STATUS EnumerateAllKeywords(IN CHAR8 *NameSpace, OUT EFI_STRING *MultiResp, OUT UINT32 *ProgressErr)
EFI_STATUS ExtractValueFromDriver(IN CHAR16 *ConfigRequest, OUT CHAR16 **ValueElement)
BOOLEAN IsStorageOpCode(IN UINT8 Operand)
BOOLEAN ExtractFilter(IN EFI_STRING String, OUT UINT8 *FilterFlags, OUT EFI_STRING *NextString)
EFI_STATUS ExtractKeyword(IN EFI_STRING String, OUT EFI_STRING *Keyword, OUT EFI_STRING *NextString)
UINT32 ValidateFilter(IN UINT8 *OpCodeData, IN CHAR16 *KeywordRequest, OUT CHAR16 **NextString, OUT BOOLEAN *ReadOnly)
EFI_STATUS ExtractConfigResp(IN HII_DATABASE_RECORD *DatabaseRecord, IN EFI_STRING_ID KeywordStrId, IN EFI_STRING ValueElement, OUT UINT8 **OpCodeData, OUT EFI_STRING *ConfigResp)
EFI_STATUS EFIAPI EfiConfigKeywordHandlerGetData(IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING NameSpaceId OPTIONAL, IN CONST EFI_STRING KeywordString OPTIONAL, OUT EFI_STRING *Progress, OUT UINT32 *ProgressErr, OUT EFI_STRING *Results)
EFI_STATUS GenerateKeywordResp(IN CHAR8 *NameSpace, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_STRING KeywordData, IN EFI_STRING ValueStr, IN BOOLEAN ReadOnly, OUT EFI_STRING *KeywordResp)
EFI_STATUS GetUnicodeStringTextAndSize(IN UINT8 *StringSrc, OUT UINTN *BufferSize, OUT EFI_STRING *StringDest)
EFI_STATUS MergeToMultiKeywordResp(IN OUT EFI_STRING *MultiKeywordResp, IN EFI_STRING *KeywordResp)
EFI_STRING EFIAPI InternalLowerConfigString(IN EFI_STRING ConfigString)
UINT8 * FindQuestionFromStringId(IN HII_IFR_PACKAGE_INSTANCE *FormPackage, IN EFI_STRING_ID KeywordStrId)
EFI_STATUS ExtractNameSpace(IN EFI_STRING String, OUT CHAR8 **NameSpace, OUT EFI_STRING *NextString)
UINT8 * FindStorageFromVarId(IN HII_IFR_PACKAGE_INSTANCE *FormPackage, IN EFI_VARSTORE_ID VarStoreId)
EFI_STATUS ExtractConfigRequest(IN HII_DATABASE_RECORD *DatabaseRecord, IN EFI_STRING_ID KeywordStrId, OUT UINT8 **OpCodeData, OUT EFI_STRING *ConfigRequest)
BOOLEAN ExtractReadOnlyFromOpCode(IN UINT8 *OpCodeData)
UINT16 GetWidth(IN UINT8 *OpCodeData)
UINT32 GetStringIdFromRecord(IN HII_DATABASE_RECORD *DatabaseRecord, IN CHAR8 **NameSpace, IN CHAR16 *KeywordValue, OUT EFI_STRING_ID *StringId)
EFI_STRING_ID GetNextStringId(IN HII_STRING_PACKAGE_INSTANCE *StringPackage, IN EFI_STRING_ID StringId, OUT EFI_STRING *KeywordValue)
EFI_STATUS EFIAPI EfiConfigKeywordHandlerSetData(IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING KeywordString, OUT EFI_STRING *Progress, OUT UINT32 *ProgressErr)
EFI_STRING ConstructConfigHdr(IN UINT8 *OpCodeData, IN EFI_HANDLE DriverHandle)
EFI_STATUS GetStringIdFromString(IN HII_STRING_PACKAGE_INSTANCE *StringPackage, IN CHAR16 *KeywordValue, OUT EFI_STRING_ID *StringId)
CHAR16 * GetNameFromId(IN HII_DATABASE_RECORD *DatabaseRecord, IN EFI_STRING_ID NameId)
EFI_STATUS ExtractDevicePath(IN EFI_STRING String, OUT UINT8 **DevicePathData, OUT EFI_STRING *NextString)
EFI_STRING ConstructRequestElement(IN CHAR16 *Name, IN UINT16 Offset, IN UINT16 Width)
CHAR8 * GetSupportedLanguages(IN EFI_HII_HANDLE HiiHandle)
VOID GenerateSubStr(IN CONST EFI_STRING String, IN UINTN BufferLen, IN VOID *Buffer, IN UINT8 Flag, OUT EFI_STRING *SubStr)
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
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)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
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 DEBUG(Expression)
#define CR(Record, TYPE, Field, TestSignature)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI GetEfiGlobalVariable2(IN CONST CHAR16 *Name, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
CHAR8 *EFIAPI GetBestLanguage(IN CONST CHAR8 *SupportedLanguages, IN UINTN Iso639Language,...)