📄 drivertut7.html
字号:
</p><ul>
<p></p><li>
The
<tt>eisa_option</tt>
structure (declared and initialized in the
<tt>/usr/sys/data/eisa_option_data.c</tt>
file) contains EISA/ISA bus options.
<p></p></li><li>
The
<tt>pci_option</tt>
structure (declared and initialized in the
<tt>/usr/sys/data/pci_option_data.c</tt>
file) contains PCI bus options.
<p></p></li><li>
The
<tt>tc_option</tt>
structure (declared and initialized in the
<tt>/usr/sys/data/tc_option_data.c</tt>
file) contains TURBOchannel bus options.
</li></ul><p>
</p><p>
In a previous version of Digital UNIX,
to write portable device drivers (that were statically configured)
across multiple bus architectures you needed to add
device entries to the bus-specific option structure arrays.
When using the traditional model, you used a text editor to directly
edit these arrays.
When using the third-party model, you did not directly edit the arrays.
Instead, you provided the bus-specific option array information in the
following files for use with the
<tt>mkdata</tt>
utility:
<tt>eisa_data</tt>
(for the EISA/ISA bus option structure array),
<tt>pci_data</tt>
(for the PCI bus option structure array),
and
<tt>tc_data</tt>
(for the TURBOchannel bus option structure array).
To write portable drivers (that were dynamically configured) across
multiple bus architectures in
a previous version of Digital UNIX, you needed to declare and initialize
bus-specific option structure snippets.
</p><p>
For this version of Digital UNIX, you no longer add entries to the
bus-specific option structure arrays (for statically configured drivers)
or declare and
initialize a bus-specific option structure snippet (for dynamically
configured drivers) or add entries to the
<tt>eisa_data</tt>,
<tt>pci_data</tt>,
and
<tt>tc_data</tt>
files (for the traditional model).
You now use the
<tt>EISA_Option</tt>
(for EISA buses),
<tt>ISA_Option</tt>
(for ISA buses),
<tt>PCI_Option</tt>
(for PCI buses),
<tt>TC_Option</tt>
(for TURBOchannel buses),
and
<tt>VBA_Option</tt>
(for the VMEbus)
attribute fields to populate a driver's
<tt>sysconfigtab</tt>
file fragment.
See the bus-specific book for descriptions of the
<tt>EISA_Option</tt>,
<tt>ISA_Option</tt>,
<tt>PCI_Option</tt>,
<tt>TC_Option</tt>,
and
<tt>VBA_Option</tt>
attribute fields.
<a name="PortIssueDevDrvObjFiles"></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="drivertut7_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="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueUseofOptionStruct"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueChangesstanzastatic"><img src="drivertut7_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/drivertut8.html"><img src="drivertut7_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="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.4 Device Driver Object Files
</h3>
<p>
<a name="nx_id_166"></a>
In previous versions of the operating system,
third-party driver writers supplied to their customers:
</p><ul>
<p></p><li>
Driver object files for statically configured drivers, which have
<tt>.o</tt>
extensions
<p></p></li><li>
Driver load modules for dynamically configured drivers, which have
<tt>.mod</tt>
extensions
</li></ul><p>
</p><p>
In this version of Digital UNIX it is not necessary to ship files with
<tt>.o</tt>
extensions.
The reason is that Digital UNIX supports a single binary module (for
drivers that are statically or dynamically configured into the kernel).
Thus, third-party driver writers supply to their customers a single binary
module, which has a
<tt>.mod</tt>
extension.
Note that the
<tt>.mod</tt>
file in this version of Digital UNIX is not the same as the
<tt>.mod</tt>
file in previous versions of the operating system.
Part 4
contains chapters that describe how to statically and dynamically
configure third-party device drivers into the kernel.
<a name="PortIssueChangesstanzastatic"></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="drivertut7_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="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueDevDrvObjFiles"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueChangesstanzaload"><img src="drivertut7_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/drivertut8.html"><img src="drivertut7_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="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.5 Elimination of the stanza.static File Fragment
</h3>
<p>
<a name="nx_id_167"></a>
In previous versions of the operating system, you could specify the following in the
<tt>stanza.static</tt>
file fragment:
</p><ul>
<p></p><li>
The I/O services interfaces (and other information) for block and
character drivers to be added to the
<tt>bdevsw</tt>
and
<tt>cdevsw</tt>
tables, respectively
<p></p></li><li>
Device special file information
</li></ul><p>
For this version of Digital UNIX, the
<tt>stanza.static</tt>
file fragment is replaced by the
<tt>sysconfigtab</tt>
file fragment.
You must not specify the I/O services interfaces (and other information)
for block and character drivers in the
<tt>sysconfigtab</tt>
file fragment.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut10.html#ReserveMajorNumber">Section 6.6.5.2</a>
discusses how to register character and block driver interfaces by calling
the
<tt>devsw_add</tt>
interface.
</p><p>
You specify device special file information, bus option, and other
information in the
<tt>sysconfigtab</tt>
file fragment.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#StaticConfigCresysconfigtab">Section 14.1.5</a>
describes in detail how to create a driver's
<tt>sysconfigtab</tt>
file fragment and what items to place in it.
<a name="PortIssueChangesstanzaload"></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="drivertut7_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="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueChangesstanzastatic"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueChangesfilesfile"><img src="drivertut7_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/drivertut8.html"><img src="drivertut7_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="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.6 Elimination of the stanza.loadable File Fragment
</h3>
<p>
<a name="nx_id_168"></a>
In previous versions of the operating system, you could specify the following in the
<tt>stanza.loadable</tt>
file fragment:
</p><ul>
<p></p><li>
Device connectivity information, such as the following example:
<p>
<tt>Module_Config1 = controller none0 at tc?</tt>
</p><p></p></li><li>
Device special file information
</li></ul><p>
For this version of Digital UNIX, the
<tt>stanza.loadable</tt>
file fragment is replaced by the
<tt>sysconfigtab</tt>
file fragment.
You must not specify device connectivity information in the
<tt>sysconfigtab</tt>
file fragment.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut10.html#WriteCallbackRtn">Section 6.6.6</a>
shows how to specify device connectivity information by calling the
<tt>create_controller_struct</tt>
and
<tt>create_device_struct</tt>
interfaces.
</p><p>
You specify device special file, bus option, and other information in the
<tt>sysconfigtab</tt>
file fragment.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#StaticConfigCresysconfigtab">Section 14.1.5</a>
describes in detail how to create a driver's
<tt>sysconfigtab</tt>
file fragment and what items to place in it.
<a name="PortIssueChangesfilesfile"></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="drivertut7_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="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueChangesstanzaload"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueChangesconfigfile"><img src="drivertut7_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/drivertut8.html"><img src="drivertut7_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="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.7 Changes to the files File Fragment
</h3>
<p>
<a name="nx_id_169"></a>
The syntax you use to specify information in the
<tt>files</tt>
file fragment has changed.
The reason for the changes is to accommodate the single binary module.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#CrefilesFileFragforSingBinMod">Section 14.1.3</a>
discusses the syntax associated with a
<tt>files</tt>
file fragment.
Note that the
<tt>if_dynamic</tt>
and
<tt>optional</tt>
keywords will be retired in a future release of the Digital UNIX
operating system.
<a name="PortIssueChangesconfigfile"></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="drivertut7_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="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueChangesfilesfile"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueMethodConfUnconfCtlrs"><img src="drivertut7_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/drivertut8.html"><img src="drivertut7_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="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.8 Elimination of the config.file File Fragment
</h3>
<p>
<a name="nx_id_170"></a>
In previous versions of the operating system, you could specify the following in the
<tt>config.file</tt>
file fragment:
</p><ul>
<p></p><li>
Device connectivity information
<p></p></li><li>
Callout keywords
</li></ul><p>
For this version of Digital UNIX, the
<tt>config.file</tt>
file fragment is no longer used.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -