Michael, that's a good point but it only works for drivers which bind to a device. If you're just installing a protocol e.g. for virtual devices or special services which you don't want to turn into libraries then this doesn't work.
Haojian, that's what I was thinking, I just wasn't sure if the order is reliable. Andrew, your description sounds like its about DXE_DRIVERs and their Depex sections, does this apply to UEFI_DRIVERs too when they're auto-loaded from the fdf(since they don't support the Depex section)? Thanks for all your answers, Michael On Thu, May 18, 2017 at 7:21 AM, Andrew Fish <[email protected]> wrote: > >> On May 17, 2017, at 10:00 PM, Kinney, Michael D <[email protected]> >> wrote: >> >> Michael, >> >> The UEFI Driver Model and the Driver Binding Protocol >> provide support for this case. The idea is that a driver >> is loaded and started, but when a UEFI Driver is started, >> it only registers a Driver Binding Protocol. Then in the >> BDS phase, the devices required to boot are started using >> the UEFI Boot Service ConnectController() and >> ConnectController() calls the Driver Binding Protocol(s). >> >> The dependencies between UEFI Drivers are in their Driver >> Binding Protocols which are not used until after all of >> the UEFI Drivers are loaded and started. >> > > Micheal, > > 1st off no dependency is really a dependency on all the architecture > protocols, which is a fancy way of saying all the EFI Boot and Runtime > Services are available. > > Lets say you have a driver that depends on DiskIo. The DiskIo driver depends > on BlockIo. Now what happens when a disk driver is connected and produces a > BlockIO is the DiskIo driver can know get connected. The DXE Core knows a > protocol was added to the handle so it will keep trying to connect drivers to > that handle as long as new protocols get added. So this is how the > DriverBinding Support() is used to resolve the sequence issues. > > Thanks, > > Andrew Fish > >> Mike >> >>> -----Original Message----- >>> From: edk2-devel [mailto:[email protected]] On Behalf Of >>> Michael >>> Zimmermann >>> Sent: Wednesday, May 17, 2017 9:43 PM >>> To: edk2-devel-01 <[email protected]>; Zeng, Star >>> <[email protected]>; Dong, >>> Eric <[email protected]> >>> Subject: [edk2] UEFI_DRIVER dependencies >>> >>> I know that UEFI_DRIVERs don't need or support Depex sections, but >>> what if an UEFI_DRIVER depends on a protocol provided by another >>> UEFI_DRIVER? >>> Since they get loaded automatically because I put them in my >>> platform's fdf, it raises the question of the loading order. >>> >>> Will they get loaded in the order they're defined? How often will the >>> core retry if one of the drivers returns EFI_NOT_READY? >>> >>> Thanks, >>> Michael >>> _______________________________________________ >>> edk2-devel mailing list >>> [email protected] >>> https://lists.01.org/mailman/listinfo/edk2-devel >> _______________________________________________ >> edk2-devel mailing list >> [email protected] >> https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

