1## @file
2#  This driver produces UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL if this protocol doesn't exist.
3#  It doesn't install again if this protocol exists.
4#  It only implements one interface GetDriver of PLATFORM_DRIVER_OVERRIDE_PROTOCOL protocol
5#  and doesn't support other two interfaces GetDriverPath, DriverLoaded.
6#
7#  This driver also offers an UI interface in device manager to let user configure
8#  platform override protocol to override the default algorithm for matching
9#  drivers to controllers.
10#
11#  The main flow:
12#  1. It dynamicly locate all controller device path.
13#  2. It dynamicly locate all drivers which support binding protocol.
14#  3. It export and dynamicly update two menu to let user select the
15#     mapping between drivers to controllers.
16#  4. It save all the mapping info in NV variables for the following boot,
17#     which will be consumed by GetDriver API of the produced the platform override protocol.
18#
19# Caution: This module is a sample implementation for the test purpose.
20#
21# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
22#
23#  This program and the accompanying materials
24#  are licensed and made available under the terms and conditions of the BSD License
25#  which accompanies this distribution. The full text of the license may be found at
26#  http://opensource.org/licenses/bsd-license.php
27#
28#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
29#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
30#
31##
32
33[Defines]
34  INF_VERSION                    = 0x00010005
35  BASE_NAME                      = PlatDriOverrideDxe
36  MODULE_UNI_FILE                = PlatDriOverrideDxe.uni
37  FILE_GUID                      = 35034CE2-A6E5-4fb4-BABE-A0156E9B2549
38  MODULE_TYPE                    = DXE_DRIVER
39  VERSION_STRING                 = 1.0
40  ENTRY_POINT                    = PlatDriOverrideDxeInit
41  UNLOAD_IMAGE                   = PlatDriOverrideDxeUnload
42
43#
44# The following information is for reference only and not required by the build tools.
45#
46#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
47#
48
49[Sources]
50  VfrStrings.uni
51  Vfr.vfr
52  PlatDriOverrideDxe.c
53  PlatOverMngr.h
54  PlatDriOverrideLib.c
55  InternalPlatDriOverrideDxe.h
56
57[Packages]
58  MdePkg/MdePkg.dec
59  MdeModulePkg/MdeModulePkg.dec
60
61[LibraryClasses]
62  BaseLib
63  DebugLib
64  UefiLib
65  UefiDriverEntryPoint
66  UefiBootServicesTableLib
67  HiiLib
68  BaseMemoryLib
69  MemoryAllocationLib
70  DevicePathLib
71  DxeServicesTableLib
72  UefiRuntimeServicesTableLib
73  PrintLib
74
75[Guids]
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  #
81  # There could be more than one variables, from PlatDriOver, PlatDriOver1, PlatDriOver2,...
82  #  gEfiCallerIdGuid                           ## Private  ## Variable:L"PlatDriOver"
83  #
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
91
92[Protocols]
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
98
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
102
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
110
111[Depex]
112  gEfiFormBrowser2ProtocolGuid AND gEfiHiiConfigRoutingProtocolGuid
113
114[UserExtensions.TianoCore."ExtraFiles"]
115  PlatDriOverrideDxeExtra.uni
116