summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2023-02-23 19:48:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2023-02-23 19:48:23 +0000
commit4ca89ee078d7814e763d9fe45a5893e726032e4f (patch)
tree90f170446adb3af0500515ee30fee6f83a8ab432 /sys/arch/i386/stand
parent9a17c74c7944052ae6405993a3f46aab37c9599d (diff)
Remove dangerous user-settable "addr" variable from MI boot loader, and
only compile tty-related code (stty command, tty variable) on platforms where it makes sense for the boot loader to control it, rather than the PROM/firmware/whatever.
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r--sys/arch/i386/stand/Makefile.inc4
-rw-r--r--sys/arch/i386/stand/boot/boot.86
-rw-r--r--sys/arch/i386/stand/libsa/libsa.h4
3 files changed, 5 insertions, 9 deletions
diff --git a/sys/arch/i386/stand/Makefile.inc b/sys/arch/i386/stand/Makefile.inc
index df73ce17abf..d9898462e50 100644
--- a/sys/arch/i386/stand/Makefile.inc
+++ b/sys/arch/i386/stand/Makefile.inc
@@ -1,7 +1,7 @@
-# $OpenBSD: Makefile.inc,v 1.53 2022/12/30 06:50:27 jca Exp $
+# $OpenBSD: Makefile.inc,v 1.54 2023/02/23 19:48:22 miod Exp $
CFLAGS=${DEBUG} ${COPTS} -Oz -Wall -Werror
-CFLAGS+= -ffreestanding -fno-stack-protector -DMDRANDOM
+CFLAGS+= -ffreestanding -fno-stack-protector -DMDRANDOM -DBOOT_STTY
CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR}
SACFLAGS=-D_STANDALONE
DEBUGFLAGS=
diff --git a/sys/arch/i386/stand/boot/boot.8 b/sys/arch/i386/stand/boot/boot.8
index 6a15b898f93..6d15b9d589a 100644
--- a/sys/arch/i386/stand/boot/boot.8
+++ b/sys/arch/i386/stand/boot/boot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: boot.8,v 1.67 2019/12/23 12:44:34 bluhm Exp $
+.\" $OpenBSD: boot.8,v 1.68 2023/02/23 19:48:22 miod Exp $
.\"
.\" Copyright (c) 1997-2001 Michael Shalayeff
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
-.Dd $Mdocdate: December 23 2019 $
+.Dd $Mdocdate: February 23 2023 $
.Dt BOOT 8 i386
.Os
.Sh NAME
@@ -302,8 +302,6 @@ are both specified, sets that variable to the given value.
Variables include:
.Pp
.Bl -tag -compact -width db_console
-.It Ic addr
-Address at which to load the kernel.
.It Ic db_console
Boolean (0 or 1) to permit entry into the kernel debugger before the
.Em ddb.console
diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h
index e989aedadf9..19b67fc7973 100644
--- a/sys/arch/i386/stand/libsa/libsa.h
+++ b/sys/arch/i386/stand/libsa/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.46 2020/06/14 16:00:11 deraadt Exp $ */
+/* $OpenBSD: libsa.h,v 1.47 2023/02/23 19:48:22 miod Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
@@ -31,8 +31,6 @@
#define EXEC_ELF
-#define DEFAULT_KERNEL_ADDRESS 0
-
struct i386_boot_probes {
char *name;
void (**probes)(void);