summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/stand/bootsd/boot.c10
-rw-r--r--sys/arch/mvme88k/stand/libsa/exec_mvme.c29
-rw-r--r--sys/arch/mvme88k/stand/libsa/parse_args.c31
3 files changed, 12 insertions, 58 deletions
diff --git a/sys/arch/mvme88k/stand/bootsd/boot.c b/sys/arch/mvme88k/stand/bootsd/boot.c
index cd23d6fafd2..4ff215865c2 100644
--- a/sys/arch/mvme88k/stand/bootsd/boot.c
+++ b/sys/arch/mvme88k/stand/bootsd/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.5 2001/01/13 05:19:00 smurph Exp $ */
+/* $OpenBSD: boot.c,v 1.6 2001/06/29 21:53:28 miod Exp $ */
/* $NetBSD: boot.c,v 1.2 1995/09/23 03:42:52 gwr Exp $ */
/*-
@@ -44,11 +44,6 @@
#include "stand.h"
#include "libsa.h"
-#define RB_NOSYM 0x400
-#define RB_MULTI 0x4000
-#define RB_EXTRA 0x8000
-#define RB_ASKKERN 0x0010 /* ask kernel name */
-
int debug;
int errno;
extern char *version;
@@ -64,9 +59,6 @@ main()
printf("\n>> OpenBSD/mvme88k bootsd [%s]\n", version);
ret = parse_args(&file, &flag);
- if (flag & RB_ASKKERN) {
- ask = 1;
- }
for (;;) {
if (ask) {
printf("boot: ");
diff --git a/sys/arch/mvme88k/stand/libsa/exec_mvme.c b/sys/arch/mvme88k/stand/libsa/exec_mvme.c
index 031e3a02004..d0ae726c7bd 100644
--- a/sys/arch/mvme88k/stand/libsa/exec_mvme.c
+++ b/sys/arch/mvme88k/stand/libsa/exec_mvme.c
@@ -54,16 +54,11 @@ struct kernel {
u_int end_loaded;
} kernel;
-#define RB_NOSYM 0x400
-#define RB_MULTI 0x4000
-#define RB_EXTRA 0x8000
-#define RB_ASKKERN 0x0010 /* ask kernel name */
-
/*ARGSUSED*/
void
exec_mvme(file, flag)
-char *file;
-int flag;
+ char *file;
+ int flag;
{
char *loadaddr;
register int io;
@@ -72,12 +67,11 @@ int flag;
void (*entry)();
register char *cp;
register int *ip;
- int n;
int bootdev;
- if (flag & RB_EXTRA) {
- printf("exec_mvme: file=%s flag=0x%x cputyp=%x\n", file, flag, bugargs.cputyp);
- }
+#ifdef DEBUG
+ printf("exec_mvme: file=%s flag=0x%x cputyp=%x\n", file, flag, bugargs.cputyp);
+#endif
io = open(file, 0);
if (io < 0)
@@ -106,13 +100,6 @@ int flag;
* so we must mask that off (has no effect on the other formats
*/
loadaddr = (void *)(x.a_entry & ~sizeof(x));
- n = x.a_text + x.a_data + x.a_bss + x.a_syms + sizeof(int);
-
- /* debugging stuff for netboot
- printf("hex load address range 0x%x to 0x%x\n", loadaddr, loadaddr+n);
- printf("dec load address range %ld to %ld\n", loadaddr, loadaddr+n);
- bzero((void *)loadaddr, n);
- */
cp = loadaddr;
magic = N_GETMAGIC(x);
@@ -208,14 +195,14 @@ int flag;
bootdev = (bugargs.ctrl_lun << 8) | (bugargs.dev_lun & 0xFF);
- (*entry)(flag, bugargs.ctrl_addr, cp, kernel.smini, kernel.emini, bootdev, bugargs.cputyp);
+ (*entry)(flag, bugargs.ctrl_addr, cp, kernel.smini, kernel.emini, bootdev, bugargs.cputyp);
printf("exec: kernel returned!\n");
return;
- shread:
+shread:
printf("exec: short read\n");
errno = EIO;
- closeout:
+closeout:
close(io);
return;
}
diff --git a/sys/arch/mvme88k/stand/libsa/parse_args.c b/sys/arch/mvme88k/stand/libsa/parse_args.c
index 88d218bef04..7895da1e2c8 100644
--- a/sys/arch/mvme88k/stand/libsa/parse_args.c
+++ b/sys/arch/mvme88k/stand/libsa/parse_args.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse_args.c,v 1.2 1999/09/27 19:30:01 smurph Exp $ */
+/* $OpenBSD: parse_args.c,v 1.3 2001/06/29 21:53:35 miod Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -41,26 +41,6 @@
#include "libsa.h"
#define KERNEL_NAME "bsd"
-#define RB_NOSYM 0x400
-
-#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
-
-#if 0
-#define RB_ASKNAME 0x0001 /* ask for file name to reboot from */
-#define RB_SINGLE 0x0002 /* reboot to single user only */
-#define RB_NOSYNC 0x0004 /* dont sync before reboot */
-#define RB_HALT 0x0008 /* don't reboot, just halt */
-#define RB_INITNAME 0x0010 /* name given for /etc/init (unused) */
-#define RB_DFLTROOT 0x0020 /* use compiled-in rootdev */
-#define RB_KDB 0x0040 /* give control to kernel debugger */
-#define RB_RDONLY 0x0080 /* mount root fs read-only */
-#define RB_DUMP 0x0100 /* dump kernel memory before reboot */
-#define RB_MINIROOT 0x0200 /* mini-root present in memory at boot time */
-#define RB_CONFIG 0x0400 /* change configured devices */
-#define RB_TIMEBAD 0x0800 /* don't call resettodr() in boot() */
-#define RB_POWERDOWN 0x1000 /* attempt to power down machine */
-#define RB_SERCONS 0x2000 /* use serial console if available */
-#endif
struct flags {
char c;
@@ -70,21 +50,16 @@ struct flags {
{ 'b', RB_HALT },
{ 'c', RB_CONFIG },
{ 'd', RB_KDB },
- { 'e', 0x4000 }, /* spin slave cpus */
- { 'f', 0x0010 }, /* ask kernel name */
{ 'm', RB_MINIROOT },
{ 'r', RB_DFLTROOT },
{ 's', RB_SINGLE },
- { 'x', 0x8000 }, /* extra boot debug */
{ 'y', RB_NOSYM },
};
int
parse_args(filep, flagp)
-
-char **filep;
-int *flagp;
-
+ char **filep;
+ int *flagp;
{
char *name = KERNEL_NAME, *ptr;
int i, howto = 0;