DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Porting drivers to DDI 8

Initialization, configuration, and removal routines

The process for coding driver initialization and configuration in a DDI 8 driver can be summarized as follows. The _load(D2) entry point calls the drv_attach(D3) function. The kernel then calls the config(D2) entry point with the CFG_ADD subfunction once for each board, passing it the key for that board. The driver's config( ) entry point can then call the cm_intr_attach(D3) function or any other cm_xxx( ) or devmem_xxx( ) functions that need a key.

The CFG_ADD subfunction must also allocate a private instance data structure that contains or references state information for the board (possibly including the key, and likely including the interrupt cookie). This is then passed to the kernel as an opaque handle by writing it to (*(void **)idata). All subsequent entry points have this idata value passed back in to the driver so it can get at its per-board state.

The following sections summarize the entry point modifications required for initialization, configuration, and removal when porting drivers from earlier DDI versions or SCO OpenServer 5 to run on DDI 8:


© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005