Page MenuHomeFreeBSD

OFW: Add helper function for parsing PCI "ranges" property.
AbandonedPublic

Authored by mmel on Dec 3 2015, 12:19 PM.
Tags
Referenced Files
Unknown Object (File)
Oct 3 2024, 1:56 AM
Unknown Object (File)
Oct 2 2024, 10:00 AM
Unknown Object (File)
Sep 8 2024, 7:37 AM
Unknown Object (File)
Sep 7 2024, 5:57 AM
Unknown Object (File)
Sep 6 2024, 5:26 PM
Unknown Object (File)
Jul 10 2024, 9:55 AM
Unknown Object (File)
Jul 5 2024, 8:10 PM
Unknown Object (File)
Jul 3 2024, 11:21 AM
Subscribers
None

Details

Summary

This function is needed for (nearly) all OFW PCI(e) drivers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mmel retitled this revision from to OFW: Add helper function for parsing PCI "ranges" property..
mmel updated this object.
mmel edited the test plan for this revision. (Show Details)
mmel added reviewers: imp, nwhitehorn, andrew, kib.
mmel set the repository for this revision to rS FreeBSD src repository - subversion.
mmel added a project: ARM.

What pci drivers do we have that could use this?

sys/dev/ofw/ofw_pci.c
112

It looks a bit odd using (*ranges)[i] som any times, perhaps create a variable to point at *ranges?

I'm not 100% sure, but probably all arm PCIe drivers have 'ranges' property. To be specific, each one who have I/O, memory and/or config space mapped to fixed (or configurable) address in host address space.

sys/dev/ofw/ofw_pci.c
112

oki, i will do it

On PPC, instead of a utility function, we have a common newbus base class that does this (powerpc/ofw/ofw_pci*). These remove 99% of the boilerplate from PCI bus drivers as well. I'd prefer that approach on ARM to new functions.

Yes, it's definitely better way.