📄 c-iosys7.html
字号:
</dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="97119">Configuring SCSI Drivers</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="97674"> </a>Constants associated with SCSI drivers are listed in <a href="c-iosys7.html#97684">Table 3-13</a>. Define these in the indicated portion of the VxWorks view or in the configuration files. To enable SCSI functionality, select <b class="symbol_UC">INCLUDE_SCSI</b> for inclusion in the project facility VxWorks view. This enables SCSI-1. To enable SCSI-2, you must select, in addition to SCSI-1, <b class="symbol_UC">INCLUDE_SCSI2</b>. <p class="table"><h4 class="EntityTitle"><a name="97684"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 3-13: SCSI Constants</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="97690"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Constant</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="97692"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="97694"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Where to Configure</font></b></div></th></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97697"> </a><b class="symbol_UC">INCLUDE_SCSI</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97699"> </a>Include SCSI interface. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97701"> </a><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">hardware/buses</font></b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97704"> </a><b class="symbol_UC">INCLUDE_SCSI2</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97706"> </a>SCSI-2 extensions. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97708"> </a><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">hardware/buses</font></b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97711"> </a><b class="symbol_UC">INCLUDE_SCSI_DMA</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97713"> </a>Enable DMA for SCSI. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97715"> </a><b class="file">sysLib.c</b> or <b class="file">sysScsi.c </b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97718"> </a><b class="symbol_UC">INCLUDE_SCSI_BOOT</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97720"> </a>Allow booting from a SCSI device. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97722"> </a><b class="file">sysLib.c</b> or <b class="file">sysScsi.c</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97725"> </a><b class="symbol_UC">SCSI_AUTO_CONFIG</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97727"> </a>Auto-configure and locate all targets on a SCSI bus. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97729"> </a><b class="file">sysLib.c</b> or <b class="file">sysScsi.c</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97732"> </a><b class="symbol_UC">INCLUDE_DOSFS</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97734"> </a>Include the DOS file system. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97736"> </a><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">operating system components/IO system components</font></b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97739"> </a><b class="symbol_UC">INCLUDE_TAPEFS</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97741"> </a>Include the tape file system. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97743"> </a><b class="file">config.h</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="97746"> </a><b class="symbol_UC">INCLUDE_CDROMFS</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97748"> </a>Include CD-ROM file system support. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="97750"> </a><b class="file">config.h</b> </div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p><dd><p class="Body"><a name="97174"> </a>Autoconfiguration, DMA, and booting from a SCSI device are defined appropriately for each BSP. If you need to change these settings, see the online reference for <b class="routine"><i class="routine">sysScsiConfig</i></b><b>( )</b> under <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">VxWorks Reference>Manual: Libraries</font></b> and the source file <i class="textVariable">installDir</i><b class="file">/target/src/config/usrScsi.c</b>. Except for dosFs, which can be configured from the project facility, the file systems that can be used with SCSI must be defined in <b class="file">config.h</b>. (For more information see <a href="c-config.html#84365"><i class="title">8. Configuration and Build</i></a>.)</p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/caution.gif"></td><td><hr><div class="CalloutCell"><a name="95809"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">CAUTION: </font></b></a>Including SCSI-2 in your VxWorks image can significantly increase the image size. If you receive a warning from <b class="command">vxsize</b> when building VxWorks, or if the size of your image becomes greater than that supported by the current setting of <b class="symbol_UC">RAM_HIGH_ADRS</b>, be sure to see <a href="c-config6.html#86040"><i class="title">8.6.1 Scaling Down VxWorks</i></a> and <a href="c-config9.html#86670"><i class="title">8.9 Creating Bootable Applications</i></a> for information on how to resolve the problem.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="88036">Configuring the SCSI Bus ID</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="88037"> </a>Each board in a SCSI-2 environment must define a unique SCSI bus ID for the SCSI initiator. SCSI-1 drivers, which support only a single initiator at a time, assume an initiator SCSI bus ID of 7. However, SCSI-2 supports multiple initiators, up to eight initiators and targets at one time. Therefore, to ensure a unique ID, choose a value in the range 0-7 to be passed as a parameter to the driver's initialization routine (for example, <b class="routine"><i class="routine">ncr710CtrlInitScsi2</i></b><b>( )</b>) by the <b class="routine"><i class="routine">sysScsiInit</i></b><b>( )</b> routine in <b class="file">sysScsi.c</b>. For more information, see the reference entry for the relevant driver initialization routine. If there are multiple boards on one SCSI bus, and all of these boards use the same BSP, then different versions of the BSP must be compiled for each board by assigning unique SCSI bus IDs. </p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="88038">ROM Size Adjustment for SCSI Boot</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="88039"> </a>If <b class="symbol_UC">INCLUDE_SCSI_BOOT</b> is defined, larger ROMs may be required for some boards. If this is the case, the definition of <b class="symbol_UC">ROM_SIZE</b> in <b class="file">Makefile </b>and in <b class="file">config.h</b> should be changed to a size that suits the capabilities of the target hardware.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="87997">Structure of the SCSI Subsystem</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="88092"> </a>The SCSI subsystem supports libraries and drivers for both SCSI-1 and SCSI-2. It consists of the following six libraries which are independent of any SCSI controller:</p></dl><dl class="margin"><dd><div class="Item"><a name="88093"> </a><b class="library">scsiLib</b> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88094"> </a>routines that provide the mechanism for switching SCSI requests to either the SCSI-1 library (<b class="library">scsi1Lib</b>) or the SCSI-2 library (<b class="library">scsi2Lib</b>), as configured by the board support package (BSP). </div><br></dl></dl><dd><div class="Item"><a name="88095"> </a><b class="library">scsi1Lib</b> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88096"> </a>SCSI-1 library routines and interface, used when only <b class="symbol_UC">INCLUDE_SCSI</b> is selected for inclusion in the project facility VxWorks view (see <a href="c-iosys7.html#97119"><i class="title">Configuring SCSI Drivers</i></a>.)</div><br></dl></dl><dd><div class="Item"><a name="88100"> </a><b class="library">scsi2Lib</b> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88101"> </a>SCSI-2 library routines and all physical device creation and deletion routines.</div><br></dl></dl><dd><div class="Item"><a name="88102"> </a><b class="library">scsiCommonLib</b> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88103"> </a>commands common to all types of SCSI devices.</div><br></dl></dl><dd><div class="Item"><a name="88104"> </a><b class="library">scsiDirectLib</b> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88105"> </a>routines and commands for direct access devices (disks).</div><br></dl></dl><dd><div class="Item"><a name="88106"> </a><b class="library">scsiSeqLib</b> </div><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="88107"> </a>routines and commands for sequential access block devices (tapes).</div><br></dl></dl></dl><dl class="margin"><dd><p class="Body"><a name="88136"> </a>Controller-independent support for the SCSI-2 functionality is divided into<b class="library"> scsi2Lib</b>, <b class="library">scsiCommonLib</b>, <b class="library">scsiDirectLib</b>, and<b> </b><b class="library">scsiSeqLib</b>. The interface to any of these SCSI-2 libraries can be accessed directly. However, <b class="library">scsiSeqLib</b> is designed to be used in conjunction with tapeFs, while <b class="library">scsiDirectLib</b> works with dosFs, rt11Fs, and rawFs. Applications written for SCSI-1 can be used with SCSI-2; however, SCSI-1 device drivers cannot.</p><dd><p class="Body"><a name="88111"> </a>VxWorks targets using SCSI interface controllers require a controller-specific device driver. These device drivers work in conjunction with the controller-independent SCSI libraries, and they provide controller configuration and initialization routines contained in controller-specific libraries. For example, the Western Digital WD33C93 SCSI controller is supported by the device driver libraries <b class="library">wd33c93Lib</b>, <b class="library">wd33c93Lib1</b>, and <b class="library">wd33c93Lib2</b>. Routines tied to SCSI-1 (such as <b class="routine"><i class="routine">wd33c93CtrlCreate</i></b><b>( )</b>) and SCSI-2 (such as <b class="routine"><i class="routine">wd33c93CtrlCreateScsi2</i></b><b>( )</b>) are segregated into separate libraries to simplify configuration. There are also additional support routines for individual targets in <b class="library">sysLib.c</b>. <
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -