Home | History | Annotate | Download | only in eisa
History log of /src/sys/dev/eisa/eisa.c
RevisionDateAuthorComments
 1.50  13-May-2024  msaitoh s/of of/of/ in comment.
 1.49  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.48  24-Apr-2021  thorpej branches: 1.48.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.47  27-Jan-2021  thorpej branches: 1.47.2;
Add eisa_compatible_match() and eisa_compatible_lookup().
 1.46  11-Jul-2016  msaitoh branches: 1.46.32;
KNF. No functional change.
 1.45  06-Apr-2008  cegger branches: 1.45.48; 1.45.68;
use aprint_*_dev and device_xname
 1.44  26-Mar-2008  matt use device_t & cfdata_t
 1.43  26-Mar-2008  matt "split" softc/device_t. (since softc was a struct device, use a split softc
size of 0).
 1.42  19-Oct-2007  ad branches: 1.42.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.41  16-Nov-2006  christos branches: 1.41.8; 1.41.22; 1.41.24; 1.41.28;
__unused removal on arguments; approved by core.
 1.40  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.39  11-Dec-2005  christos branches: 1.39.20; 1.39.22;
merge ktrace-lwp.
 1.38  25-Aug-2005  drochner kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
then fail
else
ask device match function

This is handled by config_stdsubmatch() now.
 1.37  25-Aug-2005  drochner replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
 1.36  27-Feb-2005  perry branches: 1.36.4;
nuke trailing whitespace
 1.35  01-Sep-2004  drochner branches: 1.35.4; 1.35.6;
use the locator passing config_found/submatch, and limit use of the
"locators.h" header to the .c file
 1.34  30-Aug-2004  drochner 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.33  23-Aug-2004  thorpej - Use ANSI function decls.
- Sprinkle some static around.
- Sprinkle some const around.
 1.32  22-Apr-2004  itojun sprintf -> snprintf
 1.31  01-Jan-2003  thorpej branches: 1.31.2;
Use aprint_normal() in cfprint routines.
 1.30  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.29  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.28  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.27  27-Sep-2002  thorpej Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller. Use it
rather than invoking cfattach->ca_match directly.
 1.26  27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.25  13-Nov-2001  lukem add RCSID
 1.24  18-Jan-2001  jdolecek branches: 1.24.2; 1.24.4;
constify
 1.23  01-Sep-2000  ad - Simplify eisa_devinfo().
- New KNF.
 1.22  30-Mar-2000  augustss Remove register declarations.
 1.21  08-Jun-1998  thorpej branches: 1.21.14;
Nuke __BROKEN_INDIRECT_CONFIG.
 1.20  12-Jan-1998  thorpej Slight change to previous.
 1.19  12-Jan-1998  thorpej Adjust for config changes.
 1.18  13-Sep-1997  enami Declare EISAVERBOSE by defopt in files.eisa. Include opt_eisaverbose.h
in eisa.c.
 1.17  06-Jun-1997  thorpej branches: 1.17.4;
Pull thorpej-bus-dma branch into mainline.
 1.16  05-Dec-1996  cgd branches: 1.16.8;
update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
 1.15  21-Oct-1996  thorpej New bus.h implementation/interface:
- No more distinction between i/o-mapped and memory-mapped
devices. It's all "bus space" now, and space tags
differentiate the space with finer grain than the
bus chipset tag.
- Add memory barrier methods.
- Implement space alloc/free methods.
- Implement region read/write methods (like memcpy to/from
bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.
 1.14  13-Oct-1996  christos backout kprintf changes
 1.13  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.12  27-Aug-1996  cgd change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
 1.11  09-Apr-1996  cgd make the EISA code look a bit more like the PCI code, in the way
the bus is configured, interrupts are handled, etc. machine-dependent
header (machine/eisa/eisa_machdep.h) defines eisa_chipset_tag_t and
eisa_intr_handle_t types, and the following functions:
eisa_attach_hook()
eisa_maxslots()
eisa_intr_map()
eisa_intr_string()
eisa_intr_establish()
eisa_intr_disestablish()
Don't define the interrupt establish/disestablish functions directly
in terms of the ISA functions any more (on some wacked out systems,
there can be a difference).
 1.10  06-Apr-1996  cgd kill some pasted spaces.
 1.9  30-Mar-1996  christos - remove unused variable
- add missing argument to printf statement
 1.8  17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.7  14-Mar-1996  cgd These devices don't actually need softc's that are supersets of 'struct
device.' No point in adding that complexity + space if they're not needed,
so axe them.
 1.6  08-Mar-1996  cgd remember the bus_chipset_tag_t given by our parent, and pass it on to
children. use I/O space access routines defined in <machine/bus.h>
when examining I/O space for slot ID information.
 1.5  02-Mar-1996  cgd change printing of unknown device names when not (BUS)VERBOSE slightly
 1.4  02-Mar-1996  cgd clean up some diagnostic printfs
 1.3  02-Mar-1996  cgd if not EISAVERBOSE, don't say that vendor/product is "unknown," just say
what it is.
 1.2  27-Feb-1996  cgd use config_found_sm(), rather than config_search+config_attach()+glue, to
attach subdevices.
 1.1  27-Feb-1996  cgd Better EISA autoconfiguration, per PR 1959.
 1.16.8.1  13-May-1997  thorpej Pass the EISA bus dma tag to children.
 1.17.4.1  16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.21.14.2  11-Feb-2001  bouyer Sync with HEAD.
 1.21.14.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.24.4.2  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.24.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.24.2.3  03-Jan-2003  thorpej Sync with HEAD.
 1.24.2.2  18-Oct-2002  nathanw Catch up to -current.
 1.24.2.1  14-Nov-2001  nathanw Catch up to -current.
 1.31.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.31.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.31.2.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.4  18-Sep-2004  skrll Sync with HEAD.
 1.31.2.3  03-Sep-2004  skrll Sync with HEAD
 1.31.2.2  25-Aug-2004  skrll Sync with HEAD.
 1.31.2.1  03-Aug-2004  skrll Sync with HEAD
 1.35.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.35.4.1  29-Apr-2005  kent sync with -current
 1.36.4.3  27-Oct-2007  yamt sync with head.
 1.36.4.2  30-Dec-2006  yamt sync with head.
 1.36.4.1  21-Jun-2006  yamt sync with head.
 1.39.22.2  10-Dec-2006  yamt sync with head.
 1.39.22.1  22-Oct-2006  yamt sync with head
 1.39.20.1  18-Nov-2006  ad Sync with head.
 1.41.28.1  25-Oct-2007  bouyer Sync with HEAD.
 1.41.24.1  06-Nov-2007  matt sync with HEAD
 1.41.22.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.41.8.1  23-Oct-2007  ad Sync with head.
 1.42.16.2  02-Jun-2008  mjf Sync with HEAD.
 1.42.16.1  03-Apr-2008  mjf Sync with HEAD.
 1.45.68.1  05-Oct-2016  skrll Sync with HEAD
 1.45.48.1  03-Dec-2017  jdolecek update from HEAD
 1.46.32.1  03-Apr-2021  thorpej Sync with HEAD.
 1.47.2.2  22-Mar-2021  thorpej Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.
 1.47.2.1  22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.48.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed