Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/sparc64/dev/ebus.c
RevisionDateAuthorComments
 1.69  22-Jan-2022  thorpej Change the devhandle_from_*() functions to also take a "super handle",
from which the newly created handle will inherit it's implementation.
The root implementation for a new handle type is used if an invalid
"super handle" is passed.
 1.68  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.67  10-May-2021  thorpej branches: 1.67.4;
Associate the OpenBoot / OpenFirmware node with attached devices
at config_found() time.
 1.66  24-Apr-2021  thorpej branches: 1.66.2; 1.66.4;
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.65  04-Jan-2021  thorpej branches: 1.65.2;
malloc(9) -> kmem(9) -- just the simple, straightforward conversions for now.
 1.64  10-Nov-2019  chs branches: 1.64.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.63  18-Jan-2018  mrg branches: 1.63.4;
merge the ebus@pci attach output to be like most PCI drivers:

ebus0 at pci1 dev 1 function 0
ebus0: Sun Microsystems PCIO Ebus2, revision 0x01

becomes:

ebus0 at pci1 dev 1 function 0: Sun Microsystems PCIO Ebus2, revision 0x01
 1.62  18-Oct-2014  snj src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.61  19-Sep-2012  jdc Match the Altera ebus bridge, as found on the Tadpole SPARCle.
 1.60  30-Jan-2012  mrg branches: 1.60.6;
avoid writing 1 byte beyond the end of the string promlib.c has given us.
instead of forcing a nul byte afterwards, KASSERT() that the final byte
already is a nul. if there are broken proms... well, we can fix them.

this, plus one more change, allows my SS20 to boot multiuser.
 1.59  20-Jul-2011  macallan branches: 1.59.2; 1.59.6;
add per ivec event counters
 1.58  01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.57  02-Jun-2011  christos split auxio, ebus, psycho, sab.
 1.56  18-Mar-2011  mrg branches: 1.56.2;
re-add local ebusvar.h, and use it to share between ebus.c and ebus_mainbus.c
 1.55  11-Mar-2011  nakayama Remove unnecessary headers.
 1.54  11-Mar-2010  mrg branches: 1.54.2; 1.54.4;
various aprint_* fixes.
 1.53  13-Oct-2008  nakayama branches: 1.53.14;
Remove unnecessary includes.
 1.52  29-May-2008  mrg branches: 1.52.4;
remove clause #3 from my license where there are no other
copyright holders involved.
 1.51  05-Apr-2008  cegger branches: 1.51.2; 1.51.4; 1.51.6;
use aprint_*_dev and device_xname
OK martin
 1.50  13-Feb-2006  cdi branches: 1.50.68;
ANSIfy: u_intN_t -> uintN_t, remove __P(), fix function definitions.
 1.49  11-Feb-2006  cdi ANSIfication: u_intN_t -> uintN_t, use ANSI function declarations/definitions
instead of K&R ones.
 1.48  11-Dec-2005  christos branches: 1.48.2; 1.48.4; 1.48.6;
merge ktrace-lwp.
 1.47  31-May-2005  christos branches: 1.47.2;
- sprinkle const
- avoid variable shadow
 1.46  24-Apr-2004  kleink Update for new pci_devinfo(9) signature.
 1.45  21-Mar-2004  pk Use prom_getpropstring().
 1.44  21-Mar-2004  martin Make sure prom_getprop is called with the size pointed to by nitem
initialized. (Some of these are more paranoia, but two were actual bugs.)
Print error codes in some panic messages.
 1.43  17-Mar-2004  pk Rename PROM_getprop*() => prom_getprop*().
 1.42  09-Nov-2003  martin Nuke bcopy/bzero.
 1.41  27-Aug-2003  mrg change PROM_getprop() from taking a "void **" for the storage, to a
"void *", and do the extra de-reference directly in the function. this
avoids having to cast dozens of different types to "void **", which sets
of GCC3's strict-aliasing. testing by martin@
 1.40  15-Jul-2003  lukem __KERNEL_RCSID()
 1.39  17-May-2003  nakayama branches: 1.39.2;
Avoid strict-alias warnings in gcc 3.3.
 1.38  03-May-2003  wiz DMA, not dma nor Dma.
 1.37  01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.36  10-Dec-2002  pk Remove the `flags' argument from bus_intr_establish().
 1.35  10-Dec-2002  pk bus_intr_establish() signature change.
The additional `fast trap' argument is ignored in these drivers.
BUS_INTR_ESTABLISH_FASTTRAP and BUS_INTR_ESTABLISH_SOFTINTR are no longer used.
 1.34  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.33  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.32  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31  16-Mar-2002  mrg convert to using <dev/ebus/ebusvar.h> and it's struct member names.
 1.30  15-Mar-2002  eeh Get PCI working with the new bus_space*.
 1.29  22-Oct-2001  mrg branches: 1.29.4;
clean up ebus:
- kill dead dma code
- remove icky self->dv_parent casts

audiocs @ ebus doesn't crash anymore, but it doesn't appear to work
yet either...
 1.28  26-Sep-2001  eeh getprop* -> PROM_getprop*
 1.27  24-Sep-2001  eeh Change bus_space_mmap() signature to the official one.
 1.26  10-Sep-2001  eeh Get rid of spurious OF_getprop().
 1.25  10-Sep-2001  eeh Sun Blade 100 support (and some psycho fixes from Jason Wright).
 1.24  25-Jul-2001  eeh branches: 1.24.2;
Don't match ebus nodes not called "ebus" like the ones on hme cards.
 1.23  20-Jul-2001  eeh PCI overhaul.
 1.22  04-Jun-2001  mrg branches: 1.22.2;
fix lint exposed by GCC 3.0 20010604 (prerelease).
 1.21  18-May-2001  mrg correct some comments. <80 char debug statements.
 1.20  18-May-2001  mrg do not force ebus interrupts to have bit 0x20 set.
 1.19  08-Jan-2001  pk branches: 1.19.2;
ebus_find_node(): plug memory leak; make debug output meaningfuller.
 1.18  04-Dec-2000  fvdl Warning police. Mostly useless format warnings. Switch Makefile for
kernel compiles to the warning flags that other ports also use.
 1.17  27-Jul-2000  mrg ebus sc_is is a pointer now, already.
 1.16  12-Jul-2000  pk If there is no "interrupt-map" property on the ebus node, assume the
child "interrupt" properties are already in a format suitable for
the parent bus.
 1.15  09-Jul-2000  pk Add a `device class' interrupt level argument (from machine/intr.h)
to bus_interrupt_establish().

It's currently only used in sparc64/dev/psycho.c to assign a CPU interrupt
level to devices in PCI slots.
 1.14  29-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.13  26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.12  24-Jun-2000  eeh Enable interrupts.
 1.11  12-Jun-2000  eeh branches: 1.11.2;
ebus_ca needs to specify enough memory to hold an ebus_softc, not a struct device.
 1.10  08-Jun-2000  mrg ensure an ebus really does exist in ebus_match; fixes spurious attachments with the ebus on a hme pci card.
 1.9  17-May-2000  mrg branches: 1.9.2;
expand a comment slightly.
 1.8  22-Apr-2000  mrg whole bunch of changes:
- merge IOMMU DVMA code from sbus/psycho into iommu.c. this code was
identical and a few minor inconsistencies had crept in. this way
keeps them all in sync.
- with this code gone from psycho, merge the psycho.c and psycho_bus.c
files. same with ebus/ebus_bus.c. delete the _bus.c files.
- add a _ds_boundary member to the dma segment structure, so that later
dma mappings can find this value.
- set _ds_boundary in machdep.c:_bus_dmamem_alloc().
- kill much dead code.
 1.7  15-Apr-2000  mrg - auxio cleanup and sbus support.
- make GENERIC64 include GENERIC and set the 3 optoins it needs. suggested
by hubert feyrer.
- add a comment that we maybe should use the `bpp' driver, not the lpt, on
the ebus because the `bpp' driver does DMA already.
- ebus_attach_args got a member renamed
 1.6  13-Apr-2000  mrg avoid a potential memory leak.
 1.5  08-Apr-2000  mrg - store the ebus's parent so we can find the IOMMU
- use generic iommu routines in the ebus code (uses the above)
- add some more comments.
 1.4  05-Apr-2000  mrg be slightly more verbose when attaching ebus devices.
 1.3  05-Jun-1999  mrg branches: 1.3.2; 1.3.4;
find ebus device INO values via the "interrupt-map" and "interrupt-map-mask" properties.
 1.2  04-Jun-1999  mrg avoid uninitalised pointers.
 1.1  04-Jun-1999  mrg support for the UltraSPARC `Extension Bus' found on the PCI machines.
the bus space/dma code is cloned from the PCI code to do the same thing
which itself was cloned from the sbus bus space/dma code. the bus dma
code is non-functional at this point.
 1.3.4.3  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.3.4.2  08-Dec-2000  bouyer Sync with HEAD.
 1.3.4.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.3.2.1  21-Jun-1999  thorpej Sync w/ -current.
 1.9.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.11.2.2  15-May-2001  he Pull up revision 1.17 (requested by martin):
Fix a bug: ``sc'' is a pointer, so use it correctly.
 1.11.2.1  18-Jul-2000  mrg pullup the contents of -current arch/sparc64. this gives us significant
ultrasparc PCI support (ultra5, ultra10, AXi, and E250 tested so far),
plus many other small fixes. netbooting is now supported.
 1.19.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.22.2.5  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.22.2.4  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.22.2.3  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.22.2.2  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.22.2.1  03-Aug-2001  lukem update to -current
 1.24.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.29.4.5  03-Jan-2003  thorpej Sync with HEAD.
 1.29.4.4  11-Dec-2002  thorpej Sync with HEAD.
 1.29.4.3  18-Oct-2002  nathanw Catch up to -current.
 1.29.4.2  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.29.4.1  22-Oct-2001  nathanw file ebus.c was added on branch nathanw_sa on 2002-04-01 07:43:00 +0000
 1.39.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.39.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.39.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.39.2.1  03-Aug-2004  skrll Sync with HEAD
 1.47.2.1  21-Jun-2006  yamt sync with head.
 1.48.6.1  22-Apr-2006  simonb Sync with head.
 1.48.4.1  09-Sep-2006  rpaulo sync with head
 1.48.2.1  18-Feb-2006  yamt sync with head.
 1.50.68.2  17-Jan-2009  mjf Sync with HEAD.
 1.50.68.1  02-Jun-2008  mjf Sync with HEAD.
 1.51.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.51.4.2  11-Aug-2010  yamt sync with head.
 1.51.4.1  04-May-2009  yamt sync with head.
 1.51.2.1  04-Jun-2008  yamt sync with head
 1.52.4.1  19-Oct-2008  haad Sync with HEAD.
 1.53.14.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.54.4.1  06-Jun-2011  jruoho Sync with HEAD.
 1.54.2.2  12-Jun-2011  rmind sync with head
 1.54.2.1  21-Apr-2011  rmind sync with head
 1.56.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.59.6.1  18-Feb-2012  mrg merge to -current.
 1.59.2.2  30-Oct-2012  yamt sync with head
 1.59.2.1  17-Apr-2012  yamt sync with head
 1.60.6.2  03-Dec-2017  jdolecek update from HEAD
 1.60.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.63.4.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.64.8.1  03-Apr-2021  thorpej Sync with HEAD.
 1.65.2.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.66.4.1  31-May-2021  cjep sync with head
 1.66.2.1  13-May-2021  thorpej Sync with HEAD.
 1.67.4.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed