Page MenuHomeFreeBSD

fu740_pci_dw: Add SiFive FU740 PCIe controller driver
ClosedPublic

Authored by jrtc27 on Jul 5 2021, 12:11 AM.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Accidentally uploaded an old version of the patch

mhorne added inline comments.
sys/riscv/sifive/fu740_pci_dw.c
373

"Old" in this case means the version that shipped on the SD card?

sys/riscv/sifive/fu740_pci_dw.c
373

Yes, as opposed to what was committed upstream

While I did not go over every line in detail, I don't see anything objectionable. The PCIe chapter in the FU740 manual is particularly lacking.

I've lightly tested this series on my board, root on USB and NVMe both appear to be working. My remaining concern is that I see messages about failed PCI resource allocation in the boot log, see P514. Is this expected? The kernel I've tested here is based on your unmatched branch (b96c50e2fad) + one unrelated commit of mine.

While I did not go over every line in detail, I don't see anything objectionable. The PCIe chapter in the FU740 manual is particularly lacking.

I've lightly tested this series on my board, root on USB and NVMe both appear to be working. My remaining concern is that I see messages about failed PCI resource allocation in the boot log, see P514. Is this expected? The kernel I've tested here is based on your unmatched branch (b96c50e2fad) + one unrelated commit of mine.

Yes, those are harmless, when resetting the controller all the windows change to 4K open windows at a low address (either 0 or 4K, I forget) that FreeBSD initially interprets as being configured by firmware and thus tries to preserve them, but fails to (since they're not within the controller's static address ranges). I'd like to find a way to silence those somehow (clear_pcib exists but for some reason doesn't seem to quite work, enumeration stops after the first bridge), but that'd be a future patch as it's not causing any functional issues.

While I did not go over every line in detail, I don't see anything objectionable. The PCIe chapter in the FU740 manual is particularly lacking.

I've lightly tested this series on my board, root on USB and NVMe both appear to be working. My remaining concern is that I see messages about failed PCI resource allocation in the boot log, see P514. Is this expected? The kernel I've tested here is based on your unmatched branch (b96c50e2fad) + one unrelated commit of mine.

Yes, those are harmless, when resetting the controller all the windows change to 4K open windows at a low address (either 0 or 4K, I forget) that FreeBSD initially interprets as being configured by firmware and thus tries to preserve them, but fails to (since they're not within the controller's static address ranges). I'd like to find a way to silence those somehow (clear_pcib exists but for some reason doesn't seem to quite work, enumeration stops after the first bridge), but that'd be a future patch as it's not causing any functional issues.

Ack. This sounds okay to me.

This revision is now accepted and ready to land.Aug 6 2021, 5:38 PM