我正在做我的服务器上的一些testing,并希望降低我的PCIe设备(或其PCIe桥)的宽度。
如果是相关的,我想通过Linux的setpci来改变基于PCI规范的速度,并且改变链路控制2寄存器的“目标链路速度”。 这使我从8GT / s下降到5GT / s甚至2.5GT / s。
这是一个工作的例子:
Server:~ # setpci -s 83:04.0 98.w=1:ff Server:~ # setpci -s 83:04.0 78.w=20:20 Server:~ # ./check_speed_width 84:00.0 has reported reduced PCIe speed: 2.5GT/s instead of 8GT/s bridge device 83:04.0 has reported reduced PCIe speed: 2.5GT/s instead of 8GT/s Server:~ # setpci -s 83:04.0 98.w=2:ff Server:~ # setpci -s 83:04.0 78.w=20:20 Server:~ # ./check_speed_width 84:00.0 has reported reduced PCIe speed: 5GT/s instead of 8GT/s bridge device 83:04.0 has reported reduced PCIe speed: 5GT/s instead of 8GT/s
到目前为止,我的一些想法是降低宽度:
也许我错过了一个可写的寄存器? 目标链接速度是一个具有读写function的寄存器。 说到宽度寄存器,我只能看到PCI规范中列出的只读寄存器。
也许有一种方法可以禁用一些独立于PCIe规范的通道?
我知道,如果有问题,东西可以训练/初始化为较低的宽度。 那么也许我可以在特定的车道上注入错误并导致车道下降?