Sun Java Solaris Communities My SDN Account Join SDN
 
Documentation

Preface

In driver development, it is very common for a driver to perform tasks that require system resources or service requests from the system. Examples of these tasks are:

  • Registering the device driver's interrupt handler
  • Establishing kernel mapping to the device's address space
  • Setting up DMA transfer

Solaris software provides a complete set of Device Driver Interface (DDI) functions to perform these tasks. Device drivers using the Solaris 2.x DDI can be ported to different bus architectures with minimal efforts. Solaris 2.x achieves this portability through a hierarchical approach of representing the system hardware in a tree structure.

Standard device drivers are associated with leaf node. Bus drivers are associated with bus nexus node and are called bus nexus drivers. In addition to the DDI functions, Solaris 2.x uses properties for device drivers to retrieve device characteristics. For devices without FCode, bus nexus node creates properties for the device.

The support for the Peripheral Component Interconnect (PCI) local bus in Sun platforms creates new opportunities and challenges for developers of devices and peripherals.

Who Should Use This White Paper

This white paper tells you, the developer, how to write PCI device drivers for Sun SPARC platforms. As a complement to existing Sun documents, this white paper focuses on the properties of PCI devices, the characteristics of the PCI nexus node, and the functionality of the PCI nexus driver.

Before You Read This White Paper

To understand the information presented in this white paper, you must be familiar with the material in these documents:

This white paper is organized into these chapters:

Chapter 1, "Introduction," outlines the topics presented in this white paper and summarizes the commonly used device driver interface functions for PCI device drivers.

Chapter 2, "Device Properties," discusses the properties used to describe the characteristics of a hardware device or its associated devices.

Chapter 3, "Sun SPARC Implementation for the PCI Bus," describes the Sun Host to PCI Bridge (HPB), a PCI-based I/O subsystem that connects a system bus (Ultra Port Architecture (UPA)) with PCI buses.

Chapter 4, "Interrupts," describes how interrupts are handled by the device drivers in a system.

Chapter 5, "Device Address Mapping," describes how mappings between kernel virtual addresses and device address space are established.

Chapter 6, "Direct Memory Access," discusses Direct Memory Access (DMA) objects, Direct Virtual Memory Access (DVMA) resources, and IOMMU translations, as well as consistent vs. streaming DMA.

Related Books

Refer to the following books to learn more about writing PCI device drivers:

  • PCI Local Bus Specification, Rev. 2.1, June 1, 1995
  • SPARC-V9 Architecture Manual
  • UltraSPARC-I User's Manual, Revision 1.0, September 18, 1995
  • IEEE 1275 Standard for Boot Firmware: Core Requirements and Practices
  • PCI Bus Binding to IEEE Std 1275: 1994 Standard for Boot Firmware, Rev. 1.7
  • Writing FCode Programs for PCI, Firmworks, Rev. H, October 1995
  • Open Firmware Recommended Practice: Generic Names, Ver. 1.1, 4/11/1996 Ordering Sun Documents

The SunDocsSM program provides more than 250 manuals from Sun Microsystems, Inc. If you live in the United States, Canada, Europe, or Japan, you can purchase documentation sets or individual manuals using this program.

For a list of documents and how to order them, see the catalog section of the SunExpress Internet site at http://www.sun.com/sunexpress.

What Typographic Changes Mean

The following table describes the typographic changes used in this white paper.

Table P-1 Typographic Conventions
Typeface or Symbol Meaning Example
AaBbCc123 The names of commands, files, and directories; on-screen computer output Edit your .login file.

Use ls -a to list all files.

machine_name% You have mail.

AaBbCc123 What you type, contrasted with on-screen computer output machine_name% su

Password:
AaBbCc123 Command-line placeholder:

replace with a real name or value
To delete a file, type rm filename.
AaBbCc123 Book titles, new words or terms, or words to be emphasized Read Chapter 6 in User's Guide. These are called class options.

You must be root to do this.
 

Shell Prompts in Command Examples

The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.

Table P-2 Shell Prompts
Shell Prompt
C shell prompt machine_name%
C shell superuser prompt machine_name#
Bourne shell and Korn shell prompt $
Bourne shell and Korn shell superuser prompt #
 

<<Contents |  Next>>