3.10 UEFI driver model
The Overview and UEFI Driver Model chapters of the UEFI Specification define the UEFI driver model. Drivers that follow the UEFI driver model share the same image characteristics as UEFI applications. However, the model allows UEFI more control over drivers by separating their loading into memory from their starting and stopping. The table below lists the series of UEFI driver model-related protocols that are used to accomplish this separation.
The new protocols are registered on the driver's image handle. HII packages are registered in the HII database. In the UEFI driver model, the main goal of the driver's entry point is to install theses protocols, register HII packages, and exit successfully.
At a later point in the system initialization, UEFI can use these protocol functions to operate the driver. A more complex driver may produce more than one instance of the
EFI_DRIVER_BINDING_PROTOCOL. In this case, additional instances of the Driver Binding Protocol are installed on new handles. These new handles may also optionally support the additional protocols listed in Table 10 above.
The UEFI driver model follows the organization of physical/electrical architecture by defining three basic types of UEFI boot time drivers:
- Device drivers
- Bus drivers
- Hybrid drivers, which have characteristics of both a device driver and a bus driver
Device drivers and bus drivers are distinguished by the operations they perform in the
Stop()services of the Driver Binding Protocol. By walking through the
process of connecting a driver to a device, the roles and relationships of the bus drivers and device drivers become evident; the following sections discuss these two driver types.