CPU 的物理 PCI 顺序参考

CPU 的物理 PCI 顺序参考

有没有什么方法可以知道 PCI 相对于 CPU(或相对于某些东西?)的顺序?

例如,我有 5 张 AMD 卡,我想知道哪一张是哪一张(物理上)。我可以用来lshw找出顺序(通过 PCI-X,其中 X 是整数),就像第三张卡不工作一样,但我需要一个参考,以便我可以快速识别板上的物理卡。我想每个主板制造商都不同,即使顺序也不会改变(PCI不会像1,3,2,5,4那样跳来跳去),所以它是顺时针还是逆时针?

这是我的一部分lshw信息

yoshie
    description: Computer
    width: 64 bits
    capabilities: vsyscall32
  *-core
       description: Motherboard
       physical id: 0
     *-memory
      description: System memory
      physical id: 0
      size: 3407MiB
     *-cpu
      product: AMD Embedded G-Series GX-224IJ Radeon R4E
      vendor: Advanced Micro Devices [AMD]
      physical id: 1
      bus info: cpu@0
      size: 2400MHz
      capacity: 2400MHz
      width: 64 bits
      capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp x86-64 constant_tsc rep_good acc_power nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic overflow_recov cpufreq
     *-pci:0
      description: Host bridge
      product: Advanced Micro Devices, Inc. [AMD]
      vendor: Advanced Micro Devices, Inc. [AMD]
      physical id: 100
      bus info: pci@0000:00:00.0
      version: 00
      width: 32 bits
      clock: 33MHz
    *-display
         description: VGA compatible controller
         product: Advanced Micro Devices, Inc. [AMD/ATI]
         vendor: Advanced Micro Devices, Inc. [AMD/ATI]
         physical id: 1
         bus info: pci@0000:00:01.0
         version: 81
         width: 64 bits
         clock: 33MHz
         capabilities: vga_controller bus_master cap_list rom
         configuration: driver=amdgpu latency=0
         resources: iomemory:f0-ef irq:232 memory:e0000000-efffffff memory:ff0800000-ff0ffffff ioport:f000(size=256) memory:feb00000-feb3ffff memory:c0000-dffff
    *-multimedia
         description: Audio device
         product: Advanced Micro Devices, Inc. [AMD/ATI]
         vendor: Advanced Micro Devices, Inc. [AMD/ATI]
         physical id: 1.1
         bus info: pci@0000:00:01.1
         version: 00
         width: 64 bits
         clock: 33MHz
         capabilities: bus_master cap_list
         configuration: driver=snd_hda_intel latency=0
         resources: iomemory:f0-ef irq:239 memory:ffff00000-ffff03fff
    *-pci:0
         description: PCI bridge
         product: Advanced Micro Devices, Inc. [AMD]
         vendor: Advanced Micro Devices, Inc. [AMD]
         physical id: 2.1
         bus info: pci@0000:00:02.1
         version: 00
         width: 32 bits
         clock: 33MHz
         capabilities: pci normal_decode bus_master cap_list
         configuration: driver=pcieport
         resources: irq:216 ioport:9000(size=20480) memory:fe500000-fe9fffff ioport:f60000000(size=2418016256)
       *-pci
            description: PCI bridge
            product: ASMedia Technology Inc.
            vendor: ASMedia Technology Inc.
            physical id: 0
            bus info: pci@0000:01:00.0
            version: 00
            width: 32 bits
            clock: 33MHz
            capabilities: pci normal_decode bus_master cap_list
            configuration: driver=pcieport
            resources: irq:218 ioport:9000(size=20480) memory:fe500000-fe9fffff ioport:f60000000(size=2418016256)
          *-pci:0
               description: PCI bridge
               product: ASMedia Technology Inc.
               vendor: ASMedia Technology Inc.
               physical id: 1
               bus info: pci@0000:02:01.0
               version: 00
               width: 32 bits
               clock: 33MHz
               capabilities: pci normal_decode bus_master cap_list
               configuration: driver=pcieport
               resources: irq:220
          *-pci:1
               description: PCI bridge
               product: ASMedia Technology Inc.
               vendor: ASMedia Technology Inc.
               physical id: 2
               bus info: pci@0000:02:02.0
               version: 00
               width: 32 bits
               clock: 33MHz
               capabilities: pci normal_decode bus_master cap_list
               configuration: driver=pcieport
               resources: irq:222
          *-pci:2
               description: PCI bridge
               product: ASMedia Technology Inc.
               vendor: ASMedia Technology Inc.
               physical id: 3
               bus info: pci@0000:02:03.0
               version: 00
               width: 32 bits
               clock: 33MHz
               capabilities: pci normal_decode bus_master cap_list
               configuration: driver=pcieport
               resources: irq:224 ioport:d000(size=4096) memory:fe900000-fe9fffff ioport:fe0000000(size=270532608)
             *-display
                  description: VGA compatible controller
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0
                  bus info: pci@0000:05:00.0
                  version: cf
                  width: 64 bits
                  clock: 33MHz
                  capabilities: vga_controller bus_master cap_list rom
                  configuration: driver=amdgpu latency=0
                  resources: iomemory:f0-ef iomemory:f0-ef irq:233 memory:fe0000000-fefffffff memory:ff0000000-ff01fffff ioport:d000(size=256) memory:fe900000-fe93ffff memory:fe940000-fe95ffff
             *-multimedia
                  description: Audio device
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0.1
                  bus info: pci@0000:05:00.1
                  version: 00
                  width: 64 bits
                  clock: 33MHz
                  capabilities: bus_master cap_list
                  configuration: driver=snd_hda_intel latency=0
                  resources: irq:240 memory:fe960000-fe963fff
          *-pci:3
               description: PCI bridge
               product: ASMedia Technology Inc.
               vendor: ASMedia Technology Inc.
               physical id: 4
               bus info: pci@0000:02:04.0
               version: 00
               width: 32 bits
               clock: 33MHz
               capabilities: pci normal_decode bus_master cap_list
               configuration: driver=pcieport
               resources: irq:225 ioport:c000(size=4096) memory:fe800000-fe8fffff ioport:fc0000000(size=270532608)
             *-display
                  description: VGA compatible controller
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0
                  bus info: pci@0000:06:00.0
                  version: cf
                  width: 64 bits
                  clock: 33MHz
                  capabilities: vga_controller bus_master cap_list rom
                  configuration: driver=amdgpu latency=0
                  resources: iomemory:f0-ef iomemory:f0-ef irq:234 memory:fc0000000-fcfffffff memory:fd0000000-fd01fffff ioport:c000(size=256) memory:fe800000-fe83ffff memory:fe840000-fe85ffff
             *-multimedia
                  description: Audio device
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0.1
                  bus info: pci@0000:06:00.1
                  version: 00
                  width: 64 bits
                  clock: 33MHz
                  capabilities: bus_master cap_list
                  configuration: driver=snd_hda_intel latency=0
                  resources: irq:241 memory:fe860000-fe863fff
          *-pci:4
               description: PCI bridge
               product: ASMedia Technology Inc.
               vendor: ASMedia Technology Inc.
               physical id: 5
               bus info: pci@0000:02:05.0
               version: 00
               width: 32 bits
               clock: 33MHz
               capabilities: pci normal_decode bus_master cap_list
               configuration: driver=pcieport
               resources: irq:226 ioport:b000(size=4096) memory:fe700000-fe7fffff ioport:fa0000000(size=270532608)
             *-display
                  description: VGA compatible controller
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0
                  bus info: pci@0000:07:00.0
                  version: cf
                  width: 64 bits
                  clock: 33MHz
                  capabilities: vga_controller bus_master cap_list rom
                  configuration: driver=amdgpu latency=0
                  resources: iomemory:f0-ef iomemory:f0-ef irq:235 memory:fa0000000-fafffffff memory:fb0000000-fb01fffff ioport:b000(size=256) memory:fe700000-fe73ffff memory:fe740000-fe75ffff
             *-multimedia
                  description: Audio device
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0.1
                  bus info: pci@0000:07:00.1
                  version: 00
                  width: 64 bits
                  clock: 33MHz
                  capabilities: bus_master cap_list
                  configuration: driver=snd_hda_intel latency=0
                  resources: irq:242 memory:fe760000-fe763fff
          *-pci:5
               description: PCI bridge
               product: ASMedia Technology Inc.
               vendor: ASMedia Technology Inc.
               physical id: 6
               bus info: pci@0000:02:06.0
               version: 00
               width: 32 bits
               clock: 33MHz
               capabilities: pci normal_decode bus_master cap_list
               configuration: driver=pcieport
               resources: irq:227 ioport:a000(size=4096) memory:fe600000-fe6fffff ioport:f80000000(size=270532608)
             *-display
                  description: VGA compatible controller
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0
                  bus info: pci@0000:08:00.0
                  version: cf
                  width: 64 bits
                  clock: 33MHz
                  capabilities: vga_controller bus_master cap_list rom
                  configuration: driver=amdgpu latency=0
                  resources: iomemory:f0-ef iomemory:f0-ef irq:236 memory:f80000000-f8fffffff memory:f90000000-f901fffff ioport:a000(size=256) memory:fe600000-fe63ffff memory:fe640000-fe65ffff
             *-multimedia
                  description: Audio device
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0.1
                  bus info: pci@0000:08:00.1
                  version: 00
                  width: 64 bits
                  clock: 33MHz
                  capabilities: bus_master cap_list
                  configuration: driver=snd_hda_intel latency=0
                  resources: irq:243 memory:fe660000-fe663fff
          *-pci:6
               description: PCI bridge
               product: ASMedia Technology Inc.
               vendor: ASMedia Technology Inc.
               physical id: 7
               bus info: pci@0000:02:07.0
               version: 00
               width: 32 bits
               clock: 33MHz
               capabilities: pci normal_decode bus_master cap_list
               configuration: driver=pcieport
               resources: irq:228 ioport:9000(size=4096) memory:fe500000-fe5fffff ioport:f60000000(size=270532608)
             *-display
                  description: VGA compatible controller
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0
                  bus info: pci@0000:09:00.0
                  version: cf
                  width: 64 bits
                  clock: 33MHz
                  capabilities: vga_controller bus_master cap_list rom
                  configuration: driver=amdgpu latency=0
                  resources: iomemory:f0-ef iomemory:f0-ef irq:237 memory:f60000000-f6fffffff memory:f70000000-f701fffff ioport:9000(size=256) memory:fe500000-fe53ffff memory:fe540000-fe55ffff
             *-multimedia
                  description: Audio device
                  product: Advanced Micro Devices, Inc. [AMD/ATI]
                  vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                  physical id: 0.1
                  bus info: pci@0000:09:00.1
                  version: 00
                  width: 64 bits
                  clock: 33MHz
                  capabilities: bus_master cap_list
                  configuration: driver=snd_hda_intel latency=0
                  resources: irq:244 memory:fe560000-fe563fff
    *-pci:1
         description: PCI bridge
         product: Advanced Micro Devices, Inc. [AMD]
         vendor: Advanced Micro Devices, Inc. [AMD]
         physical id: 2.4
         bus info: pci@0000:00:02.4
         version: 00
         width: 32 bits
         clock: 33MHz
         capabilities: pci normal_decode bus_master cap_list
         configuration: driver=pcieport
         resources: irq:216 ioport:e000(size=4096) memory:fea00000-feafffff ioport:f0000000(size=1048576)
       *-network
            description: Ethernet interface
            product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
            vendor: Realtek Semiconductor Co., Ltd.
            physical id: 0
            bus info: pci@0000:0a:00.0
            logical name: enp10s0
            version: 0c
            serial: dc:9c:52:07:6b:4c
            size: 1Gbit/s
            capacity: 1Gbit/s
            width: 64 bits
            clock: 33MHz
            capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
            configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=172.16.2.45 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
            resources: irq:230 ioport:e000(size=256) memory:fea00000-fea00fff memory:f0000000-f0003fff
...

答案1

主板厂商通常(*) 对 PCI-e 插槽进行物理布局,使其处于连续的逻辑设备顺序。顺序是通常从距离 CPU 最近到距离 CPU 最远。

您的 GPU 已开启:

00:00:01.0
00:05:00.0
00:06:00.0
00:07:00.0
00:08:00.0
00:09:00.0

我们可以忽略第一个,因为它可能是 CPU 内置的 GPU。其余的按照它们物理安装到插槽中的顺序列出 - 例如 00:05:00.0 将是第一个插槽中的 GPU,00:06:00.0 将是第二个插槽中的 CPU。


(*) 我犹豫是否要说“总是”,但我从未见过具有不同布局的主板。几乎可以肯定,因为这样做会需要更多工作(因此成本更高)。请注意,如果制造商发现了一种方法,可以通过不同的方式为每个主板节省几纳美分,那么他们就会这么做。

具有 PCI 转接卡和附加 PCI 桥等的主板将改变这一点,但您通常不会在 1 或 2RU 机架式机箱的服务器主板之外看到它们......即使如此,顺序仍然(通常)从最近到最远。

相关内容