ChorusOS 4.0 Device Driver Framework Guide

Organization (trees)

All files related to driver components are organized in 4 file trees:

Note that both drv and drv_f trees are mainly populated by third party driver writers (although ChorusOS system deliveries contain drivers for the reference platform's devices).

The main functional components of the 'dki' tree are:

All other file trees are organized following the bus/device class provided APIs. In other words, there is a directory per class of bus and device, which contains the header file defining the API provided by this device class.

For drv and drv_f, in each bus/device class directory there is one directory per bus/device hardware controller for which a driver component is written.

Listed below are some path examples (header file paths are relative to the ChorusOS operating system delivery root directory):

    include/chorus/ddi/bus/bus.h              -> DDI's Common bus class API
    include/chorus/ddi/pci/pci.h               -> DDI's PCI bus class API
    include/chorus/ddi/uart/uart.h            -> DDI's UART device class API

    drv_f/src/pci/raven/ravenProp.h           -> family specific driver component
    drv_f/src/pci/raven/raven.h                      for the Motorola RAVEN PCI host
    drv_f/src/pci/raven/raven.c                       bridge
    drv_f/src/pci/raven/Imakefile

    drv/src/uart/ns16550/ns16550Prop.h    -> Generic driver component for
    drv/src/uart/ns16550/ns16550.h                NS16x50 compatible UART devices.
    drv/src/uart/ns16550/ns16550.c
    drv/src/uart/ns16550/Imakefile