本文档包括以下内容:
关于PCI和ISA设备
RTX提供了一套机制,可使现有的Windows PCI/ISA设备转换成RTSS程序可控的设备。转换需要两步:
1. 添加RTX INF支持。
2. 更新Windows设备驱动。
关于INF文件
INF文件是一个文本文件,它包含安装一个设备的全部必需的信息,例如驱动名称和位置,注册表信息和版本信息等。文件 RtxPnp.inf 储存着所有用于RTX PnP 驱动(RtxPnp.sys)的信息。添加RTX INF支持(在RTX Properties控制面板中的Hardware标签页中进行)这个操作会把Windows设备的信息添加到RTX PnP 驱动INF文件RtxPnp.inf 中。添加后,Windows设备驱动向导会列出支持此设备的RTX PnP驱动。
配置中断
RTX支持三种类型的设备:
- ISA
- PCI without MSI/MSI-X capability
- PCI with MSI/MSI-X capability
- 当一个设备使用line-based中断时,在同RTSS环境通信时,它必须申请一个IRQ(中断请求资源)。RTX PnP驱动负责从Windows PnP管理器为RTX设备要求IRQ资源,作为一个管理员用户,你可以:
1. 为每个PCI和ISA设备划分你想要的IRQ资源。
2. 查看一个设备的状态,看它要求的IRQ是否已经分配。
3. 列出全部已使用的IRQ,以帮你为你的RTX设备找到未使用的IRQ。
MSI/MSI-X 兼容设备可能需要也可能不需要一个IRQ,这取决于控制它们的RTSS程序。如果一个RTSS程序配置在一个使用message-based中断的MSI兼容设备,那么IRQ是不需要的。如果一个RTSS程序配置在一个使用line-based中断的MSI兼容设备,那么此设备必须要有IRQ。
message-based中断通常存在于MSI兼容设备上,并且不需要配置。如果你对一个MSI兼容设备也配置了line-based中断,那么就使得一些RTSS程序通过line-based中断对其进行访问,而另外一些RTSS程序则使用message-based中断。这就是说,不能同时使用line-based中断和message-based中断。如果多个程序同时访问一个MSI兼容设备,那么它们必须都使用同一种中断类型。
最后,当将一个设备转为RTX设备时,如果RTX PnP驱动认定此设备是一个MSI设备,其默认动作是不要求一个IRQ,以为其他设备节省line-based中断资源。如果你需要为一个MSI设备请求一个IRQ,你必须首先convert the device,然后modify its properties,以获得line-based中断资源。
检查现有的IRQ资源
确定是否有IRQ分配给它:
1. 打开RTX Properties控制面板。
2. 在Hardware标签页,在RTX设备下单击Settings按钮。
3. 双击想要查看IRQ的设备,弹出如下图所示:
4. 查看状态信息中是否有IRQ资源。可能的状态信息如下所示:
PCI MSI 状态信息:
-
Device is MSI capable and should work for message-based interrupts.
- Device is not MSI capable.
PCI line-based 状态信息:
- The [shared/unique] IRQ [IRQ_Number] is available for line-based interrupts.
- No IRQ resource is available for line-based interrupts.
- The device was unable to get the requested line-based IRQ resource, but was able to acquire [shared/unique] IRQ [IRQ_Number].
ISA line-based 状态信息:
- The IRQ [IRQ_Number] is available for line-based interrupts.
- The device was unable to get the requested line-based IRQ resource, but was able to acquire IRQ [IRQ_Number].
- No IRQ resource is available for line-based interrupts.
5. 如果需要的IRQ不存在,在上图中所示界面点击Cancel返回。然后依照下列步骤查看当前已使用的IRQ资源:
1. 在 PnP Device Settings 对话框中单击 Device Manager 。
2. 在Windows设备管理器中,选择“查看”->“依类型排序资源”。
3. 展开IRQ列表来查看当前使用的IRQ资源。
提示:在《Working with Hardware Resource Limitations》这个文档里有更详细的解决方案。
修改RTX PCI设备属性
可以改变一个PCI设备的IRQ,并选择其特性,即是否与其他RTX设备共享同一个IRQ。对于任何使用line-based中断的PCI设备(both MSI-capable and non-MSI-capable)来说,IRQ都是必需的。
提示:不能在非ACPI Windows系统上修改设备资源。
非MSI兼容设备的属性页 MSI兼容设备的属性页
如果是MSI兼容型设备,你将会在状态区域看到以“Device is MSI capable...“开头的信息。如果你在设备上只想用message-based中断,则无需做任何配置。如果你想在MSI兼容设备上使用line-based中断,则选择Obtain line based resources。然后,在IRQ框中输入一个没有使用的IRQ值,在下拉框中有两个选择:
-
Device Exclusive (默认) - 将获得的IRQ设为此设备独占使用,其他设备不能共享此IRQ资源。
-
Shared by RTX - 允许共享此IRQ资源
不是所有的PCI插槽可以将一个IRQ设为Device Exclusive。如果想要中断设备有一个不共享的IRQ,应该将其安装在一个空的、不共享的PCI插槽中。一些中断设备,如PCI NIC 设备,可能会需要一个非共享的、总线主PCI插槽。这可能会需要多次尝试之后才能确定正确的插槽。
Note: By configuring both line-based and message-based interrupts for an MSI-capable device, you make it possible for some RTSS applications to communicate with the device via line-based interrupts while others use message-based interrupts. However, you cannot attach to a device using message-based and line-based interrupts at the same time. If multiple applications attach simultaneously to a single MSI-capable device, they must all use the same interrupt type.
设置好之后重启机器,以使IRQ变动生效。
为了验证是否有IRQ资源冲突,在Hardware标签页,右击你刚刚更新的设备,然后查看它是否能够正常工作。
修改RTX ISA设备属性
提示:不能在非ACPI Windows系统上修改设备资源。
Before you begin, check which IRQ values are available on your machine:
- Open the RTX Properties Control Panel.
- On the Hardware tab, click the Settings button under RTX devices.
- In the PnP Device Settings dialog box, click the Device Manager button.
- In Windows Device Manager, select View > Resources by type > Interrupt request.
To modify RTX ISA device properties:
- Open the RTX Properties Control Panel.
- On the Hardware tab, click the Settings button under RTX devices. You'll see a list of the current Plug and Play devices on your system. If Show filtered list is checked, only the most common devices are displayed; if it in unchecked, all devices are displayed. To update the device information, click the Refresh button.
- Double-click the device whose properties you want to edit.
- Enter a valid interrupt level value in the IRQ box.
- Click OK to close the RTX Device Properties dialog box and then click Apply or OK in the PnP Device Settings dialog box.
- Reboot the machine so your IRQ changes take effect.
- To verify that there is no resource conflict with the requested IRQ, go to the Hardware tab in RTX Properties, double-click the device you just updated, and check to see if it is working properly.
将RTX设备转换为Windows下的设备
1. 打开 RTX Properties Control Panel,在Hardware选项卡里,选中所用设备,然后单击右键,Remove RTX INF support.2. 点击最下面的Apply.3. 点击Device Manager,打开windows设备管理器。在所用设备上单击右键,选择更新驱动程序。4. 选择自己选择驱动程序文件,在出现的对话框中选择RTX驱动。5. 返回后,确定。===================Using RTX Runtime END ===================
-