PCI BUS and PCI DEVICES: ------------------------ System boot process - Device discovery General device characteristics - Device Registers Device access - Device Memory - DMA and Programmed I/O Device Interrupts Other buses and devices: ------------------------ USB SCSI Device Tree -------------- * Bus Nexus and leaf devices [ Differences in driver functionalities for each ] * prtconf - Parent - Child relation ships * /devices and devfs DDI/DKI main functions : ---------------------------- * Dynamic loading and unloading of modules * Interrupt handling * Accessing the device space from the kernel or a user process, that is, register mapping and memory mapping * Accessing kernel or user process space from the device using DMA services * Managing device properties * Power management Driver attaching ----------------- * Creation of device properties : - Device aliases for attaching drivers to devices. - Other properties specific to the device - property access functions * /etc/driver_aliases - Repository of drivers and hardware they are responsible for. Autoconfiguration ------------------ * modlinkage -> modldrv-> devops -> cbops mod_install is a commn interface for all kinds of modules. Module specific initialisation is done by the modm_ routines in mod_ops * modldrv -> mod_driverops, which is a defined structure used for driver modules. (refer uts/os/modconf.c) mod_ops -> uts/common/sys/modctl.h _init -> mod_install. _fini _info Attach and detach ------------------ Things to do during attach : * Allocating a soft-state structure for the device instance * Initializing per-instance mutexes * Initializing condition variables * Registering the device s interrupts * Mapping the registers and memory of the device instance * Creating minor device nodes for the device instance * Reporting that the device instance has attached Things to do during detach : ----------------------------- Reversal of all operations done in attach Accessing device/device memory : ----------------------------------- PCI config space ddi_regs_map_setup Interrupt handling ---------------------- check for hi level interrupts check for number of interrupts get the iblock cookie for an interrupt specification initialise mutexes with the iblock cookie add the interrupt handler References: ----------- * Writing Device Drivers: http://docs.sun.com/app/docs/doc/816-4854 * From "man -s9e intro" How to Use Section 9 Section 9 is divided into the following subsections: 9E Driver Entry Points - contains reference pages for all driver entry point routines. 9F Kernel Functions - contains reference pages for all driver support routines. 9P Driver Properties - contains reference pages for driver properties. 9S Data Structures - contains reference pages for driver-related structures. * A discussion on nexus drivers on the device drivers mailing list on opensolaris.org: http://www.opensolaris.org/jive/thread.jspa?threadID=16207