Home | History | Annotate | Download | only in pci
History log of /src/sys/arch/algor/pci/pcib.c
RevisionDateAuthorComments
 1.29  08-Feb-2024  andvar s/sharable/shareable in comments and documentation.
 1.28  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.27  24-Apr-2021  thorpej branches: 1.27.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.26  14-Nov-2020  thorpej branches: 1.26.2;
malloc(9) -> kmem(9)
 1.25  10-Nov-2019  chs branches: 1.25.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.24  09-Jul-2011  matt branches: 1.24.54;
Allow algor kernels to be built under either algor/algor64 or
evbmips-el/evbmips64-el. Note that MAXMAPARITITONS and majors numbers
differ between the two ports which is why two kernels are still needed.
 1.23  08-Jul-2011  matt Major update of algor.
Now uses generic mips bus_space.h bus_dma.h isa_machdep.h pci_machdep.h
Now uses evbmips versions of cpu.c isadma_bounce.c mcclock_isa.c
 1.22  01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.21  19-Aug-2009  dyoung Define, and hook into the isa_chipset_tag_t, pcib_isa_detach_hook().
 1.20  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.19  28-Apr-2008  martin branches: 1.19.8; 1.19.14;
Remove clause 3 and 4 from TNF licenses
 1.18  12-May-2006  tsutsui branches: 1.18.62; 1.18.64; 1.18.66;
According to the i8259 manual, EOI, R, and SL bits belong to OCW2 register
so rename them OCW3_* -> OCW2_*.
 1.17  11-Dec-2005  christos branches: 1.17.4; 1.17.6; 1.17.8; 1.17.12;
merge ktrace-lwp.
 1.16  30-Aug-2004  drochner branches: 1.16.12;
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.15  23-Apr-2004  itojun pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.14  02-Nov-2003  he Fix uninitialized error in pcib_print().
 1.13  01-Jan-2003  thorpej branches: 1.13.2;
Use aprint_normal() for cfprint() routines.
 1.12  02-Oct-2002  thorpej Fix script-o's in last.
 1.11  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.10  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9  22-Jun-2001  thorpej branches: 1.9.2; 1.9.8;
Check in work-in-progress of P-6032 support. This is not tested,
but is meant for back-up purposes.
 1.8  22-Jun-2001  thorpej Fill in one P-6032 snippet.
 1.7  21-Jun-2001  thorpej More ISA interrupt rototilling. I get *some* interrupts on a:

we1 at isa0 port 0x300-0x31f iomem 0xcc000-0xcffff irq 10
we1: WD8013WC Ethernet (16-bit)
we1: Ethernet address 00:00:c0:94:f6:72

...but still nothing on the PCIC.
 1.6  21-Jun-2001  thorpej Rototill ISA interrupt code. In particular, I have remembered most
of the horror that is the 8259 PIC.

PCMCIA interrupts still not working yet, but getting closer.
 1.5  15-Jun-2001  thorpej Yet more interrupt cleanup -- the platform mater interrupt establish
function now just takes an "irq", which is an index into the irqmap
table for that platform.
 1.4  10-Jun-2001  thorpej Hand off intr evcnt responsiblity in a reasonable way on the 5064.
 1.3  10-Jun-2001  thorpej Check in work-in-progress of generic ISA interrupt support. The
goal here is to get the P-5064 PCMCIA slots working, and serve as
the basis for P-6032 interrupt support.

PCMCIA interrupt auto-detection not working -- more work to be
done here.
 1.2  01-Jun-2001  thorpej The P-4032 has no ISA bridge/bus, so remove all P-4032 conditionals.
 1.1  28-May-2001  thorpej A port to the Algorithmics MIPS evaluation boards. We currently
support the P-5064, which has a QED RM5xxx CPU soldered on.

There is some skeletal support for the P-4032 (an older board, which
had an R4xxx CPU). There are some placeholders for the P-6032, which
is their newest board, but no real code yet (the P-6032 has a different
PCI controller, the Algorithmics BONITO).

There are still some (apprently softintr-related) problems with the
algor kernel, but it works well-enough to self-host.

Kudos to Allegro Networks for loaning me a P-5064 board on which to do
the port.
 1.9.8.3  03-Jan-2003  thorpej Sync with HEAD.
 1.9.8.2  18-Oct-2002  nathanw Catch up to -current.
 1.9.8.1  22-Jun-2001  nathanw file pcib.c was added on branch nathanw_sa on 2002-10-18 02:33:52 +0000
 1.9.2.1  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.13.2.2  03-Sep-2004  skrll Sync with HEAD
 1.13.2.1  03-Aug-2004  skrll Sync with HEAD
 1.16.12.1  21-Jun-2006  yamt sync with head.
 1.17.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.17.8.1  24-May-2006  yamt sync with head.
 1.17.6.1  01-Jun-2006  kardel Sync with head.
 1.17.4.1  09-Sep-2006  rpaulo sync with head
 1.18.66.3  19-Aug-2009  yamt sync with head.
 1.18.66.2  04-May-2009  yamt sync with head.
 1.18.66.1  16-May-2008  yamt sync with head.
 1.18.64.1  18-May-2008  yamt sync with head.
 1.18.62.1  02-Jun-2008  mjf Sync with HEAD.
 1.19.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.8.1  28-Apr-2009  skrll Sync with HEAD.
 1.24.54.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.25.8.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.26.2.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.27.8.1  03-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed