Commit Graph

37 Commits

Author SHA1 Message Date
fair 4c351f243e %x -> 0x%x 1997-07-29 09:58:04 +00:00
pk 63fa13065c #include "locators.h" 1997-07-19 21:43:54 +00:00
jtk 9388f271a9 use locator defines in "locators.h" to index cf_loc[] 1997-07-17 02:12:50 +00:00
thorpej cf016f61f4 foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.
1997-06-24 00:56:28 +00:00
pk 4269e0eab1 xdsize(): only call xdopen()/xdclose() if not already open, per the
current `openmask'.
1997-06-18 20:45:03 +00:00
pk 1ab49e584f Avoid "false positives" in match routines. 1997-06-10 20:59:10 +00:00
pk ec02e14ae2 Remove all `bustype' arguments from map[io]dev() and REG2PHYS(). 1997-05-24 20:16:06 +00:00
pk d8fc2afd1e Replace `cpumod' with `cpuinfo.cpu_type' equivalents. 1997-03-10 23:01:40 +00:00
pk 841d1ec634 Comply with recent autoconfiguration changes. Diffs graciously
supplied by Chris Demetriou.
1996-12-10 22:54:46 +00:00
christos 8d9699acda backout previous kprintf change 1996-10-13 02:59:55 +00:00
christos 19d8368f2f printf -> kprintf, sprintf -> ksprintf 1996-10-11 00:44:42 +00:00
chuck cfdb99f44c repair XDC_HWAIT macro to handle the fact that waithead is now
unsigned.   should fix xdc watchdog timeouts noted in port-sparc
by nathanw@mit.edu.
1996-08-12 20:19:27 +00:00
christos a897ec996a Remove dependency on <sys/cpu.h> 1996-04-22 02:42:00 +00:00
pk e4394459a1 `bootdv' is gone. Instead, set the device pointer in the `struct bootpath'
that is passed in the attach arguments.
1996-04-10 20:46:05 +00:00
christos dc6ff48df6 Eliminated dependencies on dev_conf.h 1996-04-01 17:29:44 +00:00
pk 2f3ec93250 Various cleanup; mostly trailing spaces/tabs. 1996-03-31 22:38:29 +00:00
thorpej 3cd14f7597 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 02:00:30 +00:00
christos 4b636d71eb cast argument to probeget() 1996-03-16 23:28:37 +00:00
christos 03b701e393 Bring prototypes into scope and fix compiler warnings. 1996-03-14 19:44:30 +00:00
chuck 9fee13d104 Fix two bugs reported by Don Koch <aardvark@poirot.krl.com> (PR#2169).
[1] check return value from malloc() for NULL before trying to bzero it.
 [2] use "=" rather than "|=" when writing to CSR (otherwise you may
	ACK something you don't mean to!).
1996-03-04 20:11:32 +00:00
pk 3d182fe265 Use CPU-type macros 1996-02-25 21:53:49 +00:00
thorpej a246f6c835 Fixup some RCS ids. 1996-02-22 06:50:49 +00:00
chuck 2accbfeefb - moved disk_busy() call from xdstrategy() to xdc_startbuf()
[prevents disk_unbusy panic when disk is loaded (if no
	free IOPBs, xdstrategy() would queue the buffer for pickup
	by xdcintr() but xdcintr() would never call disk_busy().
	xdc_startbuf() is a better place since all bufs are routed
	through here]   problem detected by girish@dworkin.wustl.edu,
	diagnosed and corrected by me.
- move disk_unbusy() call in xdc_remove_iorq() before the call to
	XDC_FREE() [don't want to access a data structure that was just put
	on a free list]
1996-02-08 04:40:33 +00:00
chuck ca80988399 - call mapiodev() with sizeof(struct xdc) rather than ra_len (which is
zero since xdcmatch no longer sets it).   [if you call mapiodev()
	with a zero size it will reuse the KVA it returns, swiping the device
	out from under you!]
 - make xdc->iopbase point in the kernels DVMA space rather than at the
	normal malloc'd KVA.   this isn't compatable with sun4m [doesn't
	have a kernel DVMA space] and will need to be changed later (XXX).
 - move disk_attach() to before reading the disk label as per Jason.
	otherwise we are reading into an unallocated buffer (oops!)
1996-01-13 03:35:53 +00:00
chuck 3ef3001bec nuke uneeded variable in match function. 1996-01-12 23:06:23 +00:00
chuck d14b5cb80e we no longer need to add in the offset to the mapped VA to get the correct
device address (bus_tmp, bus_map, and mapiodev now do this for us).

also, we handle all our mappings, so don't have obio.c do any for us
(i.e. don't set ra->ra_len in xdcmatch).
1996-01-12 22:43:55 +00:00
thorpej 5b39541e48 New generic disk framework. Highlights:
- New metrics handling.  Metrics are now kept in the new
	  `struct disk'.  Busy time is now stored as a timeval, and
	  transfer count in bytes.

	- Storage for disklabels is now dynamically allocated, so that
	  the size of the disk structure is not machine-dependent.

	- Several new functions for attaching and detaching disks, and
	  handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
1996-01-07 22:01:38 +00:00
pk f840d96cfe Adapt to changed mapiodev() interface.
Use new DVMA routines.
1995-12-11 12:40:20 +00:00
chuck 1779adf6be minor cleanups:
- don't let pcyl go unassigned if we have a non-sunos disklabel.
		if nothing else, guess pcyl = ncyl + acyl.
	- don't use bogus disklabel data if disk label is invalid
		(xdgetdisklabel() now returns if label was ok or not).
	- move xddriver decl. before start of actual code (cleanup).
1995-09-25 20:12:44 +00:00
chuck 2aff99a206 bug fix: xddummystrat() was clearing all but B_BUSY when it should
have been clearing just B_BUSY (s/B_BUSY/~B_BUSY/).    this
	fixes hard hang when reading disklabel when booting system.
minor clean up: added a few prototypes and only fool with bootpath
	if booting the system (in xdattach).
1995-09-25 16:02:09 +00:00
chuck 4408ec71bf init bad144 table before we actually try and read anything from the
disk, rather than init'ing after reading block 0 [in case we get an
error reading block zero].
1995-09-24 00:27:59 +00:00
pk 4025edc861 Make this compile again by calling readdisklabel() with a dummy strategy routine.
XXX - need some reorganization to this from xdopen().
1995-09-18 23:26:39 +00:00
pk a3bb091c9e Do bootpath matching. 1995-08-18 22:03:59 +00:00
pk ced95e1824 update from Chuck 1995-08-01 21:06:55 +00:00
pk 12bdf1b787 KNFify a bit. 1995-07-05 19:55:02 +00:00
pk 9013a7a6e2 Add xxread/xxwrite. 1995-07-05 13:34:10 +00:00
pk c7df493055 SMD disk driver, from Chuck Cranor. 1995-06-26 23:06:57 +00:00