Page MenuHomeFreeBSD

fu740_pci_dw: Add SiFive FU740 PCIe controller driver
ClosedPublic

Authored by jrtc27 on Jul 5 2021, 12:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 8 2024, 8:21 PM
Unknown Object (File)
Oct 8 2024, 8:20 PM
Unknown Object (File)
Oct 8 2024, 8:20 PM
Unknown Object (File)
Oct 8 2024, 8:19 PM
Unknown Object (File)
Sep 29 2024, 5:49 PM
Unknown Object (File)
Sep 29 2024, 1:17 AM
Unknown Object (File)
Sep 27 2024, 11:13 PM
Unknown Object (File)
Sep 27 2024, 5:14 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
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
374

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

sys/riscv/sifive/fu740_pci_dw.c
374

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