summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1996-08-10 21:37:48 +0000
committerbriggs <briggs@cvs.openbsd.org>1996-08-10 21:37:48 +0000
commite5b7559c19039063b8bb2138a07e59a93db000d3 (patch)
tree5dfc32fc160c611b25bf0df5e351232ab60512ed /sys/arch
parentea9e6cbecb74d8f6bf72bfaa86b1619b5bad41c4 (diff)
Sync with NetBSD.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mac68k/conf/GENERIC8
-rw-r--r--sys/arch/mac68k/conf/Makefile.mac68k31
-rw-r--r--sys/arch/mac68k/conf/OCELOT7
-rw-r--r--sys/arch/mac68k/conf/PUMA7
-rw-r--r--sys/arch/mac68k/conf/RAMDISK7
-rw-r--r--sys/arch/mac68k/conf/SPOT10
-rw-r--r--sys/arch/mac68k/conf/files.mac68k6
-rw-r--r--sys/arch/mac68k/conf/std.mac68k7
-rw-r--r--sys/arch/mac68k/dev/grf.c14
-rw-r--r--sys/arch/mac68k/dev/grf_iv.c6
-rw-r--r--sys/arch/mac68k/dev/grf_mv.c6
-rw-r--r--sys/arch/mac68k/dev/grf_subr.c9
-rw-r--r--sys/arch/mac68k/dev/grfvar.h6
-rw-r--r--sys/arch/mac68k/dev/ite.c50
-rw-r--r--sys/arch/mac68k/include/cpu.h4
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c76
-rw-r--r--sys/arch/mac68k/mac68k/macrom.c13
17 files changed, 171 insertions, 96 deletions
diff --git a/sys/arch/mac68k/conf/GENERIC b/sys/arch/mac68k/conf/GENERIC
index 170b352686e..4be1bd9fa11 100644
--- a/sys/arch/mac68k/conf/GENERIC
+++ b/sys/arch/mac68k/conf/GENERIC
@@ -1,5 +1,5 @@
-# $OpenBSD: GENERIC,v 1.6 1996/05/26 18:35:05 briggs Exp $
-# $NetBSD: GENERIC,v 1.37 1996/05/19 22:29:04 scottr Exp $
+# $OpenBSD: GENERIC,v 1.7 1996/08/10 21:37:39 briggs Exp $
+# $NetBSD: GENERIC,v 1.38 1996/08/05 01:52:13 scottr Exp $
#
# GENERIC
@@ -7,7 +7,6 @@ include "std.mac68k"
maxusers 16
-# obsolete timezone spec
options MAXFDESCS=2048
# Standard system options
@@ -78,6 +77,9 @@ ae* at nubus?
macvid* at nubus?
grf* at macvid?
+# Attach ite semantics to the appropriate grf device
+ite0 at grf?
+
ncrscsi0 at obio? # SCSI NCR 5380
ncr96scsi0 at obio? # SCSI NCR 53C96
diff --git a/sys/arch/mac68k/conf/Makefile.mac68k b/sys/arch/mac68k/conf/Makefile.mac68k
index f09b3efad2a..fbcb7eb177b 100644
--- a/sys/arch/mac68k/conf/Makefile.mac68k
+++ b/sys/arch/mac68k/conf/Makefile.mac68k
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile.mac68k,v 1.9 1996/05/26 18:35:07 briggs Exp $
-# $NetBSD: Makefile.mac68k,v 1.38 1996/05/11 16:12:20 mycroft Exp $
+# $OpenBSD: Makefile.mac68k,v 1.10 1996/08/10 21:37:40 briggs Exp $
+# $NetBSD: Makefile.mac68k,v 1.40 1996/08/10 06:09:07 mycroft Exp $
# Makefile for NetBSD
#
@@ -22,21 +22,20 @@
# DEBUG is set to -g if debugging.
# PROF is set to -pg if profiling.
-AS?= as
CC?= cc
-CPP?= cpp
LD?= ld
+MKDEP?= mkdep
STRIP?= strip -d
TOUCH?= touch -f -c
# source tree is located via $S relative to the compilation directory
-S= ../../../..
-MAC68K= ../..
+S!= cd ../../../..; pwd
+MAC68K= $S/arch/mac68k
-INCLUDES= -I. -I$S/arch -I$S
+INCLUDES= -I. -I$S/arch -I$S -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dmc68020 -Dmac68k
-GCCWFLAGS= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized
-CFLAGS= ${DEBUG} -O ${GCCWFLAGS} -msoft-float
+CWARNFLAGS= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized
+CFLAGS= ${DEBUG} ${CWARNFLAGS} -O -msoft-float
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -n -Ttext 0 -e start
@@ -73,6 +72,8 @@ DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
+HOSTED_C_C= ${NORMAL_C_C:S/^-pg$//:S/^-p$//:S/^-nostdinc$//}
+
%OBJS
%CFILES
@@ -99,7 +100,7 @@ SYSTEM_LD_TAIL+=; \
echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
echo ${STRIP} $@; ${STRIP} $@
.else
-LINKFLAGS+= -x
+LINKFLAGS+= -S
.endif
%LOAD
@@ -111,7 +112,7 @@ genassym: genassym.o
${CC} -o $@ genassym.o
genassym.o: ${MAC68K}/mac68k/genassym.c
- ${NORMAL_C_C}
+ ${HOSTED_C_C}
param.c: $S/conf/param.c
rm -f param.c
@@ -153,10 +154,10 @@ SRCS= ${MAC68K}/mac68k/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
.depend: ${SRCS} assym.h param.c
- mkdep ${AFLAGS} ${CPPFLAGS} ${MAC68K}/mac68k/locore.s
- mkdep -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
- mkdep -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
- mkdep -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${MAC68K}/mac68k/genassym.c
+ ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${MAC68K}/mac68k/locore.s
+ ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
+ ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
+ ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} ${PARAM} ${MAC68K}/mac68k/genassym.c
# depend on root or device configuration
diff --git a/sys/arch/mac68k/conf/OCELOT b/sys/arch/mac68k/conf/OCELOT
index b0d261c137f..7246b238384 100644
--- a/sys/arch/mac68k/conf/OCELOT
+++ b/sys/arch/mac68k/conf/OCELOT
@@ -1,5 +1,5 @@
-# $OpenBSD: OCELOT,v 1.5 1996/05/26 18:35:08 briggs Exp $
-# $NetBSD: OCELOT,v 1.10 1996/05/19 22:29:06 scottr Exp $
+# $OpenBSD: OCELOT,v 1.6 1996/08/10 21:37:40 briggs Exp $
+# $NetBSD: OCELOT,v 1.11 1996/08/05 01:52:14 scottr Exp $
#
# OCELOT
@@ -61,6 +61,9 @@ macvid* at nubus?
grf* at intvid?
grf* at macvid?
+# Attach ite semantics to the appropriate grf device
+ite0 at grf?
+
ncrscsi0 at mainbus? # SCSI NCR 5380
ncr96scsi0 at mainbus? # SCSI NCR 53C96
diff --git a/sys/arch/mac68k/conf/PUMA b/sys/arch/mac68k/conf/PUMA
index 4831f63a6fc..7105fca6581 100644
--- a/sys/arch/mac68k/conf/PUMA
+++ b/sys/arch/mac68k/conf/PUMA
@@ -1,5 +1,5 @@
-# $OpenBSD: PUMA,v 1.5 1996/05/26 18:35:08 briggs Exp $
-# $NetBSD: PUMA,v 1.12 1996/05/19 22:29:07 scottr Exp $
+# $OpenBSD: PUMA,v 1.6 1996/08/10 21:37:40 briggs Exp $
+# $NetBSD: PUMA,v 1.13 1996/08/05 01:52:15 scottr Exp $
#
# PUMA
@@ -57,6 +57,9 @@ macvid* at nubus?
grf* at macvid?
+# Attach ite semantics to the appropriate grf device
+ite0 at grf?
+
ncrscsi0 at obio? # SCSI NCR 5380
scsibus* at scsi?
diff --git a/sys/arch/mac68k/conf/RAMDISK b/sys/arch/mac68k/conf/RAMDISK
index efa62db3b30..1e59e26b1e7 100644
--- a/sys/arch/mac68k/conf/RAMDISK
+++ b/sys/arch/mac68k/conf/RAMDISK
@@ -1,5 +1,5 @@
-# $OpenBSD: RAMDISK,v 1.4 1996/05/26 18:35:09 briggs Exp $
-# $NetBSD: RAMDISK,v 1.5 1996/05/19 22:29:08 scottr Exp $
+# $OpenBSD: RAMDISK,v 1.5 1996/08/10 21:37:41 briggs Exp $
+# $NetBSD: RAMDISK,v 1.6 1996/08/05 01:52:16 scottr Exp $
# RAMDISK
# Support Root/swap on ramdisk
@@ -53,6 +53,9 @@ macvid* at nubus?
grf* at intvid?
grf* at macvid?
+# Attach ite semantics to the appropriate grf device
+ite0 at grf?
+
ncrscsi0 at mainbus? # SCSI NCR 5380
ncr96scsi0 at mainbus? # SCSI NCR 53C96
diff --git a/sys/arch/mac68k/conf/SPOT b/sys/arch/mac68k/conf/SPOT
index 90745417a93..948ce314089 100644
--- a/sys/arch/mac68k/conf/SPOT
+++ b/sys/arch/mac68k/conf/SPOT
@@ -1,5 +1,5 @@
-# $OpenBSD: SPOT,v 1.3 1996/06/23 16:19:13 briggs Exp $
-# $NetBSD: SPOT,v 1.10 1996/06/20 04:11:55 scottr Exp $
+# $OpenBSD: SPOT,v 1.4 1996/08/10 21:37:41 briggs Exp $
+# $NetBSD: SPOT,v 1.11 1996/08/05 01:52:17 scottr Exp $
#
# SPOT
@@ -17,6 +17,7 @@ options KTRACE # system call tracing support
#options KGDB # support for kernel gdb
#options GDB # support for normal gdb
#options KGDBDEV=0xc01, KGDBRATE=38400 # device & baud rate
+options UCONSOLE # non-root can grab console
# Filesystem options
options FIFO # POSIX fifo support (in all filesystems)
@@ -49,7 +50,7 @@ options GATEWAY # IP packet forwarding
#options TPIP
#options EON
options PPP_BSDCOMP
-#options PPP_DEFLATE
+options PPP_DEFLATE
options COMPAT_42
options COMPAT_43
#options NS
@@ -78,6 +79,9 @@ macvid* at nubus?
grf* at intvid?
grf* at macvid?
+# Attach ite semantics to the appropriate grf device
+ite0 at grf?
+
#ncrscsi0 at obio? # SCSI NCR 5380
#ncr96scsi0 at obio? # SCSI NCR 53C96
sbc0 at obio? flags 0x1 # MI NCR 5380 SCSI Bus Controller
diff --git a/sys/arch/mac68k/conf/files.mac68k b/sys/arch/mac68k/conf/files.mac68k
index d451d71b49b..640631c727e 100644
--- a/sys/arch/mac68k/conf/files.mac68k
+++ b/sys/arch/mac68k/conf/files.mac68k
@@ -1,5 +1,5 @@
-# $OpenBSD: files.mac68k,v 1.6 1996/06/23 16:18:02 briggs Exp $
-# $NetBSD: files.mac68k,v 1.49 1996/06/19 03:21:08 scottr Exp $
+# $OpenBSD: files.mac68k,v 1.7 1996/08/10 21:37:42 briggs Exp $
+# $NetBSD: files.mac68k,v 1.50 1996/08/05 01:00:15 scottr Exp $
# mac68k-specific configuration info
@@ -49,7 +49,7 @@ attach ae at nubus
file arch/mac68k/dev/if_ae.c ae needs-flag
device ite
-attach ite at obio
+attach ite at grf
file arch/mac68k/dev/ite.c ite needs-flag
device sn: ifnet, ether
diff --git a/sys/arch/mac68k/conf/std.mac68k b/sys/arch/mac68k/conf/std.mac68k
index b2805afdebc..4dc72b8306b 100644
--- a/sys/arch/mac68k/conf/std.mac68k
+++ b/sys/arch/mac68k/conf/std.mac68k
@@ -1,5 +1,5 @@
-# $OpenBSD: std.mac68k,v 1.5 1996/05/26 18:35:11 briggs Exp $
-# $NetBSD: std.mac68k,v 1.12 1996/05/18 18:53:56 briggs Exp $
+# $OpenBSD: std.mac68k,v 1.6 1996/08/10 21:37:42 briggs Exp $
+# $NetBSD: std.mac68k,v 1.13 1996/08/05 01:00:12 scottr Exp $
#
# standard Macintosh information.
# roughly copied from std.sparc 14 Oct 1993.
@@ -14,10 +14,9 @@ obio0 at mainbus?
adb0 at obio?
asc0 at obio?
fpu0 at obio?
-ite0 at obio?
zsc0 at obio?
zstty* at zsc? channel ?
options TIMEZONE=0 # minutes west of GMT--read from booter
-options DST=0 # daylight savings rules--obsolete
+options DST=0 # daylight savings time/summer time
options HZ=60 # clock runs at 60hz on this port
diff --git a/sys/arch/mac68k/dev/grf.c b/sys/arch/mac68k/dev/grf.c
index 53060c73ca6..cd782fe1412 100644
--- a/sys/arch/mac68k/dev/grf.c
+++ b/sys/arch/mac68k/dev/grf.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: grf.c,v 1.3 1996/05/26 18:35:20 briggs Exp $ */
-/* $NetBSD: grf.c,v 1.33 1996/05/19 22:27:04 scottr Exp $ */
+/* $OpenBSD: grf.c,v 1.4 1996/08/10 21:37:43 briggs Exp $ */
+/* $NetBSD: grf.c,v 1.35 1996/08/05 01:26:31 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -129,14 +129,12 @@ grfattach(parent, self, aux)
sc->sc_flags = GF_ALIVE; /* XXX bogus */
-#ifdef notyet
/*
* Attach ite semantics to the grf. Change the name, forward
* everything else.
*/
ga->ga_name = "ite";
(void)config_found(self, ga, grfbusprint);
-#endif
}
/*ARGSUSED*/
@@ -345,6 +343,7 @@ grfmap(dev, addrp, p)
caddr_t *addrp;
struct proc *p;
{
+ extern u_int32_t mac68k_vidphys;
struct grf_softc *gp;
struct specinfo si;
struct vnode vn;
@@ -359,8 +358,11 @@ grfmap(dev, addrp, p)
len = mac68k_round_page(gp->sc_grfmode->fbsize + gp->sc_grfmode->fboff);
flags = MAP_SHARED | MAP_FIXED;
- *addrp = (caddr_t) mac68k_trunc_page(
- NUBUS_SLOT_TO_PADDR(gp->sc_slot->slot));
+ if (gp->sc_slot == NULL)
+ *addrp = (caddr_t) mac68k_trunc_page(mac68k_vidphys);
+ else
+ *addrp = (caddr_t) mac68k_trunc_page(
+ NUBUS_SLOT_TO_PADDR(gp->sc_slot->slot));
vn.v_type = VCHR; /* XXX */
vn.v_specinfo = &si; /* XXX */
diff --git a/sys/arch/mac68k/dev/grf_iv.c b/sys/arch/mac68k/dev/grf_iv.c
index 0ac4300f0b3..0685cf76038 100644
--- a/sys/arch/mac68k/dev/grf_iv.c
+++ b/sys/arch/mac68k/dev/grf_iv.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: grf_iv.c,v 1.3 1996/05/26 18:35:21 briggs Exp $ */
-/* $NetBSD: grf_iv.c,v 1.12 1996/05/19 22:27:06 scottr Exp $ */
+/* $OpenBSD: grf_iv.c,v 1.4 1996/08/10 21:37:43 briggs Exp $ */
+/* $NetBSD: grf_iv.c,v 1.13 1996/08/04 06:03:52 scottr Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@@ -111,7 +111,7 @@ grfiv_attach(parent, self, aux)
gm->fboff = 0;
/* Perform common video attachment. */
- grf_establish(sc, grfiv_mode, grfiv_phys);
+ grf_establish(sc, NULL, grfiv_mode, grfiv_phys);
}
static int
diff --git a/sys/arch/mac68k/dev/grf_mv.c b/sys/arch/mac68k/dev/grf_mv.c
index f91b29c8405..3c8c5594560 100644
--- a/sys/arch/mac68k/dev/grf_mv.c
+++ b/sys/arch/mac68k/dev/grf_mv.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: grf_mv.c,v 1.3 1996/05/26 18:35:21 briggs Exp $ */
-/* $NetBSD: grf_mv.c,v 1.11 1996/05/19 22:27:07 scottr Exp $ */
+/* $OpenBSD: grf_mv.c,v 1.4 1996/08/10 21:37:44 briggs Exp $ */
+/* $NetBSD: grf_mv.c,v 1.12 1996/08/04 06:03:54 scottr Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@@ -243,7 +243,7 @@ grfmv_attach(parent, self, aux)
add_nubus_intr(sc->sc_slot.slot, grfmv_intr, sc);
/* Perform common video attachment. */
- grf_establish(sc, grfmv_mode, grfmv_phys);
+ grf_establish(sc, &sc->sc_slot, grfmv_mode, grfmv_phys);
}
static int
diff --git a/sys/arch/mac68k/dev/grf_subr.c b/sys/arch/mac68k/dev/grf_subr.c
index 872a41eaca5..2035881511c 100644
--- a/sys/arch/mac68k/dev/grf_subr.c
+++ b/sys/arch/mac68k/dev/grf_subr.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: grf_subr.c,v 1.1 1996/05/26 19:02:06 briggs Exp $ */
-/* $NetBSD: grf_subr.c,v 1.1 1996/05/19 22:27:08 scottr Exp $ */
+/* $OpenBSD: grf_subr.c,v 1.2 1996/08/10 21:37:44 briggs Exp $ */
+/* $NetBSD: grf_subr.c,v 1.2 1996/08/04 06:03:56 scottr Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -47,8 +47,9 @@
#include <mac68k/dev/grfvar.h>
void
-grf_establish(sc, g_mode, g_phys)
+grf_establish(sc, sp, g_mode, g_phys)
struct grfbus_softc *sc;
+ nubus_slot *sp;
int (*g_mode) __P((struct grf_softc *, int, void *));
caddr_t (*g_phys) __P((struct grf_softc *, vm_offset_t));
{
@@ -65,7 +66,7 @@ grf_establish(sc, g_mode, g_phys)
/* Attach grf semantics to the hardware. */
ga.ga_name = "grf";
ga.ga_grfmode = gm;
- ga.ga_slot = &sc->sc_slot; /* XXX */
+ ga.ga_slot = sp;
ga.ga_mode = g_mode;
ga.ga_phys = g_phys;
(void)config_found(&sc->sc_dev, &ga, grfbusprint);
diff --git a/sys/arch/mac68k/dev/grfvar.h b/sys/arch/mac68k/dev/grfvar.h
index d4c95487e48..37109c21dfa 100644
--- a/sys/arch/mac68k/dev/grfvar.h
+++ b/sys/arch/mac68k/dev/grfvar.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: grfvar.h,v 1.3 1996/05/26 18:35:22 briggs Exp $ */
-/* $NetBSD: grfvar.h,v 1.10 1996/05/19 22:27:10 scottr Exp $ */
+/* $OpenBSD: grfvar.h,v 1.4 1996/08/10 21:37:44 briggs Exp $ */
+/* $NetBSD: grfvar.h,v 1.11 1996/08/04 06:03:58 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -144,7 +144,7 @@ int grfaddr __P((struct grf_softc *gp, register int off));
int grfmap __P((dev_t dev, caddr_t *addrp, struct proc *p));
int grfunmap __P((dev_t dev, caddr_t addr, struct proc *p));
-void grf_establish __P((struct grfbus_softc *,
+void grf_establish __P((struct grfbus_softc *, nubus_slot *,
int (*)(struct grf_softc *, int, void *),
caddr_t (*)(struct grf_softc *, vm_offset_t)));
int grfbusprint __P((void *, char *));
diff --git a/sys/arch/mac68k/dev/ite.c b/sys/arch/mac68k/dev/ite.c
index 499c550a22b..f38b599c7ad 100644
--- a/sys/arch/mac68k/dev/ite.c
+++ b/sys/arch/mac68k/dev/ite.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ite.c,v 1.4 1996/06/08 16:21:10 briggs Exp $ */
-/* $NetBSD: ite.c,v 1.23 1996/06/01 00:13:39 scottr Exp $ */
+/* $OpenBSD: ite.c,v 1.5 1996/08/10 21:37:45 briggs Exp $ */
+/* $NetBSD: ite.c,v 1.24 1996/08/05 01:26:35 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -56,14 +56,14 @@
*/
#include <sys/param.h>
+#include <sys/systm.h>
+#include <dev/cons.h>
#include <sys/conf.h>
-#include <sys/proc.h>
+#include <sys/device.h>
#include <sys/ioctl.h>
-#include <sys/tty.h>
-#include <sys/systm.h>
#include <sys/malloc.h>
-#include <sys/device.h>
-#include <dev/cons.h>
+#include <sys/proc.h>
+#include <sys/tty.h>
#include <machine/viareg.h>
#include <machine/cpu.h>
@@ -73,11 +73,17 @@
#include <machine/keyboard.h>
#include <machine/adbsys.h>
#include <machine/iteioctl.h>
+#include <machine/grfioctl.h>
+
+#include <vm/vm.h>
+#include <vm/pmap.h>
#include "../mac68k/macrom.h"
-#include "ascvar.h"
+#include "nubus.h"
#include "itevar.h"
+#include "grfvar.h"
+#include "ascvar.h"
#include "6x10.h"
#define CHARWIDTH 6
@@ -155,6 +161,8 @@ static int scrreg_bottom;
static int polledkey;
extern int adb_polling;
+extern u_long conspa;
+
struct tty *ite_tty; /* Our tty */
static void (*putpixel) __P((int x, int y, int *c, int num));
@@ -798,16 +806,24 @@ struct cfdriver ite_cd = {
};
static int
-itematch(pdp, match, auxp)
- struct device *pdp;
- void *match, *auxp;
+itematch(parent, match, aux)
+ struct device *parent;
+ void *match, *aux;
{
- return 1;
+ struct grfbus_attach_args *ga = aux;
+ struct grfmode *gm = ga->ga_grfmode;
+ vm_offset_t pa;
+
+ if (strcmp(ga->ga_name, "ite"))
+ return 0;
+ pa = pmap_extract(pmap_kernel(), (vm_offset_t) gm->fbbase);
+
+ return (pa == (vm_offset_t) conspa);
}
static void
-iteattach(parent, dev, aux)
- struct device *parent, *dev;
+iteattach(parent, self, aux)
+ struct device *parent, *self;
void *aux;
{
printf(" (minimal console)\n");
@@ -1092,12 +1108,10 @@ itecninit(struct consdev * cp)
scrrows = height / CHARHEIGHT;
scrcols = width / CHARWIDTH;
- vt100_reset();
-
switch (videobitdepth) {
default:
case 1:
- putpixel = putpixel2;
+ putpixel = putpixel1;
reversepixel = reversepixel1;
screenrowbytes = (width + 7) >> 3;
break;
@@ -1118,6 +1132,8 @@ itecninit(struct consdev * cp)
break;
}
+ vt100_reset();
+
return iteon(cp->cn_dev, 0);
}
diff --git a/sys/arch/mac68k/include/cpu.h b/sys/arch/mac68k/include/cpu.h
index 2fea6f9e891..c196fa00cb2 100644
--- a/sys/arch/mac68k/include/cpu.h
+++ b/sys/arch/mac68k/include/cpu.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: cpu.h,v 1.8 1996/06/23 15:35:59 briggs Exp $ */
-/* $NetBSD: cpu.h,v 1.38 1996/06/11 02:52:54 scottr Exp $ */
+/* $OpenBSD: cpu.h,v 1.9 1996/08/10 21:37:46 briggs Exp $ */
+/* $NetBSD: cpu.h,v 1.40 1996/07/12 17:09:26 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 07d4cb55fcd..3632e096310 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: machdep.c,v 1.17 1996/07/27 11:40:38 deraadt Exp $ */
-/* $NetBSD: machdep.c,v 1.110 1996/06/21 06:11:02 scottr Exp $ */
+/* $OpenBSD: machdep.c,v 1.18 1996/08/10 21:37:46 briggs Exp $ */
+/* $NetBSD: machdep.c,v 1.114 1996/08/06 04:03:33 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -141,6 +141,7 @@ struct mac68k_machine_S mac68k_machine;
volatile u_char *Via1Base, *Via2Base;
u_long NuBusBase = NBBASE;
u_long IOBase;
+u_long conspa;
vm_offset_t SCSIBase;
@@ -200,8 +201,9 @@ int safepri = PSL_LOWIPL;
*/
int fpu_type;
-static void identifycpu __P((void));
-void dumpsys __P((void));
+static void identifycpu __P((void));
+static u_long get_physical __P((u_int, u_long *));
+void dumpsys __P((void));
/*
* Console initialization: called early on from main,
@@ -1912,6 +1914,35 @@ static romvec_t romvecs[] =
(caddr_t) 0x40a1c406, /* FixDiv */
(caddr_t) 0x40a1c312, /* FixMul */
},
+
+ /*
+ * Vectors verified for Quadra 630
+ */
+ { /* 13 */
+ "Quadra630 ROMs",
+ (caddr_t) 0x408a9bd2, /* ADB int */
+ (caddr_t) 0x0, /* PM intr */
+ (caddr_t) 0x408b2f94, /* ADBBase + 130 */
+ (caddr_t) 0x4080a360, /* CountADBs */
+ (caddr_t) 0x4080a37a, /* GetIndADB */
+ (caddr_t) 0x4080a3a6, /* GetADBInfo */
+ (caddr_t) 0x4080a3ac, /* SetADBInfo */
+ (caddr_t) 0x4080a752, /* ADBReInit */
+ (caddr_t) 0x4080a3dc, /* ADBOp */
+ (caddr_t) 0, /* PMgrOp */
+ (caddr_t) 0x4080c05c, /* WriteParam */
+ (caddr_t) 0x4080c086, /* SetDateTime */
+ (caddr_t) 0x4080c5cc, /* InitUtil */
+ (caddr_t) 0x4080b190, /* Wild guess at WriteXPRam */
+ (caddr_t) 0x408b39f4, /* jClkNoMem */
+ (caddr_t) 0x4080a818, /* ADBAlternateInit */
+ (caddr_t) 0x408a99c0, /* Egret */
+ (caddr_t) 0x408147c8, /* InitEgret */
+ (caddr_t) 0x408a7ef8, /* ADBReInit_JTBL */
+ (caddr_t) 0x4087eb90, /* ROMResourceMap List Head */
+ (caddr_t) 0x4081c406, /* FixDiv */
+ (caddr_t) 0x4081c312, /* FixMul */
+ },
/* Please fill these in! -BG */
};
@@ -1941,7 +1972,7 @@ struct cpu_model_info cpu_models[] = {
{MACH_MACQ605, "Quadra", " 605", MACH_CLASSQ, &romvecs[9]},
{MACH_MACC610, "Centris", " 610 ", MACH_CLASSQ, &romvecs[6]},
{MACH_MACQ610, "Quadra", " 610 ", MACH_CLASSQ, &romvecs[6]},
- {MACH_MACQ630, "Quadra", " 630 ", MACH_CLASSQ, &romvecs[6]},
+ {MACH_MACQ630, "Quadra", " 630 ", MACH_CLASSQ, &romvecs[13]},
{MACH_MACC660AV, "Centris", " 660AV ", MACH_CLASSAV, &romvecs[7]},
{MACH_MACQ840AV, "Quadra", " 840AV ", MACH_CLASSAV, &romvecs[7]},
@@ -1997,7 +2028,6 @@ struct cpu_model_info cpu_models[] = {
* PowerBook 520
* PowerBook 150
* Duo 280
- * Quadra 630
* Performa 6000s
* ...?
*/
@@ -2167,6 +2197,7 @@ void
setmachdep()
{
static int firstpass = 1;
+ int setup_mrg_vectors = 0;
struct cpu_model_info *cpui;
/*
@@ -2182,16 +2213,15 @@ setmachdep()
cpui = &(cpu_models[mac68k_machine.cpu_model_index]);
current_mac_model = cpui;
- if (firstpass == 0)
+ if (!firstpass)
return;
/*
- * Set up current ROM Glue vectors. Actually now all we do
- * is save the address of the ROM Glue Vector table. This gets
- * used later when we re-map the vectors from MacOS Address
- * Space to NetBSD Address Space.
+ * Get the console buffer physical address. If we can't, we
+ * punt and set it to 0.
*/
- mrg_MacOSROMVectors = cpui->rom_vectors;
+ if (!get_physical(videoaddr, &conspa))
+ conspa = 0;
/*
* Set up any machine specific stuff that we have to before
@@ -2206,6 +2236,7 @@ setmachdep()
mac68k_machine.sccClkConst = 115200;
via_reg(VIA1, vIER) = 0x7f; /* disable VIA1 int */
via_reg(VIA2, vIER) = 0x7f; /* disable VIA2 int */
+ setup_mrg_vectors = 1;
break;
case MACH_CLASSPB:
VIA2 = 1;
@@ -2286,6 +2317,16 @@ setmachdep()
case MACH_CLASSIIfx:
break;
}
+
+ /*
+ * Set up current ROM Glue vectors. Actually now all we do
+ * is save the address of the ROM Glue Vector table. This gets
+ * used later when we re-map the vectors from MacOS Address
+ * Space to NetBSD Address Space.
+ */
+ if ((mac68k_machine.serial_console & 0x03) == 0 || setup_mrg_vectors)
+ mrg_MacOSROMVectors = cpui->rom_vectors;
+
firstpass = 0;
}
@@ -2375,12 +2416,10 @@ extern int get_pte __P((u_int addr, u_long pte[2], u_short * psr));
* to look through MacOS page tables.
*/
-static u_long get_physical __P((u_int, u_long *));
-
static u_long
get_physical(u_int addr, u_long * phys)
{
- u_long pte[2], ph;
+ u_long pte[2], ph, mask;
u_short psr;
int i, numbits;
extern u_int macos_tc;
@@ -2415,12 +2454,11 @@ get_physical(u_int addr, u_long * phys)
/*
* We have to take the most significant "numbits" from
* the returned value "ph", and the rest from our addr.
- * Assume that the lower (32-numbits) bits of ph are
- * already zero. Also assume numbits != 0. Also, notice
- * that this is an addition, not an "or".
+ * Assume that numbits != 0.
*/
- *phys = ph + (addr & ((1 << (32 - numbits)) - 1));
+ mask = (1 << (32 - numbits)) - 1;
+ *phys = (ph & ~mask) | (addr & mask);
return 1;
}
diff --git a/sys/arch/mac68k/mac68k/macrom.c b/sys/arch/mac68k/mac68k/macrom.c
index 1e93f068ff0..b80a193464b 100644
--- a/sys/arch/mac68k/mac68k/macrom.c
+++ b/sys/arch/mac68k/mac68k/macrom.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: macrom.c,v 1.3 1996/05/26 18:36:24 briggs Exp $ */
-/* $NetBSD: macrom.c,v 1.25 1996/05/25 14:45:34 briggs Exp $ */
+/* $OpenBSD: macrom.c,v 1.4 1996/08/10 21:37:47 briggs Exp $ */
+/* $NetBSD: macrom.c,v 1.26 1996/08/05 23:20:46 briggs Exp $ */
/*-
* Copyright (C) 1994 Bradley A. Grantham
@@ -763,9 +763,12 @@ mrg_init()
caddr_t *handle;
#endif
- VBLQueue = (u_int16_t) 0; /* No vertical blanking routines in the queue */
- VBLQueue_head = (caddr_t) 0; /* Let's hope that this init happens
- VBLQueue_tail = (caddr_t) 0; * before the RTC interrupts are enabled */
+ /*
+ * Clear the VBLQueue.
+ */
+ VBLQueue = (u_int16_t) 0;
+ VBLQueue_head = (caddr_t) 0;
+ VBLQueue_tail = (caddr_t) 0;
#if defined(MRG_TEST)
if (ROMResourceMap) {