summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
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/loongson
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/loongson')
-rw-r--r--sys/arch/loongson/stand/boot/libsa.h4
-rw-r--r--sys/arch/loongson/stand/boot/machdep.c25
2 files changed, 2 insertions, 27 deletions
diff --git a/sys/arch/loongson/stand/boot/libsa.h b/sys/arch/loongson/stand/boot/libsa.h
index d375daffc54..21a2dff87f0 100644
--- a/sys/arch/loongson/stand/boot/libsa.h
+++ b/sys/arch/loongson/stand/boot/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.7 2020/12/09 18:10:19 krw Exp $ */
+/* $OpenBSD: libsa.h,v 1.8 2023/02/23 19:48:22 miod Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -18,8 +18,6 @@
#include <lib/libsa/stand.h>
-#define DEFAULT_KERNEL_ADDRESS 0
-
/* where the initrd is loaded */
#define INITRD_BASE PHYS_TO_CKSEG0(0x04000000)
diff --git a/sys/arch/loongson/stand/boot/machdep.c b/sys/arch/loongson/stand/boot/machdep.c
index 47956a8a136..5de4d3ff2b6 100644
--- a/sys/arch/loongson/stand/boot/machdep.c
+++ b/sys/arch/loongson/stand/boot/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.8 2014/07/13 09:26:08 jasper Exp $ */
+/* $OpenBSD: machdep.c,v 1.9 2023/02/23 19:48:22 miod Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -55,29 +55,6 @@ int boot_rd;
extern int bootprompt;
/*
- * Console
- */
-
-int
-cnspeed(dev_t dev, int sp)
-{
- return CONSPEED;
-}
-
-char *
-ttyname(int fd)
-{
- return "pmon console";
-}
-
-dev_t
-ttydev(char *name)
-{
- /* we do not support any other console than pmon */
- return NODEV;
-}
-
-/*
* Configuration and device path aerobics
*/