更改 PCI 设备的 IO 地址
我想通过将新的(页对齐)地址写入 BAR0/1 来更改 PCI 设备的 IO 地址。当我使用 BIOS 功能执行此操作时,我无法访问新地址的 PCI 设备。
还需要做些什么才能使其发挥作用吗?我在实模式下使用汇编器。
I would like to change the IOaddress of a PCI device by writing the new (page aligned) address into BAR0/1. When I did that using a BIOS function I could not access the PCI device at the new address.
Is there anything else that needs to be done to get that to work? I am using Assembler in real mode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
覆盖 BAR 应更改设备的地址。 (只要你做得正确。)
该设备是否位于网桥后面?如果是这样,您还需要更新桥配置寄存器。
此外,芯片组/根联合体可能具有其自己的总线解码配置。检查芯片组数据表。
Overwriting the BAR should change the address of the device. (As long as you did it properly.)
Is the device behind a bridge? If so, you will also need to update the bridge configuration registers.
Also, the chipset/root complex may have it's own bus decode configuration. Check the chipset datasheet.
如果您的端点设备位于桥后面,则相应地更改可预取基础高 32 位和可预取限制高 32 位寄存器。我认为你不需要担心根复合体。
if your end point device is behind the bridge then change the Pre-fetchable Base Upper 32 Bit and Pre-fetchable Limit Upper 32 Bit registers appropriately. I dont think you need to worry about root complex.