18 PCI Driver Design Guidelines
There are several categories of PCI drivers that cooperate to provide support for PCI controllers in a platform. Table 25- lists these PCI drivers.
This chapter concentrates on the design and implementation of PCI drivers. PCI drivers must follow all of the general design guidelines described in Chapter 4. This chapter covers guidelines that apply specifically to the management of PCI controllers.
The following figure shows an example PCI driver stack and the protocols the PCIrelated drivers consume and produce. In this example, the platform hardware produces a single PCI root bridge. The PCI Root Bridge I/O Protocol driver accesses the hardware resources to produce a single handle with the
The PCI bus driver consumes the services of the
PCI_ROOT_BRIDGE_IO_PROTOCOLand uses those services to enumerate the PCI controllers present in the system. In this example, the PCI bus driver detected a disk controller, a graphics controller, and a USB host controller. As a result, the PCI bus driver produces three child handles with the
- The driver for the PCI disk controller consumes the services of the
EFI_PCI_IO_PROTOCOLand produces two child handles with the
- The PCI driver for the graphics controller consumes the services of the
EFI_PCI_IO_PROTOCOLand produces a child handle with the
- The PCI driver for the USB host controller consumes the services of the
EFI_PCI_IO_PROTOCOLto produce the
EFI_USB_HOST_CONTROLLER_PROTOCOL.Although not shown in Figure 19, the
EFI_USB_HOST_CONTROLLER_PROTOCOLwouldthen be consumed by the USB bus driver to produce child handles for each USBdevice. USB drivers would then manage those child handles.
Chapter 19 contains the guidelines for designing USB drivers.