Commit Graph

807 Commits

Author SHA1 Message Date
mycroft 2dfbe4f961 Don't define _LOCORE here. 1996-02-02 20:05:08 +00:00
mycroft 9d9a70a5a2 Fix #includes. 1996-02-02 18:05:36 +00:00
mycroft fc9d84fb46 assym.s -> assym.h
(Some ports did this already.)
1996-02-02 02:34:09 +00:00
mycroft 88e512b693 LOCORE -> _LOCORE 1996-02-01 22:28:24 +00:00
thorpej b97cbfb606 Implement DIOCLOCK. It's a no-op in this driver. 1996-01-30 18:31:05 +00:00
gwr 427556aeab Move struct definitions to MD code. 1996-01-24 19:52:57 +00:00
thorpej 353f4388fb Use a shutdownhook to make sure the drive motor is turned off
at halt/reboot time, as suggested by Perry Metzger.
1996-01-16 19:35:06 +00:00
thorpej 8a5504241e Three distinct changes:
- Better disklabel handling.  While a disklabel isn't used
	  in the driver, some versions of the OpenPROM insist on
	  one being present in order to boot from floppy.  These
	  changes provide a default label (in a way similar to how
	  the SCSI disk driver provides a default) so that a user
	  can more easily place the label on the disk.

	- Fix semi-bug in bootpath handling.  It appears as if the
	  bootpath can appear in a couple of formats: "/fd@0,0", which
	  is what bootpath_fake() creates on v0 proms and may be
	  passed by some v2 proms, and "/fd0" which is what the
	  v2 prom on my SS2 passes.  We now handle both formats.

	- Use a mountroot hook to eject the floppy and wait for
	  the user to insert a filesystem floppy if we're the boot/root
	  device.
1996-01-15 00:14:42 +00:00
thorpej 3f8e0d27a6 Add a "mountroot hook" mechanism so that devices can take care of
special needs before being used in (*mountroot)().
1996-01-15 00:06:49 +00:00
chuck ef895a47d4 - call mapiodev() with sizeof(struct xyc) rather than ra_len (which is
zero since xycmatch 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 xyc->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:42:40 +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 695a034ccd change mapdev to panic if size == 0 to be safe. 1996-01-13 03:11:18 +00:00
chuck dfbaa33f05 we handle all our mappings, so don't have obio.c do any for us
(i.e. don't set ra->ra_len in the match function).
1996-01-12 23:08:57 +00:00
chuck 3ef3001bec nuke uneeded variable in match function. 1996-01-12 23:06:23 +00:00
chuck 93cc1b33e1 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 xycmatch).
1996-01-12 22:45:04 +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
chuck b5ddd8431d dmamatch never added in the offset for the dma registers to the VA,
and thus probed the wrong address on the 4/300 (but it worked because
it was probing the esp0 registers!).

now that bus_tmp() adds the offset in for us [as of obio 1.19] i
discoved that a byte access to the dma registers is not allowed.
so, i've change probeget to use a word access.
1996-01-12 22:03:39 +00:00
chuck afb262e8da improved handling of mapping of devices who's registers do not reside on
page boundaries:
 - change bus_tmp() to include the offset from the start of page in the
        returned KVA [rather than forcing each driver to add it back in
        individually]
 - changed bus_map() to include the offset from the start of page in the
        the returned value if a mapping is found in the PROM's KVA area
 - clarified a few comments
1996-01-12 21:44:16 +00:00
chuck c488310462 change mapdev() so that it includes the offset from the start of the
page in the virtual address it returns.
1996-01-12 21:22:46 +00:00
thorpej 43b4486bb3 Balance calls to disk_busy() and disk_unbusy() properly to avoid
dk_busy < 0 panics.  Count seeks.
1996-01-12 00:19:29 +00:00
pk f278cec042 Move bus_map() prototype here. 1996-01-11 21:55:57 +00:00
pk 9580abeba7 Should pass suitable arguments bus_map(); as noted by Chuck. 1996-01-11 21:54:03 +00:00
pk 7430f70694 Return `no error' after ejecting; per Jason. 1996-01-11 21:18:40 +00:00
pk 5035080586 Correct page frame calculation after mapdev() interface change. 1996-01-11 11:19:01 +00:00
pk 94bb8db5ad Add shutdownhooks(). 1996-01-10 23:00:33 +00:00
thorpej 926f925088 Re-arrange slightly the si_options special case for the `sw'. 1996-01-09 02:36:58 +00:00
thorpej 3cb556defb Disable DMA by default on the 4/100 `sw' controller. I've had a couple
of reports of data corruption, and would rather be slow and safe until
the DMA bug is fixed.
1996-01-09 02:06:50 +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
christos 742cee29e5 Fix setcontext call and sendsig 1996-01-07 19:47:27 +00:00
pk dd9e5c93c7 Use {U,L} suffices per Charles' recommendation. 1996-01-05 18:10:57 +00:00
jtc 2fce159ff8 Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.
1996-01-04 22:21:33 +00:00
thorpej d35bd4bb23 Fix a typo that would bite if the interrupt level were wildcarded in the
kernel config file.
1996-01-04 00:20:19 +00:00
thorpej 0e8ffc850f "si" and "sw" actually interrupt at level 3 (which I quickly discovered
when porting the driver).
1996-01-01 22:46:08 +00:00
thorpej 33582e90e0 "si" and "sw" now have the ncr5380sbc attribute. 1996-01-01 22:44:05 +00:00
thorpej 6d6c652f18 New driver for the Sun SCSI-3 VME and 4/100-series SCSI "Weird" controllers,
utilizing David Jones' new MI NCR 5380 code.  Ported from the sun3 ncr_si.c
and "sw" DMA code written by me.

This driver contains user-configurable "options", which can be set via the
"flags" directive in the kernel configuration file.  By default, only
DMA is enabled.  DMA completion interrupts and reselection may be enabled
by setting the appropriate bits with "flags".  See si.c for details.

Note that DMA completion interrupts and reselection don't yet work on the
4/100 controller.  I don't know why, and it's unlikely that I'll have
the opportunity to find out any time soon.  DMA does work, and results
in a considerable performance increase.

DMA, DMA completion interrupts, and reslection all work on my 4/260 (VME)
system with modern SCSI-II disks.
1996-01-01 22:40:56 +00:00
mycroft 3a89082ff4 Make this work for GCC < 2.6. 1995-12-29 18:53:01 +00:00
thorpej 17eb6e2bc1 Move the old-style disk instrumentation "structures" to a central location
(sys/kern/subr_disk.c) and note that they should/will be deperecated.
1995-12-28 19:16:31 +00:00
mycroft cd8fe86bcb Make the type of __builtin_va_list a long. 1995-12-26 01:16:24 +00:00
mycroft 0c00214737 Use __builtin_va_alist. 1995-12-26 00:19:09 +00:00
mycroft fa887628d8 Stylistic changes. 1995-12-25 23:15:31 +00:00
mycroft 72e24c3168 Update for GCC 2.7, and fix bugs. 1995-12-25 22:24:54 +00:00
mycroft 3da4b2a160 The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
1995-12-24 02:29:35 +00:00
pk 644c68a706 Towards machine independency, per cgd: macros to access hardware registers. 1995-12-18 23:58:31 +00:00
pk b7feb4a35e Enable interrupts; some ROM versions apparently turn them off. 1995-12-13 23:35:18 +00:00
pk 524718f597 Adapt to changed mapiodev() interface. 1995-12-11 12:45:16 +00:00
pk d2ae46d04e Agree with prototype. 1995-12-11 12:44:39 +00:00
pk 0d1981416d Adapt to changed mapiodev() interface. 1995-12-11 12:43:14 +00:00
pk f840d96cfe Adapt to changed mapiodev() interface.
Use new DVMA routines.
1995-12-11 12:40:20 +00:00
pk 8f162e4e25 mapdev() now takes a `struct rom_reg' argument to get access to `iospace'. 1995-12-11 12:34:36 +00:00
pk 2b7034a493 The return of dvma_malloc/dvma_free in a different shape. 1995-12-11 12:32:56 +00:00