summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-06-08 20:57:20 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-06-08 20:57:20 +0000
commit2c57a9726dcd1d56791188ab7cac0a45ef2dbeae (patch)
tree0038efe5b66eecfc3617bc5bfe0b109acadc2495 /sys/arch
parenta587c12e336de345a9c788100500c94b6fa7c0f4 (diff)
Make sure to cnpollc(1)/cnpollc(0) around cngetc() or getsn() calls.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/hp300/machdep.c4
-rw-r--r--sys/arch/hp300/hp300/trap.c5
-rw-r--r--sys/arch/i386/i386/machdep.c4
-rw-r--r--sys/arch/landisk/landisk/machdep.c4
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c4
-rw-r--r--sys/arch/mac68k/mac68k/trap.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c4
-rw-r--r--sys/arch/sparc/sparc/pmap.c8
9 files changed, 31 insertions, 11 deletions
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 6d269ebe747..bc6226fdcad 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.118 2008/04/09 16:58:10 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.119 2008/06/08 20:57:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -692,7 +692,9 @@ haltsys:
/* Finally, halt/reboot the system. */
if (howto & RB_HALT) {
printf("System halted. Hit any key to reboot.\n\n");
+ cnpollc(1);
while (cngetc() == 0);
+ cnpollc(0);
}
printf("rebooting...\n");
diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c
index 9338324224c..e96dda2303f 100644
--- a/sys/arch/hp300/hp300/trap.c
+++ b/sys/arch/hp300/hp300/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.52 2007/05/15 13:46:22 martin Exp $ */
+/* $OpenBSD: trap.c,v 1.53 2008/06/08 20:57:16 miod Exp $ */
/* $NetBSD: trap.c,v 1.57 1998/02/16 20:58:31 thorpej Exp $ */
/*
@@ -307,7 +307,8 @@ dopanic:
printf("trap during panic!\n");
#ifdef DEBUG
/* XXX should be a machine-dependent hook */
- printf("(press a key)\n"); (void)cngetc();
+ printf("(press a key)\n");
+ cnpollc(1); (void)cngetc(); cnpollc(0);
#endif
}
regdump(&(frame.F_t), 128);
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 8ad9a9cc827..d7a3ad84ad7 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.429 2008/05/30 23:10:16 fgsch Exp $ */
+/* $OpenBSD: machdep.c,v 1.430 2008/06/08 20:57:18 miod Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -3044,7 +3044,9 @@ init386(paddr_t first_avail)
if (physmem < atop(4 * 1024 * 1024)) {
printf("\awarning: too little memory available;"
"running in degraded mode\npress a key to confirm\n\n");
+ cnpollc(1);
cngetc();
+ cnpollc(0);
}
#ifdef DEBUG
diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c
index 57b9de50658..5516fc18a72 100644
--- a/sys/arch/landisk/landisk/machdep.c
+++ b/sys/arch/landisk/landisk/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.15 2008/04/09 16:58:10 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.16 2008/06/08 20:57:18 miod Exp $ */
/* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -231,7 +231,9 @@ haltsys:
printf("\n");
printf("The operating system has halted.\n");
printf("Please press any key to reboot.\n\n");
+ cnpollc(1);
cngetc();
+ cnpollc(0);
}
printf("rebooting...\n");
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index adcc0f614a8..5ca94569d71 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.144 2008/04/09 16:58:10 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.145 2008/06/08 20:57:18 miod Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -598,7 +598,9 @@ haltsys:
}
printf("\nThe operating system has halted.\n");
printf("Please press any key to reboot.\n\n");
+ cnpollc(1);
(void)cngetc();
+ cnpollc(0);
}
/* Map the last physical page VA = PA for doboot() */
diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c
index 16be0b2528a..38d8e9d41ff 100644
--- a/sys/arch/mac68k/mac68k/trap.c
+++ b/sys/arch/mac68k/mac68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.54 2007/05/15 13:46:22 martin Exp $ */
+/* $OpenBSD: trap.c,v 1.55 2008/06/08 20:57:19 miod Exp $ */
/* $NetBSD: trap.c,v 1.68 1998/12/22 08:47:07 scottr Exp $ */
/*
@@ -267,7 +267,8 @@ kgdb_cont:
printf("trap during panic!\n");
#ifdef DEBUG
/* XXX should be a machine-dependent hook */
- printf("(press a key)\n"); (void)cngetc();
+ printf("(press a key)\n");
+ cnpollc(1); (void)cngetc(); cnpollc(0);
#endif
}
regdump(&(frame.F_t), 128);
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 044d9b0138c..bd9b81e8fe9 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.109 2008/04/09 16:58:10 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.110 2008/06/08 20:57:19 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -538,7 +538,9 @@ haltsys:
if (howto & RB_HALT) {
printf("System halted. Press any key to reboot...\n\n");
+ cnpollc(1);
cngetc();
+ cnpollc(0);
}
doboot();
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index f990f53ca14..df704d54c2d 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.211 2008/04/09 16:58:10 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.212 2008/06/08 20:57:19 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -506,7 +506,9 @@ haltsys:
if (howto & RB_HALT) {
printf("System halted. Press any key to reboot...\n\n");
+ cnpollc(1);
cngetc();
+ cnpollc(0);
}
doboot();
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 3f718191e7f..ad4a3d1f1bb 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.147 2007/11/28 16:33:20 martin Exp $ */
+/* $OpenBSD: pmap.c,v 1.148 2008/06/08 20:57:19 miod Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -6594,7 +6594,9 @@ debug_pagetables()
printf("Testing kernel region 0x%x: ", VA_VREG(VM_MIN_KERNEL_ADDRESS));
test_region(VA_VREG(VM_MIN_KERNEL_ADDRESS), 4096, avail_start);
#endif
+ cnpollc(1);
cngetc();
+ cnpollc(0);
for (i = 0; i < SRMMU_L1SIZE; i++) {
te = regtbl[i];
@@ -6609,8 +6611,10 @@ debug_pagetables()
pmap_kernel()->pm_regmap[i].rg_seg_ptps);
}
printf("Press q to halt...\n");
+ cnpollc(1);
if (cngetc()=='q')
callrom();
+ cnpollc(0);
}
static u_int
@@ -6695,6 +6699,7 @@ void test_region(reg, start, stop)
/* int cnt=0;
*/
+ cnpollc(1);
for (i = start; i < stop; i+= NBPG) {
addr = (reg << RGSHIFT) | i;
pte=lda(((u_int)(addr)) | ASI_SRMMUFP_LN, ASI_SRMMUFP);
@@ -6720,6 +6725,7 @@ void test_region(reg, start, stop)
}
}
}
+ cnpollc(0);
printf("done.\n");
}