When a SYS_RES_IOPORT resource crosses a pci_host_generic bridge, it
is translated into a memory access for an associated range, so use
SYS_RES_MEMORY for the resource allocated from the parent. This is
arguably a cleaner solution than having simplebus rewrite
SYS_RES_MEMORY to SYS_RES_IOPORT.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
What about all the other PCI controller drivers though? Various use ofw_pcib, for example.
ofw_pcib doesn't pass child resources up to simplebus for allocation or activation, it uses bus_space_map directly with a new-bus method to get the bus_space_tag. I think this might be the only one passing SYS_RES_IOPORT up to simplebus and that if this works we might be able to remove all SYS_RES_IOPORT support from simplebus.
I have thought about changing ofw_pcib, but to be clear, ofw_pcib is not passing SYS_RES_IOPORT resources up to its parent bus driver currently.
Booting fine is the main thing I wanted to see. Can you also apply D48501 (in the stack) on top of this and make sure it still boots fine?
It still boots without problems, but this system boots using ACPI, I think that patch is a no-op here.
Actually, can you show me the parent devices of pcib0? I wonder if ACPI was passing these requests up to the arm64 nexus and if it was just treating I/O ports as memory?
I saved devinfo -r output, I hope that's sufficient: https://reviews.freebsd.org/P655
Or perhaps, just test the patch from D48581 (now linked as a child of this) on top of this patch (which I will merge to main shortly)