⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hw inde dd.htm

📁 What is this ``device driver stuff anyway? Here s a very short introduction to the concept.
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html><head><title>Hardware-Independent Model and Device Drivers</title>

<meta name="ROBOTS" content="NOFOLLOW">
<meta name="DESCRIPTION" content="Writing Device Drivers Tutorial: DIGITAL UNIX Version 4.0B documentation set">
<meta name="AUTHOR" content="Copyright (c) Digital Equipment Corporation 1996. All Rights Reserved."></head>
<body>
<a name="HWIndepModelandDrvs"></a>
<p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="HW%20inde%20DD_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="HW%20inde%20DD_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut20.html"><img src="HW%20inde%20DD_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<img src="HW%20inde%20DD_files/BLANK.GIF" border="0">
<a href="#HardIndKernInter"><img src="HW%20inde%20DD_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut22.html"><img src="HW%20inde%20DD_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="HW%20inde%20DD_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="HW%20inde%20DD_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h1>15&nbsp;&nbsp;&nbsp;&nbsp;Hardware-Independent Model and Device Drivers</h1>
<p>
One of the goals of an open systems environment is to provide hardware
and software platforms that promote the use of standards.
By adhering to a set of standard interfaces, these platforms make it
easier for third-party application programmers to write applications
that can run on a variety of operating systems and hardware.
This open systems environment can also make it easier for systems 
engineers to write device drivers for numerous peripheral devices
that operate on this same variety of operating systems and hardware.
<a name="nx_id_651"></a>
</p><p>
The hardware-independent model describes the hardware and software
components that make up an open systems environment.
<a name="nx_id_652"></a>
This chapter provides an overview of the hardware-independent model and
shows how it relates to device drivers.
Although you do not need to know all of the
details of this model, a high-level discussion can help to clarify how
device drivers fit into the independent model.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut21.html#HardIndModel">Figure 15-1</a>
shows that the hardware-independent model consists of a:
</p><ul>
<p></p><li>
Hardware-independent subsystem
<p></p></li><li>
Hardware-dependent subsystem
<p></p></li><li>
Bus support subsystem
<p></p></li><li>
Device driver subsystem
</li></ul><p>
The sections following
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut21.html#HardIndModel">Figure 15-1</a>
briefly describe these subsystems
as they relate to device
drivers. 
</p><p>
<a name="HardIndModel"></a>
</p><h3>Figure 15-1: Hardware-Independent Model</h3>
<p><img src="HW%20inde%20DD_files/zk-0544U.gif"></p><p>
<a name="nx_id_653"></a>
<a name="HardIndKernInter"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="HW%20inde%20DD_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="HW%20inde%20DD_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#HWIndepModelandDrvs"><img src="HW%20inde%20DD_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<img src="HW%20inde%20DD_files/BLANK.GIF" border="0">
<a href="#HardDepInter"><img src="HW%20inde%20DD_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut22.html"><img src="HW%20inde%20DD_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="HW%20inde%20DD_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="HW%20inde%20DD_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h2>
15.1&nbsp;&nbsp;&nbsp;&nbsp;Hardware-Independent Subsystem
</h2>
<p>
The hardware-independent subsystem contains all of the
hardware-independent pieces of an operating system, including the
hardware-independent kernel interfaces, user programs, shells, and
utilities.
<a name="nx_id_654"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut21.html#HardIndModel">Figure 15-1</a>
shows, however, this subsystem also contains extensions and
enhancements made by Digital Equipment Corporation.
Examples of these extensions are DECnet and support for CD-ROM
file systems.
</p><p>
<a name="nx_id_655"></a>
Writing device drivers becomes easier in such an open systems environment
because the system design standardizes interfaces and data
structures whenever possible.
For example, the hardware-independent subsystem contains those
kernel interfaces
(such as
<tt>MALLOC</tt>
and
<tt>timeout</tt>)
and data structures
(such as
<tt>buf</tt>
and
<tt>uio</tt>)
that are not affected by the
hardware.
On the other hand, those interfaces
(such as
<tt>fubyte</tt>
and
<tt>suword</tt>)
and data structures (such as the timer and memory management structures)
affected by the
hardware are contained in the hardware-dependent subsystem.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut21.html#HardIndModel">Figure 15-1</a>
shows that the hardware-independent subsystem communicates with: 
</p><ul>
<p></p><li>
The hardware-dependent subsystem
<p>
The hardware-independent subsystem communicates with the
hardware-dependent subsystem by calling interfaces and referencing
data structures and global variables provided by the hardware-dependent
subsystem.
<a name="nx_id_656"></a>
</p><p></p></li><li>
The device driver subsystem
<p>
The hardware-independent subsystem communicates with the
device driver subsystem by using a specific data structure to make 
calls into the device driver subsystem.
This data structure is the device switch table
<tt>dsent</tt>.
</p></li></ul><p>
<a name="nx_id_657"></a>
<a name="HardDepInter"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="HW%20inde%20DD_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="HW%20inde%20DD_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#HWIndepModelandDrvs"><img src="HW%20inde%20DD_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#HardIndKernInter"><img src="HW%20inde%20DD_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#BusSupprtSub"><img src="HW%20inde%20DD_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut22.html"><img src="HW%20inde%20DD_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="HW%20inde%20DD_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="HW%20inde%20DD_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h2>
15.2&nbsp;&nbsp;&nbsp;&nbsp;Hardware-Dependent Subsystem
</h2>
<p>
The hardware-dependent subsystem contains all of the
hardware-dependent pieces of an operating system with the exception of
device drivers.
This subsystem provides the code that supports a specific CPU platform
and, therefore, is implemented by specific vendors.
<a name="nx_id_658"></a>
In the case of Digital Equipment Corporation, this code supports
the Alpha architecture.
However, code could be written to support other CPU architectures.
Writing device drivers becomes easier in such an open systems environment
because the CPU-specific changes are hidden in the
hardware-dependent layer, so minimal or no changes would need to be
made to device drivers.
<a name="nx_id_659"></a>
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut21.html#HardIndModel">Figure 15-1</a>
shows that the hardware-dependent subsystem communicates with: 
</p><ul>
<p></p><li>
The hardware-independent subsystem
<p>
The hardware-independent subsystem initiates communication
with the hardware-dependent subsystem
by calling interfaces 
and referencing data structures and global variables provided by 
the hardware-dependent subsystem.
<a name="nx_id_660"></a>
</p><p></p></li><li>
The device driver subsystem
<p>
The device driver subsystem initiates communication
with the hardware-dependent subsystem
by calling some of the same interfaces and
referencing some of the same data structures as the hardware-independent
subsystem.
<a name="nx_id_661"></a>
</p><p></p></li><li>
The bus support subsystem
<p>
The hardware-dependent subsystem initiates communication with the bus
support subsystem by calling the bus configuration interfaces.
The bus support subsystem also initiates communication with the device
driver by calling the driver's autoconfiguration entry points.
These entry points are the driver's
<tt>probe</tt>,
<tt>attach</tt>,
and
<tt>slave</tt>
interfaces.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -