Reputation: 125
I have noticed pci_resource_start(pdev, bar)
returns different address in each boot on the same machine. If it returns a 'physical address', shouldn't it be consistent on same machine? Am I missing something?
Upvotes: 2
Views: 1339
Reputation: 12457
The BIOS and/or the OS allocates address space for each device on each boot. There's no requirement for consistency from one boot to the next, but one would expect the algorithms to be deterministic. Any change to the system hardware or boot parameters could cause it to vary. (For example, even leaving a USB device plugged in across boot could conceivably cause variation.) I haven't noticed address space assignment changing when rebooting without any other changes.
Upvotes: 1