Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/boot Fix boot block countdown on 4000/60. Easy ...
details: https://anonhg.NetBSD.org/src/rev/ab91e627b8e4
branches: trunk
changeset: 485239:ab91e627b8e4
user: ragge <ragge%NetBSD.org@localhost>
date: Sat Apr 22 20:29:58 2000 +0000
description:
Fix boot block countdown on 4000/60. Easy to add for other 4000 machines also.
diffstat:
sys/arch/vax/boot/boot/autoconf.c | 14 +++++++++++++-
sys/arch/vax/boot/boot/boot.c | 17 +++++++++++++----
sys/arch/vax/boot/common/str.s | 20 +++++++++++++++++++-
3 files changed, 45 insertions(+), 6 deletions(-)
diffs (119 lines):
diff -r 97b9d8dd208d -r ab91e627b8e4 sys/arch/vax/boot/boot/autoconf.c
--- a/sys/arch/vax/boot/boot/autoconf.c Sat Apr 22 18:11:27 2000 +0000
+++ b/sys/arch/vax/boot/boot/autoconf.c Sat Apr 22 20:29:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.6 2000/01/24 02:54:01 matt Exp $ */
+/* $NetBSD: autoconf.c,v 1.7 2000/04/22 20:29:59 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -210,12 +210,24 @@
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) {
+ int nu = sluttid - getsecs();
+ if (senast != nu) {
+ mtpr(20, PR_IPL);
+ longjmp(jbuf);
+ }
+ }
}
asm("
diff -r 97b9d8dd208d -r ab91e627b8e4 sys/arch/vax/boot/boot/boot.c
--- a/sys/arch/vax/boot/boot/boot.c Sat Apr 22 18:11:27 2000 +0000
+++ b/sys/arch/vax/boot/boot/boot.c Sat Apr 22 20:29:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.4 1999/10/23 14:42:22 ragge Exp $ */
+/* $NetBSD: boot.c,v 1.5 2000/04/22 20:29:59 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@@ -75,18 +75,25 @@
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;
+ io = 0;
+ skip = 1;
autoconf();
askname = howto & RB_ASKNAME;
printf("\n\r>> NetBSD/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 @@
break;
senast = nu;
if ((j = (testkey() & 0177))) {
+ skip = 1;
if (j != 10 && j != 13) {
printf("\nPress '?' for help");
askname = 1;
@@ -102,6 +110,7 @@
break;
}
}
+ skip = 1;
printf("\n");
/* First try to autoboot */
diff -r 97b9d8dd208d -r ab91e627b8e4 sys/arch/vax/boot/common/str.s
--- a/sys/arch/vax/boot/common/str.s Sat Apr 22 18:11:27 2000 +0000
+++ b/sys/arch/vax/boot/common/str.s Sat Apr 22 20:29:58 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: str.s,v 1.1 1999/03/06 16:36:06 ragge Exp $ */
+/* $NetBSD: str.s,v 1.2 2000/04/22 20:29:58 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -144,3 +144,21 @@
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)
+
Home |
Main Index |
Thread Index |
Old Index