<<DriverName>>.c. This file contains the instance of the
EFI_DRIVER_BINDING_PROTOCOLalong with the implementation of the
Stop()services. Appendix A contains the template for a UEFI Driver and includes the declaration of the Driver Binding Protocol instance, the Driver Binding Protocol services and the driver entry point that uses the EDK II library
UefiLibfunctions to install the Driver Binding Protocol into the handle database and complete the initialization of the Driver Binding Protocol data fields.
Stop()services are covered in detail in the EFI Driver Binding Protocol section of the UEFI Specification. Also included are code examples and the detailed algorithms to implement these services for device drivers and bus drivers If a UEFI Driver produces multiple instances of the Driver Binding Protocol, they are all installed in the driver entry point. Each instance of the Driver Binding Protocol is implemented using the same guidelines. The different instances may share worker functions to reduce the size of the driver.
Supported()service performs a quick check to see if a driver supports a controller. The
notmodify the state of the controller because the controller may already be managed by a different driver. If the
Supported()service passes, the
Start()service is called to ask the driver to bind to a specific controller. The
Stop()service does the opposite of
Start(). It disconnects a driver from a controller and frees any resources allocated in the
Supported()service of the driver seems to make sense, the
Supported()service is intended only to be a quick check to find out if a driver can make a connection to the specified controller, find out if it has already been called (started and in use), or if it is in use exclusively by another component. The
Supported()service must return an error if the controller is already in use or is in use exclusively by another component.
Start()service of the driver, not in the
ASSERT()macros from the EDK II library
DebugLibto send messages to the standard error console if it is active. These macros are usually enabled during UEFI Driver development and are disabled when a UEFI Driver is released.