是否可以为没有的设备逆向工程 PCI 驱动程序?
有问题的设备是一个 PCI ESCON 卡,它允许您将大型机 ESCON 通道连接到专用 unix 计算机。据我所知,这款设备从未公开发布过任何驱动程序,但仍使用标准 PCI 总线。
是否可以在没有现有集合的情况下将驱动程序放在一起进行逆向工程?
任何信息,将不胜感激。
我在某处读到 PCI 枚举(查找总线和设备、功能)是由 x86 系统中的 BIOS 完成的。(今天我在韩国网络文档中再次看到它:https ://melonicedlatte.com/computerarchitecture/2019/11/27 /234300.html )。那么基于arm64的系统呢?我从https://patchwork.kernel.org/project/linux-pci/patch/[email protected]/发现arm64 使用 UEFI 进行 PCIe 初始化,还发现你-boot 支持 arm64 的 PCIe。那么,如果我不使用 UEFI 固件并使用 u-boot 并且在 u-boot 期间不对 PCIe 做任何事情,操作系统(linux)会进行枚举吗?(当然我为 PCI 和我的 PCIe 控制器配置了 linux)。
http://redsymbol.net/linux-kernel-boot-parameters/3.2/
compat Treat PCIe ports as PCI-to-PCI bridges, disable the PCIe
ports driver.
在我的理解中,PCIe 端口(这里是指根端口?)是一个根端口,为什么它可以被视为 PCI-to-PCI 桥接器。
lspci -tvv
在具有 GPU 的服务器上提取:
-+-[0000:b2]-+-00.0-[b3-b8]----00.0-[b4-b8]----08.0-[b5-b8]----00.0-[b6-b8]--+-05.0-[b7]----00.0 NVIDIA Corporation GP104GL
\-0d.0-[b8]----00.0 NVIDIA Corporation GP104GL
与输出相关的格式是什么/我如何理解输出?
从我在网上找到的树输出通常是:
[domain number:bus number]-+-device number.function number Device Description
我猜 lspci 将是执行此操作的工具,但我似乎找不到任何识别输出。有没有办法从命令行知道机器上是否存在 Thunderbolt 端口?
我有一台我知道有 Thunderbolt 端口的计算机,lspci 显示:
00:00.0 Host bridge: Intel Corporation Device 3ec2 (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 3e92
00:08.0 System peripheral: Intel Corporation Skylake Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Device a379 (rev 10)
00:14.0 USB controller: Intel Corporation Device a36d (rev 10)
00:14.2 RAM memory: Intel Corporation Device a36f (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Device a368 (rev 10)
00:16.0 Communication controller: Intel Corporation Device a360 (rev 10)
00:17.0 SATA controller: Intel Corporation Device a352 (rev 10)
00:1d.0 PCI bridge: Intel Corporation Device a330 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a306 (rev 10)
00:1f.3 Audio device: Intel Corporation Device a348 (rev 10)
00:1f.4 SMBus: Intel Corporation Device a323 (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device a324 (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10)
01:00.0 Multimedia video controller: Blackmagic Design DeckLink Mini Recorder
02:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
我已经远程登录到另一台机器,想知道它是否有 Thunderbolt 端口,lspci 显示如下:
00:00.0 Host bridge: Intel Corporation Device 191f (rev 07)
00:01.0 PCI bridge: Intel Corporation Device 1901 (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 1912 (rev 06)
00:14.0 USB controller: Intel Corporation Device a12f (rev 31)
00:14.2 Signal processing controller: Intel Corporation Device a131 (rev 31)
00:16.0 Communication controller: Intel Corporation Device a13a (rev 31)
00:16.3 Serial controller: Intel Corporation Device a13d (rev 31)
00:17.0 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 31)
00:1d.0 PCI bridge: Intel Corporation Device a118 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Device a146 (rev 31)
00:1f.2 Memory controller: Intel Corporation Device a121 (rev 31)
00:1f.3 Audio device: Intel Corporation Device a170 (rev 31)
00:1f.4 SMBus: Intel Corporation Device a123 (rev 31)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-LM (rev 31)
01:00.0 Multimedia video controller: Blackmagic Design DeckLink Mini Recorder
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express
当我运行列表硬件lshw -class network
时,它显示:
product: 82599 10 Gigabit Dual Port Network Connection
size: 10Gbit/s
capacity: 10Gbit/s
width: 32 bits
clock: 33MHz
假设我们使用的PCI ex 2.0 .x8
是容量,那么可以认为容量是:32 (width) * 33 * 10^6 (clock) * 8 (.x8)
但它只会给我 8Gbps (32 * 33 * 10^6 * 8)/1000^3
,我在这里错过了什么?
它使用 PCIeX 2.0,据我所知,理论上它可以提供每条通道 500MBps 的速度。
PCIeX 2.0 总线如何传输超过显示的 NIC 时钟lshw
?
我正在调试一些深奥的驱动程序/BIOS 兼容性问题。我发现的一个可能的线索是提到了 PCI 最大有效负载大小 (MPS) 的可能不匹配/错误检测。我尝试pci=pcie_bus_peer2peer
在内核命令行上重新启动以将所有节点上的 MPS 限制为 128 字节,但这并没有解决我的问题,所以我想查询以确保它生效(并查看当我再次删除)。
我可以使用哪些工具,或者在哪里/sys
或者/proc
我会寻找树中每个 PCI 设备的 MPS 到我的问题设备?
据我了解,连接到不同控制器的设备应显示在不同的 USB 总线下。但是,当我将键盘连接到 xHCI 控制器时,它仍然列在 EHCI 总线之一下。查看>>>>
清单中的标记:
$ lspci | grep -i usb
>>>> 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)
$ lspci -vs 00:14.0
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04) (prog-if 30 [XHCI])
Subsystem: ASUSTeK Computer Inc. 8 Series/C220 Series Chipset Family USB xHCI
Flags: bus master, medium devsel, latency 0, IRQ 27
Memory at ef920000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Kernel driver in use: xhci_hcd
所以我确实有一个 xHCI 控制器。它是主板上的一个单独的物理端口。
$lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>> Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
>>>> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 014: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 003 Device 015: ID 195d:2030 Itron Technology iONE
Bus 003 Device 013: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 003 Device 012: ID 0424:2228 Standard Microsystems Corp. 9-in-2 Card Reader
Bus 003 Device 011: ID 0424:2602 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 010: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
>>>> Bus 003 Device 016: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
总线 004 上的“超高速”3.0 集线器应该是 xHCI 控制器。然而,键盘连接到总线 003:
$lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
|__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
>>>>|__ Port 1: Dev 16, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 10, If 0, Class=Hub, Driver=hub/2p, 480M
|__ Port 1: Dev 11, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 12, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 3: Dev 13, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 15, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 15, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 15, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 14, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
事实上,无论我如何将设备连接到物理控制器,它们总是出现在同一总线下。有谁知道可能发生了什么?
系统
Processor: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
OS: Debian GNU/Linux testing (buster) with ACS patch, IOMMU enabled.
Kernel: Linux 4.10.0-acs+ (x86_64)
Version: #3 SMP PREEMPT Sun Feb 26 00:03:48 CET 2017
Processor: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz : 3900.00 MHz
Board: Asus Z87-PRO
BIOS: AMI version 1707, VT-d/x enabled
我正在尝试使用该setserial
命令将 Brainboxes PX-246 PCI express 串行卡分配给 /dev/ttyS.. 设备,但是该卡似乎没有 I/O 端口地址(只有内存地址)。
lspci -v
给出以下内容:
05:00.0 Serial controller: Brain Boxes Device 4016 (rev 02) (prog-if 06 [16950])
Subsystem: Brain Boxes Device 4016
Flags: fast devsel, IRQ 18
Memory at f7600000 (32-bit, non-prefetchable) [size=16K]
Memory at f7400000 (32-bit, non-prefetchable) [size=2M]
Memory at f7200000 (32-bit, non-prefetchable) [size=2M]
Capabilities: [40] Power Management version 3
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [b0] MSI-X: Enable- Count=16 Masked-
Capabilities: [100] Device Serial Number 00-30-e0-11-11-00-01-50
Capabilities: [110] Power Budgeting <?>
是否可以将内存地址分配给串行设备而不是 I/O 端口?
目前我正在 Ubuntu 16.04 下测试该卡,但它最终会在 Fedora 系统上使用。
任何帮助将非常感激!