These hardware device drivers are done:

There are also these 'software' drivers:

Borrowing Drivers

There are two methods I have for borrowing drivers from other OS's.

  1. Project UDI was designed for such a purpose
  2. Borrowing an MS SCSI driver
Neither method has proven completely successful, however.

Driver Entrypoints

Only Initialization and Start I/O request are required.

Initialization Drivers can be initialized in any way suited to the task. These ways are currently implemented in one or more drivers:

No matter how it is called, its purpose is to create appropriate device structs that applications can see and to initialize any associated hardware controllers.

Shutdown This routine is called when the system is being shut down. It can flush caches out and hardware reset controllers.

Create clone device This routine is called when a clone device is about to be created. Clone devices are used for such things as pseudo-terminals, ie, where the device exists only when it is being used.

Delete clone device This routine is called when the clone device is no longer being used. The driver aborts and closes all processing being performed on the device.

New I/O channel being assigned This routine is called when a new channel has been assigned to the device. The driver initializes the per-channel device struct.

I/O channel being deassigned The driver closes anything opened on the channel.

Abort I/O request The driver makes an attempt to abort the indicated I/O operations as soon as it can. Usually, it marks them for abort then tells the controller to stop processing them.

Start I/O request This is used to initiate an I/O request. It returns as soon as it can. The I/O is performed either as a series of interrupt routines or as a kernel thread. When the requested operation has completed, a callback is made to the os to inform it of such and of the completion status.

Related Data Structures (Kernel Objects)

The function table

The entrypoints (all except the initialization routine) are located in the driver's function table. The elements of the function table are:

The drivers are interfaced to by module oz_knl_devio.c.