<?Pub UDT _bookmark _target?><?Pub EntList amp nbsp gt lt ndash hyphen?><?Pub CX solbook(book(title()bookinfo()?><preface id="drivertutp"><?Pub Tag atict:info tracking="off" ref="0"?><?Pub Tag
atict:user user="ae149097" fullname="Alta Elstad"?><title>Preface</title><highlights><para>This <citetitle>Device Driver Tutorial</citetitle> is a hands-on guide that shows
you how to develop a simple device driver for the <trademark>Solaris</trademark> Operating
System (Solaris OS). <citetitle>Device Driver Tutorial</citetitle> also explains how
device drivers work in the Solaris OS. This book is a companion to <olink targetdoc="driver" remap="external"><citetitle remap="book">Writing Device Drivers</citetitle></olink>. <citetitle>Writing Device Drivers</citetitle> is a thorough reference document that discusses
many types of devices and drivers. <citetitle>Device Driver Tutorial</citetitle> examines
complete drivers but does not provide a comprehensive treatment of all driver
types. <citetitle>Device Driver Tutorial</citetitle> often points to <citetitle>Writing
Device Drivers</citetitle> and other books for further information.</para><note><para>This Solaris release supports systems that use the <trademark class="registered">SPARC</trademark> and x86 families of processor architectures: <trademark class="registered">UltraSPARC</trademark>, SPARC64, AMD64, Pentium, and Xeon
EM64T. The supported systems appear in the <citetitle>Solaris OS Hardware
Compatibility Lists</citetitle> at <ulink url="http://www.sun.com/bigadmin/hcl/" type="url"></ulink>. This document cites any implementation differences between
the platform types.</para>
</note>
</highlights><sect1 id="wdd-whatsnew"><title>What's New</title><para><emphasis role="strong">SX build 102:</emphasis> Added <literal>quiesce</literal>(9E)
in <literal>dev_ops</literal>(9S).</para><para><emphasis role="strong">SX build 89:</emphasis> Noted that configuration
files are no longer needed for x86 drivers.</para><para><emphasis role="strong">SXDE 9/07:</emphasis> Fixed CR 6573163: remove
references to <filename>/usr/ccs/bin</filename>. Updated compile options for
Sun Studio 12.</para><para><emphasis role="strong">SXDE 2/07:</emphasis> Fixed CR 6495598: incorrect
arguments used in <function>ddi_soft_state_free</function>. Added description
of deadman to testing section.</para>
</sect1><sect1><title>Who Should Use This Book</title><para>You should read this tutorial if you need to develop, install, and configure
device drivers for the Solaris OS. You also should read this book if you need
to maintain existing drivers or add new functionality to existing Solaris
OS drivers. Information about the kernel provided in this book also will help
you troubleshoot any problems you might encounter installing or configuring
Solaris systems.</para>
</sect1><sect1><title>User Background</title><itemizedlist><para>To write device drivers for the Solaris OS, you should have the following
background:</para><listitem><para>Be a confident C programmer</para>
</listitem><listitem><para>Have experience with data structures, especially with linked
lists</para>
</listitem><listitem><para>Understand bit operations</para>
</listitem><listitem><para>Understand indirect function calls</para>
</listitem><listitem><para>Understand caching</para>
</listitem><listitem><para>Understand multithreading (see the <olink targetdoc="mtp" remap="external"><citetitle remap="book">Multithreaded Programming Guide</citetitle></olink>)</para>
</listitem><listitem><para>Be familiar with a <trademark class="registered">UNIX</trademark> shell</para>
</listitem><listitem><para>Understand the basics of UNIX system and I/O architecture</para>
</listitem>
</itemizedlist><para>The most important information you need to have to write a device driver
are the characteristics of the device. Get a detailed specification for the
device you want to drive.</para><para>Experience with Solaris OS compilers, debuggers, and other tools will
be very helpful to you. You also need to understand where the file system
fits with the kernel and the application layer. These topics are discussed
in this tutorial.</para>
</sect1><sect1><title>How This Book Is Organized</title><para>This book is organized into the following chapters:</para><para><olink targetptr="drivertut1" remap="internal">Chapter&nbsp;1, Introduction to Device
Drivers</olink> provides an overview of the Solaris Operating System and kernel.
This chapter also discusses the driver development environment and tools.</para><para><olink targetptr="eoqrt" remap="internal">Chapter&nbsp;2, Template Driver Example</olink> shows
a simple template driver. This chapter shows in detail the steps to develop,
build, install, load, and test this simple driver.</para><para><olink targetptr="faatl" remap="internal">Chapter&nbsp;3, Reading and Writing Data in
Kernel Memory</olink> describes how to develop a driver that reads data from
and writes data to kernel memory.</para><para><olink targetptr="eoqrv" remap="internal">Chapter&nbsp;4, Tips for Developing Device
Drivers</olink> discusses some common errors in driver development and how
to avoid them or handle them. This chapter also introduces driver analysis
and debugging tools.</para>
</sect1><sect1><title>Related Books</title><para>For detailed reference information about the device driver interfaces,
see the section&nbsp;9 man pages. Section&nbsp;9E, <olink targetdoc="group-refman" targetptr="intro-9e" remap="external"><citerefentry><refentrytitle>Intro</refentrytitle><manvolnum>9E</manvolnum></citerefentry></olink>, describes DDI/DKI (Device
Driver Interface, Driver-Kernel Interface) driver entry points. Section&nbsp;9F, <olink targetdoc="group-refman" targetptr="intro-9f" remap="external"><citerefentry><refentrytitle>Intro</refentrytitle><manvolnum>9F</manvolnum></citerefentry></olink>, describes DDI/DKI kernel
functions. Sections&nbsp;9P and&nbsp;9S, <olink targetdoc="group-refman" targetptr="intro-9s" remap="external"><citerefentry><refentrytitle>Intro</refentrytitle><manvolnum>9S</manvolnum></citerefentry></olink>, describe DDI/DKI properties
and data structures.</para><itemizedlist><para>For information on other driver-related tools and issues, see these
books from Sun Microsystems:</para><listitem><para><olink targetdoc="driver" remap="external"><citetitle remap="book">Writing
Device Drivers</citetitle></olink>. Sun Microsystems, Inc., 2008.</para>
</listitem><listitem><para><olink targetdoc="mtp" remap="external"><citetitle remap="book">Multithreaded
Programming Guide</citetitle></olink>. Sun Microsystems, Inc., 2008.</para>
</listitem><listitem><para><olink targetdoc="streams" remap="external"><citetitle remap="book">STREAMS
Programming Guide</citetitle></olink>. Sun Microsystems, Inc., 2005.</para>
</listitem><listitem><para><olink targetdoc="sol64trans" remap="external"><citetitle remap="book">Solaris
64-bit Developer&rsquo;s Guide</citetitle></olink>. Sun Microsystems, Inc.,
2005.</para>
</listitem><listitem><para><olink targetdoc="cug" remap="external"><citetitle remap="book">Sun Studio
12: C User&rsquo;s Guide</citetitle></olink>. Sun Microsystems, Inc., 2007.</para><para>Click <citetitle>Sun Studio 12 Collection</citetitle> at the top left
of this page to see Sun Studio books about <command>dbx</command>, <command>dmake</command>, Performance Analyzer, and other software development topics.</para>
</listitem><listitem><para><olink targetdoc="moddebug" remap="external"><citetitle remap="book">Solaris
Modular Debugger Guide</citetitle></olink>. Sun Microsystems, Inc., 2008.</para>
</listitem><listitem><para><olink targetdoc="dynmctrcggd" remap="external"><citetitle remap="book">Solaris
Dynamic Tracing Guide</citetitle></olink>. Sun Microsystems, Inc., 2007.</para>
</listitem><listitem><para><olink targetdoc="dtrcug" remap="external"><citetitle remap="book">DTrace User
Guide</citetitle></olink>. Sun Microsystems, Inc., 2006.</para>
</listitem><listitem><para><olink targetdoc="sagdfs" remap="external"><citetitle remap="book">System Administration
Guide: Devices and File Systems</citetitle></olink>. Sun Microsystems, Inc.,
2008.</para>
</listitem><listitem><para><olink targetdoc="packinstall" remap="external"><citetitle remap="book">Application
Packaging Developer&rsquo;s Guide</citetitle></olink>. Sun Microsystems, Inc.,
2005.</para>
</listitem>
</itemizedlist>
</sect1>&sundocs;&typeconv;
</preface><?Pub *0000008427 0?>