diff options
author | Brandon Creighton <bjc@cvs.openbsd.org> | 2000-05-01 00:12:03 +0000 |
---|---|---|
committer | Brandon Creighton <bjc@cvs.openbsd.org> | 2000-05-01 00:12:03 +0000 |
commit | d2214a150b4edf8fc5705a966e37e42d7c3c959a (patch) | |
tree | 8d67b0e51f4fc17b08beb31b1f654357789a4ee7 /sys/arch | |
parent | 03d411d0c93a6e668ca2efa294619aa3e48f5bc6 (diff) |
fix countdown for vs4000{/60,/90,VLC} -- from netbsd
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/vax/boot/boot/autoconf.c | 16 | ||||
-rw-r--r-- | sys/arch/vax/boot/boot/boot.c | 15 | ||||
-rw-r--r-- | sys/arch/vax/boot/common/str.s | 19 | ||||
-rw-r--r-- | sys/arch/vax/stand/boot/autoconf.c | 16 | ||||
-rw-r--r-- | sys/arch/vax/stand/boot/boot.c | 15 | ||||
-rw-r--r-- | sys/arch/vax/stand/common/str.s | 19 |
6 files changed, 90 insertions, 10 deletions
diff --git a/sys/arch/vax/boot/boot/autoconf.c b/sys/arch/vax/boot/boot/autoconf.c index 641d9184f72..7edd73492f9 100644 --- a/sys/arch/vax/boot/boot/autoconf.c +++ b/sys/arch/vax/boot/boot/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.1 2000/04/27 02:26:24 bjc Exp $ */ +/* $OpenBSD: autoconf.c,v 1.2 2000/05/01 00:12:00 bjc Exp $ */ /* $NetBSD: autoconf.c,v 1.5 1999/08/23 19:09:27 ragge Exp $ */ /* * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden. @@ -212,12 +212,26 @@ scbinit() mtpr(20, PR_IPL); } +extern int jbuf[10]; +extern int sluttid, senast, skip; + void rtimer() { mtpr(31, PR_IPL); tickcnt++; mtpr(0xc1, PR_ICCS); + if (skip) + return; + if ((vax_boardtype == VAX_BTYP_46) || + (vax_boardtype == VAX_BTYP_48) || + (vax_boardtype == VAX_BTYP_49)) { + int nu = sluttid - getsecs(); + if (senast != nu) { + mtpr(20, PR_IPL); + longjmp(jbuf); + } + } } asm(" diff --git a/sys/arch/vax/boot/boot/boot.c b/sys/arch/vax/boot/boot/boot.c index e6cde511d76..d20de16aa08 100644 --- a/sys/arch/vax/boot/boot/boot.c +++ b/sys/arch/vax/boot/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.1 2000/04/27 02:26:24 bjc Exp $ */ +/* $OpenBSD: boot.c,v 1.2 2000/05/01 00:12:01 bjc Exp $ */ /* $NetBSD: boot.c,v 1.4 1999/10/23 14:42:22 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -75,18 +75,25 @@ char *filer[] = { 0, }; +int jbuf[10]; +int sluttid, senast, skip; + Xmain() { - int io, type, sluttid, askname, filindex = 0; - int j, senast = 0, nu; + int io, type, askname, filindex = 0; + int j, nu; io=0; + skip = 1; autoconf(); askname = howto & RB_ASKNAME; printf("\n\r>> OpenBSD/vax boot [%s %s] <<\n", __DATE__, __TIME__); printf(">> Press any key to abort autoboot "); sluttid = getsecs() + 5; + senast = 0; + skip = 0; + setjmp(jbuf); for (;;) { nu = sluttid - getsecs(); if (senast != nu) @@ -95,6 +102,7 @@ Xmain() break; senast = nu; if ((j = (testkey() & 0177))) { + skip = 1; if (j != 10 && j != 13) { printf("\nPress '?' for help"); askname = 1; @@ -102,6 +110,7 @@ Xmain() break; } } + skip = 1; printf("\n"); /* First try to autoboot */ diff --git a/sys/arch/vax/boot/common/str.s b/sys/arch/vax/boot/common/str.s index b2f93510ec7..e45ab28ea67 100644 --- a/sys/arch/vax/boot/common/str.s +++ b/sys/arch/vax/boot/common/str.s @@ -1,4 +1,4 @@ -/* $OpenBSD: str.s,v 1.1 2000/04/27 02:26:26 bjc Exp $ */ +/* $OpenBSD: str.s,v 1.2 2000/05/01 00:12:02 bjc Exp $ */ /* $NetBSD: str.s,v 1.1 1999/03/06 16:36:06 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -145,3 +145,20 @@ ENTRY(strcat, 0) 1: movb (r1)+,(r0)+ bneq 1b ret + +ENTRY(setjmp, 0) + movl 4(ap), r0 + movl 8(fp), (r0) + movl 12(fp), 4(r0) + movl 16(fp), 8(r0) + addl3 fp,$28,12(r0) + clrl r0 + ret + +ENTRY(longjmp, 0) + movl 4(ap), r1 + movl 8(ap), r0 + movl (r1), ap + movl 4(r1), fp + movl 12(r1), sp + jmp *8(r1) diff --git a/sys/arch/vax/stand/boot/autoconf.c b/sys/arch/vax/stand/boot/autoconf.c index 641d9184f72..7edd73492f9 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.1 2000/04/27 02:26:24 bjc Exp $ */ +/* $OpenBSD: autoconf.c,v 1.2 2000/05/01 00:12:00 bjc Exp $ */ /* $NetBSD: autoconf.c,v 1.5 1999/08/23 19:09:27 ragge Exp $ */ /* * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden. @@ -212,12 +212,26 @@ scbinit() mtpr(20, PR_IPL); } +extern int jbuf[10]; +extern int sluttid, senast, skip; + void rtimer() { mtpr(31, PR_IPL); tickcnt++; mtpr(0xc1, PR_ICCS); + if (skip) + return; + if ((vax_boardtype == VAX_BTYP_46) || + (vax_boardtype == VAX_BTYP_48) || + (vax_boardtype == VAX_BTYP_49)) { + int nu = sluttid - getsecs(); + if (senast != nu) { + mtpr(20, PR_IPL); + longjmp(jbuf); + } + } } asm(" diff --git a/sys/arch/vax/stand/boot/boot.c b/sys/arch/vax/stand/boot/boot.c index e6cde511d76..d20de16aa08 100644 --- a/sys/arch/vax/stand/boot/boot.c +++ b/sys/arch/vax/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.1 2000/04/27 02:26:24 bjc Exp $ */ +/* $OpenBSD: boot.c,v 1.2 2000/05/01 00:12:01 bjc Exp $ */ /* $NetBSD: boot.c,v 1.4 1999/10/23 14:42:22 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -75,18 +75,25 @@ char *filer[] = { 0, }; +int jbuf[10]; +int sluttid, senast, skip; + Xmain() { - int io, type, sluttid, askname, filindex = 0; - int j, senast = 0, nu; + int io, type, askname, filindex = 0; + int j, nu; io=0; + skip = 1; autoconf(); askname = howto & RB_ASKNAME; printf("\n\r>> OpenBSD/vax boot [%s %s] <<\n", __DATE__, __TIME__); printf(">> Press any key to abort autoboot "); sluttid = getsecs() + 5; + senast = 0; + skip = 0; + setjmp(jbuf); for (;;) { nu = sluttid - getsecs(); if (senast != nu) @@ -95,6 +102,7 @@ Xmain() break; senast = nu; if ((j = (testkey() & 0177))) { + skip = 1; if (j != 10 && j != 13) { printf("\nPress '?' for help"); askname = 1; @@ -102,6 +110,7 @@ Xmain() break; } } + skip = 1; printf("\n"); /* First try to autoboot */ diff --git a/sys/arch/vax/stand/common/str.s b/sys/arch/vax/stand/common/str.s index b2f93510ec7..e45ab28ea67 100644 --- a/sys/arch/vax/stand/common/str.s +++ b/sys/arch/vax/stand/common/str.s @@ -1,4 +1,4 @@ -/* $OpenBSD: str.s,v 1.1 2000/04/27 02:26:26 bjc Exp $ */ +/* $OpenBSD: str.s,v 1.2 2000/05/01 00:12:02 bjc Exp $ */ /* $NetBSD: str.s,v 1.1 1999/03/06 16:36:06 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -145,3 +145,20 @@ ENTRY(strcat, 0) 1: movb (r1)+,(r0)+ bneq 1b ret + +ENTRY(setjmp, 0) + movl 4(ap), r0 + movl 8(fp), (r0) + movl 12(fp), 4(r0) + movl 16(fp), 8(r0) + addl3 fp,$28,12(r0) + clrl r0 + ret + +ENTRY(longjmp, 0) + movl 4(ap), r1 + movl 8(ap), r0 + movl (r1), ap + movl 4(r1), fp + movl 12(r1), sp + jmp *8(r1) |