1

I have an Ampere ARMv8 server running Ubuntu 20.04. I want to find out the kernel driver used for the PCIe controllers. How should I do?

My purpose is to prove a hypothesis that for a server (which has UEFI/ACPI capability) to install official distros (such as Ubuntu/Debian w/o modification), the PCIe controller drivers has to be in the kernel source tree for that distro.

Part of the dmesg|grep -i pci output from my Ampere server is as below:

root@ampere:/sys/bus/platform/drivers# dmesg|grep -i pci
[    0.108502] PCI/MSI: ITS@0x100100080000 domain created
[    0.108504] PCI/MSI: ITS@0x1001000a0000 domain created
[    0.108506] PCI/MSI: ITS@0x1001000c0000 domain created
[    0.108508] PCI/MSI: ITS@0x1001000e0000 domain created
[    0.108509] PCI/MSI: ITS@0x100100100000 domain created
[    0.108511] PCI/MSI: ITS@0x100100120000 domain created
[    0.108512] PCI/MSI: ITS@0x500100080000 domain created
[    0.108514] PCI/MSI: ITS@0x5001000a0000 domain created
[    0.108516] PCI/MSI: ITS@0x5001000c0000 domain created
[    0.108517] PCI/MSI: ITS@0x5001000e0000 domain created
[    0.108519] PCI/MSI: ITS@0x500100100000 domain created
[    0.108520] PCI/MSI: ITS@0x500100120000 domain created
[    0.429505] ACPI: bus type PCI registered
[    0.429507] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    9.670274] ACPI: PCI Root Bridge [PCI2] (domain 0000 [bus 00-ff])
[    9.685558] acpi PNP0A08:02: _OSC: platform does not support [PCIeHotplug SHPCHotplug PME LTR]
[    9.694213] acpi PNP0A08:02: _OSC: OS now controls [AER PCIeCapability]
[    9.700821] acpi PNP0A08:02: MCFG quirk: ECAM at [mem 0x3bfff0000000-0x3bffffffffff] for [bus 00-ff] with pci_32b_read_ops
[    9.729932] PCI host bridge to bus 0000:00
[    9.734016] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff window]
[    9.741486] pci_bus 0000:00: root bus resource [mem 0x380000000000-0x3bffdfffffff window]
[    9.749649] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.755139] pci 0000:00:00.0: [1def:e100] type 00 class 0x060000
[    9.761191] pci 0000:00:01.0: [1def:e101] type 01 class 0x060400
...

And I have the following info from /sys:

root@ampere:/sys/bus/platform/drivers# find . -type d|grep -i pci
./pci-host-generic
./advk-pcie
./pci_thunder_pem
./armada8k-pcie
./dw-pcie
./xilinx-pcie
./altera-pcie
./imx6q-pcie
./hisi-pcie-almost-ecam
./cdns-pcie-ep
./qcom-pcie
./rcar-pcie
./kirin-pcie
./ftpci100
./keystone-pcie
./cdns-pcie-host
./pci_thunder_ecam
./nwl-pcie
./mobiveil-pcie
./xgene-pcie
./rockchip-pcie-ep
./histb-pcie
./hisi-pcie
./al-pcie
./mtk-pcie

And lspci -k for host bridge shows no kernel driver info either:

...
 \-[0000:00]-+-00.0  Ampere Computing, LLC Device e100
             +-01.0-[01]--
             +-02.0-[02]--
             +-03.0-[03]--
             \-04.0-[04-05]--+-00.0  Intel Corporation Ethernet Controller 10G X550T
                             \-00.1  Intel Corporation Ethernet Controller 10G X550T

root@ampere:/home/cmic# lspci -s 0:0:0.0 -kvv
0000:00:00.0 Host bridge: Ampere Computing, LLC Device e100
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        NUMA node: 0

root@ampere:/home/cmic# lspci -s 0:0:1.0 -k
0000:00:01.0 PCI bridge: Ampere Computing, LLC Device e101 (rev 04)
        Kernel driver in use: pcieport

Thanks!

bruin
  • 111
  • 4
  • Try `lspci -k`. – Nikita Kipriyanov Nov 02 '22 at 03:46
  • Thanks for your reply. I updated the question by including the `lspci -k` output for a host bridge and a pci bridge. – bruin Nov 02 '22 at 05:05
  • As it follows from the last call to `lspci -k`, `pcieport` is the kernel module that supports the device `0000:00:01.0`. It literally says "kernel driver in use", how are you seeing "no kernel driver info"? What info you wanted to see? Also, from the tree you also displayed we see that Intel dual port 10G LAN PCIe card is connected to that PCIe bridge. – Nikita Kipriyanov Nov 02 '22 at 05:50
  • As I understood it, `pcieport` is the driver for one of PCIe bridge (`0:0:1.0`) in the RC. What I am looking for is the driver for the RC (host bridge, `0:0:0.0`), aka the PCIe host/controller driver. One such controller driver is `https://elixir.bootlin.com/linux/latest/source/drivers/pci/controller/pcie-xilinx.c`, for instance. Thanks. – bruin Nov 02 '22 at 06:40
  • From [this page](https://www.kernel.org/doc/html/latest/PCI/acpi-info.html), I see a paragraph starting with "PCI host bridges are PNP0A03 or PNP0A08 devices...". I am guessing that probably, in case of ACPI, the host bridge driver are generic ones while hardware-specific details are covered in UEFI bios? – bruin Nov 02 '22 at 08:22

0 Answers0