forked from tianocore/edk2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MdeModulePkg: Optimize CoreInstallMultipleProtocolInterfaces
CoreLocateDevicePath is used in CoreInstallMultipleProtocolInterfaces to check if a Device Path Protocol instance with the same device path is alreay installed. CoreLocateDevicePath is a generic API, and would introduce some unnecessary overhead for such usage. The optimization is: 1. Implement IsDevicePathInstalled to loop all the Device Path Protocols installed and check if any of them matchs the given device path. 2. Replace CoreLocateDevicePath with IsDevicePathInstalled in CoreInstallMultipleProtocolInterfaces. This optimization could save several seconds in PCI enumeration on a system with many PCI devices. Cc: Jian J Wang <[email protected]> Cc: Liming Gao <[email protected]> Cc: Dandan Bi <[email protected]> Cc: Ray Ni <[email protected]> Signed-off-by: Zhi Jin <[email protected]> Reviewed-by: Ray Ni <[email protected]> Reviewed-by: Liming Gao <[email protected]>
- Loading branch information
1 parent
26d484d
commit 5340219
Showing
1 changed file
with
72 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters