'How to find out PCIe Maximum Payload Size in C program?

is there any library or something in C lang, so I can find out Max payload size of PCIe bus ? I think BIOS should know it, is there any chance how to read from there or any ideas ?



Solution 1:[1]

You can potentially read it using the PCI library (libpci), as it includes functions to access the configuration space of PCI devices.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 haggai_e