mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdeModulePkg: Optimize CoreConnectSingleController
CoreConnectSingleController() searches for the Driver Family Override Protocol drivers by looping and checking each Driver Binding Handles. This loop can be skipped by checking if any Driver Family Override Protocol installed in the platform first, to improve the performance. Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Zhi Jin <zhi.jin@intel.com>
This commit is contained in:
parent
9eddbab650
commit
959f71c801
@ -497,7 +497,12 @@ CoreConnectSingleController (
|
||||
//
|
||||
// Add the Driver Family Override Protocol drivers for ControllerHandle
|
||||
//
|
||||
while (TRUE) {
|
||||
Status = CoreLocateProtocol (
|
||||
&gEfiDriverFamilyOverrideProtocolGuid,
|
||||
NULL,
|
||||
(VOID **)&DriverFamilyOverride
|
||||
);
|
||||
while (!EFI_ERROR (Status) && (DriverFamilyOverride != NULL)) {
|
||||
HighestIndex = DriverBindingHandleCount;
|
||||
HighestVersion = 0;
|
||||
for (Index = 0; Index < DriverBindingHandleCount; Index++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user