Coupled with D15461, this makes PCI work on POWER9. There is still
more to do to fully exploit the hardware capabilities, but this is sufficient to
enable USB and ethernet controllers on a Talos system.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/powerpc/powernv/opal_pci.c | ||
---|---|---|
200 ↗ | (On Diff #42968) | Not quite. roundup2/rounddown2 take a power of 2 as 'y', and rounds 'x' to a multiple of 'y'. In this case, I'm trying to round up to the nearest power of 2. |
276 ↗ | (On Diff #42968) | Kind of. It's work in progress. I don't want to throw it away, because this is part of the "proper" initialization, which Linux does. It's blocked out for now, because it doesn't fully work, and I haven't yet found the missing pieces for it. |
352 ↗ | (On Diff #42968) | This might be a casualty of my testing. I'll have to retest it to be sure. |
No need to comment out the OPAL_PCI_MAP_PE_MMIO_WINDOW. It likely was already
mapped as such by Opal.
sys/powerpc/powernv/opal_pci.c | ||
---|---|---|
276 ↗ | (On Diff #42968) | I think it didn't work on P8 either, at least with the newest OPAL. However, on P8 it only produces a warning during boot and does not influence anything further. |
358 ↗ | (On Diff #42968) | This might be worth testing on P8 also. If I recall correctly, there were sth messed up with using splitted windows... |
sys/powerpc/powernv/opal_pci.c | ||
---|---|---|
358 ↗ | (On Diff #42968) | Yeah, it didn't work on POWER9 either, and I was pretty sure I had reverted it before submitting for review. I tested both cases, including post-revert. With split windows bge couldn't find its phy, after reverting to non-split windows, bge could initialize correctly. |
sys/powerpc/powernv/opal_pci.c | ||
---|---|---|
414 ↗ | (On Diff #42970) | Can't you just call OF_getencprop() and checking if the return > 0, if so proceeding to branch other than calling OF_getproplen() and OF_getencprop()? |
sys/powerpc/powernv/opal_pci.c | ||
---|---|---|
414 ↗ | (On Diff #42970) | Yeah, that would be saner. This change, and most of the OF_* changes, are just a rename of ofw_bus_get_node(dev) -> node. I'll commit that change separately though, since it't a non-functional change. I plan to make further changes to this file after I get the initial working skeleton in, for performance and stability. |