PCie card information for ACPI and Device Tree systems

Greg KH greg at kroah.com
Sat Jun 17 05:51:15 EDT 2023


On Sat, Jun 17, 2023 at 10:20:01AM +0100, Lucas Tanure wrote:
> Hi,
> 
> How can the kernel read hardware information for a PCIe card if ACPI
> in the BIOS doesn't have it?
> The DSDT/ACPI information doesn't contain information about an
> external PCIe inserted in the motherboard, so how can the Kenerl
> discover its hardware information?

The PCI bus protocol has a function to walk the devices and let the host
operating system know a device is present and then the operating system
does the device probe and reads the hardware information from the device
itself.

> If the kernel has the rule of not hardcoding hardware information in
> its driver, what is the method to get hardware information for a PCIe
> not part of the motherboard?

Because that's not how PCI works :)

> And the same question for ARM device trees. How can the driver find
> hardware information about a PCIe card that is not in the loaded DTB
> for the system?

PCI is CPU agnostic.

Just like USB and other self-discoverable busses.

See the PCI specification for more details if you are curious, there are
some good books out there on how this works at the low level if you want
to know more.

hope this helps,

greg k-h



More information about the Kernelnewbies mailing list