📄 syslib.html
字号:
<hr><a name="sysAuxClkConnect"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>sysAuxClkConnect</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sysAuxClkConnect</i>( )</strong> - connect a routine to the auxiliary clock interrupt</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS sysAuxClkConnect ( FUNCPTR routine, /* routine called at each aux clock interrupt */ int arg /* argument to auxiliary clock interrupt routine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine specifies the interrupt service routine to be called at eachauxiliary clock interrupt. It does not enable auxiliary clock interrupts.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the routine cannot be connected to the interrupt.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, <b><i><a href="../../ref/intArchLib.html#intConnect" >intConnect</a></i>( )</b>, <b><i><a href="./sysLib.html#sysAuxClkEnable">sysAuxClkEnable</a></i>( )</b><hr><a name="sysAuxClkDisable"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>sysAuxClkDisable</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sysAuxClkDisable</i>( )</strong> - turn off auxiliary clock interrupts</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void sysAuxClkDisable (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine disables auxiliary clock interrupts.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, <b><i><a href="./sysLib.html#sysAuxClkEnable">sysAuxClkEnable</a></i>( )</b><hr><a name="sysAuxClkEnable"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>sysAuxClkEnable</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sysAuxClkEnable</i>( )</strong> - turn on auxiliary clock interrupts</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void sysAuxClkEnable (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine enables auxiliary clock interrupts.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, <b><i><a href="./sysLib.html#sysAuxClkConnect">sysAuxClkConnect</a></i>( )</b>, <b><i><a href="./sysLib.html#sysAuxClkDisable">sysAuxClkDisable</a></i>( )</b>, <b><i><a href="./sysLib.html#sysAuxClkRateSet">sysAuxClkRateSet</a></i>( )</b><hr><a name="sysAuxClkRateGet"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>sysAuxClkRateGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sysAuxClkRateGet</i>( )</strong> - get the auxiliary clock rate</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sysAuxClkRateGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the interrupt rate of the auxiliary clock.<p></blockquote><h4>RETURNS</h4><blockquote><p>The number of ticks per second of the auxiliary clock.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, <b><i><a href="./sysLib.html#sysAuxClkEnable">sysAuxClkEnable</a></i>( )</b>, <b><i><a href="./sysLib.html#sysAuxClkRateSet">sysAuxClkRateSet</a></i>( )</b><hr><a name="sysAuxClkRateSet"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>sysAuxClkRateSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sysAuxClkRateSet</i>( )</strong> - set the auxiliary clock rate</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS sysAuxClkRateSet ( int ticksPerSecond /* number of clock interrupts per second */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the interrupt rate of the auxiliary clock. It does notenable auxiliary clock interrupts.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the tick rate is invalid or the timer cannot be set.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, <b><i><a href="./sysLib.html#sysAuxClkEnable">sysAuxClkEnable</a></i>( )</b>, <b><i><a href="./sysLib.html#sysAuxClkRateGet">sysAuxClkRateGet</a></i>( )</b><hr><a name="pciConfigLibInit"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>pciConfigLibInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>pciConfigLibInit</i>( )</strong> - initialize the configuration access-method and addresses</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciConfigLibInit ( int mechanism, /* configuration mechanism: 0, 1, 2 */ ULONG addr0, /* config-addr-reg / CSE-reg */ ULONG addr1, /* config-data-reg / Forward-reg */ ULONG addr2 /* none / Base-address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the configuration access-method and addresses.<p>Configuration mechanism one utilizes two 32-bit IO ports located at addresses0x0cf8 and 0x0cfc. These two ports are:<p><dl><dt>P"<dd>32-bit configuration address port, at 0x0cf8<p><dt>P"<dd> 32-bit configuration data port, at 0x0cfc </dl><p>Accessing a PCI function's configuration port is two step process.<p><dl><dt>P"<dd>Write the bus number, physical device number, function number and register number to the configuration address port.<p><dt>P"<dd> Perform an IO read from or an write to the configuration data port. </dl><p>Configuration mechanism two uses following two single-byte IO ports.<dl><dt>P"<dd>Configuration space enable, or CSE, register, at 0x0cf8<p><dt>P"<dd> Forward register, at 0x0cfa </dl><p>To generate a PCI configuration transaction, the following actions areperformed.<p><dl><dt>- <dd>Write the target bus number into the forward register.<p><dt>- <dd>Write a one byte value to the CSE register at 0x0cf8. The bitpattern written to this register has three effects: disables thegeneration of special cycles; enables the generation of configurationtransactions; specifies the target PCI functional device.<p><dt>- <dd> Perform a one, two or four byte IO read or write transaction withinthe IO range 0xc000 through 0xcfff. </dl><p>Configuration mechanism zero is for non-PC/PowerPC environmentswhere an area of address space produces PCI configurationtransactions. No support for special cycles is included.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if a mechanism is not 0, 1, or 2.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciFindDevice"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>pciFindDevice</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>pciFindDevice</i>( )</strong> - find the nth device with the given device & vendor ID</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciFindDevice ( int vendorId, /* vendor ID */ int deviceId, /* device ID */ int index, /* desired instance of device */ int * pBusNo, /* bus number */ int * pDeviceNo, /* device number */ int * pFuncNo /* function number */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the nth device with the given device & vendor ID.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the deviceId and vendorId didn't match.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciFindClass"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>pciFindClass</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>pciFindClass</i>( )</strong> - find the nth occurence of a device by PCI class code.</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciFindClass ( int classCode, /* 24-bit class code */ int index, /* desired instance of device */ int * pBusNo, /* bus number */ int * pDeviceNo, /* device number */ int * pFuncNo /* function number */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine finds the nth device with the given 24-bit PCI class code(class subclass prog_if).<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the class didn't match.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b><hr><a name="pciDevConfig"></a><p align=right><a href="rtnIndex.html"><i>pcPentium : Routines</i></a></p></blockquote><h1><i>pciDevConfig</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>pciDevConfig</i>( )</strong> - configure a device on a PCI bus</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS pciDevConfig ( int pciBusNo, /* PCI bus number */ int pciDevNo, /* PCI device number */ int pciFuncNo, /* PCI function number */ UINT32 devIoBaseAdrs, /* device IO base address */ UINT32 devMemBaseAdrs, /* device memory base address */ UINT32 command /* command to issue */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine configures a device that is on a Peripheral ComponentInterconnect (PCI) bus by writing to the configuration header of theselected device.<p>It first disables the device by clearing the command register in theconfiguration header. It then sets the I/O and/or memory space baseaddress registers, the latency timer value and the cache line size.Finally, it re-enables the device by loading the command register withthe specified command.<p></blockquote><h4>NOTE</h4><blockquote><p>This routine is designed for Type 0 PCI Configuration Headers ONLY.It is NOT usable for configuring, for example, a PCI-to-PCI bridge.<p></blockquote><h4>RETURNS</h4><blockquote><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -