Page MenuHomeFreeBSD

Clean up the pci host generic driver
ClosedPublic

Authored by andrew on Jun 3 2020, 4:39 PM.
Tags
None
Referenced Files
F138018936: D25121.id.diff
Fri, Nov 28, 5:20 AM
F137947091: D25121.id72622.diff
Thu, Nov 27, 1:50 PM
Unknown Object (File)
Wed, Nov 26, 4:21 PM
Unknown Object (File)
Tue, Nov 25, 12:58 AM
Unknown Object (File)
Mon, Nov 24, 1:14 AM
Unknown Object (File)
Sun, Nov 23, 6:38 PM
Unknown Object (File)
Sat, Nov 22, 11:19 PM
Unknown Object (File)
Thu, Nov 20, 11:31 PM

Details

Summary
  • Support Prefetchable Memory
  • Use the correct rman when allocating memory and ioports
  • Translate PCI addresses in bus_alloc_resource to allow physical addresses that are different than pci addresses.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31464
Build 29077: arc lint + arc unit

Event Timeline

andrew requested review of this revision.Jun 3 2020, 4:39 PM
andrew created this revision.

I am not an expert by any means but these changes look good to me.

This revision is now accepted and ready to land.Jun 13 2020, 12:33 AM
sys/dev/pci/pci_host_generic.c
364

Actually, another niggle I find while trying to adopt this patch today.

In pci_pci.c, when allocating the bridge window, we try to allocate start=0x0, end=0xfffff.

That's always going to fail if the pci memory range is [0xf8000000,0xfbffffff] (as in the case of the rpi controller). Somehow we need to adjust that bridge window region into a pci address range.

Also, it seems that we don't actually check if sc->ranges[i] is large enough to hold the requested [start, end] resource.

sys/dev/pci/pci_host_generic.c
364

Can you get the raw values of the PCIR_MEMBASE_1 and PCIR_MEMLIMIT_1 registers.

This revision was automatically updated to reflect the committed changes.