如何理解lspci树格式?

use*_*750 9 linux pci-express pci drivers

我使用戴尔 G3 3579 运行 lspci -tvv 命令。

这是输出:

-[0000:00]-+-00.0  Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers
           +-01.0-[01]----00.0  NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile]
           +-02.0  Intel Corporation Device 3e9b
           +-04.0  Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem        
           +-08.0  Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
           +-12.0  Intel Corporation Cannon Lake PCH Thermal Controller
           +-14.0  Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller
           +-14.2  Intel Corporation Cannon Lake PCH Shared SRAM
           +-14.3  Intel Corporation Wireless-AC 9560 [Jefferson Peak]
           +-15.0  Intel Corporation Device a368
           +-15.1  Intel Corporation Device a369
           +-16.0  Intel Corporation Cannon Lake PCH HECI Controller
           +-17.0  Intel Corporation 82801 Mobile SATA Controller [RAID mode]
           +-1b.0-[02-3a]--
           +-1d.0-[3b]----00.0  Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           +-1f.0  Intel Corporation Device a30d
           +-1f.3  Intel Corporation Cannon Lake PCH cAVS
           +-1f.4  Intel Corporation Cannon Lake PCH SMBus Controller
           \-1f.5  Intel Corporation Cannon Lake PCH SPI Controller
Run Code Online (Sandbox Code Playgroud)

我知道GPU是通过PCIE直接连接CPU,intel使用PCH连接其他设备。

以下是问题:
Q1:为什么树形输出显示所有设备都连接到相同的 PCI 总线(总线 00)?
Q2:什么+-1b.0-[02-3a]--意思?
Q3: 我怎么知道哪个设备连接到CPU的PCI-E或PCH的PCI-E总线?

dir*_*rkt 7

为什么树输出显示所有设备都连接到相同的 PCI 总线(总线 00)?

因为这就是 PCIe 结构的工作原理:所有设备都连接到单个根节点。(虽然您可以拥有多个 PCIe 域,但这会使事情复杂化)。

对于 Intel,所有外部 PCIe 通道,无论它们来自 CPU 还是 PCH,都位于 PCIe 桥接器之后(因此获得新的 PCIe 总线编号)。PCH 南桥中的设备本身显示为 PCIe 根的直接后代。

请记住,CPU 和 PCH 通过专有的高速总线紧密耦合,该总线对 PCIe 协议是透明的。这就是 PCIe 布局与物理布局不匹配的原因。

+-1b.0-[02-3a]-- 是什么意思?

1b.0是 PCIe 根集线器的插槽和功能编号。在这种情况下,它包含一个 PCIe 桥接器。这座桥后面的总线将编号为 02 到 3a,即使当前没有连接到它们的设备。

以类似的方式,您的 GPU 位于网桥后面,而网桥后面的01.0LAN 控制器1d.0可能是内部网桥。

我如何知道哪个设备连接到 CPU 的 PCI-E 或 PCH 的 PCI-E 总线?

通常,它们会出现在不同的 PCIe 桥接器后面。详细信息取决于 Intel CPU 架构。不,我不知道对于您的特定架构有哪些桥接,但可能可以通过英特尔数据表和/或通过观察现有系统找到答案。