Mike,
Maybe I don't understand Sathya's question. I thought we was trying to prevent
any UEFI driver from binding with c2. The Bus Specific Driver Override rules,
just bumps the priority of the search, but the search still happens. So a
driver would match.
This functions uses five precedence rules when deciding the order that drivers
are tested against controllers. These five rules from highest precedence to
lowest precedence are as follows:
1. Context Override : DriverImageHandle is an ordered list of handles that
support the EFI_DRIVER_BINDING_PROTOCOL. The highest priority image handle is
the first element of the list, and the lowest priority image handle is the last
element of the list. The list is terminated with a NULL image handle.
2. Platform Driver Override : If an EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL
instance is present in the system, then the GetDriver() service of this
protocol is used to retrieve an ordered list of image handles for
ControllerHandle. From this list, the image handles found in rule (1) above are
removed. The first image handle returned from GetDriver() has the highest
precedence, and the last image handle returned from GetDriver() has the lowest
precedence. The ordered list is terminated when GetDriver() returns
EFI_NOT_FOUND. It is legal for no image handles to be returned by GetDriver().
There can be at most a single instance in the system of the
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL. If there is more than one, then the
system behavior is not deterministic.
3. Driver Family Override Search : The list of available driver image handles
can be found by using the boot service LocateHandle()with a SearchType of
ByProtocol for the GUID of the EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL. From this
list, the image handles found in rules (1), and (2) above are removed. The
remaining image handles are sorted from highest to lowest based on the value
returned from the GetVersion() function of the
EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL associated with each image handle.
4. Bus Specific Driver Override : If there is an instance of the
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL attached to ControllerHandle, then
the GetDriver() service of this protocol is used to retrieve an ordered list of
image handle for ControllerHandle. From this list, the image handles found in
rules (1), (2), and (3) above are removed. The first image handle returned from
GetDriver() has the highest precedence, and the last image handle returned from
GetDriver() has the lowest precedence. The ordered list is terminated when
GetDriver() returns EFI_NOT_FOUND. It is legal for no image handles to be
returned by GetDriver().
5. Driver Binding Search : The list of available driver image handles can be
found by using the boot service LocateHandle() with a SearchType of ByProtocol
for the GUID of the EFI_DRIVER_BINDING_PROTOCOL. From this list, the image
handles found in rules (1), (2), (3), and (4) above are removed. The remaining
image handles are sorted from highest to lowest based on the Version field of
the EFI_DRIVER_BINDING_PROTOCOL instance associated with each image handle.
Sathy,
What do you want to happen on c2?
Andrew Fish
On Dec 19, 2012, at 4:34 PM, "Kinney, Michael D" <michael.d.kin...@intel.com>
wrote:
> Sathya,
>
> By default for PCI Adapters, the driver from the option ROM associated with a
> PCI Controller will be tried first using the Bus Specific Driver Override
> rule. The details on all the rules that determine the order that Driver
> Binding Supported() is tried on a specific controller are described in the
> UEFI Specification in the description of the UEFI Boot Service
> ConnectController().
>
> Your use case is also covered in an example in the UEFI Driver Writer’s Guide
> in section 3.14.2. It is available from the following page:
>
> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Driver_Developer
>
> Best regards,
>
> Mike
>
> From: Andrew Fish [mailto:af...@apple.com]
> Sent: Wednesday, December 19, 2012 4:03 PM
> To: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] How to impose 1 to 1 mapping between driver and controller
>
> The EFI_PCI_IO_PROTOCOL contains a pointer to the RomImage that was filled in
> by the PCI bus driver. There is also an attribute bit that lets you know if
> the ROM cam from the system or the PCI Card. So your could check the
> EFI_PCI_IO_PROTOCOL.RomImage to make sure you are running on the card the ROM
> came from.
>
> Andrew Fish
>
>
> On Dec 19, 2012, at 3:32 PM, "Prakash, Sathya" <sathya.prak...@lsi.com> wrote:
>
>
> Folks,
> Let us assume a case where there are two I/O controllers present in the
> system with only one controller (c1) having a UEFI Boot Service Driver
> programmed in its flash part and the other one (c2) doesn’t have the BSD in
> flash. Both are having same PCI IDs. I want to ensure in my driver binding’s
> supported or start routines to make sure the driver manages only the
> controller from where it loads and not the other controller. Can it is doable?
>
> Thanks
> Sathya
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel