summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-03-19 21:10:57 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-03-19 21:10:57 +0000
commit169c29d1b708c51bbae3f546e0adfe0d433b5b7b (patch)
tree15b32c155eb85259ca3be610962de5f8aa24b91c /sys/arch
parent7aa5f12551d2fef2475152a3a5c9b9961e14b83a (diff)
Merging w/ NetBSD 021796.
speaker upgraded to the current. some changes to the VM stuff (ie kern_thread.c added and so).
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/Makefile2
-rw-r--r--sys/arch/i386/conf/Makefile.i386176
-rw-r--r--sys/arch/i386/conf/files.i38611
-rw-r--r--sys/arch/i386/i386/autoconf.c3
-rw-r--r--sys/arch/i386/i386/conf.c2
-rw-r--r--sys/arch/i386/i386/db_disasm.c2
-rw-r--r--sys/arch/i386/i386/dkbad.c2
-rw-r--r--sys/arch/i386/i386/gdt.c5
-rw-r--r--sys/arch/i386/i386/genassym.c7
-rw-r--r--sys/arch/i386/i386/locore.s6
-rw-r--r--sys/arch/i386/i386/math_emulate.c5
-rw-r--r--sys/arch/i386/i386/microtime.s3
-rw-r--r--sys/arch/i386/i386/ns_cksum.c3
-rw-r--r--sys/arch/i386/i386/pmap.c2
-rw-r--r--sys/arch/i386/i386/pmap.old.c2
-rw-r--r--sys/arch/i386/i386/trap.c3
-rw-r--r--sys/arch/i386/i386/vm_machdep.c3
-rw-r--r--sys/arch/i386/include/param.h4
-rw-r--r--sys/arch/i386/include/pccons.h6
-rw-r--r--sys/arch/i386/include/pmap.h4
-rw-r--r--sys/arch/i386/include/pmap.old.h4
-rw-r--r--sys/arch/i386/include/psl.h21
-rw-r--r--sys/arch/i386/include/pte.h6
-rw-r--r--sys/arch/i386/include/segments.h6
-rw-r--r--sys/arch/i386/isa/clock.c4
-rw-r--r--sys/arch/i386/isa/fd.c14
-rw-r--r--sys/arch/i386/isa/fdreg.h2
-rw-r--r--sys/arch/i386/isa/icu.h6
-rw-r--r--sys/arch/i386/isa/isa_machdep.c32
-rw-r--r--sys/arch/i386/isa/isa_machdep.h15
-rw-r--r--sys/arch/i386/isa/lms.c4
-rw-r--r--sys/arch/i386/isa/mms.c4
-rw-r--r--sys/arch/i386/isa/npx.c2
-rw-r--r--sys/arch/i386/isa/pccons.c4
-rw-r--r--sys/arch/i386/isa/pcvt/Util/vgaio/vgaio.h9
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_conf.h4
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_drv.c2
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_hdr.h87
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_ioctl.h4
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_kbd.c6
-rw-r--r--sys/arch/i386/isa/pms.c4
-rw-r--r--sys/arch/i386/isa/spkr.c42
-rw-r--r--sys/arch/i386/isa/vector.s16
-rw-r--r--sys/arch/i386/netboot/arp.c4
-rw-r--r--sys/arch/i386/netboot/main.c4
-rw-r--r--sys/arch/i386/netboot/packet.c4
-rw-r--r--sys/arch/i386/netboot/tftp.c4
-rw-r--r--sys/arch/i386/pci/pci_machdep.c5
-rw-r--r--sys/arch/i386/stand/Makefile12
49 files changed, 284 insertions, 298 deletions
diff --git a/sys/arch/i386/Makefile b/sys/arch/i386/Makefile
index 6d433a34fa1..faaff94f1bd 100644
--- a/sys/arch/i386/Makefile
+++ b/sys/arch/i386/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 1994/10/27 04:14:23 cgd Exp $
+# $NetBSD: Makefile,v 1.6 1996/02/01 22:31:28 mycroft Exp $
# @(#)Makefile 7.3 (Berkeley) 6/9/91
# Makefile for i386 tags file and boot blocks
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index 308c00c4bfc..364cf3c16e8 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,12 +1,14 @@
-# $NetBSD: Makefile.i386,v 1.59 1995/10/10 05:58:00 mycroft Exp $
+# $NetBSD: Makefile.i386,v 1.64 1996/02/09 02:21:25 mycroft Exp $
+# Makefile for NetBSD
+#
# This makefile is constructed from a machine description:
# config machineid
# Most changes should be made in the machine description
# /sys/arch/i386/conf/``machineid''
# after which you should do
-# config machineid
-# Generic makefile changes should be made in
+# config machineid
+# Machine generic makefile changes should be made in
# /sys/arch/i386/conf/Makefile.i386
# after which config should be rerun for all machines of that type.
#
@@ -15,25 +17,27 @@
#
# -DTRACE compile in kernel tracing hooks
# -DQUOTA compile in file system quotas
-#
-# DEBUG is set to -g by config if debugging is requested (config -g).
-# PROF is set to -pg by config if profiling is requested (config -p).
-AS= as ${DEBUG}
+# DEBUG is set to -g if debugging.
+# PROF is set to -pg if profiling.
+
+AS= as
AWK= awk
-CC= cc ${DEBUG}
+CC= cc
CPP= cpp
LD= ld
+STRIP= strip -d
TOUCH= touch -f -c
# source tree is located via $S relative to the compilation directory
S= ../../../..
I386= ../..
-INCLUDES= -I. -I$S/arch -I$S -I$S/sys
-COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -Di386
-CFLAGS= -O6 -fno-strength-reduce -Werror ${COPTS}
-LOAD_ADDRESS= F8100000
+INCLUDES= -I. -I$S/arch -I$S
+CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Di386
+CFLAGS= ${DEBUG} -O2 -Werror
+AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+LINKFLAGS= -z -Ttext F8100000 -e start
### find out what to use for libkern
.include "$S/lib/libkern/Makefile.inc"
@@ -56,121 +60,119 @@ LIBCOMPAT= ${COMPATLIB_PROF}
# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
# is marked as config-dependent.
-NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
-NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
-
-DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
-DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
+NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-PROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \
- sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
- ${AS} -o $@; \
- rm -f $*.s
+DRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
+DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-NORMAL_S= ${CPP} -DLOCORE ${COPTS} $< | ${AS} -o $@
-NORMAL_S_C= ${CPP} -DLOCORE ${COPTS} ${PARAM} $< | ${AS} -o $@
+NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
+NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
%OBJS
%CFILES
+%SFILES
+
# load lines for config "xxx" will be emitted as:
# xxx: ${SYSTEM_DEP} swapxxx.o
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_OBJ= locore.o vnode_if.o ${OBJS} param.o ioconf.o ${LIBKERN} \
- ${LIBCOMPAT}
+SYSTEM_OBJ= locore.o \
+ vnode_if.o param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
SYSTEM_LD_HEAD= rm -f $@
-SYSTEM_LD= @if [ X${DEBUG} = X-g ]; then \
- strip=-X; \
- else \
- strip=-x; \
- fi; \
- echo ${LD} $$strip -z -T ${LOAD_ADDRESS} -o $@ -e start '$${SYSTEM_OBJ}' vers.o; \
- ${LD} $$strip -z -T ${LOAD_ADDRESS} -o $@ -e start ${SYSTEM_OBJ} vers.o
-SYSTEM_LD_TAIL= @size $@; chmod 755 $@; \
- if [ X${DEBUG} = X-g ]; then \
- echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
- echo strip -d $@; strip -d $@; \
- fi
+SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
+ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
+SYSTEM_LD_TAIL= @size $@; chmod 755 $@
+
+DEBUG?=
+.if ${DEBUG} == "-g"
+LINKFLAGS+= -X
+SYSTEM_LD_TAIL+=; \
+ echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
+ echo ${STRIP} $@; ${STRIP} $@
+.else
+LINKFLAGS+= -x
+.endif
%LOAD
-newvers: vers.o
+assym.h: genassym
+ ./genassym >assym.h
-vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
- sh $S/conf/newvers.sh
- ${CC} ${CFLAGS} -c vers.c
+genassym: genassym.o
+ ${CC} -o $@ genassym.o
-clean::
- rm -f eddep bsd bsd.gdb tags vnode_if.[ch] *.o locore.i \
- [a-z]*.s [Ee]rrs linterrs makelinks genassym
+genassym.o: ${I386}/i386/genassym.c
+ ${NORMAL_C_C}
-lint: /tmp param.c
- @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
- ${I386}/i386/Locore.c ${CFILES} ${I386}/i386/swapgeneric.c \
- ioconf.c param.c | \
- grep -v 'struct/union .* never defined' | \
- grep -v 'possible pointer alignment problem'
-
-locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h
-locore.o: machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s
-locore.o: $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h
-locore.o: ${I386}/isa/icu.h $S/dev/isa/isareg.h $S/net/netisr.h
- ${CPP} -DLOCORE ${COPTS} ${I386}/i386/locore.s | ${AS} -o locore.o
+vnode_if.c vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
+ AWK="${AWK}" sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
-# the following is necessary because autoconf.o depends on #if GENERIC
-autoconf.o: Makefile
+param.c: $S/conf/param.c
+ rm -f param.c
+ cp $S/conf/param.c .
-# the following are necessary because the files depend on the types of
-# cpu's included in the system configuration
-locore.o machdep.o: Makefile
+param.o: param.c Makefile
+ ${NORMAL_C_C}
-# depend on network or filesystem configuration
-uipc_proto.o vfs_conf.o locore.o: Makefile
+ioconf.o: ioconf.c
+ ${NORMAL_C}
-# depend on maxusers
-assym.s: Makefile
+newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
+ sh $S/conf/newvers.sh
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
-# depends on KDB (cons.o also depends on GENERIC)
-trap.o cons.o: Makefile
-assym.s: genassym
- ./genassym >assym.s
+clean::
+ rm -f eddep *netbsd netbsd.gdb tags vnode_if.[ch] *.[io] [a-z]*.s \
+ [Ee]rrs linterrs makelinks genassym genassym.o assym.h
-genassym: ${I386}/i386/genassym.c
- ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Di386 -o genassym \
- ${I386}/i386/genassym.c
+lint:
+ @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ ${I386}/i386/Locore.c ${CFILES} ${I386}/i386/swapgeneric.c \
+ ioconf.c param.c | \
+ grep -v 'static function .* unused'
-depend: assym.s param.c vnode_if.h
- mkdep ${COPTS} ${CFILES} ioconf.c param.c
- mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
+tags:
+ @echo "see $S/kern/Makefile for tags"
links:
egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
sort -u | comm -23 - dontlink | \
- sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
+ sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
sh makelinks && rm -f dontlink
-tags:
- @echo "see $S/kern/Makefile for tags"
+SRCS= ${I386}/i386/locore.s \
+ vnode_if.c param.c ioconf.c ${CFILES} ${SFILES}
+depend: .depend
+.depend: ${SRCS} assym.h vnode_if.h param.c
+ mkdep ${AFLAGS} ${CPPFLAGS} ${I386}/i386/locore.s
+ mkdep -a ${CFLAGS} ${CPPFLAGS} vnode_if.c param.c ioconf.c ${CFILES}
+ mkdep -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
+ mkdep -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${I386}/i386/genassym.c
-ioconf.o: ioconf.c
- ${CC} -c ${CFLAGS} ioconf.c
-param.c: $S/conf/param.c
- rm -f param.c
- cp $S/conf/param.c .
+# depend on root or device configuration
+autoconf.o conf.o: Makefile
+
+# depend on network or filesystem configuration
+uipc_proto.o vfs_conf.o: Makefile
-param.o: param.c Makefile
- ${CC} -c ${CFLAGS} ${PARAM} param.c
+# depend on maxusers
+genassym.o machdep.o: Makefile
-vnode_if.c vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
- AWK="${AWK}" sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
+# depend on CPU configuration
+locore.o machdep.o: Makefile
+
+
+locore.o: ${I386}/i386/locore.s assym.h
+ ${NORMAL_S}
%RULES
diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386
index 105bca78f7b..714ae03d60d 100644
--- a/sys/arch/i386/conf/files.i386
+++ b/sys/arch/i386/conf/files.i386
@@ -1,4 +1,3 @@
-# $OpenBSD: files.i386,v 1.7 1996/02/27 11:13:00 niklas Exp $
# $NetBSD: files.i386,v 1.61 1996/01/08 13:51:30 mycroft Exp $
#
# new style config file for i386 architecture
@@ -70,12 +69,16 @@ file arch/i386/isa/clock.c isa
device npx at isa
file arch/i386/isa/npx.c npx needs-flag
+# attribute used to represent the "keyboard controller"
+# XXX should be a real device
+define pckbd { [irq = -1], [port = -1] }
+
# PC console support a la "pccons"
-device pc at isa: tty
+device pc at isa: tty, pckbd
file arch/i386/isa/pccons.c pc needs-flag
# PC console support a la "pcvt"
-device vt at isa: tty
+device vt at isa: tty, pckbd
file arch/i386/isa/pcvt/pcvt_drv.c vt needs-flag
file arch/i386/isa/pcvt/pcvt_ext.c vt needs-flag
file arch/i386/isa/pcvt/pcvt_kbd.c vt needs-flag
@@ -106,7 +109,7 @@ file arch/i386/isa/fd.c fdc needs-flag
major {fd = 2}
# PC speaker
-device spkr at isa: tty
+device spkr at pckbd: tty
file arch/i386/isa/spkr.c spkr needs-flag
# AMD am7990 (Lance) -based boards
diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c
index b02546e3577..a1ab9c17e31 100644
--- a/sys/arch/i386/i386/autoconf.c
+++ b/sys/arch/i386/i386/autoconf.c
@@ -70,6 +70,9 @@ extern int cold; /* cold start flag initialized in locore.s */
*/
configure()
{
+
+ startrtclock();
+
config_rootfound("isa", NULL);
config_rootfound("eisa", NULL);
config_rootfound("pci", NULL);
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index 91e73d2ebcb..f94045cb83b 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.8 1996/02/28 14:38:38 mickey Exp $ */
+/* $NetBSD: conf.c,v 1.68 1995/12/09 05:53:00 mycroft Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
diff --git a/sys/arch/i386/i386/db_disasm.c b/sys/arch/i386/i386/db_disasm.c
index 22b4df8706f..7959d5960b7 100644
--- a/sys/arch/i386/i386/db_disasm.c
+++ b/sys/arch/i386/i386/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.3 1996/03/11 11:16:40 mickey Exp $ */
+/* $NetBSD: db_disasm.c,v 1.10 1996/02/02 18:05:58 mycroft Exp $ */
/*
* Mach Operating System
diff --git a/sys/arch/i386/i386/dkbad.c b/sys/arch/i386/i386/dkbad.c
index fcffbf05185..25cd19bb7d1 100644
--- a/sys/arch/i386/i386/dkbad.c
+++ b/sys/arch/i386/i386/dkbad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dkbad.c,v 1.2 1996/02/28 14:38:41 mickey Exp $ */
+/* $NetBSD: dkbad.c,v 1.4 1996/02/02 18:05:59 mycroft Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c
index 6b3818082e5..e827c337d54 100644
--- a/sys/arch/i386/i386/gdt.c
+++ b/sys/arch/i386/i386/gdt.c
@@ -1,5 +1,4 @@
-/* $OpenBSD: gdt.c,v 1.4 1996/03/11 11:16:46 mickey Exp $ */
-/* $NetBSD: gdt.c,v 1.5 1995/11/17 06:47:27 jtc Exp $ */
+/* $NetBSD: gdt.c,v 1.6 1996/01/30 12:18:26 mycroft Exp $ */
/*
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -104,6 +103,7 @@ gdt_compact()
int slot = NGDT, oslot;
for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
+ PHOLD(p);
pcb = &p->p_addr->u_pcb;
oslot = IDXSEL(pcb->pcb_tss_sel);
if (oslot >= gdt_count) {
@@ -125,6 +125,7 @@ gdt_compact()
dynamic_gdt[oslot].gd.gd_type = SDT_SYSNULL;
pcb->pcb_ldt_sel = GSEL(slot, SEL_KPL);
}
+ PRELE(p);
}
for (; slot < gdt_count; slot++)
if (dynamic_gdt[slot].gd.gd_type == SDT_SYSNULL)
diff --git a/sys/arch/i386/i386/genassym.c b/sys/arch/i386/i386/genassym.c
index 993bfa9a444..b3248141382 100644
--- a/sys/arch/i386/i386/genassym.c
+++ b/sys/arch/i386/i386/genassym.c
@@ -1,4 +1,4 @@
-/* $NetBSD: genassym.c,v 1.45 1995/10/11 04:19:38 mycroft Exp $ */
+/* $NetBSD: genassym.c,v 1.46 1996/02/02 19:42:43 mycroft Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -39,15 +39,14 @@
* @(#)genassym.c 5.11 (Berkeley) 5/10/91
*/
-#define _KERNEL
-
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/device.h>
-#include <vm/vm.h>
#include <sys/user.h>
+#include <vm/vm.h>
+
#include <machine/trap.h>
#include <machine/pmap.h>
#include <machine/vmparam.h>
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s
index 97e36ba250f..d68944b52b9 100644
--- a/sys/arch/i386/i386/locore.s
+++ b/sys/arch/i386/i386/locore.s
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.142 1996/01/07 03:59:28 mycroft Exp $ */
+/* $NetBSD: locore.s,v 1.143 1996/02/02 02:36:40 mycroft Exp $ */
#undef DIAGNOSTIC
#define DIAGNOSTIC
@@ -42,7 +42,7 @@
*/
#include "npx.h"
-#include "assym.s"
+#include "assym.h"
#include <sys/errno.h>
#include <sys/syscall.h>
@@ -1887,7 +1887,7 @@ IDTVEC(align)
* If an error is detected during trap, syscall, or interrupt exit, trap() will
* change %eip to point to one of these labels. We clean up the stack, if
* necessary, and resume as if we were handling a general protection fault.
- * This will cause the process to get a SIGSEGV.
+ * This will cause the process to get a SIGBUS.
*/
ENTRY(resume_iret)
ZTRAP(T_PROTFLT)
diff --git a/sys/arch/i386/i386/math_emulate.c b/sys/arch/i386/i386/math_emulate.c
index 5ab7f7f0df9..28afdbd6703 100644
--- a/sys/arch/i386/i386/math_emulate.c
+++ b/sys/arch/i386/i386/math_emulate.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: math_emulate.c,v 1.2 1996/02/28 14:38:43 mickey Exp $ */
+/* $OpenBSD: math_emulate.c,v 1.3 1996/03/19 21:09:19 mickey Exp $ */
+/* $NetBSD: math_emulate.c,v 1.16 1996/02/02 18:06:01 mycroft Exp $ */
/*
* expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj
@@ -909,6 +910,8 @@ void fmul(const temp_real * src1, const temp_real * src2, temp_real * result)
* temporary real division routine.
*/
+#include <i386/i386/math_emu.h>
+
static void shift_left(int * c)
{
__asm__ __volatile__("movl (%0),%%eax ; addl %%eax,(%0)\n\t"
diff --git a/sys/arch/i386/i386/microtime.s b/sys/arch/i386/i386/microtime.s
index 70fda8671b0..918a9de229c 100644
--- a/sys/arch/i386/i386/microtime.s
+++ b/sys/arch/i386/i386/microtime.s
@@ -1,4 +1,5 @@
-/* $OpenBSD: microtime.s,v 1.3 1996/02/28 14:38:45 mickey Exp $ */
+/* $OpenBSD: microtime.s,v 1.4 1996/03/19 21:09:20 mickey Exp $ */
+/* $NetBSD: microtime.s,v 1.16 1995/04/17 12:06:47 cgd Exp $ */
/*-
* Copyright (c) 1993 The Regents of the University of California.
diff --git a/sys/arch/i386/i386/ns_cksum.c b/sys/arch/i386/i386/ns_cksum.c
index 1678196f428..1a555f898f9 100644
--- a/sys/arch/i386/i386/ns_cksum.c
+++ b/sys/arch/i386/i386/ns_cksum.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: ns_cksum.c,v 1.2 1996/02/28 14:38:46 mickey Exp $ */
+/* $OpenBSD: ns_cksum.c,v 1.3 1996/03/19 21:09:21 mickey Exp $ */
+/* $NetBSD: ns_cksum.c,v 1.4 1996/02/02 18:06:03 mycroft Exp $ */
/*
* Copyright (c) 1982, 1988 Regents of the University of California.
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index f1baaeeec27..9adae198c11 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.33 1995/06/26 05:21:58 cgd Exp $ */
+/* $NetBSD: pmap.c,v 1.34 1995/12/09 07:39:02 mycroft Exp $ */
/*
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
diff --git a/sys/arch/i386/i386/pmap.old.c b/sys/arch/i386/i386/pmap.old.c
index f1baaeeec27..9adae198c11 100644
--- a/sys/arch/i386/i386/pmap.old.c
+++ b/sys/arch/i386/i386/pmap.old.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.33 1995/06/26 05:21:58 cgd Exp $ */
+/* $NetBSD: pmap.c,v 1.34 1995/12/09 07:39:02 mycroft Exp $ */
/*
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index fe4b2824829..098d277d154 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: trap.c,v 1.5 1996/02/28 14:38:46 mickey Exp $ */
+/* $OpenBSD: trap.c,v 1.6 1996/03/19 21:09:23 mickey Exp $ */
+/* $NetBSD: trap.c,v 1.92 1996/01/08 13:51:38 mycroft Exp $ */
#undef DEBUG
#define DEBUG
diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c
index 107646d86a8..b4aafa74ec1 100644
--- a/sys/arch/i386/i386/vm_machdep.c
+++ b/sys/arch/i386/i386/vm_machdep.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: vm_machdep.c,v 1.6 1996/02/28 14:38:47 mickey Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.7 1996/03/19 21:09:24 mickey Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.58 1996/02/05 02:00:35 christos Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h
index 9ac9966cc95..a18a047cb29 100644
--- a/sys/arch/i386/include/param.h
+++ b/sys/arch/i386/include/param.h
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.26 1995/06/26 06:55:58 cgd Exp $ */
+/* $NetBSD: param.h,v 1.27 1996/02/01 22:30:47 mycroft Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -43,7 +43,7 @@
*/
#ifdef _KERNEL
-#ifdef LOCORE
+#ifdef _LOCORE
#include <machine/psl.h>
#else
#include <machine/cpu.h>
diff --git a/sys/arch/i386/include/pccons.h b/sys/arch/i386/include/pccons.h
index 9ea704e6a4d..f1eb362d867 100644
--- a/sys/arch/i386/include/pccons.h
+++ b/sys/arch/i386/include/pccons.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pccons.h,v 1.3 1995/03/28 18:17:02 jtc Exp $ */
+/* $NetBSD: pccons.h,v 1.4 1996/02/02 18:06:06 mycroft Exp $ */
/*
* pccons.h -- pccons ioctl definitions
@@ -7,11 +7,7 @@
#ifndef _PCCONS_H_
#define _PCCONS_H_
-#ifndef _KERNEL
#include <sys/ioctl.h>
-#else
-#include "ioctl.h"
-#endif
#define CONSOLE_X_MODE_ON _IO('t',121)
#define CONSOLE_X_MODE_OFF _IO('t',122)
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index fe10012495b..af53627a5ed 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: pmap.h,v 1.2 1996/02/28 15:03:41 mickey Exp $ */
+/* $OpenBSD: pmap.h,v 1.3 1996/03/19 21:09:27 mickey Exp $ */
+/* $NetBSD: pmap.h,v 1.22 1996/02/12 21:12:29 christos Exp $ */
/*
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -84,7 +85,6 @@ extern int PTDpaddr; /* physical address of kernel PTD */
void pmap_bootstrap __P((vm_offset_t start));
boolean_t pmap_testbit __P((vm_offset_t, int));
void pmap_changebit __P((vm_offset_t, int, int));
-__pure int pmap_page_index __P((vm_offset_t));
#endif
/*
diff --git a/sys/arch/i386/include/pmap.old.h b/sys/arch/i386/include/pmap.old.h
index 309b1df5379..20e1d3ff2da 100644
--- a/sys/arch/i386/include/pmap.old.h
+++ b/sys/arch/i386/include/pmap.old.h
@@ -1,4 +1,5 @@
-/* $OpenBSD: pmap.old.h,v 1.2 1996/02/28 15:03:41 mickey Exp $ */
+/* $OpenBSD: pmap.old.h,v 1.3 1996/03/19 21:09:27 mickey Exp $ */
+/* $NetBSD: pmap.h,v 1.22 1996/02/12 21:12:29 christos Exp $ */
/*
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -84,7 +85,6 @@ extern int PTDpaddr; /* physical address of kernel PTD */
void pmap_bootstrap __P((vm_offset_t start));
boolean_t pmap_testbit __P((vm_offset_t, int));
void pmap_changebit __P((vm_offset_t, int, int));
-__pure int pmap_page_index __P((vm_offset_t));
#endif
/*
diff --git a/sys/arch/i386/include/psl.h b/sys/arch/i386/include/psl.h
index 504708dfe52..8f9fbd87901 100644
--- a/sys/arch/i386/include/psl.h
+++ b/sys/arch/i386/include/psl.h
@@ -1,4 +1,4 @@
-/* $NetBSD: psl.h,v 1.26 1996/01/07 21:48:35 mycroft Exp $ */
+/* $NetBSD: psl.h,v 1.27 1996/02/01 22:30:56 mycroft Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -97,22 +97,7 @@
#define SIR_TTYMASK ((1 << SIR_TTY) | SIR_CLOCKMASK)
#define SIR_ALLMASK (SIR_CLOCKMASK | SIR_NETMASK | SIR_TTYMASK)
-#ifndef LOCORE
-
-/*
- * Interrupt handler chains. isa_intr_establish() inserts a handler into
- * the list. The handler is called with its (single) argument.
- */
-
-struct intrhand {
- int (*ih_fun)();
- void *ih_arg;
- u_long ih_count;
- struct intrhand *ih_next;
- int ih_level;
- int ih_irq;
- char *ih_what;
-};
+#ifndef _LOCORE
volatile int cpl, ipending, astpending;
int imask[5];
@@ -206,7 +191,7 @@ softintr(mask)
#define setsoftnet() softintr(1 << SIR_NET)
#define setsofttty() softintr(1 << SIR_TTY)
-#endif /* !LOCORE */
+#endif /* !_LOCORE */
#endif /* _KERNEL */
#endif /* !_I386_PSL_H_ */
diff --git a/sys/arch/i386/include/pte.h b/sys/arch/i386/include/pte.h
index 925b48ae168..1cc848378a9 100644
--- a/sys/arch/i386/include/pte.h
+++ b/sys/arch/i386/include/pte.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.8 1995/03/28 18:17:15 jtc Exp $ */
+/* $NetBSD: pte.h,v 1.9 1996/02/01 22:30:59 mycroft Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -57,7 +57,7 @@
#define PDOFSET (NBPD-1) /* byte offset into page dir */
#define NPTEPD (NBPD / NBPG)
-#ifndef LOCORE
+#ifndef _LOCORE
typedef int pd_entry_t; /* page directory entry */
typedef int pt_entry_t; /* Mach page table entry */
#endif
@@ -94,7 +94,7 @@ typedef int pt_entry_t; /* Mach page table entry */
#define PGEX_W 0x02 /* during a Write cycle */
#define PGEX_U 0x04 /* access from User mode (UPL) */
-#ifndef LOCORE
+#ifndef _LOCORE
#ifdef _KERNEL
/* utilities defined in pmap.c */
extern pt_entry_t *Sysmap;
diff --git a/sys/arch/i386/include/segments.h b/sys/arch/i386/include/segments.h
index a33824797cd..a1a332e23f3 100644
--- a/sys/arch/i386/include/segments.h
+++ b/sys/arch/i386/include/segments.h
@@ -1,4 +1,4 @@
-/* $NetBSD: segments.h,v 1.22 1995/12/20 18:09:24 mycroft Exp $ */
+/* $NetBSD: segments.h,v 1.23 1996/02/01 22:31:03 mycroft Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -70,7 +70,7 @@
#define KERNELMODE(c, f) (ISPL(c) == SEL_KPL)
#endif
-#ifndef LOCORE
+#ifndef _LOCORE
#if __GNUC__ == 2 && __GNUC_MINOR__ < 7
#pragma pack(1)
@@ -136,7 +136,7 @@ void setsegment __P((struct segment_descriptor *, void *, size_t, int, int,
int, int));
#endif /* _KERNEL */
-#endif /* !LOCORE */
+#endif /* !_LOCORE */
/* system segments and gate types */
#define SDT_SYSNULL 0 /* system null */
diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c
index 2833d2f2f10..c4e310a032f 100644
--- a/sys/arch/i386/isa/clock.c
+++ b/sys/arch/i386/isa/clock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.34 1995/08/13 04:06:29 mycroft Exp $ */
+/* $NetBSD: clock.c,v 1.35 1995/12/24 02:30:07 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum.
@@ -328,7 +328,7 @@ cpu_initclocks()
* XXX If you're doing strange things with multiple clocks, you might
* want to keep track of clock handlers.
*/
- (void)isa_intr_establish(0, IST_PULSE, IPL_CLOCK, clockintr, 0, "clock");
+ (void)isa_intr_establish(0, IST_PULSE, IPL_CLOCK, clockintr, 0);
}
void
diff --git a/sys/arch/i386/isa/fd.c b/sys/arch/i386/isa/fd.c
index 78d8ff0c347..abd878fcc6b 100644
--- a/sys/arch/i386/isa/fd.c
+++ b/sys/arch/i386/isa/fd.c
@@ -308,7 +308,7 @@ fdcattach(parent, self, aux)
isa_establish(&fdc->sc_id, &fdc->sc_dev);
#endif
fdc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_BIO, fdcintr,
- fdc, fdc->sc_dev.dv_xname);
+ fdc);
/*
* The NVRAM info only tells us about the first two disks on the
@@ -931,8 +931,8 @@ loop:
at_dma(read, bp->b_data + fd->sc_skip, fd->sc_nbytes,
fdc->sc_drq);
#else
- isadma_start(bp->b_data + fd->sc_skip, fd->sc_nbytes,
- fdc->sc_drq, read ? ISADMA_START_READ : ISADMA_START_WRITE);
+ isa_dmastart(read, bp->b_data + fd->sc_skip, fd->sc_nbytes,
+ fdc->sc_drq);
#endif
outb(iobase + fdctl, type->rate);
#ifdef FD_DEBUG
@@ -987,7 +987,7 @@ loop:
#ifdef NEWCONFIG
at_dma_abort(fdc->sc_drq);
#else
- isadma_abort(fdc->sc_drq);
+ isa_dmaabort(fdc->sc_drq);
#endif
case SEEKTIMEDOUT:
case RECALTIMEDOUT:
@@ -1004,7 +1004,7 @@ loop:
#ifdef NEWCONFIG
at_dma_abort(fdc->sc_drq);
#else
- isadma_abort(fdc->sc_drq);
+ isa_dmaabort(fdc->sc_drq);
#endif
#ifdef FD_DEBUG
fdcstatus(&fd->sc_dev, 7, bp->b_flags & B_READ ?
@@ -1018,7 +1018,9 @@ loop:
#ifdef NEWCONFIG
at_dma_terminate(fdc->sc_drq);
#else
- isadma_done(fdc->sc_drq);
+ read = bp->b_flags & B_READ;
+ isa_dmadone(read, bp->b_data + fd->sc_skip, fd->sc_nbytes,
+ fdc->sc_drq);
#endif
if (fdc->sc_errors) {
diskerr(bp, "fd", "soft error", LOG_PRINTF,
diff --git a/sys/arch/i386/isa/fdreg.h b/sys/arch/i386/isa/fdreg.h
index 5bab1f7d595..a1c8388912d 100644
--- a/sys/arch/i386/isa/fdreg.h
+++ b/sys/arch/i386/isa/fdreg.h
@@ -63,4 +63,4 @@
#define FDC_BSIZE 512
#define FDC_NPORT 8
-#define FDC_MAXIOSIZE MAXBSIZE
+#define FDC_MAXIOSIZE NBPG /* XXX should be MAXBSIZE */
diff --git a/sys/arch/i386/isa/icu.h b/sys/arch/i386/isa/icu.h
index b2cc5068c34..f89eb51ed23 100644
--- a/sys/arch/i386/isa/icu.h
+++ b/sys/arch/i386/isa/icu.h
@@ -1,4 +1,4 @@
-/* $NetBSD: icu.h,v 1.18 1996/01/07 02:03:20 mycroft Exp $ */
+/* $NetBSD: icu.h,v 1.19 1996/02/01 22:31:21 mycroft Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -46,7 +46,7 @@
#ifndef _I386_ISA_ICU_H_
#define _I386_ISA_ICU_H_
-#ifndef LOCORE
+#ifndef _LOCORE
/*
* Interrupt "level" mechanism variables, masks, and macros
@@ -55,7 +55,7 @@ extern unsigned imen; /* interrupt mask enable */
#define SET_ICUS() (outb(IO_ICU1 + 1, imen), outb(IO_ICU2 + 1, imen >> 8))
-#endif /* !LOCORE */
+#endif /* !_LOCORE */
/*
* Interrupt enable bits -- in order of priority
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c
index 7078c27bfb6..93f22d78a73 100644
--- a/sys/arch/i386/isa/isa_machdep.c
+++ b/sys/arch/i386/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.8 1995/10/09 06:34:47 mycroft Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.10 1996/02/09 02:26:00 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum.
@@ -145,8 +145,6 @@ isa_nmi()
return(0);
}
-int intrstray[ICU_LEN];
-
/*
* Caught a stray interrupt, notify
*/
@@ -154,15 +152,17 @@ void
isa_strayintr(irq)
int irq;
{
+ static u_long strays;
+
/*
* Stray interrupts on irq 7 occur when an interrupt line is raised
* and then lowered before the CPU acknowledges it. This generally
* means either the device is screwed or something is cli'ing too
* long and it's timing out.
*/
- if (intrstray[irq]++ <= 5)
+ if (++strays <= 5)
log(LOG_ERR, "stray interrupt %d%s\n", irq,
- intrstray[irq] > 5 ? "; stopped logging" : "");
+ strays >= 5 ? "; stopped logging" : "");
}
int fastvec;
@@ -199,18 +199,18 @@ intr_calculatemasks()
imask[level] = irqs | SIR_ALLMASK;
}
-#include "sl.h"
-#include "ppp.h"
-#if NSL > 0 || NPPP > 0
- /* In the presence of SLIP or PPP, imp > tty. */
- imask[IPL_IMP] |= imask[IPL_TTY];
-#endif
+ /*
+ * There are tty, network and disk drivers that use free() at interrupt
+ * time, so imp > (tty | net | bio).
+ */
+ imask[IPL_IMP] |= imask[IPL_TTY] | imask[IPL_NET] | imask[IPL_BIO];
/*
- * There are network and disk drivers that use free() at interrupt
- * time, so imp > (net | bio).
+ * Enforce a hierarchy that gives slow devices a better chance at not
+ * dropping data.
*/
- imask[IPL_IMP] |= imask[IPL_NET] | imask[IPL_BIO];
+ imask[IPL_TTY] |= imask[IPL_NET] | imask[IPL_BIO];
+ imask[IPL_NET] |= imask[IPL_BIO];
/* And eventually calculate the complete masks. */
for (irq = 0; irq < ICU_LEN; irq++) {
@@ -249,13 +249,12 @@ fakeintr(arg)
* XXX PRONE TO RACE CONDITIONS, UGLY, 'INTERESTING' INSERTION ALGORITHM.
*/
void *
-isa_intr_establish(irq, type, level, ih_fun, ih_arg, ih_what)
+isa_intr_establish(irq, type, level, ih_fun, ih_arg)
int irq;
int type;
int level;
int (*ih_fun) __P((void *));
void *ih_arg;
- char *ih_what;
{
struct intrhand **p, *q, *ih;
static struct intrhand fakehand = {fakeintr};
@@ -309,7 +308,6 @@ isa_intr_establish(irq, type, level, ih_fun, ih_arg, ih_what)
ih->ih_next = NULL;
ih->ih_level = level;
ih->ih_irq = irq;
- ih->ih_what = ih_what;
*p = ih;
return (ih);
diff --git a/sys/arch/i386/isa/isa_machdep.h b/sys/arch/i386/isa/isa_machdep.h
index 56f956f8c2f..495653d9b65 100644
--- a/sys/arch/i386/isa/isa_machdep.h
+++ b/sys/arch/i386/isa/isa_machdep.h
@@ -78,6 +78,21 @@
/*
+ * Interrupt handler chains. isa_intr_establish() inserts a handler into
+ * the list. The handler is called with its (single) argument.
+ */
+
+struct intrhand {
+ int (*ih_fun)();
+ void *ih_arg;
+ u_long ih_count;
+ struct intrhand *ih_next;
+ int ih_level;
+ int ih_irq;
+};
+
+
+/*
* ISA DMA bounce buffers.
* XXX should be made partially machine- and bus-mapping-independent.
*
diff --git a/sys/arch/i386/isa/lms.c b/sys/arch/i386/isa/lms.c
index 151fc590264..7c453919051 100644
--- a/sys/arch/i386/isa/lms.c
+++ b/sys/arch/i386/isa/lms.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lms.c,v 1.20 1995/10/05 22:06:47 mycroft Exp $ */
+/* $NetBSD: lms.c,v 1.21 1995/12/24 02:30:17 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum.
@@ -120,7 +120,7 @@ lmsattach(parent, self, aux)
sc->sc_state = 0;
sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_PULSE, IPL_TTY, lmsintr,
- sc, sc->sc_dev.dv_xname);
+ sc);
}
int
diff --git a/sys/arch/i386/isa/mms.c b/sys/arch/i386/isa/mms.c
index ef2fa5e1d69..ae4f144e726 100644
--- a/sys/arch/i386/isa/mms.c
+++ b/sys/arch/i386/isa/mms.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mms.c,v 1.19 1995/10/05 22:06:51 mycroft Exp $ */
+/* $NetBSD: mms.c,v 1.20 1995/12/24 02:30:19 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum.
@@ -110,7 +110,7 @@ mmsattach(parent, self, aux)
sc->sc_state = 0;
sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_PULSE, IPL_TTY, mmsintr,
- sc, sc->sc_dev.dv_xname);
+ sc);
}
int
diff --git a/sys/arch/i386/isa/npx.c b/sys/arch/i386/isa/npx.c
index 9b58f0e8313..3ec32a58889 100644
--- a/sys/arch/i386/isa/npx.c
+++ b/sys/arch/i386/isa/npx.c
@@ -326,7 +326,7 @@ npxattach(parent, self, aux)
printf("\n");
lcr0(rcr0() & ~CR0_NE);
sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_NONE,
- npxintr, 0, "npx");
+ npxintr, 0);
break;
case NPX_EXCEPTION:
printf(": using exception 16\n");
diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c
index 73277988ed5..fefe23887d3 100644
--- a/sys/arch/i386/isa/pccons.c
+++ b/sys/arch/i386/isa/pccons.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pccons.c,v 1.90 1995/10/11 04:20:33 mycroft Exp $ */
+/* $NetBSD: pccons.c,v 1.91 1995/12/24 02:30:25 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum. All rights reserved.
@@ -471,7 +471,7 @@ pcattach(parent, self, aux)
do_async_update(1);
sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_TTY, pcintr,
- sc, sc->sc_dev.dv_xname);
+ sc);
}
int
diff --git a/sys/arch/i386/isa/pcvt/Util/vgaio/vgaio.h b/sys/arch/i386/isa/pcvt/Util/vgaio/vgaio.h
index b2d09999282..ee8c5c22935 100644
--- a/sys/arch/i386/isa/pcvt/Util/vgaio/vgaio.h
+++ b/sys/arch/i386/isa/pcvt/Util/vgaio/vgaio.h
@@ -37,8 +37,13 @@
* The author may be reached unter <joerg_wunsch@uriah.sax.de>
*
* $Log: vgaio.h,v $
- * Revision 1.1 1995/10/18 08:50:49 deraadt
- * Initial revision
+ * Revision 1.2 1996/03/19 21:09:52 mickey
+ * Merging w/ NetBSD 021796.
+ * speaker upgraded to the current.
+ * some changes to the VM stuff (ie kern_thread.c added and so).
+ *
+ * Revision 1.1.1.1 1996/02/16 18:59:24 niklas
+ * Checkin of the NetBSD src/, supped 960203
*
* Revision 1.3 1995/10/07 21:46:02 jtc
* Overlay our pcvt with pcvt 3.32 sources. All of our fixes have been
diff --git a/sys/arch/i386/isa/pcvt/pcvt_conf.h b/sys/arch/i386/isa/pcvt/pcvt_conf.h
index 379475bf49f..7a21fb3c8e3 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_conf.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_conf.h
@@ -179,7 +179,7 @@
#endif
#if !defined PCVT_PRETTYSCRNS /* ---------- DEFAULT: OFF ------------ */
-# define PCVT_PRETTYSCRNS 0 /* for the cost of some microseconds of */
+# define PCVT_PRETTYSCRNS 1 /* for the cost of some microseconds of */
#elif PCVT_PRETTYSCRNS != 0 /* cpu time this adds a more "pretty" */
# undef PCVT_PRETTYSCRNS /* version to the screensaver, an "*" */
# define PCVT_PRETTYSCRNS 1 /* in random locations of the display. */
@@ -462,7 +462,7 @@
#define COLOR_KERNEL_FG FG_LIGHTGREY /* kernel messages, foreground */
#endif
#if !defined COLOR_KERNEL_BG
-#define COLOR_KERNEL_BG BG_RED /* kernel messages, background */
+#define COLOR_KERNEL_BG BG_BLUE /* kernel messages, background */
#endif
#if !defined MONO_KERNEL_FG /* monochrome displays */
diff --git a/sys/arch/i386/isa/pcvt/pcvt_drv.c b/sys/arch/i386/isa/pcvt/pcvt_drv.c
index 0f71a01d6fd..220b4465b3a 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_drv.c
@@ -336,7 +336,7 @@ pcattach(struct isa_device *dev)
#if PCVT_NETBSD > 101
sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_TTY, pcintr,
- (void *)0, sc->sc_dev.dv_xname);
+ (void *)0);
#else /* PCVT_NETBSD > 100 */
vthand.ih_fun = pcrint;
vthand.ih_arg = 0;
diff --git a/sys/arch/i386/isa/pcvt/pcvt_hdr.h b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
index 615e19abeb3..b41ea8e2d3a 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
@@ -72,8 +72,6 @@
#define PCVT_REL "3.32" /* driver attach announcement */
/* see also: pcvt_ioctl.h */
-#if PCVT_FREEBSD >= 200
-
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/ioctl.h>
@@ -88,110 +86,65 @@
#include <sys/malloc.h>
#include <sys/time.h>
-#else /* ! PCVT_FREEBSD >= 200 */
-
-#include "param.h"
-#include "conf.h"
-#include "ioctl.h"
-#include "proc.h"
-#include "user.h"
-#include "tty.h"
-#include "uio.h"
-#include "callout.h"
-#include "systm.h"
-#include "kernel.h"
-#include "syslog.h"
-#include "malloc.h"
-#include "time.h"
-
-#endif /* PCVT_FREEBSD >= 200 */
-
#include "pcvt_conf.h"
#if PCVT_NETBSD > 9
-#include "device.h"
+#include <sys/device.h>
#endif
#if PCVT_NETBSD > 9
#if PCVT_NETBSD > 101
-#include "i386/isa/isa_machdep.h"
-#include "dev/isa/isavar.h"
+#include <i386/isa/isa_machdep.h>
+#include <dev/isa/isavar.h>
#else
-#include "i386/isa/isavar.h"
+#include <i386/isa/isavar.h>
#endif
-
-#include "i386/cpufunc.h"
-#elif PCVT_FREEBSD >= 200
-#include <i386/isa/isa_device.h>
+#include <machine/cpufunc.h>
#else
-#include "i386/isa/isa_device.h"
+#include <i386/isa/isa_device.h>
#endif
-#if PCVT_FREEBSD >= 200
#include <i386/isa/icu.h>
-#else
-#include "i386/isa/icu.h"
-#endif
#if PCVT_NETBSD > 100
#if PCVT_NETBSD > 101
-#include "dev/isa/isareg.h"
+#include <dev/isa/isareg.h>
#else
-#include "i386/isa/isareg.h"
+#include <i386/isa/isareg.h>
#endif
-#elif PCVT_FREEBSD >= 200
-#include <i386/isa/isa.h>
#else
-#include "i386/isa/isa.h"
+#include <i386/isa/isa.h>
#endif
#if PCVT_NETBSD > 9
-#include "dev/cons.h"
+#include <dev/cons.h>
#if PCVT_NETBSD > 100
-#include "dev/ic/mc146818reg.h"
-#include "i386/isa/nvram.h"
+#include <dev/ic/mc146818reg.h>
+#include <i386/isa/nvram.h>
#endif
-#elif PCVT_FREEBSD >= 200
-#include <i386/i386/cons.h>
#else
-#include "i386/i386/cons.h"
+#include <i386/i386/cons.h>
#endif
#if PCVT_NETBSD <= 9
-#if PCVT_FREEBSD >= 200
#include <machine/psl.h>
#include <machine/frame.h>
-#else /* ! PCVT_FREEBSD >= 200 */
-#include "machine/psl.h"
-#include "machine/frame.h"
-#endif /* PCVT_FREEBSD >= 200 */
#endif /* PCVT_NETBSD <= 9 */
-#if PCVT_FREEBSD >= 200
#include <machine/stdarg.h>
-#else
-#include "machine/stdarg.h"
-#endif
#if PCVT_NETBSD > 9
#include "pcvt_ioctl.h"
-#elif PCVT_FREEBSD >= 200
-#include <machine/pcvt_ioctl.h>
#else
-#include "machine/pcvt_ioctl.h"
+#include <machine/pcvt_ioctl.h>
#endif
-#if PCVT_FREEBSD >= 200
#include <machine/pc/display.h>
#if PCVT_FREEBSD > 200
#include <machine/clock.h>
#include <machine/md_var.h>
#endif
#include <vm/vm_kern.h>
-#else /* PCVT_FREEBSD >= 200 */
-#include "machine/pc/display.h"
-#include "vm/vm_kern.h"
-#endif /* PCVT_FREEBSD >= 200 */
#if PCVT_FREEBSD > 205
#include <sys/devconf.h>
@@ -252,9 +205,9 @@ in the config file"
#if PCVT_NETBSD
#if PCVT_NETBSD == 9
-#include "machine/cpufunc.h" /* NetBSD 0.9 [...and earlier -currents] */
+#include <machine/cpufunc.h> /* NetBSD 0.9 [...and earlier -currents] */
#else
-#include "machine/pio.h" /* recent NetBSD -currents */
+#include <machine/pio.h> /* recent NetBSD -currents */
#define NEW_AVERUNNABLE /* averunnable changes for younger currents */
#endif /* PCVT_NETBSD == 9 */
#endif /* PCVT_NETBSD */
@@ -763,9 +716,7 @@ EXTERN u_short user_attr; /* character attributes */
#if !PCVT_EMU_MOUSE
-#if PCVT_NETBSD > 100
-/* nothing */
-#elif PCVT_NETBSD
+#if PCVT_NETBSD
EXTERN struct tty *pc_tty[PCVT_NSCREENS];
#elif !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
EXTERN struct tty pccons[PCVT_NSCREENS];
@@ -775,9 +726,7 @@ EXTERN struct tty *pccons[PCVT_NSCREENS];
#else /* PCVT_EMU_MOUSE */
-#if PCVT_NETBSD > 100
-/* nothing */
-#elif PCVT_NETBSD
+#if PCVT_NETBSD
EXTERN struct tty *pc_tty[PCVT_NSCREENS + 1];
#elif !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
EXTERN struct tty pccons[PCVT_NSCREENS + 1];
diff --git a/sys/arch/i386/isa/pcvt/pcvt_ioctl.h b/sys/arch/i386/isa/pcvt/pcvt_ioctl.h
index bcef870bed9..a3e7d413406 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_ioctl.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_ioctl.h
@@ -75,10 +75,8 @@
#define PCVTIDMAJOR 3 /* driver id - major release */
#define PCVTIDMINOR 32 /* driver id - minor release */
-#if defined(KERNEL) || defined(_KERNEL)
-#include "ioctl.h"
-#else
#include <sys/ioctl.h>
+#if !defined(KERNEL) && !defined(_KERNEL)
#include <sys/types.h>
#endif
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
index c7925fd407e..d13008c230b 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
@@ -1215,7 +1215,13 @@ loop:
* less than half a second
*/
now = time;
+
+#if PCVT_NETBSD > 100
+ timersub(&now,&mouse.lastmove,&now);
+#else
timevalsub(&now, &mouse.lastmove);
+#endif
+
mouse.lastmove = time;
accel = (now.tv_sec == 0
&& now.tv_usec
diff --git a/sys/arch/i386/isa/pms.c b/sys/arch/i386/isa/pms.c
index 9cc0a6407ce..882b1a7951b 100644
--- a/sys/arch/i386/isa/pms.c
+++ b/sys/arch/i386/isa/pms.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pms.c,v 1.23 1995/10/05 22:06:54 mycroft Exp $ */
+/* $NetBSD: pms.c,v 1.24 1995/12/24 02:30:28 mycroft Exp $ */
/*-
* Copyright (c) 1994 Charles Hannum.
@@ -193,7 +193,7 @@ pmsattach(parent, self, aux)
sc->sc_state = 0;
sc->sc_ih = isa_intr_establish(ia->ia_irq, IST_EDGE, IPL_TTY, pmsintr,
- sc, sc->sc_dev.dv_xname);
+ sc);
}
int
diff --git a/sys/arch/i386/isa/spkr.c b/sys/arch/i386/isa/spkr.c
index 14fd48a7301..7db0a7b962c 100644
--- a/sys/arch/i386/isa/spkr.c
+++ b/sys/arch/i386/isa/spkr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: spkr.c,v 1.18 1996/02/22 05:53:28 scottr Exp $ */
+/* $NetBSD: spkr.c,v 1.22 1996/03/18 01:26:12 jtk Exp $ */
/*
* spkr.c -- device driver for console speaker on 80386
@@ -11,6 +11,9 @@
#include "spkr.h"
#if NSPKR > 0
+#if NSPKR > 1
+#error only one speaker device per system
+#endif
#include <sys/param.h>
#include <sys/kernel.h>
@@ -411,17 +414,38 @@ size_t slen;
static int spkr_active; /* exclusion flag */
static struct buf *spkr_inbuf; /* incoming buf */
-int spkrprobe (struct device *parent, void *match, void *aux)
+int spkrprobe (parent, match, aux)
+ struct device *parent;
+ void *match;
+ void *aux;
{
- struct isa_attach_args *ia = aux;
-
- ia->ia_iosize = 0;
- return 1;
+ register struct isa_attach_args *ia = aux;
+ struct cfdata *cf = match;
+ /*
+ * We only attach to the keyboard controller via
+ * the console drivers. (We really wish we could be the
+ * child of a real keyboard controller driver.)
+ */
+ if ((parent == NULL) ||
+ ((strcmp(parent->dv_cfdata->cf_driver->cd_name, "pc") != 0) &&
+ (strcmp(parent->dv_cfdata->cf_driver->cd_name, "vt") != 0)))
+ return (0);
+ if (cf->cf_loc[1] != PITAUX_PORT)
+ return (0);
+
+ return (1);
}
-void spkrattach (struct device *parent, struct device *self, void *aux)
+static int spkr_attached = 0;
+
+void
+spkrattach(parent, self, aux)
+ struct device *parent;
+ struct device *self;
+ void *aux;
{
- printf("\n");
+ printf(" port 0x%x\n", self->dv_cfdata->cf_loc[1]);
+ spkr_attached = 1;
}
int spkropen(dev)
@@ -431,7 +455,7 @@ dev_t dev;
printf("spkropen: entering with dev = %x\n", dev);
#endif /* DEBUG */
- if (minor(dev) != 0)
+ if (minor(dev) != 0 || !spkr_attached)
return(ENXIO);
else if (spkr_active)
return(EBUSY);
diff --git a/sys/arch/i386/isa/vector.s b/sys/arch/i386/isa/vector.s
index ef282214161..82202e35044 100644
--- a/sys/arch/i386/isa/vector.s
+++ b/sys/arch/i386/isa/vector.s
@@ -292,8 +292,6 @@ INTR(15, IO_ICU2, ACK2)
/*
* These tables are used by the ISA configuration code.
*/
- .data
-
/* interrupt service routine entry points */
IDTVEC(intr)
.long _Xintr0, _Xintr1, _Xintr2, _Xintr3, _Xintr4, _Xintr5, _Xintr6
@@ -328,14 +326,10 @@ IDTVEC(recurse)
.long _Xsofttty, _Xsoftnet, _Xsoftclock
/* Some bogus data, to keep vmstat happy, for now. */
- .globl _intrcnt, _eintrcnt
-_intrcnt:
- .long 0
-_eintrcnt:
-
- .globl _intrnames, _eintrnames
+ .globl _intrnames, _eintrnames, _intrcnt, _eintrcnt
_intrnames:
- .long 0
+ .long 0
_eintrnames:
-
- .text
+_intrcnt:
+ .long 0
+_eintrcnt:
diff --git a/sys/arch/i386/netboot/arp.c b/sys/arch/i386/netboot/arp.c
index 53285cb1966..10d8b1ffe9d 100644
--- a/sys/arch/i386/netboot/arp.c
+++ b/sys/arch/i386/netboot/arp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: arp.c,v 1.4 1994/10/27 04:21:01 cgd Exp $ */
+/* $NetBSD: arp.c,v 1.5 1996/02/02 18:06:14 mycroft Exp $ */
/*
* source in this file came from
@@ -12,7 +12,7 @@
#include "proto.h"
#include "assert.h"
-#include "param.h"
+#include <sys/param.h>
#include "packet.h"
#include "ether.h"
#include "inet.h"
diff --git a/sys/arch/i386/netboot/main.c b/sys/arch/i386/netboot/main.c
index 715db4836c9..43884a2b9a2 100644
--- a/sys/arch/i386/netboot/main.c
+++ b/sys/arch/i386/netboot/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.5 1994/10/27 04:21:17 cgd Exp $ */
+/* $NetBSD: main.c,v 1.6 1996/02/02 18:06:17 mycroft Exp $ */
/*
* source code in this file is from:
@@ -57,7 +57,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "config.h"
#include "nbtypes.h"
#include "assert.h"
-#include "param.h"
+#include <sys/param.h>
#include "packet.h"
#include "ether.h"
#include "inet.h"
diff --git a/sys/arch/i386/netboot/packet.c b/sys/arch/i386/netboot/packet.c
index a292f699f32..73c85d4339b 100644
--- a/sys/arch/i386/netboot/packet.c
+++ b/sys/arch/i386/netboot/packet.c
@@ -1,4 +1,4 @@
-/* $NetBSD: packet.c,v 1.3 1994/10/27 04:21:21 cgd Exp $ */
+/* $NetBSD: packet.c,v 1.4 1996/02/02 18:06:21 mycroft Exp $ */
/*
* source in this file came from
@@ -11,7 +11,7 @@
#include "proto.h"
#include "assert.h"
-#include "param.h"
+#include <sys/param.h>
#include "packet.h"
static packet_t *pool = (packet_t *)0;
diff --git a/sys/arch/i386/netboot/tftp.c b/sys/arch/i386/netboot/tftp.c
index 6725080aa5a..0edd39e45e7 100644
--- a/sys/arch/i386/netboot/tftp.c
+++ b/sys/arch/i386/netboot/tftp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tftp.c,v 1.3 1994/10/27 04:21:26 cgd Exp $ */
+/* $NetBSD: tftp.c,v 1.4 1996/02/02 18:06:23 mycroft Exp $ */
/*
* source in this file came from
@@ -11,7 +11,7 @@
#include "proto.h"
#include "assert.h"
-#include "param.h"
+#include <sys/param.h>
#include "packet.h"
#include "ether.h"
#include "inet.h"
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c
index b84cf3c2083..404fe2e1c54 100644
--- a/sys/arch/i386/pci/pci_machdep.c
+++ b/sys/arch/i386/pci/pci_machdep.c
@@ -373,12 +373,11 @@ pci_map_mem(tag, reg, vap, pap)
}
void *
-pci_map_int(tag, level, func, arg, what)
+pci_map_int(tag, level, func, arg)
pcitag_t tag;
int level;
int (*func) __P((void *));
void *arg;
- char *what;
{
pcireg_t data;
int pin, line;
@@ -430,5 +429,5 @@ pci_map_int(tag, level, func, arg, what)
printf("pci_map_int: pin %c mapped to line %d\n", '@' + pin, line);
#endif
- return isa_intr_establish(line, IST_LEVEL, level, func, arg, what);
+ return isa_intr_establish(line, IST_LEVEL, level, func, arg);
}
diff --git a/sys/arch/i386/stand/Makefile b/sys/arch/i386/stand/Makefile
index 325b8c9e2b7..b6d23347941 100644
--- a/sys/arch/i386/stand/Makefile
+++ b/sys/arch/i386/stand/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 1994/10/27 04:21:44 cgd Exp $
+# $NetBSD: Makefile,v 1.6 1996/02/01 22:31:28 mycroft Exp $
# @(#)Makefile 7.9 (Berkeley) 5/8/91
DESTDIR=/usr
@@ -27,22 +27,22 @@ all: ${ALL}
# startups
srt0.o: srt0.c
- ${CPP} -E -DLOCORE -DRELOC=0x${RELOC} srt0.c | ${AS} -o srt0.o
+ ${CPP} -E -D_LOCORE -DRELOC=0x${RELOC} srt0.c | ${AS} -o srt0.o
wsrt0.o: srt0.c
- ${CPP} -E -DLOCORE -DSMALL -DRELOC=0x${RELOC} -DREL srt0.c | \
+ ${CPP} -E -D_LOCORE -DSMALL -DRELOC=0x${RELOC} -DREL srt0.c | \
${AS} -o wsrt0.o
relsrt0.o: srt0.c
- ${CPP} -E -DLOCORE -DRELOC=0x${RELOC} -DREL srt0.c | ${AS} -o relsrt0.o
+ ${CPP} -E -D_LOCORE -DRELOC=0x${RELOC} -DREL srt0.c | ${AS} -o relsrt0.o
# block 0 boots
wdbootblk.o: wdbootblk.c
- ${CPP} -E -DLOCORE -DRELOC=0x${RELOC} wdbootblk.c | ${AS} -o $@
+ ${CPP} -E -D_LOCORE -DRELOC=0x${RELOC} wdbootblk.c | ${AS} -o $@
fdbootblk.o: fdbootblk.c
- ${CPP} -E -DLOCORE -DRELOC=0x${RELOC} fdbootblk.c | ${AS} -o $@
+ ${CPP} -E -D_LOCORE -DRELOC=0x${RELOC} fdbootblk.c | ${AS} -o $@
asbootblk.o: asbootblk.c
cc -c -O -DRELOC=0x${RELOC} ${INCPATH} asbootblk.c