The first step to building a bus driver is to include the header files for the DKI and DDI APIs involved in the bus driver's implementation.
A host bus driver implementation uses only the DKI interface, because there is no other driver component between the host bus and the microkernel API. On the other hand, a bus-to-bus bridge driver typically uses its parent bus DDI API (and some generic DKI services, like memory allocation).
In either case, the driver implementation must include:
The parent bus class API header file(s) (DKI and/or DDI).
Note that the services available for bus driver implementation are defined in these header files.
The bus class API header file(s) (DDI).
Note that these header files define the routines that must be written for the driver component to be compliant with the Driver Framework.
Shown below is an example for a PCI-to-ISA bridge bus driver that uses both DKI and "PCI bus driver" APIs, and that provides both "Common bus driver" and "ISA bus driver" APIs.
#include <dki/dki.h> #include <ddi/pci/pci.h> #include <ddi/isa/isa.h> ... #include "w83c553.h" #include "w83c553Prop.h"