JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Device Driver Tutorial
search filter icon
search icon

Document Information

Preface

1.  Introduction to Device Drivers

Solaris Operating System Definition

Kernel Overview

Differences Between Kernel Modules and User Programs

Execution Differences Between Kernel Modules and User Programs

Structural Differences Between Kernel Modules and User Programs

Data Transfer Differences Between Kernel Modules and User Programs

User and Kernel Address Spaces on x86 and SPARC Machines

Device Drivers

Driver Directory Organization

Devices as Files

Devices Directories

Device Tree

Character and Block Devices

Device Names

Device Numbers

Development Environment and Tools

Writing a Driver

Writing a Driver Module

Writing a Configuration File

Building a Driver

Compiling with Sun Studio

Compiling with the GNU C Compiler

Installing a Driver

Adding, Updating, and Removing a Driver

Loading and Unloading a Driver

Testing a Driver

2.  Template Driver Example

3.  Reading and Writing Data in Kernel Memory

4.  Tips for Developing Device Drivers

Index

Solaris Operating System Definition

The Solaris Operating System (Solaris OS) is implemented as an executable file that runs at boot time. The Solaris OS is referred to as the kernel. The kernel contains all of the routines that are necessary for the system to run. Because the kernel is essential for the running of the machine, the kernel runs in a special, protected mode that is called kernel mode. In contrast, user-level applications operate in a restricted mode called user mode that has no access to kernel instructions or to the kernel address space. Device drivers run in kernel mode and are prevented from directly accessing processes in user mode.