# This is core module in DXE phase. It provides an implementation of DXE Core that is\r
# compliant with DXE CIS. \r
# \r
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
# 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
gEfiMetronomeArchProtocolGuid ## CONSUMES\r
gEfiTimerArchProtocolGuid ## CONSUMES\r
gEfiBusSpecificDriverOverrideProtocolGuid ## CONSUMES\r
+ gEfiDriverFamilyOverrideProtocolGuid ## CONSUMES\r
gEfiPlatformDriverOverrideProtocolGuid ## CONSUMES\r
gEfiDriverBindingProtocolGuid ## SOMETIMES_CONSUMES\r
gEfiFirmwareVolumeBlockProtocolGuid ## PRODUCES\r
/** @file\r
Support functions to connect/disconnect UEFI Driver model Protocol\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
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
UINTN NewDriverBindingHandleCount;\r
EFI_HANDLE *NewDriverBindingHandleBuffer;\r
EFI_DRIVER_BINDING_PROTOCOL *DriverBinding;\r
+ EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL *DriverFamilyOverride;\r
UINTN NumberOfSortedDriverBindingProtocols;\r
EFI_DRIVER_BINDING_PROTOCOL **SortedDriverBindingProtocols;\r
+ UINT32 DriverFamilyOverrideVersion;\r
UINT32 HighestVersion;\r
UINTN HighestIndex;\r
UINTN SortIndex;\r
} while (!EFI_ERROR (Status));\r
}\r
\r
+ //\r
+ // Add the Driver Family Override Protocol drivers for ControllerHandle\r
+ //\r
+ while (TRUE) {\r
+ HighestIndex = DriverBindingHandleCount;\r
+ HighestVersion = 0;\r
+ for (Index = 0; Index < DriverBindingHandleCount; Index++) {\r
+ Status = CoreHandleProtocol (\r
+ DriverBindingHandleBuffer[Index],\r
+ &gEfiDriverFamilyOverrideProtocolGuid,\r
+ (VOID **) &DriverFamilyOverride\r
+ );\r
+ if (!EFI_ERROR (Status) && (DriverFamilyOverride != NULL)) {\r
+ DriverFamilyOverrideVersion = DriverFamilyOverride->GetVersion (DriverFamilyOverride);\r
+ if ((HighestIndex == DriverBindingHandleCount) || (DriverFamilyOverrideVersion > HighestVersion)) {\r
+ HighestVersion = DriverFamilyOverrideVersion;\r
+ HighestIndex = Index;\r
+ }\r
+ }\r
+ }\r
+\r
+ if (HighestIndex == DriverBindingHandleCount) {\r
+ break;\r
+ }\r
+\r
+ AddSortedDriverBindingProtocol (\r
+ DriverBindingHandleBuffer[HighestIndex],\r
+ &NumberOfSortedDriverBindingProtocols,\r
+ SortedDriverBindingProtocols,\r
+ DriverBindingHandleCount,\r
+ DriverBindingHandleBuffer,\r
+ FALSE\r
+ );\r
+ }\r
+\r
//\r
// Get the Bus Specific Driver Override Protocol instance on the Controller Handle\r
//\r