Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/PlatformDriOverrideDxe
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/PlatformDriOverrideDxe/InternalPlatDriOverrideDxe.h
r48674 r58459 3 3 and the shared function APIs. 4 4 5 Copyright (c) 2007 - 20 09, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 30 30 #include <Protocol/ComponentName.h> 31 31 #include <Protocol/DriverBinding.h> 32 #include <Protocol/DevicePathToText.h>33 32 #include <Protocol/DevicePath.h> 34 33 #include <Protocol/PlatformDriverOverride.h> -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
r48674 r58459 14 14 by platform override protocol driver to publish the platform override protocol. 15 15 16 Copyright (c) 2007 - 201 1, Intel Corporation. All rights reserved.<BR>16 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 17 17 This program and the accompanying materials 18 18 are licensed and made available under the terms and conditions of the BSD License … … 71 71 72 72 INTN mSelectedCtrIndex; 73 EFI_STRING_ID mControllerToken[MAX_CHOICE_NUM];73 EFI_STRING_ID *mControllerToken; 74 74 UINTN mDriverImageHandleCount; 75 EFI_STRING_ID mDriverImageToken[MAX_CHOICE_NUM]; 76 EFI_STRING_ID mDriverImageFilePathToken[MAX_CHOICE_NUM]; 77 EFI_LOADED_IMAGE_PROTOCOL *mDriverImageProtocol[MAX_CHOICE_NUM]; 78 EFI_DEVICE_PATH_PROTOCOL *mControllerDevicePathProtocol[MAX_CHOICE_NUM]; 75 EFI_STRING_ID *mDriverImageToken; 76 EFI_DEVICE_PATH_PROTOCOL **mControllerDevicePathProtocol; 79 77 UINTN mSelectedDriverImageNum; 80 78 UINTN mLastSavedDriverImageNum; 81 79 UINT16 mCurrentPage; 82 80 EFI_CALLBACK_INFO *mCallbackInfo; 81 BOOLEAN *mDriSelection; 82 UINTN mMaxDeviceCount; 83 83 84 84 HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { … … 105 105 106 106 /** 107 Converting a given device to an unicode string. 108 109 This function will dependent on gEfiDevicePathToTextProtocolGuid, if protocol 110 does not installed, then return unknown device path L"?" directly. 111 107 Converting a given device to an unicode string. 108 112 109 @param DevPath Given device path instance 113 110 114 111 @return Converted string from given device path. 115 @retval L"?" Can not locate gEfiDevicePathToTextProtocolGuid protocol for converting.112 @retval L"?" Converting failed. 116 113 **/ 117 114 CHAR16 * … … 120 117 ) 121 118 { 122 EFI_STATUS Status; 123 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText; 124 CHAR16 *ToText; 125 126 if (DevPath == NULL) { 127 return L""; 128 } 129 130 Status = gBS->LocateProtocol ( 131 &gEfiDevicePathToTextProtocolGuid, 132 NULL, 133 (VOID **) &DevPathToText 134 ); 135 if (!EFI_ERROR (Status)) { 136 ToText = DevPathToText->ConvertDevicePathToText ( 137 DevPath, 138 FALSE, 139 TRUE 140 ); 141 ASSERT (ToText != NULL); 142 return ToText; 143 } 144 145 return L"?"; 119 CHAR16 *Text; 120 Text = ConvertDevicePathToText ( 121 DevPath, 122 FALSE, 123 TRUE 124 ); 125 if (Text == NULL) { 126 Text = AllocateCopyPool (sizeof (L"?"), L"?"); 127 ASSERT (Text != NULL); 128 } 129 130 return Text; 146 131 } 147 132 … … 186 171 // Find the best matching language. 187 172 // 188 Language = GetEfiGlobalVariable (VariableName);173 GetEfiGlobalVariable2 (VariableName, (VOID**)&Language, NULL); 189 174 BestLanguage = GetBestLanguage ( 190 175 ComponentName->SupportedLanguages, … … 440 425 return EFI_SUCCESS; 441 426 } 427 428 mMaxDeviceCount = DevicePathHandleCount; 429 mControllerDevicePathProtocol = AllocateZeroPool (DevicePathHandleCount * sizeof (EFI_DEVICE_PATH_PROTOCOL *)); 430 ASSERT (mControllerDevicePathProtocol != NULL); 431 mControllerToken = AllocateZeroPool (DevicePathHandleCount * sizeof (EFI_STRING_ID)); 432 ASSERT (mControllerToken != NULL); 442 433 443 434 for (Index = 0; Index < DevicePathHandleCount; Index++) { … … 646 637 EFI_IFR_GUID_LABEL *StartLabel; 647 638 EFI_IFR_GUID_LABEL *EndLabel; 639 EFI_LOADED_IMAGE_PROTOCOL **DriverImageProtocol; 640 EFI_STRING_ID *DriverImageFilePathToken; 641 UINT8 CheckFlags; 648 642 649 643 // … … 714 708 } 715 709 710 mDriverImageToken = AllocateZeroPool (DriverImageHandleCount * sizeof (EFI_STRING_ID)); 711 ASSERT (mDriverImageToken != NULL); 712 mDriSelection = AllocateZeroPool (DriverImageHandleCount * sizeof (BOOLEAN)); 713 ASSERT (mDriSelection != NULL); 714 715 DriverImageProtocol = AllocateZeroPool (DriverImageHandleCount * sizeof (EFI_LOADED_IMAGE_PROTOCOL *)); 716 ASSERT (DriverImageProtocol != NULL); 717 DriverImageFilePathToken = AllocateZeroPool (DriverImageHandleCount * sizeof (EFI_STRING_ID)); 718 ASSERT (DriverImageFilePathToken != NULL); 719 716 720 mDriverImageHandleCount = DriverImageHandleCount; 717 721 for (Index = 0; Index < DriverImageHandleCount; Index++) { … … 734 738 ); 735 739 if (EFI_ERROR (Status)) { 736 FakeNvData->DriSelection[Index] = 0x00;740 mDriSelection[Index] = FALSE; 737 741 continue; 738 742 } 739 mDriverImageProtocol[Index] = LoadedImage;743 DriverImageProtocol[Index] = LoadedImage; 740 744 // 741 745 // Find its related driver binding protocol … … 743 747 DriverBindingHandle = GetDriverBindingHandleFromImageHandle (mDriverImageHandleBuffer[Index]); 744 748 if (DriverBindingHandle == NULL) { 745 FakeNvData->DriSelection[Index] = 0x00;749 mDriSelection[Index] = FALSE; 746 750 continue; 747 751 } … … 757 761 ); 758 762 if (LoadedImageDevicePath == NULL) { 759 FakeNvData->DriSelection[Index] = 0x00;763 mDriSelection[Index] = FALSE; 760 764 continue; 761 765 } … … 773 777 ); 774 778 if (EFI_ERROR (Status) || BusSpecificDriverOverride == NULL) { 775 FakeNvData->DriSelection[Index] = 0x00;779 mDriSelection[Index] = FALSE; 776 780 continue; 777 781 } 778 782 } else { 779 FakeNvData->DriSelection[Index] = 0x00;783 mDriSelection[Index] = FALSE; 780 784 continue; 781 785 } … … 814 818 ASSERT (NewString != NULL); 815 819 if (EFI_ERROR (CheckMapping (mControllerDevicePathProtocol[mSelectedCtrIndex], LoadedImageDevicePath, &mMappingDataBase, NULL, NULL))) { 816 FakeNvData->DriSelection[Index] = 0x00;820 mDriSelection[Index] = FALSE; 817 821 } else { 818 FakeNvData->DriSelection[Index] = 0x01;822 mDriSelection[Index] = TRUE; 819 823 mLastSavedDriverImageNum++; 820 824 } … … 836 840 ASSERT (NewString != NULL); 837 841 StrCat (NewString, DriverName); 838 NewStringHelpToken = HiiSetString (Private->RegisteredHandle, mDriverImageFilePathToken[Index], NewString, NULL);842 NewStringHelpToken = HiiSetString (Private->RegisteredHandle, DriverImageFilePathToken[Index], NewString, NULL); 839 843 ASSERT (NewStringHelpToken != 0); 840 mDriverImageFilePathToken[Index] = NewStringHelpToken;844 DriverImageFilePathToken[Index] = NewStringHelpToken; 841 845 FreePool (NewString); 842 846 FreePool (DriverName); 843 847 848 CheckFlags = 0; 849 if (mDriSelection[Index]) { 850 CheckFlags |= EFI_IFR_CHECKBOX_DEFAULT; 851 } 852 844 853 HiiCreateCheckBoxOpCode ( 845 854 StartOpCodeHandle, 846 (UINT16) ( DRIVER_SELECTION_QUESTION_ID+ Index),847 VARSTORE_ID_PLAT_OVER_MNGR,848 (UINT16) (DRIVER_SELECTION_VAR_OFFSET + Index),855 (UINT16) (KEY_VALUE_DRIVER_OFFSET + Index), 856 0, 857 0, 849 858 NewStringToken, 850 859 NewStringHelpToken, 851 0,852 0,860 EFI_IFR_FLAG_CALLBACK, 861 CheckFlags, 853 862 NULL 854 863 ); … … 868 877 HiiFreeOpCodeHandle (StartOpCodeHandle); 869 878 HiiFreeOpCodeHandle (EndOpCodeHandle); 879 880 if (DriverImageProtocol != NULL) { 881 FreePool (DriverImageProtocol); 882 } 883 884 if (DriverImageFilePathToken != NULL) { 885 FreePool (DriverImageFilePathToken); 886 } 887 870 888 return EFI_SUCCESS; 871 889 } … … 948 966 SelectedDriverImageNum = 0; 949 967 for (Index = 0; Index < mDriverImageHandleCount; Index++) { 950 if ( FakeNvData->DriSelection[Index] != 0) {968 if (mDriSelection[Index]) { 951 969 SelectedDriverImageNum ++; 952 970 } … … 966 984 SelectedDriverImageNum = 0; 967 985 for (Index = 0; Index < mDriverImageHandleCount; Index++) { 968 if ( FakeNvData->DriSelection[Index] != 0) {986 if (mDriSelection[Index]) { 969 987 // 970 988 // Use the NO. in driver binding buffer as value, will use it later … … 1084 1102 **/ 1085 1103 EFI_STATUS 1086 Commi ntChanges (1104 CommitChanges ( 1087 1105 IN EFI_CALLBACK_INFO *Private, 1088 1106 IN UINT16 KeyValue, … … 1257 1275 UINT16 KeyValue; 1258 1276 PLAT_OVER_MNGR_DATA *FakeNvData; 1277 EFI_STATUS Status; 1259 1278 1260 1279 if (Configuration == NULL || Progress == NULL) { … … 1277 1296 } 1278 1297 1279 if (mCurrentPage == FORM_ID_DRIVER) { 1280 KeyValue = KEY_VALUE_DRIVER_GOTO_ORDER; 1281 UpdatePrioritySelectPage (Private, KeyValue, FakeNvData); 1282 KeyValue = KEY_VALUE_ORDER_SAVE_AND_EXIT; 1283 CommintChanges (Private, KeyValue, FakeNvData); 1284 // 1285 // Since UpdatePrioritySelectPage will change mCurrentPage, 1286 // should ensure the mCurrentPage still indicate the second page here 1287 // 1288 mCurrentPage = FORM_ID_DRIVER; 1289 } 1298 Status = EFI_SUCCESS; 1290 1299 1291 1300 if (mCurrentPage == FORM_ID_ORDER) { 1292 1301 KeyValue = KEY_VALUE_ORDER_SAVE_AND_EXIT; 1293 CommintChanges (Private, KeyValue, FakeNvData);1294 } 1295 1296 return EFI_SUCCESS;1302 Status = CommitChanges (Private, KeyValue, FakeNvData); 1303 } 1304 1305 return Status; 1297 1306 } 1298 1307 … … 1364 1373 } 1365 1374 1366 if (((KeyValue >= KEY_VALUE_DEVICE_OFFSET) && (KeyValue < KEY_VALUE_DEVICE_ MAX)) || (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS)) {1375 if (((KeyValue >= KEY_VALUE_DEVICE_OFFSET) && (KeyValue < KEY_VALUE_DEVICE_OFFSET + mMaxDeviceCount)) || (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS)) { 1367 1376 if (KeyValue == KEY_VALUE_ORDER_GOTO_PREVIOUS) { 1368 1377 KeyValue = (EFI_QUESTION_ID) (mSelectedCtrIndex + KEY_VALUE_DEVICE_OFFSET); … … 1398 1407 } 1399 1408 } else if (Action == EFI_BROWSER_ACTION_CHANGED) { 1400 switch (KeyValue) { 1401 case KEY_VALUE_DEVICE_REFRESH: 1402 case KEY_VALUE_DEVICE_FILTER: 1403 UpdateDeviceSelectPage (Private, KeyValue, FakeNvData); 1404 // 1405 // Update page title string 1406 // 1407 NewStringToken = STRING_TOKEN (STR_TITLE); 1408 if (HiiSetString (Private->RegisteredHandle, NewStringToken, L"First, Select the controller by device path", NULL) == 0) { 1409 ASSERT (FALSE); 1409 if ((KeyValue >= KEY_VALUE_DRIVER_OFFSET) && (KeyValue < KEY_VALUE_DRIVER_OFFSET + mDriverImageHandleCount)) { 1410 mDriSelection[KeyValue - KEY_VALUE_DRIVER_OFFSET] = Value->b; 1411 } else { 1412 switch (KeyValue) { 1413 case KEY_VALUE_DEVICE_REFRESH: 1414 case KEY_VALUE_DEVICE_FILTER: 1415 UpdateDeviceSelectPage (Private, KeyValue, FakeNvData); 1416 // 1417 // Update page title string 1418 // 1419 NewStringToken = STRING_TOKEN (STR_TITLE); 1420 if (HiiSetString (Private->RegisteredHandle, NewStringToken, L"First, Select the controller by device path", NULL) == 0) { 1421 ASSERT (FALSE); 1422 } 1423 break; 1424 1425 case KEY_VALUE_ORDER_SAVE_AND_EXIT: 1426 Status = CommitChanges (Private, KeyValue, FakeNvData); 1427 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT; 1428 if (EFI_ERROR (Status)) { 1429 CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Single Override Info too large, Saving Error!", NULL); 1430 return EFI_DEVICE_ERROR; 1431 } 1432 break; 1433 1434 default: 1435 break; 1410 1436 } 1411 break;1412 1413 case KEY_VALUE_ORDER_SAVE_AND_EXIT:1414 Status = CommintChanges (Private, KeyValue, FakeNvData);1415 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;1416 if (EFI_ERROR (Status)) {1417 CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Single Override Info too large, Saving Error!", NULL);1418 return EFI_DEVICE_ERROR;1419 }1420 break;1421 1422 default:1423 break;1424 1437 } 1425 1438 } … … 1673 1686 mDriverImageHandleCount = 0; 1674 1687 mCurrentPage = 0; 1675 ZeroMem (mDriverImageToken, MAX_CHOICE_NUM * sizeof (EFI_STRING_ID));1676 ZeroMem (mDriverImageFilePathToken, MAX_CHOICE_NUM * sizeof (EFI_STRING_ID));1677 ZeroMem (mControllerToken, MAX_CHOICE_NUM * sizeof (EFI_STRING_ID));1678 ZeroMem (mDriverImageProtocol, MAX_CHOICE_NUM * sizeof (EFI_LOADED_IMAGE_PROTOCOL *));1679 1688 1680 1689 return EFI_SUCCESS; … … 1720 1729 FreePool (mCallbackInfo); 1721 1730 1731 if (mControllerToken != NULL) { 1732 FreePool (mControllerToken); 1733 } 1734 1735 if (mControllerDevicePathProtocol != NULL) { 1736 FreePool (mControllerDevicePathProtocol); 1737 } 1738 1739 if (mDriverImageToken != NULL) { 1740 FreePool (mDriverImageToken); 1741 } 1742 1722 1743 return EFI_SUCCESS; 1723 1744 } -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c
r48674 r58459 2 2 Implementation of the shared functions to do the platform driver vverride mapping. 3 3 4 Copyright (c) 2007 - 20 09, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 692 692 VariableNum = 1; 693 693 Corrupted = FALSE; 694 NotEnd = 0; 694 695 do { 695 696 VariableIndex = VariableBuffer; 696 // 697 // End flag 698 // 699 NotEnd = *(UINT32*) VariableIndex; 697 if (VariableIndex + sizeof (UINT32) > (UINT8 *) VariableBuffer + BufferSize) { 698 Corrupted = TRUE; 699 } else { 700 // 701 // End flag 702 // 703 NotEnd = *(UINT32*) VariableIndex; 704 } 700 705 // 701 706 // Traverse the entries containing the mapping that Controller Device Path … … 707 712 // Check signature of this entry 708 713 // 714 if (VariableIndex + sizeof (UINT32) > (UINT8 *) VariableBuffer + BufferSize) { 715 Corrupted = TRUE; 716 break; 717 } 709 718 Signature = *(UINT32 *) VariableIndex; 710 719 if (Signature != PLATFORM_OVERRIDE_ITEM_SIGNATURE) { … … 723 732 // Get DriverNum 724 733 // 734 if (VariableIndex + sizeof (UINT32) >= (UINT8 *) VariableBuffer + BufferSize) { 735 Corrupted = TRUE; 736 break; 737 } 725 738 DriverNumber = *(UINT32*) VariableIndex; 726 739 OverrideItem->DriverInfoNum = DriverNumber; … … 736 749 // 737 750 VariableIndex += ((sizeof(UINT32) - ((UINTN) (VariableIndex))) & (sizeof(UINT32) - 1)); 751 // 752 // Check buffer overflow. 753 // 754 if ((OverrideItem->ControllerDevicePath == NULL) || (VariableIndex < (UINT8 *) ControllerDevicePath) || 755 (VariableIndex > (UINT8 *) VariableBuffer + BufferSize)) { 756 Corrupted = TRUE; 757 break; 758 } 738 759 739 760 // … … 757 778 758 779 InsertTailList (&OverrideItem->DriverInfoList, &DriverImageInfo->Link); 780 781 // 782 // Check buffer overflow 783 // 784 if ((DriverImageInfo->DriverImagePath == NULL) || (VariableIndex < (UINT8 *) DriverDevicePath) || 785 (VariableIndex < (UINT8 *) VariableBuffer + BufferSize)) { 786 Corrupted = TRUE; 787 break; 788 } 759 789 } 760 790 InsertTailList (MappingDataBase, &OverrideItem->Link); 791 if (Corrupted) { 792 break; 793 } 761 794 } 762 795 … … 867 900 // Check NotEnd to get all PlatDriOverX variable(s) 868 901 // 869 while ((*(UINT32*)VariableBuffer) != 0) { 902 while ((VariableBuffer != NULL) && ((*(UINT32*)VariableBuffer) != 0)) { 903 FreePool (VariableBuffer); 870 904 UnicodeSPrint (OverrideVariableName, sizeof (OverrideVariableName), L"PlatDriOver%d", VariableNum); 871 905 VariableBuffer = GetVariableAndSize (OverrideVariableName, &gEfiCallerIdGuid, &BufferSize); 872 906 VariableNum++; 873 ASSERT (VariableBuffer != NULL);874 907 } 875 908 … … 880 913 L"PlatDriOver", 881 914 &gEfiCallerIdGuid, 882 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_ RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,915 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, 883 916 0, 884 917 NULL … … 890 923 OverrideVariableName, 891 924 &gEfiCallerIdGuid, 892 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_ RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,925 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, 893 926 0, 894 927 NULL … … 945 978 // 946 979 gRT->QueryVariableInfo ( 947 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_ RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,980 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, 948 981 &MaximumVariableStorageSize, 949 982 &RemainingVariableStorageSize, … … 1054 1087 OverrideVariableName, 1055 1088 &gEfiCallerIdGuid, 1056 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_ RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,1089 EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, 1057 1090 VariableNeededSize, 1058 1091 VariableBuffer 1059 1092 ); 1060 ASSERT (!EFI_ERROR(Status)); 1093 FreePool (VariableBuffer); 1094 1095 if (EFI_ERROR (Status)) { 1096 if (NumIndex > 0) { 1097 // 1098 // Delete all PlatDriOver variables when full mapping can't be set. 1099 // 1100 DeleteOverridesVariables (); 1101 } 1102 return Status; 1103 } 1061 1104 1062 1105 NumIndex ++; 1063 FreePool (VariableBuffer);1064 1106 } 1065 1107 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatOverMngr.h
r48674 r58459 4 4 The PLAT_OVER_MNGR_DATA structure, form guid and Ifr question ID are defined. 5 5 6 Copyright (c) 2007 - 201 1, Intel Corporation. All rights reserved.<BR>6 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 7 7 This program and the accompanying materials 8 8 are licensed and made available under the terms and conditions of the BSD License … … 23 23 // The max number of the supported driver list. 24 24 // 25 #define MAX_CHOICE_NUM 0x00 ff25 #define MAX_CHOICE_NUM 0x00FF 26 26 #define UPDATE_DATA_SIZE 0x1000 27 27 … … 31 31 32 32 #define KEY_VALUE_DEVICE_OFFSET 0x0100 33 #define KEY_VALUE_D EVICE_MAX (KEY_VALUE_DEVICE_OFFSET + MAX_CHOICE_NUM)33 #define KEY_VALUE_DRIVER_OFFSET 0x0300 34 34 35 35 #define KEY_VALUE_DEVICE_REFRESH 0x1234 … … 48 48 49 49 typedef struct { 50 UINT8 DriSelection[MAX_CHOICE_NUM];51 50 UINT8 DriOrder[MAX_CHOICE_NUM]; 52 51 UINT8 PciDeviceFilter; … … 57 56 // 58 57 #define VAR_OFFSET(Field) ((UINTN) &(((PLAT_OVER_MNGR_DATA *) 0)->Field)) 59 #define DRIVER_SELECTION_VAR_OFFSET (VAR_OFFSET (DriSelection))60 58 #define DRIVER_ORDER_VAR_OFFSET (VAR_OFFSET (DriOrder)) 61 59 … … 65 63 // 66 64 #define QUESTION_ID_OFFSET 0x0500 67 #define DRIVER_SELECTION_QUESTION_ID (VAR_OFFSET (DriSelection) + QUESTION_ID_OFFSET)68 65 #define DRIVER_ORDER_QUESTION_ID (VAR_OFFSET (DriOrder) + QUESTION_ID_OFFSET) 69 66 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf
r48674 r58459 17 17 # which will be consumed by GetDriver API of the produced the platform override protocol. 18 18 # 19 # Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR> 19 # Caution: This module is a sample implementation for the test purpose. 20 # 21 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 20 22 # 21 23 # This program and the accompanying materials … … 32 34 INF_VERSION = 0x00010005 33 35 BASE_NAME = PlatDriOverrideDxe 36 MODULE_UNI_FILE = PlatDriOverrideDxe.uni 34 37 FILE_GUID = 35034CE2-A6E5-4fb4-BABE-A0156E9B2549 35 38 MODULE_TYPE = DXE_DRIVER … … 71 74 72 75 [Guids] 73 ## This GUID C Name is not required for build since it is from UefiLib and not directly used by this module source. 74 ## gEfiGlobalVariableGuid ## SOMETIMES_CONSUMED ## Variable:L"PlatformLang" this variable specifies the platform supported language string (RFC 4646 format) 75 ## gEfiGlobalVariableGuid ## SOMETIMES_CONSUMED ## Variable:L"Lang" this variable specifies the platform supported language string (ISO 639-2 format) 76 ## 76 # 77 # This GUID C Name is not required for build since it is from UefiLib and not directly used by this module source. 78 # gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:L"PlatformLang" # this variable specifies the platform supported language string (RFC 4646 format) 79 # gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:L"Lang" # this variable specifies the platform supported language string (ISO 639-2 format) 80 # 77 81 # There could be more than one variables, from PlatDriOver, PlatDriOver1, PlatDriOver2,... 82 # gEfiCallerIdGuid ## Private ## Variable:L"PlatDriOver" 78 83 # 79 # gEfiCallerIdGuid ## Private ## Variable:L"PlatDriOver" 80 gEfiIfrTianoGuid ## CONSUMES ## Guid 81 gPlatformOverridesManagerGuid ## PRODUCES ## Guid 84 gEfiIfrTianoGuid ## SOMETIMES_PRODUCES ## UNDEFINED 85 ## SOMETIMES_CONSUMES ## GUID # HiiIsConfigHdrMatch Data 86 ## SOMETIMES_PRODUCES ## GUID # HiiGetBrowserData Data 87 ## SOMETIMES_CONSUMES ## GUID # HiiSetBrowserData Data 88 ## SOMETIMES_PRODUCES ## GUID # HiiConstructConfigHdr Data 89 ## CONSUMES ## HII 90 gPlatformOverridesManagerGuid 82 91 83 92 [Protocols] 84 gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUME D (Get Driver Name if ComponentName2Protocol exists)85 gEfiComponentNameProtocolGuid ## SOMETIMES_CONSUME D (Get Driver Name if ComponentNameProtocol exists and ComponentName2Protocol doesn't exist)86 gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUME D (Get Driver Name from EFI UI section if ComponentName2Protocol and ComponentNameProtocol don't exist)87 gEfiPciIoProtocolGuid ## SOMETIMES_CONSUME D (Find the PCI device if PciIo protocol is installed)88 gEfiBusSpecificDriverOverrideProtocolGuid ## SOMETIMES_CONSUME D (Check whether the PCI device contains one or more efi drivers in its option rom by this protocol)93 gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUMES # Get Driver Name if ComponentName2Protocol exists 94 gEfiComponentNameProtocolGuid ## SOMETIMES_CONSUMES # Get Driver Name if ComponentNameProtocol exists and ComponentName2Protocol doesn't exist 95 gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES # Get Driver Name from EFI UI section if ComponentName2Protocol and ComponentNameProtocol don't exist 96 gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES # Find the PCI device if PciIo protocol is installed 97 gEfiBusSpecificDriverOverrideProtocolGuid ## SOMETIMES_CONSUMES # Check whether the PCI device contains one or more efi drivers in its option rom by this protocol 89 98 90 gEfiDriverBindingProtocolGuid ## SOMETIMES_CONSUMED 91 gEfiLoadedImageProtocolGuid ## SOMETIMES_CONSUMED 92 gEfiLoadedImageDevicePathProtocolGuid ## SOMETIMES_CONSUMED (Show the drivers in the second page that support DriverBindingProtocol, LoadedImageProtocol and LoadedImageDevicePathProtocol) 93 gEfiDevicePathProtocolGuid ## SOMETIMES_CONSUMED (Show the controller device in the first page that support DevicePathProtocol) 99 gEfiDriverBindingProtocolGuid ## SOMETIMES_CONSUMES 100 gEfiLoadedImageProtocolGuid ## SOMETIMES_CONSUMES 101 gEfiLoadedImageDevicePathProtocolGuid ## SOMETIMES_CONSUMES # Show the drivers in the second page that support DriverBindingProtocol, LoadedImageProtocol and LoadedImageDevicePathProtocol 94 102 95 gEfiFormBrowser2ProtocolGuid ## CONSUMED 96 gEfiHiiConfigRoutingProtocolGuid ## CONSUMED 97 gEfiHiiConfigAccessProtocolGuid ## PRODUCED 98 gEfiDevicePathToTextProtocolGuid ## CONSUMED 99 gEfiPlatformDriverOverrideProtocolGuid ## PRODUCED 103 gEfiFormBrowser2ProtocolGuid ## CONSUMES 104 gEfiHiiConfigRoutingProtocolGuid ## CONSUMES 105 gEfiHiiConfigAccessProtocolGuid ## PRODUCES 106 gEfiPlatformDriverOverrideProtocolGuid ## PRODUCES 107 ## PRODUCES 108 ## SOMETIMES_CONSUMES # Show the controller device in the first page that support DevicePathProtocol 109 gEfiDevicePathProtocolGuid 100 110 101 111 [Depex] 102 112 gEfiFormBrowser2ProtocolGuid AND gEfiHiiConfigRoutingProtocolGuid 113 114 [UserExtensions.TianoCore."ExtraFiles"] 115 PlatDriOverrideDxeExtra.uni -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/PlatformDriOverrideDxe/Vfr.vfr
r48674 r58459 43 43 help = STRING_TOKEN(STR_FIRST_REFRESH_HELP), 44 44 text = STRING_TOKEN(STR_FIRST_REFRESH), 45 text = STRING_TOKEN(STR_NULL_STRING),46 45 flags = INTERACTIVE, 47 46 key = KEY_VALUE_DEVICE_REFRESH; … … 103 102 help = STRING_TOKEN (STR_NULL_STRING), 104 103 text = STRING_TOKEN (STR_SAVE_AND_EXIT), 105 text = STRING_TOKEN (STR_SAVE_AND_EXIT),106 104 flags = INTERACTIVE | RESET_REQUIRED, 107 105 key = KEY_VALUE_ORDER_SAVE_AND_EXIT;
Note:
See TracChangeset
for help on using the changeset viewer.