Commit Graph

633 Commits

Author SHA1 Message Date
thorpej 570949e0e4 Catch up with ITE data structure changes. 1996-03-03 04:23:33 +00:00
scottr 9e8b6a032a Don't try to make dependencies for SFILES if it isn't defined. 1996-03-01 17:03:17 +00:00
cgd 3d67685d36 Do not build vnode_if.[ch] for each kernel. Build them once, like the
various syscall sources/headers, and just compile them.  From PR 2142, OK'd
by mycroft.
1996-02-29 20:54:58 +00:00
thorpej ee8a2c002f Copyright assigned to The NetBSD Foundation. 1996-02-28 01:01:17 +00:00
scottr f08c9ffa5a make this compile again, since CONUNIT is no longer defined for us.
per Jason.
1996-02-27 22:11:44 +00:00
thorpej 0adab4d779 Avoid accidentally lowering a devices console priority. 1996-02-26 23:40:29 +00:00
thorpej cf93780656 Adjust for the new console code; CONSCODE is now a kernel option, not
a dca-specific constant.  For now, hardwire standalone DCA console
at select code 9 (which is what the old constant expanded to).  Really
should make the way the bootblock console is probed look just like how
the kernel console is probed.
1996-02-26 21:51:25 +00:00
mycroft 2ce52ae489 Define build programs with `?=', so they can be overridden with `makeoptions'. 1996-02-26 02:53:20 +00:00
thorpej fa7bee29a5 Completely rework how the console is probed. Console probing no longer
requires pre-autoconfigured devices.  Fix up some prototypes.  Part of the
long journey towards new config.  (GETTING THERE!)
1996-02-24 00:54:53 +00:00
gwr 946696f064 Add m68k/db_memrw.c 1996-02-22 23:35:07 +00:00
thorpej 94ca9f6aa0 New interrupt handling code. Highlights:
- Interrupt service routines now take a pointer to
	  the device's softc, rather than a unit number.
	- Interrupt handling code in locore.s condensed.  Only
	  remaining "special" handlers are lev0 (spurious),
	  lev1 (HIL; don't ask), lev6 (clock), and lev7 (NMI).
	  Only remaining hard-coded device driver reference in
	  locore is HIL.  (clock doesn't count...)
	- "dcafastservice" eliminated.  DCA driver has new mechanism
	  to guarantee prompt interrupt service at any ipl (not
	  just level 5).
	- Interrupt code pulled out of autoconf.c and machdep.c and
	  placed in new file, isr.c
1996-02-14 02:56:38 +00:00
thorpej d6f4511690 All interrupt routines (except the HIL; don't ask) now take a pointer
to a softc, rather than a unit number.  Add a "dq_softc" member
to struct devqueue; this is a temporary measure until the
dma/controller/device callback spaghetti is untangled.

YAY!  No more need for dcafastservice!

HIL: squish instances of "(void) splhil()" and "(void) spl0();".
1996-02-14 02:43:54 +00:00
thorpej c88b047836 Compile the new interrupt handling code. 1996-02-14 02:33:25 +00:00
scottr b62a5cfd54 When we panic, be a little smarter about whether we need to wait
for the user to hit a key before we reboot.
1996-02-09 18:57:20 +00:00
scottr 41378a47c0 Info from Mike Hibler <mike@cs.utah.edu> indicates that the probable
intent for the value of the C_REL constant was 0xc0.  Testing has turned
up no adverse effect on tape or disk devices, and in fact this change
apparently makes my 9145 tape work as expected. (!)  Closes PRs 1874 and
1971.
1996-02-09 18:00:35 +00:00
scottr 4058c67702 Specify return type for vunmapbuf() 1996-02-09 16:58:40 +00:00
mycroft 753fe3a25a Fix mkdep problems due to missing flags. 1996-02-09 02:21:13 +00:00
christos 2c8314f73c vm prototype changes 1996-02-05 02:06:38 +00:00
thorpej 996edfa606 Remove bogus "return (0);" in rdmatch() that wiggled its way in uninvited. 1996-02-03 03:00:29 +00:00
mycroft d6b2d2e00f config.old uses vers.o, not newvers. 1996-02-03 01:17:22 +00:00
mycroft 5bc076e17e Use `-traditional-cpp' when building .s and .S files. 1996-02-03 00:43:50 +00:00
mycroft aa15cd3f7f Don't need unistd.h. 1996-02-02 23:53:20 +00:00
mycroft 56a63148c6 config.old doesn't grok %SFILES. 1996-02-02 23:49:19 +00:00
mycroft dcd66e9f4d Clone these, and fix many bugs. 1996-02-02 20:08:17 +00:00
scottr c0f37b4d05 Use DISKUNIT()/DISKPART() from <sys/disklabel.h> instead of
our own home-grown versions.
1996-02-02 19:50:26 +00:00
mycroft 9db20bf150 Don't define _KERNEL here. 1996-02-02 19:42: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 134b410457 Use the common sigreturn routine. 1996-01-31 02:26:05 +00:00
thorpej 90a0b784de Build memcpy.c 1996-01-30 19:47:32 +00:00
thorpej abe8231c4f Catch up with changes to libsa. 1996-01-30 19:09:09 +00:00
scottr f9418ec605 Eliminate unnecessary goto and labels, and other minor cleanup. 1996-01-23 00:28:09 +00:00
thorpej cd17a6b3af Remove all the old STACKCHECK stuff; it hasn't been used for a long time. 1996-01-16 22:24:28 +00:00
thorpej 1eff435896 Use ${BINOWN} and ${BINGRP} per Arne H. Juul <arnej@ikke.idt.unit.no>
in PR #705.  Also, clean up some stuff left over from HP-BSD.
1996-01-15 01:41:37 +00:00
thorpej 524cf97f54 Kludge around a case where a flaky HP-IB disk might be slow to respond
to the identification request in rdmatch().  Similar in spirit to a
patch from Jason Downs (written eons ago), but limited to the broken
device we're trying to reach.  My patch tested (and fixed :-) by
Herb Peyerl.
1996-01-10 20:54:29 +00:00
thorpej 2e1c1680c5 Fix declaration of hilqfree(), from Daniel Hagerty <hag@wizardz.com>,
PR #1918.
1996-01-10 20:31:12 +00:00
thorpej f1d8ca699f Oops, compile hpux_machdep.c if COMPAT_HPUX. Forgetfulness pointed
out by Dave Carrel.
1996-01-08 03:27:36 +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
thorpej d9bce7422e Move the obviously machine-dependent HP-UX compat code to hpux_machdep.{c,h}.
A fair bit of this, the m68k core dump and exec goo, can probably be
made into a generic m68k hpux module, eventually.

More to be placed in hpux_machdep.c - keep your eyes peeled...
1996-01-06 12:44:06 +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 90964d13db Implement a suggestion from Charles; use a wrapper function before
leintr() to deal with das blinkenlights.  Also squishes the need
for LEINTR_UNIT.
1996-01-02 21:56:21 +00:00
thorpej e7cf87f5dc Add the last revision previous to the switch to the MI LANCE code of
hp300/dev/if_lereg.h to the standalone code; the standalone LANCE driver
for the hp300 needs it.
1996-01-01 18:10:54 +00:00
thorpej 3319ad7b61 XXX TEMPORARY STOP-GAP MEASURE! A 12-bit command modifier was being
squished into an 8-bit position in a command stream!  Which one is wrong?
Changed the constant from 0x140 to 0x40, which is what ended up happening
anyhow.  This exists in the old Utah sources, too!  How long has this
bug existed?!
1995-12-31 04:11:42 +00:00
thorpej 34c2680a5b Re-work the serial console support a bit; it doesn't depend on statically
allocated softc's now.
1995-12-31 00:27:16 +00:00
thorpej f26be3a3d6 Fix something the switch to the MI LANCE code broke: use LE_TINT_HOOK
and LE_RINT_HOOK to blink the "LAN transmit" and "LAN receive" LEDs on
the front panels of 400-series machines iff the CPP symbol USELEDS is
defined in the kernel config file.
1995-12-30 21:03:02 +00:00
thorpej 67c76ca15d Print unconfigured card id and select code regardless of -DDEBUG. 1995-12-30 18:25:25 +00:00
thorpej 11c7d655d8 Correct some comments about 8-port DCM boards. (Thanks, Mike, for
pointing out the True Nature of The Force...)
1995-12-29 17:21:29 +00:00
thorpej 9ba67f2c93 Increase maxusers from 16 to 32. 1995-12-29 17:16:29 +00:00
thorpej 9038d094fa Enable COMPAT_HPUX by default. It's still not 100% yet, but it doesn't
seem to really hurt anything, either.  Makes it easier for folks using
binary snapshots only to try it out.

GENERIC: now that the PT map allocation is fixed, increase the default
maxusers to 32.
1995-12-29 17:12:48 +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 ce000f04ef Remove deprecated cpu_setstack(). 1995-12-21 05:01:32 +00:00
thorpej 1094eb5008 Oops ... missed this file in the last round of device changes. 1995-12-11 19:41:47 +00:00
thorpej 540dfebf15 Rather than using individual HP300 model names, map those model names to
properties such as "M68040" and "M68K_MMU_MOTOROLA", used to conditionally
compile code.  This is more in-line with now the other m68k ports do it,
and makes it much easier to find "common ground" among them.

In locore.s, use the MMU-type constants defined my <machine/cpu.h> rather
than "expanded" values.

Because HP300-model names are mapped to CPU/MMU combinations in
<machine/cpu.h>, no change to kernel configuration will be necessary.
1995-12-11 17:09:09 +00:00
thorpej de6dad9228 Move bcopy/ovbcopy/memcpy into m68/m68k/copy.s, which is used by all
m68k ports already anyhow.  No use in keeping 6 identical copies of this
function around.
1995-12-11 02:37:55 +00:00
mycroft 7877aa6eb5 Use the MI LANCE code. 1995-12-10 00:49:33 +00:00
thorpej b1c7779d0a Prevent the msgbuf from getting trashed across reboots by moving avail_end
back one page.
1995-12-09 07:54:19 +00:00
thorpej 862bb3adc1 Pass the correct number of arguments to readdisklabel(). 1995-12-09 07:31:03 +00:00
mycroft 0e0ac5ed68 cpu_fork() now returns void. 1995-12-09 04:37:23 +00:00
thorpej 87206673fb Keymap for the Swedish HIL keyboard, from Tomas Tengling <ltt@cd.chalmers.se>. 1995-12-06 22:13:23 +00:00
thorpej 9c784e07c1 Fix the integer overflow problem in pmap_init() when the user PT map is
allocated, as noticed by Chuck Cranor.  In addition to re-arranging
the assignment as suggested by Niklas Hallqvist, check to see if maxproc
is higher than the number of available user PTs.  If it is, lower maxproc
to that value, the rationale being that it's much more desirable to have
fork() return EAGAIN than to have your system wedge.

XXX note that root can still raise maxproc with sysctl(2) later.  It's
probably worth having further discussion about this issue, but until
everyone has time to think about it, this seems like an acceptable solution
for the time being.
1995-12-05 20:01:54 +00:00
thorpej 52ec09e420 Use a "match/attach" rather than "init" scheme for probing devices.
This is a step towards getting the drivers ready for new config.
1995-12-02 18:21:49 +00:00
thorpej deb00c27b3 Use a "match/attach" rather than "init" scheme for probing devices.
This is a step towards getting the drivers ready for new config.

Clean up namespace, remove several instances of global arrays.  Instead,
use a softc to carry state around.  Where possible, pass a pointer to
the softc rather than a unit number.

Pointers to hardware and software constructs are now stored per port
in each instance of the softc (one softc per board) rather than indexed
by minor number.
1995-12-02 18:18:50 +00:00
thorpej 41cf6f071f Use a "match/attach" rather than "init" scheme for probing devices.
This is a step towards getting the drivers ready for new config.

Clean up namespace, remove several instances of global arrays.  Instead,
use a softc to carry state around.  Where possible, pass a pointer to the
softc rather than a unit number.
1995-12-02 18:15:50 +00:00
thorpej 3ac76475ea Use a "match/attach" rather than "init" scheme for probing devices.
This is a step towards getting drivers prepared for new config.
1995-12-02 18:11:21 +00:00
thorpej de5ce5f48c Change "hilloop" to "hilsoftc" and make slightly more new config-friendly.
Remove all uses of curproc.
1995-12-02 02:48:47 +00:00
thorpej b618522128 Make the DMA controller driver a little more new config-friendly. Still
more work to do, but this is a step in the right direction.
1995-12-02 02:46:45 +00:00
thorpej da66c0a255 Enable COMPAT_HPUX. 1995-11-28 08:48:18 +00:00
thorpej 38b63746fb Note the new status of COMPAT_HPUX, but keep is disabled by default. 1995-11-28 08:47:38 +00:00
thorpej 63b0022b86 Update a #include for the "new" location of HP-UX emulation code. 1995-11-28 08:12:37 +00:00
thorpej ffcccc41bd Compile compat/hpux/hpux_exec.c and compat/hpux/hpux_file.c if COMPAT_HPUX
is defined.
1995-11-28 08:10:09 +00:00
thorpej b92924680d Garbage collect some stuff that isn't used. Rename the relocation info
structure to be consistent with the other m68k ports.  XXX that struct needs
to move to an m68k common file.
1995-11-20 01:15:26 +00:00
thorpej df59198ddc Put doshutdownhooks() in the right place. Pointed out by cgd. 1995-11-20 00:58:54 +00:00
thorpej 8272af3168 Re-arrange boot() a bit; call doshutdownhooks(), if we're rebooting, say so,
etc.  Modeled after the alpha port's boot().
1995-11-19 23:24:15 +00:00
thorpej 8122bc0e33 Prevent the ITE_ACTIVE bit from being cleared in iteoff() if the ITE_ISCONS
bit is set.  Works around the fact that the last process to have the
console open exits, the bit is cleared, and "syncing disks...", etc. is
not seen if the system is rebooted with reboot(8).  Fixes PR #1455.
1995-11-19 23:14:22 +00:00
thorpej 31430a5279 Cosmetically change one #include directive. 1995-11-19 22:32:38 +00:00
thorpej 905cb9dda1 Re-arrange things such that we can print out disk geometry regardless of
COMPAT_NOLABEL.

XXX One day when the world doesn't assume DEV_BSIZE bytes/sector, we'll be
able to actually use the stuff sensed from the drive, rather than a table.
1995-11-19 19:07:18 +00:00
thorpej d0e01feb5c Do an indirect driver a little more like an indirect driver would like to
be done.  Set up a structure filled with function pointers in the
controller-specific probe routines, and jump through them, instead of
if()'ing our way though each operation.

Be a little more discriptive; print out the controller type found
during the probe in a way that's somewhat meaningful.
1995-11-19 17:57:15 +00:00
thorpej af18124282 We no longer need -fno-builtin; syscall namespace has been cleaned up a bit. 1995-10-22 06:05:21 +00:00
thorpej 62150b43b1 Truncate the incoming packet if it doesn't fit into the buffer. 1995-10-19 18:43:27 +00:00
thorpej ef52ec31c1 Recompile genassym if the Makefile changes. 1995-10-18 22:50:15 +00:00
thorpej 43358aae60 Deal with vendor, product, and revision strings properly. 1995-10-16 08:51:49 +00:00
thorpej 5dcaa0b51c Be a tad bit more informative when the drive is attached. Print geometry
info when appropriate, because, darn it, it's useful.
1995-10-15 10:03:18 +00:00
thorpej 54ed756bc4 Add another dca and grf 1995-10-10 02:12:37 +00:00
thorpej ab16c2efa6 Remove unneeded RCS ids. 1995-10-09 08:07:37 +00:00
thorpej 2d5f7a7b07 Pass correct number of arguments to hpibgo(). 1995-10-09 07:57:43 +00:00
thorpej 83dfe0816e Remove the icode stuff; it hasn't been used in a long time. 1995-10-08 20:19:22 +00:00
thorpej a8637d68f8 blkclr -> bzero 1995-10-08 19:33:36 +00:00
thorpej 09024536ef Remove __main(), strlen(), bzero(), and bcmp(). They're all in libkern. 1995-10-08 19:30:51 +00:00
thorpej 3b70bc6b37 Finish up the system call function renaming; sysarch -> sys_sysarch and
vtrace -> sys_vtrace.
1995-10-08 19:01:26 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej c2ca33b9c1 Initialize the kernel PT map as thoroughly in the 68040 case as the
non-68040 case.  Fix up a comment there, too.
1995-10-05 06:54:12 +00:00
thorpej a6359b2633 Fix segment table reference bug, from Micheal Hitch. 1995-10-05 06:47:25 +00:00
thorpej e43d278d31 Several changes:
* Reset the card on "fresh open" as a sanity measure.
	* Use the "secret bit" to enable interrupts.
	* Make some parts look/behave like their cousins in dev/isa/com.c
	* Set the FIFO threshold based on line speed.
	* Be a little more informative when port is attached.
	* Implement TIOC{G,S}FLAGS; ttyflags now works.
First two items prevent deadlock on some systems (notably the 380,
425, and 433) which some people have been reporting.  Use of the
"secret bit" seems to be safe on systems which don't need it.  Changes
tested on a 319, 340, 345, and 380.
1995-10-04 17:46:08 +00:00
thorpej 442aff9376 Say what I really meant in a printf()... 1995-10-04 08:39:14 +00:00
thorpej b675177228 Put new-style RCS ids in the startup banner. Makes bootblock revisions
much easier to recognize; old method could have revision corrupted by
local RCS control.
1995-10-04 07:24:31 +00:00
thorpej d08330454a Determine the select code of the console device, or -1 for internal grf.
Pass this value to the kernel in register d5.  This value isn't currently
used by the kernel, but will be in the future.
1995-10-04 06:54:42 +00:00
thorpej f060c456de Couple of changes:
* Implement TIOC{G,S}FLAGS; ttyflags works now.
	* Reset the card on a "fresh open" as a sanity measure.
	* Make dcmopen() and dcmclose() a little more like the
	  corresponding routines in the new dca.c
1995-10-04 06:39:06 +00:00
thorpej d7b36ab7a2 Add mt0. 1995-10-02 00:36:07 +00:00
thorpej f12fd2307e Driver for HP 7974a, 7978a/b, 7979a, 7980a, and 7980xc 9-track HP-IB tapes.
Original version contributed to Utah by Mt. Xinu.  Ported to 4.4BSD by
Mark Davies and Andrew Vignaux.
1995-10-02 00:28:20 +00:00