summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-04-28 19:23:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-04-28 19:23:11 +0000
commit8408ac10a18e8acbd4c400a7af41ce7bc814e573 (patch)
tree2b66f5a43dc13ee0a38baf2a648ea7747d693b11 /sys/arch
parent4d00462555fb47e13c9cf5d48e0132c98eeee5cc (diff)
clone "Control key" logic from i386 written by tom; tested by art
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/stand/boot/boot.87
-rw-r--r--sys/arch/amd64/stand/boot/conf.c4
-rw-r--r--sys/arch/amd64/stand/cdboot/cdboot.86
-rw-r--r--sys/arch/amd64/stand/cdboot/conf.c4
-rw-r--r--sys/arch/amd64/stand/libsa/bioscons.c13
-rw-r--r--sys/arch/amd64/stand/libsa/biosdev.h3
-rw-r--r--sys/arch/amd64/stand/libsa/libsa.h4
-rw-r--r--sys/arch/amd64/stand/libsa/machdep.c9
-rw-r--r--sys/arch/amd64/stand/pxeboot/conf.c4
-rw-r--r--sys/arch/amd64/stand/pxeboot/pxeboot.86
10 files changed, 47 insertions, 13 deletions
diff --git a/sys/arch/amd64/stand/boot/boot.8 b/sys/arch/amd64/stand/boot/boot.8
index 65acff5a2bd..384b918944f 100644
--- a/sys/arch/amd64/stand/boot/boot.8
+++ b/sys/arch/amd64/stand/boot/boot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: boot.8,v 1.7 2006/05/15 09:10:52 jmc Exp $
+.\" $OpenBSD: boot.8,v 1.8 2007/04/28 19:23:10 deraadt Exp $
.\"
.\" Copyright (c) 1997-2001 Michael Shalayeff
.\" All rights reserved.
@@ -106,6 +106,11 @@ This file may contain any commands
.Nm
accepts at the interactive prompt.
Though default settings usually suffice, they can be changed here.
+.Pp
+.Pa boot.conf
+processing can be skipped by holding down either Control key as
+.Nm
+starts.
.It
The header line
.Pp
diff --git a/sys/arch/amd64/stand/boot/conf.c b/sys/arch/amd64/stand/boot/conf.c
index 96cf66084fd..c7af2054447 100644
--- a/sys/arch/amd64/stand/boot/conf.c
+++ b/sys/arch/amd64/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.10 2007/01/02 16:34:16 tom Exp $ */
+/* $OpenBSD: conf.c,v 1.11 2007/04/28 19:23:10 deraadt Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -42,7 +42,7 @@
#include <biosdev.h>
#include <dev/cons.h>
-const char version[] = "2.14";
+const char version[] = "2.15";
int debug = 1;
diff --git a/sys/arch/amd64/stand/cdboot/cdboot.8 b/sys/arch/amd64/stand/cdboot/cdboot.8
index bc9b01d189b..1c0fa077f9a 100644
--- a/sys/arch/amd64/stand/cdboot/cdboot.8
+++ b/sys/arch/amd64/stand/cdboot/cdboot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cdboot.8,v 1.5 2006/10/31 11:29:54 tom Exp $
+.\" $OpenBSD: cdboot.8,v 1.6 2007/04/28 19:23:10 deraadt Exp $
.\" Copyright (c) 2004 Tom Cosgrove
.\" Copyright (c) 2003 Matthias Drochner
.\" Copyright (c) 1999 Doug White
@@ -46,6 +46,10 @@ will look for an
configuration
file on the CD-ROM.
If it finds one, it processes the commands within it.
+.Pa boot.conf
+processing can be skipped by holding down either Control key as
+.Nm
+starts.
.Pp
.Nm
then sits in a loop,
diff --git a/sys/arch/amd64/stand/cdboot/conf.c b/sys/arch/amd64/stand/cdboot/conf.c
index b965dfa23d7..beec5f73b07 100644
--- a/sys/arch/amd64/stand/cdboot/conf.c
+++ b/sys/arch/amd64/stand/cdboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.9 2007/01/02 16:34:16 tom Exp $ */
+/* $OpenBSD: conf.c,v 1.10 2007/04/28 19:23:10 deraadt Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -42,7 +42,7 @@
#include <biosdev.h>
#include <dev/cons.h>
-const char version[] = "1.08";
+const char version[] = "1.09";
int debug = 1;
diff --git a/sys/arch/amd64/stand/libsa/bioscons.c b/sys/arch/amd64/stand/libsa/bioscons.c
index 4998ba101e9..6f9e25329b9 100644
--- a/sys/arch/amd64/stand/libsa/bioscons.c
+++ b/sys/arch/amd64/stand/libsa/bioscons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioscons.c,v 1.2 2007/01/02 16:34:16 tom Exp $ */
+/* $OpenBSD: bioscons.c,v 1.3 2007/04/28 19:23:10 deraadt Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -93,6 +93,17 @@ pc_getc(dev_t dev)
return (rv & 0xff);
}
+int
+pc_getshifts(dev_t dev)
+{
+ register int rv;
+
+ __asm __volatile(DOINT(0x16) : "=a" (rv) : "0" (0x200) :
+ "%ecx", "%edx", "cc" );
+
+ return (rv & 0xff);
+}
+
void
pc_putc(dev_t dev, int c)
{
diff --git a/sys/arch/amd64/stand/libsa/biosdev.h b/sys/arch/amd64/stand/libsa/biosdev.h
index 3c00bc6d9a1..4f2287d7948 100644
--- a/sys/arch/amd64/stand/libsa/biosdev.h
+++ b/sys/arch/amd64/stand/libsa/biosdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.h,v 1.1 2004/02/03 12:09:47 mickey Exp $ */
+/* $OpenBSD: biosdev.h,v 1.2 2007/04/28 19:23:10 deraadt Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -60,6 +60,7 @@ bios_diskinfo_t *bios_dklookup(int);
void pc_probe(struct consdev *);
void pc_init(struct consdev *);
int pc_getc(dev_t);
+int pc_getshifts(dev_t);
void pc_putc(dev_t, int);
void pc_pollc(dev_t, int);
void com_probe(struct consdev *);
diff --git a/sys/arch/amd64/stand/libsa/libsa.h b/sys/arch/amd64/stand/libsa/libsa.h
index 6d2aa967207..5ac8d7b5be8 100644
--- a/sys/arch/amd64/stand/libsa/libsa.h
+++ b/sys/arch/amd64/stand/libsa/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.4 2006/09/18 21:15:33 mpf Exp $ */
+/* $OpenBSD: libsa.h,v 1.5 2007/04/28 19:23:10 deraadt Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
@@ -74,3 +74,5 @@ extern bios_diskinfo_t bios_diskinfo[];
extern u_int32_t bios_cksumlen;
#define MACHINE_CMD cmd_machine /* we have i386 specific sommands */
+
+#define CHECK_SKIP_CONF check_skip_conf /* we can skip boot.conf with Ctrl */
diff --git a/sys/arch/amd64/stand/libsa/machdep.c b/sys/arch/amd64/stand/libsa/machdep.c
index 97ec8d544e5..6733ec0c633 100644
--- a/sys/arch/amd64/stand/libsa/machdep.c
+++ b/sys/arch/amd64/stand/libsa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.3 2004/03/21 21:37:41 tom Exp $ */
+/* $OpenBSD: machdep.c,v 1.4 2007/04/28 19:23:10 deraadt Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -28,6 +28,7 @@
*/
#include "libsa.h"
+#include "biosdev.h"
#include <machine/apmvar.h>
#include <machine/biosvar.h>
@@ -61,3 +62,9 @@ machdep(void)
}
}
}
+
+int check_skip_conf(void)
+{
+ /* Return non-zero (skip boot.conf) if Control "shift" key down */
+ return (pc_getshifts(0) & 0x04);
+}
diff --git a/sys/arch/amd64/stand/pxeboot/conf.c b/sys/arch/amd64/stand/pxeboot/conf.c
index 4a10e47908a..0c17e412690 100644
--- a/sys/arch/amd64/stand/pxeboot/conf.c
+++ b/sys/arch/amd64/stand/pxeboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.12 2007/01/02 16:34:16 tom Exp $ */
+/* $OpenBSD: conf.c,v 1.13 2007/04/28 19:23:10 deraadt Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -45,7 +45,7 @@
#include "pxeboot.h"
#include "pxe_net.h"
-const char version[] = "1.11";
+const char version[] = "1.12";
int debug = 0;
#undef _TEST
diff --git a/sys/arch/amd64/stand/pxeboot/pxeboot.8 b/sys/arch/amd64/stand/pxeboot/pxeboot.8
index 14ff6811de5..abab283bca5 100644
--- a/sys/arch/amd64/stand/pxeboot/pxeboot.8
+++ b/sys/arch/amd64/stand/pxeboot/pxeboot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pxeboot.8,v 1.7 2007/02/12 22:13:07 jmc Exp $
+.\" $OpenBSD: pxeboot.8,v 1.8 2007/04/28 19:23:10 deraadt Exp $
.\" Copyright (c) 2004 Tom Cosgrove
.\" Copyright (c) 2003 Matthias Drochner
.\" Copyright (c) 1999 Doug White
@@ -55,6 +55,10 @@ boot program will look for an
configuration
file on the TFTP server.
If it finds one, it processes the commands within it.
+.Pa boot.conf
+processing can be skipped by holding down either Control key as
+.Nm
+starts.
.Pp
.Nm
then sits in a loop,