24#define EFI_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('C', 'l', 'b', 'k')
25#define EFI_CALLBACK_INFO_FROM_THIS(a) CR (a, EFI_CALLBACK_INFO, ConfigAccess, EFI_CALLBACK_INFO_SIGNATURE)
53extern UINT8 PlatDriOverrideDxeStrings[];
58CHAR16 mVariableName[] = L
"Data";
60BOOLEAN mEnvironmentVariableRead =
FALSE;
66INTN mSelectedCtrIndex;
67EFI_STRING_ID *mControllerToken;
68UINTN mDriverImageHandleCount;
69EFI_STRING_ID *mDriverImageToken;
71UINTN mSelectedDriverImageNum;
72UINTN mLastSavedDriverImageNum;
75BOOLEAN *mDriSelection;
92 END_ENTIRE_DEVICE_PATH_SUBTYPE,
94 (UINT8)(END_DEVICE_PATH_LENGTH),
95 (UINT8)((END_DEVICE_PATH_LENGTH) >> 8)
122 ASSERT (Text !=
NULL);
153 Status =
gBS->OpenProtocol (
156 (VOID *)&ComponentName,
159 EFI_OPEN_PROTOCOL_GET_PROTOCOL
161 if (EFI_ERROR (Status)) {
171 (BOOLEAN)(ProtocolGuid == &gEfiComponentNameProtocolGuid),
177 if (BestLanguage !=
NULL) {
178 ComponentName->GetDriverName (
186 if (Language !=
NULL) {
213 DriverName =
GetComponentNameWorker (DriverBindingHandle, &gEfiComponentName2ProtocolGuid, L
"PlatformLang");
214 if (DriverName ==
NULL) {
245 UINT32 AuthenticationStatus;
253 if (Image->FilePath ==
NULL) {
257 DevPathNode = Image->FilePath;
269 if (NameGuid !=
NULL) {
271 Status =
gBS->HandleProtocol (
273 &gEfiFirmwareVolume2ProtocolGuid,
279 if (!EFI_ERROR (Status)) {
280 Status = Fv2->ReadSection (
282 &FvFilePath->FvFileName,
283 EFI_SECTION_USER_INTERFACE,
287 &AuthenticationStatus
289 if (!EFI_ERROR (Status)) {
331 UINTN DevicePathHandleCount;
334 EFI_STRING_ID NewStringToken;
335 CHAR16 *ControllerName;
340 VOID *StartOpCodeHandle;
341 VOID *EndOpCodeHandle;
348 mCurrentPage = FORM_ID_DEVICE;
360 ASSERT (StartOpCodeHandle !=
NULL);
363 ASSERT (EndOpCodeHandle !=
NULL);
370 StartLabel->
Number = FORM_ID_DEVICE;
377 EndLabel->
Number = LABEL_END;
383 Private->RegisteredHandle,
384 &gPlatformOverridesManagerGuid,
415 DevicePathHandleCount = 0;
416 Status =
gBS->LocateHandleBuffer (
418 &gEfiDevicePathProtocolGuid,
420 &DevicePathHandleCount,
421 &mDevicePathHandleBuffer
423 if (EFI_ERROR (Status) || (DevicePathHandleCount == 0)) {
427 mMaxDeviceCount = DevicePathHandleCount;
429 ASSERT (mControllerDevicePathProtocol !=
NULL);
430 mControllerToken =
AllocateZeroPool (DevicePathHandleCount *
sizeof (EFI_STRING_ID));
431 ASSERT (mControllerToken !=
NULL);
433 for (Index = 0; Index < DevicePathHandleCount; Index++) {
434 if (FakeNvData->PciDeviceFilter == 0x01) {
442 ControllerDevicePath =
NULL;
443 Status =
gBS->OpenProtocol (
444 mDevicePathHandleBuffer[Index],
445 &gEfiPciIoProtocolGuid,
449 EFI_OPEN_PROTOCOL_GET_PROTOCOL
451 if (EFI_ERROR (Status)) {
458 Status =
gBS->HandleProtocol (
459 mDevicePathHandleBuffer[Index],
460 &gEfiBusSpecificDriverOverrideProtocolGuid,
461 (VOID **)&BusSpecificDriverOverride
463 if (EFI_ERROR (Status) || (BusSpecificDriverOverride ==
NULL)) {
468 ControllerDevicePath =
NULL;
469 Status =
gBS->OpenProtocol (
470 mDevicePathHandleBuffer[Index],
471 &gEfiDevicePathProtocolGuid,
472 (VOID **)&ControllerDevicePath,
475 EFI_OPEN_PROTOCOL_GET_PROTOCOL
481 mControllerDevicePathProtocol[Index] = ControllerDevicePath;
491 Len =
StrSize (ControllerName);
492 NewStrSize = Len +
StrSize (L
"--");
504 ASSERT (NewStringToken != 0);
509 mControllerToken[Index] = NewStringToken;
516 EFI_IFR_FLAG_CALLBACK,
517 (UINT16)(Index + KEY_VALUE_DEVICE_OFFSET)
525 Private->RegisteredHandle,
526 &gPlatformOverridesManagerGuid,
554 UINTN DriverBindingHandleCount;
559 DriverBindingHandle =
NULL;
561 if (ImageHandle ==
NULL) {
568 DriverBindingHandleCount = 0;
569 Status =
gBS->LocateHandleBuffer (
571 &gEfiDriverBindingProtocolGuid,
573 &DriverBindingHandleCount,
574 &DriverBindingHandleBuffer
576 if (EFI_ERROR (Status) || (DriverBindingHandleCount == 0)) {
583 for (Index = 0; Index < DriverBindingHandleCount; Index++) {
584 DriverBindingInterface =
NULL;
585 Status =
gBS->OpenProtocol (
586 DriverBindingHandleBuffer[Index],
587 &gEfiDriverBindingProtocolGuid,
588 (VOID **)&DriverBindingInterface,
591 EFI_OPEN_PROTOCOL_GET_PROTOCOL
593 if (EFI_ERROR (Status)) {
597 if (DriverBindingInterface->ImageHandle == ImageHandle) {
598 DriverBindingHandle = DriverBindingHandleBuffer[Index];
603 FreePool (DriverBindingHandleBuffer);
604 return DriverBindingHandle;
630 EFI_STRING_ID NewStringToken;
631 EFI_STRING_ID NewStringHelpToken;
632 UINTN DriverImageHandleCount;
635 BOOLEAN FreeDriverName;
639 VOID *StartOpCodeHandle;
640 VOID *EndOpCodeHandle;
644 EFI_STRING_ID *DriverImageFilePathToken;
656 mCurrentPage = FORM_ID_DRIVER;
660 mSelectedCtrIndex = KeyValue - KEY_VALUE_DEVICE_OFFSET;
661 ASSERT (mSelectedCtrIndex >= 0 && mSelectedCtrIndex < MAX_CHOICE_NUM);
663 mLastSavedDriverImageNum = 0;
669 ASSERT (StartOpCodeHandle !=
NULL);
672 ASSERT (EndOpCodeHandle !=
NULL);
679 StartLabel->
Number = FORM_ID_DRIVER;
686 EndLabel->
Number = LABEL_END;
692 Private->RegisteredHandle,
693 &gPlatformOverridesManagerGuid,
702 DriverImageHandleCount = 0;
703 Status =
gBS->LocateHandleBuffer (
705 &gEfiLoadedImageProtocolGuid,
707 &DriverImageHandleCount,
708 &mDriverImageHandleBuffer
710 if (EFI_ERROR (Status) || (DriverImageHandleCount == 0)) {
711 return EFI_NOT_FOUND;
714 mDriverImageToken =
AllocateZeroPool (DriverImageHandleCount *
sizeof (EFI_STRING_ID));
715 ASSERT (mDriverImageToken !=
NULL);
716 mDriSelection =
AllocateZeroPool (DriverImageHandleCount *
sizeof (BOOLEAN));
717 ASSERT (mDriSelection !=
NULL);
720 ASSERT (DriverImageProtocol !=
NULL);
721 DriverImageFilePathToken =
AllocateZeroPool (DriverImageHandleCount *
sizeof (EFI_STRING_ID));
722 ASSERT (DriverImageFilePathToken !=
NULL);
724 mDriverImageHandleCount = DriverImageHandleCount;
725 for (Index = 0; Index < DriverImageHandleCount; Index++) {
735 Status =
gBS->OpenProtocol (
736 mDriverImageHandleBuffer[Index],
737 &gEfiLoadedImageProtocolGuid,
738 (VOID **)&LoadedImage,
741 EFI_OPEN_PROTOCOL_GET_PROTOCOL
743 if (EFI_ERROR (Status)) {
744 mDriSelection[Index] =
FALSE;
748 DriverImageProtocol[Index] = LoadedImage;
753 if (DriverBindingHandle ==
NULL) {
754 mDriSelection[Index] =
FALSE;
761 LoadedImageDevicePath =
NULL;
762 Status =
gBS->HandleProtocol (
763 mDriverImageHandleBuffer[Index],
764 &gEfiLoadedImageDevicePathProtocolGuid,
765 (VOID **)&LoadedImageDevicePath
767 if (LoadedImageDevicePath ==
NULL) {
768 mDriSelection[Index] =
FALSE;
772 if (FakeNvData->PciDeviceFilter == 0x01) {
777 if (!EFI_ERROR (Status)) {
778 Status =
gBS->HandleProtocol (
779 LoadedImage->DeviceHandle,
780 &gEfiBusSpecificDriverOverrideProtocolGuid,
781 (VOID **)&BusSpecificDriverOverride
783 if (EFI_ERROR (Status) || (BusSpecificDriverOverride ==
NULL)) {
784 mDriSelection[Index] =
FALSE;
788 mDriSelection[Index] =
FALSE;
797 FreeDriverName =
FALSE;
799 if (DriverName ==
NULL) {
806 if (DriverName ==
NULL) {
811 ASSERT (DriverName !=
NULL);
812 FreeDriverName =
TRUE;
822 NewStrSize =
StrSize (DriverName);
825 if (EFI_ERROR (
CheckMapping (mControllerDevicePathProtocol[mSelectedCtrIndex], LoadedImageDevicePath, &mMappingDataBase,
NULL,
NULL))) {
826 mDriSelection[Index] =
FALSE;
828 mDriSelection[Index] =
TRUE;
829 mLastSavedDriverImageNum++;
834 ASSERT (NewStringToken != 0);
835 mDriverImageToken[Index] = NewStringToken;
837 if (FreeDriverName) {
846 NewStrSize =
StrSize (DriverName);
851 ASSERT (NewStringHelpToken != 0);
852 DriverImageFilePathToken[Index] = NewStringHelpToken;
857 if (mDriSelection[Index]) {
858 CheckFlags |= EFI_IFR_CHECKBOX_DEFAULT;
863 (UINT16)(KEY_VALUE_DRIVER_OFFSET + Index),
868 EFI_IFR_FLAG_CALLBACK,
878 Private->RegisteredHandle,
879 &gPlatformOverridesManagerGuid,
888 if (DriverImageProtocol !=
NULL) {
892 if (DriverImageFilePathToken !=
NULL) {
893 FreePool (DriverImageFilePathToken);
919 UINTN SelectedDriverImageNum;
920 UINT32 DriverImageNO;
925 VOID *StartOpCodeHandle;
926 VOID *EndOpCodeHandle;
927 VOID *OptionsOpCodeHandle;
935 mCurrentPage = FORM_ID_ORDER;
941 ASSERT (StartOpCodeHandle !=
NULL);
944 ASSERT (EndOpCodeHandle !=
NULL);
951 StartLabel->
Number = FORM_ID_ORDER;
958 EndLabel->
Number = LABEL_END;
964 Private->RegisteredHandle,
965 &gPlatformOverridesManagerGuid,
974 SelectedDriverImageNum = 0;
975 for (Index = 0; Index < mDriverImageHandleCount; Index++) {
976 if (mDriSelection[Index]) {
977 SelectedDriverImageNum++;
981 mSelectedDriverImageNum = SelectedDriverImageNum;
982 if (SelectedDriverImageNum == 0) {
987 ASSERT (OptionsOpCodeHandle !=
NULL);
992 SelectedDriverImageNum = 0;
993 for (Index = 0; Index < mDriverImageHandleCount; Index++) {
994 if (mDriSelection[Index]) {
1000 mDriverImageToken[Index],
1002 EFI_IFR_NUMERIC_SIZE_1,
1009 LoadedImageDevicePath =
NULL;
1010 gBS->HandleProtocol (
1011 mDriverImageHandleBuffer[Index],
1012 &gEfiLoadedImageDevicePathProtocolGuid,
1013 (VOID **)&LoadedImageDevicePath
1015 ASSERT (LoadedImageDevicePath !=
NULL);
1022 mControllerDevicePathProtocol[mSelectedCtrIndex],
1023 LoadedImageDevicePath,
1028 if (DriverImageNO == 0) {
1029 DriverImageNO = (UINT32)mLastSavedDriverImageNum + 1;
1030 mLastSavedDriverImageNum++;
1033 TempNO[SelectedDriverImageNum] = DriverImageNO;
1034 OrderNO[SelectedDriverImageNum] = Index + 1;
1035 SelectedDriverImageNum++;
1039 ASSERT (SelectedDriverImageNum == mSelectedDriverImageNum);
1043 ZeroMem (FakeNvData->DriOrder, sizeof (FakeNvData->DriOrder));
1049 for (Index = 0; Index < SelectedDriverImageNum; Index++) {
1054 for (Index1 = 0; Index1 < SelectedDriverImageNum; Index1++) {
1055 if (TempNO[Index1] < TempNO[MinNO]) {
1063 FakeNvData->DriOrder[Index] = (UINT8)OrderNO[MinNO];
1064 TempNO[MinNO] = MAX_CHOICE_NUM + 1;
1072 (UINT16)DRIVER_ORDER_QUESTION_ID,
1073 VARSTORE_ID_PLAT_OVER_MNGR,
1074 (UINT16)DRIVER_ORDER_VAR_OFFSET,
1075 mControllerToken[mSelectedCtrIndex],
1076 mControllerToken[mSelectedCtrIndex],
1077 EFI_IFR_FLAG_RESET_REQUIRED,
1079 EFI_IFR_NUMERIC_SIZE_1,
1080 (UINT8)MAX_CHOICE_NUM,
1081 OptionsOpCodeHandle,
1089 Private->RegisteredHandle,
1090 &gPlatformOverridesManagerGuid,
1122 UINTN SelectedDriverImageNum;
1130 for (SelectedDriverImageNum = 0; SelectedDriverImageNum < mSelectedDriverImageNum; SelectedDriverImageNum++) {
1134 Index = FakeNvData->DriOrder[SelectedDriverImageNum] - 1;
1139 LoadedImageDevicePath =
NULL;
1140 Status =
gBS->HandleProtocol (
1141 mDriverImageHandleBuffer[Index],
1142 &gEfiLoadedImageDevicePathProtocolGuid,
1143 (VOID **)&LoadedImageDevicePath
1145 ASSERT (LoadedImageDevicePath !=
NULL);
1148 mControllerDevicePathProtocol[mSelectedCtrIndex],
1149 LoadedImageDevicePath,
1151 (UINT32)SelectedDriverImageNum + 1
1186 OUT EFI_STRING *Progress,
1187 OUT EFI_STRING *Results
1193 EFI_STRING ConfigRequestHdr;
1194 EFI_STRING ConfigRequest;
1195 BOOLEAN AllocatedRequest;
1199 if ((Progress ==
NULL) || (Results ==
NULL)) {
1200 return EFI_INVALID_PARAMETER;
1203 *Progress = Request;
1205 return EFI_NOT_FOUND;
1208 ConfigRequestHdr =
NULL;
1209 ConfigRequest =
NULL;
1211 AllocatedRequest =
FALSE;
1213 Private = EFI_CALLBACK_INFO_FROM_THIS (This);
1214 HiiConfigRouting = Private->HiiConfigRouting;
1215 ConfigRequest = Request;
1216 if ((Request ==
NULL) || (
StrStr (Request, L
"OFFSET") ==
NULL)) {
1222 ConfigRequestHdr =
HiiConstructConfigHdr (&gPlatformOverridesManagerGuid, mVariableName, Private->DriverHandle);
1223 Size = (
StrLen (ConfigRequestHdr) + 32 + 1) *
sizeof (CHAR16);
1225 ASSERT (ConfigRequest !=
NULL);
1226 AllocatedRequest =
TRUE;
1228 UnicodeSPrint (ConfigRequest, Size, L
"%s&OFFSET=0&WIDTH=%016LX", ConfigRequestHdr, (UINT64)BufferSize);
1235 Status = HiiConfigRouting->BlockToConfig (
1238 (UINT8 *)&Private->FakeNvData,
1247 if (AllocatedRequest) {
1249 ConfigRequest =
NULL;
1255 if (Request ==
NULL) {
1257 }
else if (
StrStr (Request, L
"OFFSET") ==
NULL) {
1258 *Progress = Request +
StrLen (Request);
1283 IN CONST EFI_STRING Configuration,
1284 OUT EFI_STRING *Progress
1292 if ((Configuration ==
NULL) || (Progress ==
NULL)) {
1293 return EFI_INVALID_PARAMETER;
1296 *Progress = Configuration;
1298 if (!
HiiIsConfigHdrMatch (Configuration, &gPlatformOverridesManagerGuid, mVariableName)) {
1299 return EFI_NOT_FOUND;
1302 *Progress = Configuration +
StrLen (Configuration);
1303 Private = EFI_CALLBACK_INFO_FROM_THIS (This);
1304 FakeNvData = &Private->FakeNvData;
1314 if (mCurrentPage == FORM_ID_ORDER) {
1315 KeyValue = KEY_VALUE_ORDER_SAVE_AND_EXIT;
1347 IN EFI_BROWSER_ACTION Action,
1348 IN EFI_QUESTION_ID KeyValue,
1351 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
1356 EFI_STRING_ID NewStringToken;
1360 if ((Action != EFI_BROWSER_ACTION_CHANGING) && (Action != EFI_BROWSER_ACTION_CHANGED)) {
1364 return EFI_UNSUPPORTED;
1367 Private = EFI_CALLBACK_INFO_FROM_THIS (This);
1368 FakeNvData = &Private->FakeNvData;
1370 return EFI_NOT_FOUND;
1373 if (Action == EFI_BROWSER_ACTION_CHANGING) {
1374 if (Value ==
NULL) {
1375 return EFI_INVALID_PARAMETER;
1378 if (KeyValue == KEY_VALUE_DRIVER_GOTO_PREVIOUS) {
1384 if (
HiiSetString (Private->RegisteredHandle, NewStringToken, L
"First, Select the controller by device path",
NULL) == 0) {
1389 if (((KeyValue >= KEY_VALUE_DEVICE_OFFSET) && (KeyValue < KEY_VALUE_DEVICE_OFFSET + mMaxDeviceCount)) || (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS)) {
1390 if (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS) {
1391 KeyValue = (EFI_QUESTION_ID)(mSelectedCtrIndex + KEY_VALUE_DEVICE_OFFSET);
1399 if (
HiiSetString (Private->RegisteredHandle, NewStringToken, L
"Second, Select drivers for the previous selected controller",
NULL) == 0) {
1404 if (KeyValue == KEY_VALUE_DRIVER_GOTO_ORDER) {
1410 if (
HiiSetString (Private->RegisteredHandle, NewStringToken, L
"Finally, Set the priority order for the drivers and save them",
NULL) == 0) {
1415 if (KeyValue == KEY_VALUE_DEVICE_CLEAR) {
1423 }
else if (Action == EFI_BROWSER_ACTION_CHANGED) {
1424 if ((KeyValue >= KEY_VALUE_DRIVER_OFFSET) && (KeyValue < KEY_VALUE_DRIVER_OFFSET + mDriverImageHandleCount)) {
1425 mDriSelection[KeyValue - KEY_VALUE_DRIVER_OFFSET] = Value->b;
1428 case KEY_VALUE_DEVICE_REFRESH:
1429 case KEY_VALUE_DEVICE_FILTER:
1435 if (
HiiSetString (Private->RegisteredHandle, NewStringToken, L
"First, Select the controller by device path",
NULL) == 0) {
1441 case KEY_VALUE_ORDER_SAVE_AND_EXIT:
1443 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
1444 if (EFI_ERROR (Status)) {
1445 CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L
"Single Override Info too large, Saving Error!",
NULL);
1446 return EFI_DEVICE_ERROR;
1500 if (ControllerHandle ==
NULL) {
1501 return EFI_INVALID_PARAMETER;
1510 if (!mEnvironmentVariableRead) {
1511 mEnvironmentVariableRead =
TRUE;
1514 if (EFI_ERROR (Status)) {
1515 DEBUG ((DEBUG_INFO,
"The status to Get Platform Driver Override Variable is %r\n", Status));
1517 return EFI_NOT_FOUND;
1525 return EFI_NOT_FOUND;
1559 return EFI_UNSUPPORTED;
1587 return EFI_UNSUPPORTED;
1615 Status =
gBS->LocateProtocol (
1616 &gEfiFormBrowser2ProtocolGuid,
1618 (VOID **)&FormBrowser2
1620 if (EFI_ERROR (Status)) {
1629 Status =
gBS->LocateProtocol (
1630 &gEfiPlatformDriverOverrideProtocolGuid,
1637 if (!EFI_ERROR (Status)) {
1638 return EFI_ALREADY_STARTED;
1641 mCallerImageHandle = ImageHandle;
1643 if (mCallbackInfo ==
NULL) {
1644 return EFI_BAD_BUFFER_SIZE;
1647 mCallbackInfo->Signature = EFI_CALLBACK_INFO_SIGNATURE;
1651 mCallbackInfo->PlatformDriverOverride.GetDriver =
GetDriver;
1652 mCallbackInfo->PlatformDriverOverride.GetDriverPath =
GetDriverPath;
1653 mCallbackInfo->PlatformDriverOverride.DriverLoaded =
DriverLoaded;
1658 Status =
gBS->LocateProtocol (
1659 &gEfiHiiConfigRoutingProtocolGuid,
1661 (VOID **)&mCallbackInfo->HiiConfigRouting
1663 if (EFI_ERROR (Status)) {
1671 Status =
gBS->InstallMultipleProtocolInterfaces (
1672 &mCallbackInfo->DriverHandle,
1673 &gEfiDevicePathProtocolGuid,
1674 &mHiiVendorDevicePath,
1675 &gEfiHiiConfigAccessProtocolGuid,
1676 &mCallbackInfo->ConfigAccess,
1677 &gEfiPlatformDriverOverrideProtocolGuid,
1678 &mCallbackInfo->PlatformDriverOverride,
1681 if (EFI_ERROR (Status)) {
1689 &gPlatformOverridesManagerGuid,
1690 mCallbackInfo->DriverHandle,
1692 PlatDriOverrideDxeStrings,
1695 if (mCallbackInfo->RegisteredHandle ==
NULL) {
1696 Status = EFI_OUT_OF_RESOURCES;
1703 mDriverImageHandleCount = 0;
1727 ASSERT (mCallbackInfo !=
NULL);
1729 if (mCallbackInfo->DriverHandle !=
NULL) {
1730 gBS->UninstallMultipleProtocolInterfaces (
1731 mCallbackInfo->DriverHandle,
1732 &gEfiDevicePathProtocolGuid,
1733 &mHiiVendorDevicePath,
1734 &gEfiHiiConfigAccessProtocolGuid,
1735 &mCallbackInfo->ConfigAccess,
1736 &gEfiPlatformDriverOverrideProtocolGuid,
1737 &mCallbackInfo->PlatformDriverOverride,
1742 if (mCallbackInfo->RegisteredHandle !=
NULL) {
1748 if (mControllerToken !=
NULL) {
1752 if (mControllerDevicePathProtocol !=
NULL) {
1753 FreePool (mControllerDevicePathProtocol);
1756 if (mDriverImageToken !=
NULL) {
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
RETURN_STATUS EFIAPI StrCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
#define INITIALIZE_LIST_HEAD_VARIABLE(ListHead)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define HARDWARE_DEVICE_PATH
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
CHAR16 *EFIAPI ConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STRING EFIAPI HiiConstructConfigHdr(IN CONST EFI_GUID *Guid OPTIONAL, IN CONST CHAR16 *Name OPTIONAL, IN EFI_HANDLE DriverHandle)
BOOLEAN EFIAPI HiiGetBrowserData(IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL, IN UINTN BufferSize, OUT UINT8 *Buffer)
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)
VOID EFIAPI HiiFreeOpCodeHandle(VOID *OpCodeHandle)
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 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_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
UINT8 *EFIAPI HiiCreateOneOfOptionOpCode(IN VOID *OpCodeHandle, IN UINT16 StringId, IN UINT8 Flags, IN UINT8 Type, IN UINT64 Value)
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)
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)
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)
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
EFI_STATUS EFIAPI DeleteDriverImage(IN EFI_DEVICE_PATH_PROTOCOL *ControllerDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *DriverImageDevicePath, IN LIST_ENTRY *MappingDataBase)
EFI_STATUS EFIAPI FreeMappingDatabase(IN OUT LIST_ENTRY *MappingDataBase)
EFI_STATUS EFIAPI SaveOverridesMapping(IN LIST_ENTRY *MappingDataBase)
EFI_STATUS EFIAPI CheckMapping(IN EFI_DEVICE_PATH_PROTOCOL *ControllerDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *DriverImageDevicePath OPTIONAL, IN LIST_ENTRY *MappingDataBase, OUT UINT32 *DriverInfoNum OPTIONAL, OUT UINT32 *DriverImageNO OPTIONAL)
EFI_STATUS EFIAPI InsertDriverImage(IN EFI_DEVICE_PATH_PROTOCOL *ControllerDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *DriverImageDevicePath, IN LIST_ENTRY *MappingDataBase, IN UINT32 DriverImageNO)
EFI_STATUS EFIAPI InitOverridesMapping(OUT LIST_ENTRY *MappingDataBase)
EFI_STATUS EFIAPI GetDriverFromMapping(IN EFI_HANDLE ControllerHandle, IN OUT EFI_HANDLE *DriverImageHandle, IN LIST_ENTRY *MappingDataBase, IN EFI_HANDLE CallerImageHandle)
#define EFI_IFR_EXTEND_OP_LABEL
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
EFI_STATUS EFIAPI PlatDriOverrideDxeUnload(IN EFI_HANDLE ImageHandle)
EFI_STATUS UpdateDeviceSelectPage(IN EFI_CALLBACK_INFO *Private, IN UINT16 KeyValue, IN PLAT_OVER_MNGR_DATA *FakeNvData)
CHAR16 * GetComponentNameWorker(IN EFI_HANDLE DriverBindingHandle, IN EFI_GUID *ProtocolGuid, IN CONST CHAR16 *VariableName)
EFI_STATUS UpdateBindingDriverSelectPage(IN EFI_CALLBACK_INFO *Private, IN UINT16 KeyValue, IN PLAT_OVER_MNGR_DATA *FakeNvData)
CHAR16 * DevicePathToStr(IN EFI_DEVICE_PATH_PROTOCOL *DevPath)
EFI_HANDLE GetDriverBindingHandleFromImageHandle(IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI DriverLoaded(IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *DriverImagePath, IN EFI_HANDLE DriverImageHandle)
EFI_STATUS EFIAPI GetDriverPath(IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN OUT EFI_DEVICE_PATH_PROTOCOL **DriverImagePath)
EFI_STATUS EFIAPI PlatDriOverrideDxeInit(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI PlatOverMngrRouteConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress)
CHAR16 * GetComponentName(IN EFI_HANDLE DriverBindingHandle)
EFI_STATUS CommitChanges(IN EFI_CALLBACK_INFO *Private, IN UINT16 KeyValue, IN PLAT_OVER_MNGR_DATA *FakeNvData)
EFI_STATUS EFIAPI GetDriver(IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN OUT EFI_HANDLE *DriverImageHandle)
EFI_STATUS EFIAPI PlatOverMngrCallback(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID KeyValue, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
CHAR16 * GetImageName(IN EFI_LOADED_IMAGE_PROTOCOL *Image)
EFI_STATUS EFIAPI PlatOverMngrExtractConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results)
EFI_STATUS UpdatePrioritySelectPage(IN EFI_CALLBACK_INFO *Private, IN UINT16 KeyValue, IN PLAT_OVER_MNGR_DATA *FakeNvData)
EFI_STRING_ID NewString(IN CHAR16 *String, IN EFI_HII_HANDLE HiiHandle)
EFI_STATUS EFIAPI GetEfiGlobalVariable2(IN CONST CHAR16 *Name, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
VOID EFIAPI CreatePopUp(IN UINTN Attribute, OUT EFI_INPUT_KEY *Key OPTIONAL,...)
CHAR8 *EFIAPI GetBestLanguage(IN CONST CHAR8 *SupportedLanguages, IN UINTN Iso639Language,...)
EFI_GUID *EFIAPI EfiGetNameGuidFromFwVolDevicePathNode(IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode)
CHAR8 * SupportedLanguages