Home | History | Annotate | Download | only in mca
History log of /src/sys/dev/mca/mca.c
RevisionDateAuthorComments
 1.34  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.33  24-Apr-2021  thorpej branches: 1.33.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.32  14-Jul-2016  msaitoh branches: 1.32.34;
- Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.
 1.31  03-Jun-2011  matt branches: 1.31.12; 1.31.30;
-CFATTACH_DECL(foo, sizeof(struct device),
+CFATTACH_DECL_NEW(foo, 0,
 1.30  12-May-2009  cegger branches: 1.30.4; 1.30.6; 1.30.10;
struct device * -> device_t, no functional changes intended.
 1.29  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.28  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.27  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.26  28-Apr-2008  martin branches: 1.26.8; 1.26.14;
Remove clause 3 and 4 from TNF licenses
 1.25  08-Apr-2008  cegger branches: 1.25.2; 1.25.4;
use aprint_*_dev and device_xname
 1.24  19-Oct-2007  ad branches: 1.24.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.23  11-Apr-2007  garbled branches: 1.23.8; 1.23.10; 1.23.14;
Remove the define of MCA_MAX_SLOTS from mcareg.h, and include
mca_machdep.h, because the maximum number of slots is inherently MD.
 1.22  16-Nov-2006  christos branches: 1.22.4; 1.22.8; 1.22.10;
__unused removal on arguments; approved by core.
 1.21  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.20  11-Dec-2005  christos branches: 1.20.20; 1.20.22;
merge ktrace-lwp.
 1.19  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.18  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.17  04-Feb-2005  perry branches: 1.17.6;
de-__P
 1.16  30-Aug-2004  drochner branches: 1.16.4; 1.16.6;
use the locator-passing variant of autoconf submatch and use constants
from locators.h
 1.15  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.14  22-Apr-2004  itojun sprintf -> snprintf
 1.13  01-Jan-2003  thorpej branches: 1.13.2;
Use aprint_normal() in cfprint routines.
 1.12  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.11  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.10  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.9  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.8  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.7  24-Nov-2001  jdolecek don't need opt_mcaverbose.h here
print 'memory configured' instead of just 'configured' for memory expansion
cards
 1.6  13-Nov-2001  lukem add RCSID
 1.5  27-Apr-2001  jdolecek branches: 1.5.2;
Introduce mca_match_disabled() - this returns true if cards with particular
id should be handled even through it's marked as disabled in POS registers.
There are some cards which need this due to nonstandard hw design.
 1.4  31-Mar-2001  jdolecek add year 2001 to copyright for NetBSD
 1.3  23-Mar-2001  jdolecek cosmetic change for autoconf printing: for memory extension cards,
just print ": configured" if they are enabled; they don't need any
special driver to work, printing "not configured" might be confusing
 1.2  14-Feb-2001  jdolecek branches: 1.2.2;
remove mca_issupp() and just use UNCONF for unknown devices, like other
buses do - array of 'supported' peripheals makes addition of new stuff
unnecessarily harder
 1.1  11-May-2000  jdolecek branches: 1.1.6;
MI part of MicroChannel Architecture bus support

This work is based on code written by Scott D. Telford, the IBM
Token Ring card attachment was written by Gregory McGarry.

XXX this is still very experimental and development version; use at your
XXX own risk
 1.1.6.5  21-Apr-2001  bouyer Sync with HEAD
 1.1.6.4  27-Mar-2001  bouyer Sync with HEAD.
 1.1.6.3  12-Mar-2001  bouyer Sync with HEAD.
 1.1.6.2  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.1.6.1  11-May-2000  bouyer file mca.c was added on branch thorpej_scsipi on 2000-11-20 11:41:30 +0000
 1.2.2.6  03-Jan-2003  thorpej Sync with HEAD.
 1.2.2.5  18-Oct-2002  nathanw Catch up to -current.
 1.2.2.4  08-Jan-2002  nathanw Catch up to -current.
 1.2.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.2.2.2  21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1  09-Apr-2001  nathanw Catch up with -current.
 1.5.2.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.5.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.5  04-Feb-2005  skrll Sync with HEAD.
 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.6.1  12-Feb-2005  yamt sync with head.
 1.16.4.1  29-Apr-2005  kent sync with -current
 1.17.6.4  27-Oct-2007  yamt sync with head.
 1.17.6.3  03-Sep-2007  yamt sync with head.
 1.17.6.2  30-Dec-2006  yamt sync with head.
 1.17.6.1  21-Jun-2006  yamt sync with head.
 1.20.22.2  10-Dec-2006  yamt sync with head.
 1.20.22.1  22-Oct-2006  yamt sync with head
 1.20.20.1  18-Nov-2006  ad Sync with head.
 1.22.10.1  11-Jul-2007  mjf Sync with head.
 1.22.8.2  23-Oct-2007  ad Sync with head.
 1.22.8.1  27-May-2007  ad Sync with head.
 1.22.4.1  15-Apr-2007  yamt sync with head.
 1.23.14.1  25-Oct-2007  bouyer Sync with HEAD.
 1.23.10.1  06-Nov-2007  matt sync with HEAD
 1.23.8.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.24.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.25.4.3  16-May-2009  yamt sync with head
 1.25.4.2  04-May-2009  yamt sync with head.
 1.25.4.1  16-May-2008  yamt sync with head.
 1.25.2.1  18-May-2008  yamt sync with head.
 1.26.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.26.8.1  28-Apr-2009  skrll Sync with HEAD.
 1.30.10.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.30.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.30.4.1  12-Jun-2011  rmind sync with head
 1.31.30.1  05-Oct-2016  skrll Sync with HEAD
 1.31.12.1  03-Dec-2017  jdolecek update from HEAD
 1.32.34.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.32.34.1  22-Mar-2021  thorpej Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.
 1.33.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed