when is pci_dev->resource values are filled?
It looks like these values in pci_dev.resources are filled in pci_read_bases function which is called in pci_setup_device function.
So linux is reading the values set by the BIOS and setting them in its pci_dev struct. And the devices's driver is called after that.
Chan Kim
Quoted 17 lines
-----Original Message-----
From: Chan Kim <[email protected]>
Sent: Friday, May 20, 2022 10:50 AM
To: [email protected]
Subject: when ispci_dev->resourcevalues are filled?Hi, all
When initializing a PCI device, during the pci_driver's probe function,
pci_request_regionis called.
Inside thepci_request_region, it is just callingrequest_regionwith the values in pci_dev->resource[bar].start and end.
But when is thispci->dev->resourcevalues filled? Is it done by the BIOS(or UEFI) before linux boots?
Probably not because thispci_devstruct is from linux and should be filled by linux code and I couldn't find where it's done.
Quoted 1 line
Chan Kim
_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies