Commit Graph

749 Commits

Author SHA1 Message Date
thorpej f19d55d659 - Garbage-collect the old-style configuration glue.
- Make sure we don't get interrupts in dcmselftest().
1997-01-30 09:11:24 +00:00
thorpej f5bb637c10 - Convert these drivers to new-style autoconfiguration. Old-style
config is no longer supported.
- Use a much more obvious SCSI job queueing scheme.
1997-01-30 09:08:55 +00:00
thorpej 365324ec10 - Convert these drivers to new-style autoconfiguration. Old-style
configuration is no longer supported.
- Use a much more obvious HP-IB job queueing scheme.
1997-01-30 09:06:51 +00:00
thorpej d49c71cb8a - Use indicies, rather than pointer arithmetic, to track DMA chain
segments.
- Use a much more obvious DMA job queueing scheme.
- Fixup some debugging code.
1997-01-30 09:04:33 +00:00
thorpej 7bfe4e11c4 Garbage-collect old-style autoconfiguration glue. 1997-01-30 09:00:21 +00:00
thorpej 743140bb51 Garbage-collect old-style autoconfiguration code. Adopt boot device
detection code to new-style autoconfiguration.
1997-01-30 08:59:29 +00:00
hpeyerl 56542666eb fix an *old* booboo where the dma queue wasn't being set in unexpected
case.  Found, fixed, and dictated by jason. (thorpe)
1997-01-26 18:04:10 +00:00
hpeyerl 8cc55c80b6 ::->: :-) 1997-01-26 17:55:52 +00:00
scottr 1085290516 Remove obsolete timezone specification 1997-01-20 16:55:32 +00:00
thorpej 112e338d6b Fix botch in PA calculation for DIO-II devices. Bug noticed and fix
provided by Klaus Klein <kleink@layla.inka.de>, PR #3097.
1997-01-12 21:27:26 +00:00
scottr cc061d0a98 Normally, iteon() returns an int. If NITE == 0, define iteon() to be 0.
Closes PR 3091.
1997-01-10 00:07:27 +00:00
scottr b917ce3294 Bracket kernel structs with #ifdef _KERNEL so that bootblocks will once
again build.
1997-01-09 01:07:59 +00:00
mrg c71a371532 use pseudo-device ipfilter, not ipl. 1997-01-07 11:35:01 +00:00
thorpej c56e780e4f Bring some sanity into my frazzled existence:
- Always ensure that RAW_PART ("c") can be opened.
- Disallow unused or non-existent partitions from being opened.
- Don't do bounds checking or partition translation on RAW_PART.
This is consistent with other disk drivers in the NetBSD source tree,
and fixes a condition where the user could not fix a corrupted disklabel
due to a bogus offset for partition "c".
1997-01-07 09:29:30 +00:00
thorpej 32dda9a886 Kludge newvers rule, so that it works with old and new config. 1997-01-06 08:49:30 +00:00
thorpej c26a11ab21 Add PFIL_HOOKS and ipl pseudo-device. 1997-01-06 08:48:36 +00:00
thorpej 7e3b804ce5 Add ipl pseudo-device. 1997-01-06 08:47:43 +00:00
thorpej 246654663f Add "ipl" device at cdev major 18. 1997-01-05 21:29:49 +00:00
thorpej f77141521c Oops, build dio.o in the old config case, too. Pointed out by
Dave Carrel <carrel@cisco.com>.
1997-01-05 04:41:48 +00:00
thorpej e2c6ed87ec Fix several semantic bugs:
- Always allow RAW_PART to be opened, regardless of the partition table.
- Never do partition translation on RAW_PART; it's always offset 0.
- Always make sure the disklabel is read from RAW_PART.
- Make *strategy() return values consistent.

This fixes a condition where a bogus partition table could be written
to the disk from SYS_INST, and the user had no way to rewrite with
a correct partition table, since RAW_PART would be invalid.
1996-12-21 21:34:40 +00:00
thorpej 0d58626f72 This wasn't just a spelling error... I invented a whole new word! 1996-12-21 21:23:43 +00:00
thorpej c0c07cd30e Always use `SLOWSCSI'. Some devices need a long delay between phase
changes, apparently.  This is reported to work around some odd failures
people were seeing during first-time installation onto a SCSI disk.
1996-12-17 09:21:42 +00:00
thorpej 7373a43fcf Generate initial copies of these files. 1996-12-17 09:01:24 +00:00
thorpej 838edf78fd Snapshot of new config for NetBSD/hp300. This isn't quite finished yet.
We're about 75% there.  SCSI and HP-IB are not yet supported in a new
config kernel; some autoconfiguration hackery has to be done there, yet.
These changes are enough to network boot a diskless kernel.

New config glue is enabled with the "NEWCONFIG" kernel option.  If that
option is not present, an old config kernel will be built.  Any kernel
configured with config(8) will automatically pick up the NEWCONFIG
option from std.hp300.
1996-12-17 08:40:56 +00:00
thorpej 7b4ca2ebe5 Kill __BROKEN_INDIRECT_CONFIG 1996-12-17 08:11:50 +00:00
thorpej 9a8786f719 Clean up cpu_startup() a bit:
- move data structure allocation into a new function, allocsys(), like
  the i386 port.
- garbage-collect the BUFFERS_UNMANAGED code.
1996-12-11 16:49:23 +00:00
thorpej f82a494e0f Fix typo in comment. 1996-12-11 09:10:38 +00:00
thorpej 66cbbf68ff Copyright assigned to The NetBSD Foundation. 1996-12-09 17:35:24 +00:00
thorpej 5dc95f5908 Garbage-collect DMAINTLVL; it's not needed any more. 1996-12-09 06:18:13 +00:00
thorpej 49471d5fd5 Sync with reality. 1996-12-09 03:56:01 +00:00
thorpej 01667974d0 isrlink() now returns a cookie. We're not interested in the cookie, so
cast to (void).

Call dmacomputeipl() after we've hooked up our interrupt handler.
1996-12-09 03:16:26 +00:00
thorpej 648a1b19ae isrlink() now returns a cookie. We're not interested in the cookie, so
cast to (void).
1996-12-09 03:14:06 +00:00
thorpej 0d6571ba4d Defer hooking up the DMA controller interrupt. Add a new funciton,
dmacomputeipl(), which is called by drivers which use DMA once they've
hooked up their interrupts.  This new function computes the appropriate
ipl to use for the DMA controller and (re-)establishes it's interrupt.
1996-12-09 03:09:51 +00:00
thorpej 75a37ecc60 Print the interrupt levels for bio, net, and tty computed during
autoconfiguration.
1996-12-09 03:07:11 +00:00
thorpej ce7ecde8a3 Dynamically compute the PSL value for spl{bio,net,tty,imp}() calls. 1996-12-09 03:04:46 +00:00
thorpej c36215249a Add EXEC_SCRIPT (I don't even want to know how I forgot it before...) 1996-12-09 01:53:30 +00:00
thorpej b5c8aff18b In setroot(), fix mishandling of the `config netbsd root on nfs' case
that caused a NULL pointer dereference.
1996-12-07 19:00:46 +00:00
cgd 96acdadef7 First step inn removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Define __BROKEN_INDIRECT_CONFIG so that old autoconfiguration
interfaces are used, until drivers are converted to use the new
interfaces (actually, converted back to use the _older_ interfaces)
which prohibit indirect configuration devices from receiving a softc
in their match routine that they can share with their attach routine.
1996-12-05 00:13:47 +00:00
jonathan 4c1d96de78 * Replace explicit -O2 in CFLAGS with COPTS macro. Default COPTS?= -O2.
Lets users over-ride with makeoptions COPTS="..." in kernel config files.

  Leave `mandatory' flags (like  -msoft-float which  on m68k enforces no
  FP in kernel) in CFLAGS.
1996-12-01 06:12:25 +00:00
cgd 8a3333b2a9 Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().
1996-11-06 20:19:19 +00:00
hpeyerl 05fe4c93dc Force some drive mappings for reasons I won't get into. 1996-10-21 16:43:05 +00:00
thorpej 43ba106ec2 Remove declaration for now-gone function. 1996-10-20 23:47:40 +00:00
thorpej af8d8d2a56 Arrange this file into sections (configure(), root device goo, console goo,
old-config goo).  Place old-config goo at the end so that it's easy to
#ifdef our or delete (muahahah!).

Garbage collect a couple of unused functions.
1996-10-20 23:46:06 +00:00
thorpej bbdd41a2a7 Back out last change, and add a comment about what should happen.
(*grumble* will teach me to do a `make clean' next time.)
1996-10-20 23:23:28 +00:00
thorpej 7133ecf2ca Don't need to mark 0-NBPG as VM_PROT_NONE in kernel_map anymore; the
first entry is now properly setup in kmem_init().
1996-10-19 21:11:32 +00:00
thorpej 7958973110 Set VM_MIN_KERNEL_ADDRESS to NBPG. This is a better way of getting
the kernel_map to treat page 0 properly.
1996-10-19 21:07:42 +00:00
thorpej cf9b36ab1d Set up a kernel_map entry for the text segment with protection of
VM_PROT_READ|VM_PROT_EXECUTE.  The previous default (VM_PROT_ALL)
would cause the following scenario:
	- someone attempts to write kernel text (my test was writing
	  to an offset of /dev/kmem which was known to be in the text
	  segment, while in single-user mode).
	- enter trap() with MMU fault (because of RO pte).
	- trap() calls vm_fault(), which looks up vm_map_entry for
	  fauling address.
	- vm_fault interprets write fault and VM_PROT_WRITE (in VM_PROT_ALL)
	  as COW; new page allocated, data copied to new page, new page
	  mapped in at trunc_page(<faulting va>).
	- wow, look at the fireworks!
Fixes two potential symptoms:
	- kernacc() returns TRUE when checking for permission to write
	  an offset in kernel text, which is bogus, since the text has
	  been mapped RO by pmap_bootstrap().
	- Handling of a stray pointer that attempted to scribble into
	  kernel text would not be executed properly.
1996-10-19 08:51:33 +00:00
thorpej 6126eea479 Tell the `upper half' of the VM system that page 0 isn't mapped. If we
don't do this, kernacc() will bogusly return TRUE for page 0, causing a
NULL pointer dereference in uiomove() when reading /dev/kmem.

Thanks to Scott Reynolds for noticing the problem.
1996-10-18 08:57:14 +00:00
thorpej 150c33e60b Use ${INSTALL}. 1996-10-18 05:55:26 +00:00
thorpej 9f1ba5739f Don't need "options GENERIC" anymore. 1996-10-15 22:01:53 +00:00