summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-04-17 09:49:49 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-04-17 09:49:49 +0000
commitc7a9be41271a39b56a2bfc7b59a56ea219493c15 (patch)
treef69cb716b0cfe9819276a445a84635c1059da901
parent5fad7c39771140396fbfb26a014788a1f20bb294 (diff)
Tweak the behaviour of boot(8) on hppa. Normal boots now will give you a
chance to interrupt the boot procedure before booting the default kernel, just like (most) of our other hardware platforms. Interactive boots, where you interrupt the firmware boot procedure and answer "Y" to the "Interact with IPL?" question will now wait for human intervention at the boot> prompt (without a timeout). Should reduce frustration when trying to boot an alternative kernel. ok deraadt@, miod@, jsing@, todd@
-rw-r--r--sys/arch/hppa/stand/boot/conf.c4
-rw-r--r--sys/arch/hppa/stand/boot/srt0.S12
-rw-r--r--sys/arch/hppa/stand/cdboot/cdboot.c6
-rw-r--r--sys/stand/boot/boot.c5
4 files changed, 16 insertions, 11 deletions
diff --git a/sys/arch/hppa/stand/boot/conf.c b/sys/arch/hppa/stand/boot/conf.c
index a1bbb454f3a..01e0d46fef7 100644
--- a/sys/arch/hppa/stand/boot/conf.c
+++ b/sys/arch/hppa/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.25 2010/12/06 22:51:45 jasper Exp $ */
+/* $OpenBSD: conf.c,v 1.26 2011/04/17 09:49:48 kettenis Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -33,7 +33,7 @@
#include <lib/libsa/cd9660.h>
#include <dev/cons.h>
-const char version[] = "1.1";
+const char version[] = "1.2";
int debug = 0;
struct fs_ops file_system[] = {
diff --git a/sys/arch/hppa/stand/boot/srt0.S b/sys/arch/hppa/stand/boot/srt0.S
index 9244481c72e..67ddf43726f 100644
--- a/sys/arch/hppa/stand/boot/srt0.S
+++ b/sys/arch/hppa/stand/boot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.10 2005/04/07 00:21:51 mickey Exp $ */
+/* $OpenBSD: srt0.S,v 1.11 2011/04/17 09:49:48 kettenis Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -135,9 +135,13 @@ start
ldil L%HEAP_LIMIT, %sp
ldo R%HEAP_LIMIT(%sp), %sp
- .import bootprompt, data
- ldil L%bootprompt, t1
- stw r26, R%bootprompt(t1)
+ comb,= %r0, %r26, call_boot
+ nop
+ .import boottimeout, data
+ ldil L%boottimeout, %r22
+ stw %r0, R%boottimeout(%r22)
+
+call_boot
b boot ; Call boot(),
copy %r0, arg0 ; use default boot device
nop
diff --git a/sys/arch/hppa/stand/cdboot/cdboot.c b/sys/arch/hppa/stand/cdboot/cdboot.c
index 266224f1e1f..c399649008a 100644
--- a/sys/arch/hppa/stand/cdboot/cdboot.c
+++ b/sys/arch/hppa/stand/cdboot/cdboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdboot.c,v 1.10 2010/12/06 22:51:45 jasper Exp $ */
+/* $OpenBSD: cdboot.c,v 1.11 2011/04/17 09:49:48 kettenis Exp $ */
/*
* Copyright (c) 2003 Michael Shalayeff
@@ -40,7 +40,7 @@
dev_t bootdev;
int debug = 1;
-int bootprompt = 1;
+int boottimeout = 5;
struct fs_ops file_system[] = {
{ cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek,
@@ -72,7 +72,7 @@ boot(dev_t dev)
cninit();
devboot(dev, path);
strncpy(path + strlen(path), ":/bsd.rd", 9);
- printf(">> OpenBSD/" MACHINE " CDBOOT 0.1\n"
+ printf(">> OpenBSD/" MACHINE " CDBOOT 0.2\n"
"booting %s: ", path);
marks[MARK_START] = (u_long)DEFAULT_KERNEL_ADDRESS;
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c
index 66feece8afd..4f64c52298f 100644
--- a/sys/stand/boot/boot.c
+++ b/sys/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.36 2007/06/26 10:34:41 tom Exp $ */
+/* $OpenBSD: boot.c,v 1.37 2011/04/17 09:49:48 kettenis Exp $ */
/*
* Copyright (c) 2003 Dale Rahn
@@ -50,6 +50,7 @@ struct cmd_state cmd;
/* bootprompt can be set by MD code to avoid prompt first time round */
int bootprompt = 1;
char *kernelfile = KERNEL; /* can be changed by MD code */
+int boottimeout = 5; /* can be changed by MD code */
void
boot(dev_t bootdev)
@@ -69,7 +70,7 @@ boot(dev_t bootdev)
cmd.boothowto = 0;
cmd.conf = "/etc/boot.conf";
cmd.addr = (void *)DEFAULT_KERNEL_ADDRESS;
- cmd.timeout = 5;
+ cmd.timeout = boottimeout;
st = read_conf();
if (!bootprompt)