Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
12-46 12/01/02 Version 1.10
12.3 PCI Driver Model
These sections (Sections 12.3 and 12.4) describe the PCI Driver Model. This includes the behavior
of PCI Bus Drivers, the behavior of a PCI Device Drivers, and a detailed description of the PCI I/O
Protocol. The PCI Bus Driver manages PCI buses present in a system, and PCI Device Drivers
manage PCI controllers present on PCI buses. The PCI Device Drivers produce an I/O abstraction
that can be used to boot an EFI compliant operating system.
This document provides enough material to implement a PCI Bus Driver, and the tools required to
design and implement a PCI Device Drivers. It does not provide any information on specific PCI
devices.
The material contained in this document is designed to extend the EFI Specification and the EFI
Driver Model Specification in a way that supports PCI device drivers and PCI bus drivers. These
extensions are provided in the form of PCI-specific protocols. This document provides the
information required to implement a PCI Bus Driver in system firmware. The document also
contains the information required by driver writers to design and implement PCI Device Drivers
that a platform may need to boot an EFI compliant OS.
A full understanding of the EFI Specification, the EFI Driver Model Specification, and the PCI
Specification is assumed throughout this document. The PCI Driver Model described here is
intended to be a foundation on which a PCI Bus Driver and a wide variety of PCI Device Drivers
can be created.
12.3.1 PCI Driver Initialization
There are very few differences between a PCI Bus Driver and PCI Device Driver in the entry point
of the driver. The file for a driver image must be loaded from some type of media. This could
include ROM, FLASH, hard drives, floppy drives, CD-ROM, or even a network connection. Once
a driver image has been found, it can be loaded into system memory with the Boot Service
LoadImage()
. LoadImage() loads a PE/COFF formatted image into system memory. A
handle is created for the driver, and a Loaded Image Protocol instance is placed on that handle. A
handle that contains a Loaded Image Protocol instance is called an Image Handle. At this point, the
driver has not been started. It is just sitting in memory waiting to be started. Figure 12-7 shows the
state of an image handle for a driver after LoadImage() has been called.
Image Handle
EFI_LOADED_IMAGE_PROTOCOL
OM13148
Figure 12-7. Image Handle