diff options
author | Steve Murphree <smurph@cvs.openbsd.org> | 1999-09-27 19:30:02 +0000 |
---|---|---|
committer | Steve Murphree <smurph@cvs.openbsd.org> | 1999-09-27 19:30:02 +0000 |
commit | 43fce7b667be075e444ebd5979a58091cd97166c (patch) | |
tree | 6fe55d0ae04f5fbdb4618e2e265c141309727dc4 /sys/arch/mvme88k/stand/libsa | |
parent | 4ba4b9dc1e91263d6d8e54808c9bf4cee3ca39e5 (diff) |
changed loader load address.
Diffstat (limited to 'sys/arch/mvme88k/stand/libsa')
-rw-r--r-- | sys/arch/mvme88k/stand/libsa/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/libsa/exec_mvme.c | 16 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/libsa/parse_args.c | 28 |
3 files changed, 38 insertions, 10 deletions
diff --git a/sys/arch/mvme88k/stand/libsa/Makefile b/sys/arch/mvme88k/stand/libsa/Makefile index 96a743a069b..b35ecc3f443 100644 --- a/sys/arch/mvme88k/stand/libsa/Makefile +++ b/sys/arch/mvme88k/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 1998/08/22 08:07:49 smurph Exp $ +# $OpenBSD: Makefile,v 1.3 1999/09/27 19:30:00 smurph Exp $ LIB=sa @@ -37,7 +37,7 @@ DEFS= -D__INTERNAL_LIBSA_CREAD #-DNETIF_DEBUG INCL= -I${.CURDIR} -I${.CURDIR}/../libbug -I${S}/lib/libsa -I${S} COPTS= #-fno-defer-pop -CFLAGS+= ${XCFLAGS} -O2 ${COPTS} ${DEFS} ${DBG} ${INCL} +CFLAGS+= ${XCFLAGS} ${COPTS} ${DEFS} ${DBG} ${INCL} -O2 .PATH: ${DIR_SA} ${DIR_KERN} diff --git a/sys/arch/mvme88k/stand/libsa/exec_mvme.c b/sys/arch/mvme88k/stand/libsa/exec_mvme.c index 5d4bfd3149e..474e679ea45 100644 --- a/sys/arch/mvme88k/stand/libsa/exec_mvme.c +++ b/sys/arch/mvme88k/stand/libsa/exec_mvme.c @@ -55,6 +55,10 @@ struct kernel { } 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) @@ -69,10 +73,11 @@ exec_mvme(file, flag) register char *cp; register int *ip; int n; + int bootdev; -#ifdef DEBUG - printf("exec_mvme: file=%s flag=0x%x\n", file, flag); -#endif + if (flag & RB_EXTRA) { + printf("exec_mvme: file=%s flag=0x%x cputyp=%x\n", file, flag, bugargs.cputyp); + } io = open(file, 0); if (io < 0) @@ -201,8 +206,9 @@ exec_mvme(file, flag) printf("Controler Address @ %x ...\n", bugargs.ctrl_addr); if (flag & RB_HALT) mvmeprom_return(); -/* (addr)(flag, 0, kernel.esym, kernel.smini, kernel.emini);*/ - (*entry)(flag, bugargs.ctrl_addr, cp, kernel.smini, kernel.emini); + bootdev = (bugargs.ctrl_lun << 8) | (bugargs.dev_lun & 0xFF); + + (*entry)(flag, bugargs.ctrl_addr, cp, kernel.smini, kernel.emini, bootdev, bugargs.cputyp); printf("exec: kernel returned!\n"); return; diff --git a/sys/arch/mvme88k/stand/libsa/parse_args.c b/sys/arch/mvme88k/stand/libsa/parse_args.c index 217894cb89e..88d218bef04 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.1 1998/08/22 08:08:21 smurph Exp $ */ +/* $OpenBSD: parse_args.c,v 1.2 1999/09/27 19:30:01 smurph Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -43,18 +43,40 @@ #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; short bit; } bf[] = { - { 'a', RB_ASKNAME }, + { 'a', RB_ASKNAME }, /* ask root */ { 'b', RB_HALT }, { 'c', RB_CONFIG }, - { 'y', RB_NOSYM }, { '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 |