1

with lspci I can see things like:

Slot:   00:02.0
Class:  PCI bridge [0604]
Vendor: Red Hat, Inc. [1b36]
Device: QEMU PCIe Root port [000c]
Driver: pcieport

In dmesg I can see pcieport 0000:00:02.0: pciehp: Slot #0 AttnBtn+ PwrCtrl+ MRL- AttnInd+ PwrInd+ HotPlug+ Surprise+ Interlock+ NoCompl- IbPresDis- LLActRep+

However, cat /lib/modules/$(uname -r)/modules.builtin | grep pci does not show any of them. depmod -v neither.

So I guess, these 2 drivers are actually static builtin in the kernel which is not module. In kernel config (/boot/config-$(uname -r)) I can see CONFIG_HOTPLUG_PCI_PCIE=y. But I do not even know this flag till I dig into the kernel source code. I wonder is there any easy way to list all the driver names of static builtins?

Wang
  • 292
  • 1
  • 2
  • 11
  • Probably they are not compiled as module. – Tom Yan Oct 19 '22 at 02:41
  • can be static builtin in the kernel. But how do I list those static ones? I want to see all drivers available – Wang Oct 19 '22 at 12:45
  • What exactly do you mean by list / see though? The build config of the kernel you are using? Or are you looking for the location of corresponding source code in the tree? – Tom Yan Oct 19 '22 at 13:11
  • I want the static driver names according to current system's kernel config. I know the kernel config in /boot, but that is not straightforward. I try to get the actual driver names as in `/sys/bus/pci_express/drivers` not something like `CONFIG_X86_TSC=y` from the current kernel config, it is hard to associate it with the actual driver names. – Wang Oct 19 '22 at 13:33

0 Answers0