Commit Graph

44 Commits

Author SHA1 Message Date
minoura be7984a052 First step toward network boot.
By Takeshi Nakayama <tn@catvmics.ne.jp>.
1999-09-23 15:14:57 +00:00
thorpej 0d7a86c356 - Centralize the declaration and clearing of `cold'.
- Call configure() after setting up proc0.
- Call initclocks() from configure(), after cpu_configure().  Once the
  clocks are running, clear `cold'.  Then run interrupt-driven
  autoconfiguration.
1999-09-17 20:11:56 +00:00
thorpej e8431098fe Add a mechanism to defer configuration of children until interrupts
are enabled.
1999-09-15 19:37:08 +00:00
thorpej 3b01d1b872 Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.
1999-09-15 18:10:33 +00:00
ragge 5ad2718e7c Add vax to user of device_register. 1999-06-20 00:51:37 +00:00
mrg 48c12bfeed revert previous. oops. 1999-04-21 02:37:07 +00:00
mrg 58540a2274 properly test the msgsz as "msgsz - len". from PR#7386 1999-04-21 02:31:49 +00:00
pk 1673c21984 Enable `device_register()' for the sparc. 1998-12-03 23:50:11 +00:00
thorpej f50fecdeaf Oops, fix uninitialzed variable in last. 1998-11-18 18:40:54 +00:00
thorpej 587f931901 Be a bit more precise about how we allow no deactivation support in
config_detach().
1998-11-18 18:40:08 +00:00
thorpej 3579ddab03 If the ca_activate entry point fails, make sure to restore the old
dv_flags.
1998-11-18 18:38:07 +00:00
thorpej ab1b371163 Implement config_detach(), mostly from Chris Demetriou, modified slightly
by Ken Hornstein and myself.

Add flags to struct device, and define one as "active".  Devices are
initially active from config_attach().  Their active state may be changed
via config_activate() and config_deactivate().

These new functions assume that the device being manipulated will recursively
perform the action on its children.

Together, config_deactivate() and config_detach() may be used to implement
interrupt-driven device detachment.  config_deactivate() will take care of
things that need to be performed at interrupt time, and config_detach()
(which must run in a valid thread context) finishes the job, which may
block.
1998-11-17 08:38:07 +00:00
cgd d58173741d kill the last remnants of __BROKEN_INDIRECT_CONFIG. (only the pica port
used it, and it's non-working and apparently slated for replacement.)
1998-08-31 22:28:04 +00:00
perry 275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
perry 730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
thorpej 387a1c5d41 Implement config_defer(), a generic mechanism to defer the configuration
of a device until all of its parent's children have been attached.
1998-06-09 18:46:12 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
drochner 7de20a5b45 Call device_register() on i386 too. 1997-09-20 14:16:43 +00:00
thorpej 2ac210b6e3 Call device_register() if __alpha__ || hp300 1996-12-17 08:59:15 +00:00
cgd 66764a1a2f Check for a new definition, __BROKEN_INDIRECT_CONFIG, and if it is _not_
defined:
	define match functions to take a struct cfdata * as their second
	argument, config_search() to take a struct cfdata * as its second
	argument, and config_{root,}search() to return struct cfdata *.

	remove 'cd_indirect' cfdriver element.

	remove config_scan().

	remove config_make_softc() as a seperate function, reintegrating
	its functionality into config_attach().

Ports will define __BROKEN_INDIRECT_CONFIG until their drivers prototypes
are updated to work with the new definitions, and until it is sure that
their indirect-config drivers do not assume that they have a softc
in their match routine.
1996-12-05 00:09:10 +00:00
christos f443b89c92 backout previous kprintf change 1996-10-13 02:32:29 +00:00
christos 60d201973e printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:46:11 +00:00
cgd 1e2b610d5a #ifdef __alpha__, call a machine-dependent function with new device
structure and 'aux', right before ca_attach is called for the
newly-attached device.  This allows the alpha port to do root device
autodetection without modifying every bus and device driver which could
be in the 'boot path.'  In the long run, it may make sense to make
this machine-independent.
1996-06-13 04:50:29 +00:00
cgd fbce6d4468 Make config_found_sm() (and therefore config_found()) and config_rootfound()
return a struct device * of attached device, or NULL if device attach failed,
rather than 1/0 for success/failure, so that code that bus code which needs
to know what the child device is doesn't have to open-code a hacked variant
of config_found().  Make config_attach() return struct device *, rather than
void, to facilitate that.
1996-04-04 06:06:18 +00:00
cgd 8c248b98cc change 'struct device' and 'struct evcnt' lists (alldevs and allevents) to
be TAILQ's.  TAILQ_HEAD's of those structs are now 'struct devicelist' and
'struct evcntlist', respectively.
1996-04-04 00:25:44 +00:00
thorpej 532e997971 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.
1996-03-17 00:57:14 +00:00
cgd c6a9e56518 Replace config_found() with config_found_sm(), which adds a cfmatch_t to the
argument list.  This allows easy 'submatching', which will eliminate a fair
bit of slightly tricky duplicated code from various busses.  config_found()
is now a #define in sys/device.h, which invokes config_found_sm().
1996-02-27 21:45:46 +00:00
christos 8a5b1b92e2 First pass at prototyping 1996-02-04 02:15:01 +00:00
mycroft 1948fcb3fa Add a new function config_scan(), which just calls a particular function
with each plausibly cfdata, ignoring the priority mechanism completely.
1994-11-04 06:40:11 +00:00
mycroft 9fdc2ecb99 Export struct matchinfo and mapply(). 1994-11-04 03:12:20 +00:00
mycroft 52a27c59d6 Calculate indirectness earlier, and stor it in the struct matchinfo. 1994-11-04 03:07:17 +00:00
mycroft 893b0e1f83 config_make_softc() needs pointer to parent; and fix a couple of other bogons. 1994-11-04 00:14:04 +00:00
mycroft 4afbef1f16 If cd_indirect is set in the parent, create a softc early and pass it to the
probe routine.
1994-11-03 22:01:09 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
mycroft 878839c40d Simplify the code to expand the dev array slightly, and make sure the size is
a power of 2.
1994-10-07 09:07:56 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
cgd 7424fd59cf reorg derivations, slightly. 1994-05-20 04:31:22 +00:00
glass 7e3eb8ad92 update to 4.4-lite + local changes 1994-05-20 04:15:04 +00:00
glass bb8fd0a2ac slightly more optimal fix from torek himself 1994-05-12 14:15:03 +00:00
glass 82809ca415 fix chopps, et al discovered bug in allocating cd_devs array 1994-05-12 05:21:45 +00:00
mycroft 21edb9924e Canonicalize all #includes. 1993-12-18 03:59:02 +00:00
glass 8ff8fa8046 runs up to and including configure().
todo: exceptions, interrupt support, make isrs affect vector table
kernel/user stacks
1993-08-15 23:01:58 +00:00
glass 7ffaf186bb baseline revision 1993-08-13 22:00:55 +00:00
glass 7318599b7c snapshot of intergration of torek's config 1993-08-13 13:19:41 +00:00