* when is pci_dev->resource values are filled?
@ 2022-05-20 1:49 Chan Kim
0 siblings, 0 replies; 2+ messages in thread
From: Chan Kim @ 2022-05-20 1:49 UTC (permalink / raw)
To: kernelnewbies
Hi, all
When initializing a PCI device, during the pci_driver's probe function,
pci_request_region is called.
Inside the pci_request_region, it is just calling request_region with the
values in pci_dev->resource[bar].start and end.
But when is this pci->dev->resource values filled? Is it done by the BIOS(or
UEFI) before linux boots?
Probably not because this pci_dev struct is from linux and should be filled
by linux code and I couldn't find where it's done.
Chan Kim
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: when is pci_dev->resource values are filled?
@ 2022-05-23 2:32 Chan Kim
0 siblings, 0 replies; 2+ messages in thread
From: Chan Kim @ 2022-05-23 2:32 UTC (permalink / raw)
To: kernelnewbies
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
> -----Original Message-----
> From: Chan Kim <ckim@etri.re.kr>
> Sent: Friday, May 20, 2022 10:50 AM
> To: kernelnewbies@kernelnewbies.org
> Subject: when is pci_dev->resource values are filled?
>
> Hi, all
>
> When initializing a PCI device, during the pci_driver's probe function,
> pci_request_region is called.
> Inside the pci_request_region, it is just calling request_region with the
> values in pci_dev->resource[bar].start and end.
> But when is this pci->dev->resource values filled? Is it done by the
> BIOS(or UEFI) before linux boots?
> Probably not because this pci_dev struct is from linux and should be
> filled by linux code and I couldn't find where it's done.
>
> Chan Kim
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-23 2:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 1:49 when is pci_dev->resource values are filled? Chan Kim
2022-05-23 2:32 Chan Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).