-#/** @file\r
-# This driver produces UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL if this protocol doesn't exist.\r
-# It doesn't install again if this protocol exists.\r
-# It only implements one interface GetDriver of PLATFORM_DRIVER_OVERRIDE_PROTOCOL protocol \r
-# and doesn't support other two interfaces GetDriverPath, DriverLoaded. \r
-# \r
-# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\r
+## @file\r
+# This driver produces UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL if this protocol doesn't exist.\r
+# It doesn't install again if this protocol exists.\r
+# It only implements one interface GetDriver of PLATFORM_DRIVER_OVERRIDE_PROTOCOL protocol\r
+# and doesn't support other two interfaces GetDriverPath, DriverLoaded.\r
#\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
+# This driver also offers an UI interface in device manager to let user configure\r
+# platform override protocol to override the default algorithm for matching\r
+# drivers to controllers.\r
#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# The main flow:\r
+# 1. It dynamicly locate all controller device path.\r
+# 2. It dynamicly locate all drivers which support binding protocol.\r
+# 3. It export and dynamicly update two menu to let user select the\r
+# mapping between drivers to controllers.\r
+# 4. It save all the mapping info in NV variables for the following boot,\r
+# which will be consumed by GetDriver API of the produced the platform override protocol.\r
#\r
-#**/\r
+# Caution: This module is a sample implementation for the test purpose.\r
+#\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
\r
[Defines]\r
INF_VERSION = 0x00010005\r
- BASE_NAME = PlatformDriOverrideDxe\r
+ BASE_NAME = PlatDriOverrideDxe\r
+ MODULE_UNI_FILE = PlatDriOverrideDxe.uni\r
FILE_GUID = 35034CE2-A6E5-4fb4-BABE-A0156E9B2549\r
- MODULE_TYPE = UEFI_DRIVER\r
+ MODULE_TYPE = DXE_DRIVER\r
VERSION_STRING = 1.0\r
- ENTRY_POINT = PlatformDriverOverrideEntry\r
+ ENTRY_POINT = PlatDriOverrideDxeInit\r
+ UNLOAD_IMAGE = PlatDriOverrideDxeUnload\r
\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC\r
+# VALID_ARCHITECTURES = IA32 X64 EBC\r
#\r
\r
-[Sources.common]\r
- PlatformDriOverride.c\r
+[Sources]\r
+ VfrStrings.uni\r
+ Vfr.vfr\r
+ PlatDriOverrideDxe.c\r
+ PlatOverMngr.h\r
+ PlatDriOverrideLib.c\r
+ InternalPlatDriOverrideDxe.h\r
\r
[Packages]\r
MdePkg/MdePkg.dec\r
\r
[LibraryClasses]\r
BaseLib\r
- UefiDriverEntryPoint\r
DebugLib\r
- PlatformDriverOverrideLib\r
+ UefiLib\r
+ UefiDriverEntryPoint\r
UefiBootServicesTableLib\r
+ HiiLib\r
+ BaseMemoryLib\r
+ MemoryAllocationLib\r
+ DevicePathLib\r
+ DxeServicesTableLib\r
+ UefiRuntimeServicesTableLib\r
+ PrintLib\r
+\r
+[Guids]\r
+ #\r
+ # This GUID C Name is not required for build since it is from UefiLib and not directly used by this module source.\r
+ # gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:L"PlatformLang" # this variable specifies the platform supported language string (RFC 4646 format)\r
+ # gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:L"Lang" # this variable specifies the platform supported language string (ISO 639-2 format)\r
+ #\r
+ # There could be more than one variables, from PlatDriOver, PlatDriOver1, PlatDriOver2,...\r
+ # gEfiCallerIdGuid ## Private ## Variable:L"PlatDriOver"\r
+ #\r
+ gEfiIfrTianoGuid ## SOMETIMES_PRODUCES ## UNDEFINED\r
+ ## SOMETIMES_CONSUMES ## GUID # HiiIsConfigHdrMatch Data\r
+ ## SOMETIMES_PRODUCES ## GUID # HiiGetBrowserData Data\r
+ ## SOMETIMES_CONSUMES ## GUID # HiiSetBrowserData Data\r
+ ## SOMETIMES_PRODUCES ## GUID # HiiConstructConfigHdr Data\r
+ ## CONSUMES ## HII\r
+ gPlatformOverridesManagerGuid\r
\r
[Protocols]\r
- gEfiPlatformDriverOverrideProtocolGuid ## PRODUCED\r
-
\ No newline at end of file
+ gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUMES # Get Driver Name if ComponentName2Protocol exists\r
+ gEfiComponentNameProtocolGuid ## SOMETIMES_CONSUMES # Get Driver Name if ComponentNameProtocol exists and ComponentName2Protocol doesn't exist\r
+ gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES # Get Driver Name from EFI UI section if ComponentName2Protocol and ComponentNameProtocol don't exist\r
+ gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES # Find the PCI device if PciIo protocol is installed\r
+ gEfiBusSpecificDriverOverrideProtocolGuid ## SOMETIMES_CONSUMES # Check whether the PCI device contains one or more efi drivers in its option rom by this protocol\r
+\r
+ gEfiDriverBindingProtocolGuid ## SOMETIMES_CONSUMES\r
+ gEfiLoadedImageProtocolGuid ## SOMETIMES_CONSUMES\r
+ gEfiLoadedImageDevicePathProtocolGuid ## SOMETIMES_CONSUMES # Show the drivers in the second page that support DriverBindingProtocol, LoadedImageProtocol and LoadedImageDevicePathProtocol\r
+\r
+ gEfiFormBrowser2ProtocolGuid ## CONSUMES\r
+ gEfiHiiConfigRoutingProtocolGuid ## CONSUMES\r
+ gEfiHiiConfigAccessProtocolGuid ## PRODUCES\r
+ gEfiPlatformDriverOverrideProtocolGuid ## PRODUCES\r
+ ## PRODUCES\r
+ ## SOMETIMES_CONSUMES # Show the controller device in the first page that support DevicePathProtocol\r
+ gEfiDevicePathProtocolGuid\r
+\r
+[Depex]\r
+ gEfiFormBrowser2ProtocolGuid AND gEfiHiiConfigRoutingProtocolGuid\r
+\r
+[UserExtensions.TianoCore."ExtraFiles"]\r
+ PlatDriOverrideDxeExtra.uni\r