DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Driver testing and debugging

Testing the hardware

In addition to testing and debugging the driver, you must also test the hardware device itself. While the area of developing, testing, and debugging the hardware is beyond the scope of this documentation, the following guidelines are suggested:

To ensure that the kernel-device interface is functioning properly, write a simplified driver that contains dummy routine calls for the basic, non-interrupt handling routines. For DDI 8 drivers, code dummy routines for _load(D2), config(D2), open(D2), close(D2), and biostart(D2) routines. For DDI drivers prior to version 8 and all ODDI drivers, code dummy routines for the init(D2), start(D2), open(D2), close(D2), read(D2), and write(D2) routines. For example:
   qq_open()
   

{ cmn_err(CE_CONT,"Open routine entered\n"); }

This simplified driver should contain an ioctl(D2) routine that gives user program control to each control bit in the control status register (CSR). This lets you test each hardware function and ensure that the hardware is performing in the proper operational sequence.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005