Home | History | Annotate | Download | only in pci
History log of /src/sys/arch/macppc/pci/u3.c
RevisionDateAuthorComments
 1.12  21-Jan-2022  thorpej Don't bother with devhandle_from_of() if we're just forwarding along
our own node; use device_handle(self) instead.
 1.11  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.10  24-Apr-2021  thorpej branches: 1.10.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.9  13-Apr-2018  macallan branches: 1.9.16;
track bus-range for every bus and restrict config space accesses to that
range. Now pcictl pci* list no longer crashes the kernel.
 1.8  02-Oct-2015  msaitoh branches: 1.8.16;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.7  30-Apr-2013  macallan branches: 1.7.12;
zero sc_iot and sc_memt before using them
from Phileas Fogg
while there, set sc_dev properly
 1.6  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.5  30-Jun-2011  matt branches: 1.5.2; 1.5.12;
Modify mapiodev to take a third argument indicating whether the space
should be prefetchable (true) or not (false).
 1.4  18-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.3  17-May-2011  dyoung branches: 1.3.2;
PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name. Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
 1.2  17-Oct-2007  garbled branches: 1.2.42; 1.2.48;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.1  05-Aug-2006  sanjayl branches: 1.1.4; 1.1.8; 1.1.14; 1.1.20; 1.1.28; 1.1.38; 1.1.40; 1.1.42; 1.1.44;
1st cut of Powermac G5 support (uses bridge mode).
 1.1.44.1  25-Oct-2007  bouyer Sync with HEAD.
 1.1.42.1  18-Oct-2007  yamt sync with head.
 1.1.40.1  06-Nov-2007  matt sync with HEAD
 1.1.38.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.1.28.3  07-Jun-2007  garbled Convert macppc to powerpc bus_space. Lots of work here from Matt Thomas,
as well as the common ofwoea code from myself. Compile tested only,
still probably needs some fine tuning.

Also in this commit:
Convert macppc to new shared ofwoea routines.
Lots of KNF.
 1.1.28.2  06-May-2007  macallan switch macppc over to generic PCI code from arch/powerpc/pci
 1.1.28.1  05-May-2007  macallan ansify, sprinkle static. No functional change.
 1.1.20.1  23-Oct-2007  ad Sync with head.
 1.1.14.3  27-Oct-2007  yamt sync with head.
 1.1.14.2  30-Dec-2006  yamt sync with head.
 1.1.14.1  05-Aug-2006  yamt file u3.c was added on branch yamt-lazymbuf on 2006-12-30 20:46:30 +0000
 1.1.8.2  09-Sep-2006  rpaulo sync with head
 1.1.8.1  05-Aug-2006  rpaulo file u3.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:41:14 +0000
 1.1.4.2  11-Aug-2006  yamt sync with head
 1.1.4.1  05-Aug-2006  yamt file u3.c was added on branch yamt-pdpolicy on 2006-08-11 15:42:14 +0000
 1.2.48.1  06-Jun-2011  jruoho Sync with HEAD.
 1.2.42.1  31-May-2011  rmind sync with head
 1.3.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.5.12.3  03-Dec-2017  jdolecek update from HEAD
 1.5.12.2  23-Jun-2013  tls resync from head
 1.5.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.2.1  30-Oct-2012  yamt sync with head
 1.7.12.1  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.8.16.1  16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.9.16.2  04-Apr-2021  thorpej Associate the OpenFirmware phandle associated with a found device (including
PCI bus instances) by using CFARG_DEVHANDLE.
 1.9.16.1  23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.10.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed