+ //\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