DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Developing device drivers



Using the HDK documentation set
        Accessing HDK documentation on SCO OpenServer 5
                Printing the HDK documentation

HDK manual page sections

Device driver overview
        What are device drivers?
                How drivers are accessed
        Driver structure
                Header files and declarations
                Initialization, configuration, and closing
                I/O operations
                Interrupt handling
                Kernel functions
        Synchronization and locks
        Installation and configuration
        Driver development
                        Preparation
                        Implementation
                        Follow-up
                Application programs versus drivers
                Structure
                Parallel execution
                Interrupts
                Driver as part of the kernel

Guidelines for all kernel drivers
        Structure
        Functional issues
        Comments
        Error notification
        Accessing hardware
                ODDI hardware notes
        Handling interrupts
        Installation, configuration, and packaging
        Protecting against configuration changes
                DDI 7 and earlier implementation
                ODDI implementation
        Documentation

Writing drivers in C++
        Choosing a C++ version
        Language feature selection
                Exception handling
                Run Time Type Information (RTTI)
                Local static variables with dynamic initialization
                Static objects with constructors or destructors
                Operator new and delete
                Templates
        C++ standard library
                Runtime support routines
        Driver name space issues
        Compiling, linking, and debugging
        Performance considerations
        Known problems

Installing, configuring, and packaging SVR5 drivers
        Setting up the Driver Software Package (DSP)
                Master file
                System file
                Drvmap file
                Space.c file
                Node file convention
        Installing drivers
        Packaging drivers
                Files that control packaging
                        prototype
                        postinstall
                        preremove
        Notes about installation, configuration, and packaging
                Autoconfiguration and advanced bus hardware
                Drivers that support ISA and another bus type
                Controlling the order of driver initialization
                Configuring ISA devices with multiple I/O or memory addresses

Driver testing and debugging
        Testing on a non-dedicated machine
        Coding the driver for debugging
                Conditional compiler statements
                Putting debug statements in a driver
        Entering a kernel debugger from a driver
        Setting up a remote console for debugging
                Setting up a remote serial console on SVR5
                Setting up remote debug console for SVR5
                Setting up a serial terminal console on SCO OpenServer 5
        Testing the hardware
        Using crash and the kernel debuggers
                Choosing the tool to use
                Configuring the debuggers
                Invoking the debugger
                Useful kdb commands (SVR5 only)
                Debugging a DLKM at load time (SVR5 only)
        Testing during installation and initialization
                Using the magic floppy and debugging kernel on SVR5
                SCO OpenServer 5 installation debugging
        Common driver problems
                Coding problems
                Boot problems
                Cannot call open() routine (DDI)
                Data structure problems
                Hardware timing errors
                Corrupted interrupt stack
                System configuration problems
                Accessing critical data
                Overuse of local driver storage
                Incorrect DMA address mapping
                Unregistered interrupt handlers in loadable DDI drivers
                Unregistered interrupt handlers in ODDI drivers
                Panic on mod_shr_intn() (DDI)
                Calling functions at wrong context

Using SCODB on SVR5
        Running SCODB
        History mechanism
        Quitting SCODB
        SCODB commands
        Expressions, operators, and types
                Expressions
                Symbols
                Operators
                Assignment
                Debugger variables
                Breakpoint addresses
                Void type
                Output modification
                Registers
        Breakpoints
                Setting breakpoints
                Listing breakpoints
                Clearing breakpoints
                Breakpoint example
        Displaying symbol and expression types
        Displaying registers
        Dumping memory
        Changing memory
                Changing arbitrary memory
                Changing memory as structures
        Stack trace
        Disassembly
                Options for modifying disassembly output
                Movement keys
                Pattern searching
                Source code line numbers
        Single-stepping
                User input
                Conditional jump instructions
                When not to single-step
                Implementation
        Structure members
                Structure members
                Following linked lists
        Function entry tracing
        Command aliasing
        Debugger variables
        Advanced setup facilities
                Structure/union and variable definition files
                Adding line numbers

Using SCODB on SCO OpenServer 5
        Running SCODB
        SCODB commands
        Calling functions
        Expressions, operators, and types
                Expressions
                Symbols
                Operators
                Assignment
                Debugger variables
                Function arguments
                Breakpoint addresses
                Accessing other memory segments
                Partial name matching
                Void type
                Output modification
                Registers
        Breakpoints
                Setting breakpoints
                Listing breakpoints
                Clearing breakpoints
                Breakpoint example
        Displaying symbol and expression types
        Displaying registers
        Dumping memory
        Changing memory
                Changing arbitrary memory
                Changing memory as structures
        Stack trace
                Normal stack traces
                Stack traces with interrupt frames
                Trace of a different process
        Disassembly
                Options for modifying disassembly output
                Movement keys
                Pattern searching
                Source code line numbers
        Single-stepping
                User input
                Conditional jump instructions
                When not to single-step
                Implementation
        Structure members
                Structure members
                Following linked lists
        Function entry tracing
        Command aliasing
        Debugger variables
        Advanced setup facilities
                Setting the edit mode
                Modifying tunable parameters
                Setting up the display unit
                Structure/union and variable definition files
        Earlier releases of SCODB

SCO crash quick reference

SCO kdb and scodb quick reference

Index