summaryrefslogtreecommitdiff
path: root/sys/arch/vax/stand/boot/autoconf.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-08-10 18:20:08 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-08-10 18:20:08 +0000
commitbe38412e49d78c13c55bcd0a1f1b3c1959bc4dae (patch)
tree2ca720180c06e2c56472665fefa10cd63a114795 /sys/arch/vax/stand/boot/autoconf.c
parenta9ae17faa40d7f53f21c89598a89c1a87f985b91 (diff)
Add support for the VAXstation 3[58][24]0 to the bootblocks, currently
limited to serial console. This is enough for a 3520 to mopboot and download a kernel over NFS.
Diffstat (limited to 'sys/arch/vax/stand/boot/autoconf.c')
-rw-r--r--sys/arch/vax/stand/boot/autoconf.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/arch/vax/stand/boot/autoconf.c b/sys/arch/vax/stand/boot/autoconf.c
index 8b20a30b1af..1f02f44d51a 100644
--- a/sys/arch/vax/stand/boot/autoconf.c
+++ b/sys/arch/vax/stand/boot/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.10 2008/05/21 19:42:07 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.11 2008/08/10 18:20:07 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -49,6 +49,7 @@ void autoconf(void);
void findcpu(void);
void consinit(void);
void scbinit(void);
+void clkstart(void);
int getsecs(void);
void scb_stray(void *);
void longjmp(int *);
@@ -68,8 +69,9 @@ autoconf(void)
int fromnet = (bootregs[12] != -1);
findcpu(); /* Configures CPU variables */
+ scbinit(); /* Setup interrupts */
consinit(); /* Allow us to print out things */
- scbinit(); /* Fix interval clock etc */
+ clkstart(); /* Fix interval clock etc */
#ifdef DEV_DEBUG
printf("Register contents:\n");
@@ -136,14 +138,17 @@ struct ivec_dsp **scb;
struct ivec_dsp *scb_vec;
extern struct ivec_dsp idsptch;
extern int jbuf[10];
+extern int mcheck_silent;
static void
mcheck(void *arg)
{
int off, *mfp = (int *)&arg;
- off = (mfp[7]/4 + 8);
- printf("Machine check, pc=%x, psl=%x\n", mfp[off], mfp[off+1]);
+ if (!mcheck_silent) {
+ off = (mfp[7]/4 + 8);
+ printf("Machine check, pc=%x, psl=%x\n", mfp[off], mfp[off+1]);
+ }
longjmp(jbuf);
}
@@ -175,9 +180,13 @@ scbinit(void)
scb_vec[i].pushlarg = (void *) (i * 4);
scb_vec[i].ev = NULL;
}
- scb_vec[0xc0/4].hoppaddr = rtimer;
scb_vec[4/4].hoppaddr = mcheck;
+}
+void
+clkstart(void)
+{
+ scb_vec[0xc0/4].hoppaddr = rtimer;
if (vax_boardtype != VAX_BTYP_VXT)
mtpr(-10000, PR_NICR); /* Load in count register */
mtpr(0x800000d1, PR_ICCS); /* Start clock and enable interrupt */