diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-03-03 19:32:35 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1997-03-03 19:32:35 +0000 |
commit | 90ff5a441368313fa226376473fea6908c2c3539 (patch) | |
tree | 38e1de6dcfb2805194734736d7209f51e06fa9e1 /sys/arch/mvme88k/stand/bugcrt | |
parent | 7848f1c3b3e234584c90f67e60c6164590478f49 (diff) |
Third try at importing the mvme88k port. This is a working kernel
from nivas.
Userland and compiler still need to be worked on.
Make certain what directory the import is done from.
Diffstat (limited to 'sys/arch/mvme88k/stand/bugcrt')
-rw-r--r-- | sys/arch/mvme88k/stand/bugcrt/Makefile.inc | 12 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/bugcrt/m88k/Makefile.inc | 0 | ||||
-rw-r--r-- | sys/arch/mvme88k/stand/bugcrt/m88k/bugcrt.c | 44 |
3 files changed, 56 insertions, 0 deletions
diff --git a/sys/arch/mvme88k/stand/bugcrt/Makefile.inc b/sys/arch/mvme88k/stand/bugcrt/Makefile.inc new file mode 100644 index 00000000000..f2bae6c888c --- /dev/null +++ b/sys/arch/mvme88k/stand/bugcrt/Makefile.inc @@ -0,0 +1,12 @@ +BUG_CRT_DIR=${S}/arch/${MACHINE}/stand/bugcrt + +BUGCRT_DIR!= cd ${BUG_CRT_DIR}; \ + printf "xxx:\n\techo \$${.OBJDIR}\n" | ${MAKE} -r -s -f - xxx + +BUGCRT=${BUGCRT_DIR}/bugcrt.o + +$(BUGCRT): .NOTMAIN __always_make_bugcrt + @echo making sure the bugcrt is up to date... + @(cd ${BUG_CRT_DIR}; ${MAKE}) + +__always_make_bugcrt: .NOTMAIN diff --git a/sys/arch/mvme88k/stand/bugcrt/m88k/Makefile.inc b/sys/arch/mvme88k/stand/bugcrt/m88k/Makefile.inc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/sys/arch/mvme88k/stand/bugcrt/m88k/Makefile.inc diff --git a/sys/arch/mvme88k/stand/bugcrt/m88k/bugcrt.c b/sys/arch/mvme88k/stand/bugcrt/m88k/bugcrt.c new file mode 100644 index 00000000000..2eca49c663d --- /dev/null +++ b/sys/arch/mvme88k/stand/bugcrt/m88k/bugcrt.c @@ -0,0 +1,44 @@ +#include <sys/types.h> +#include <machine/prom.h> + +struct mvmeprom_args bugargs = { 1 }; /* not BSS */ + + asm (".text"); + asm (".long 0x003ffff8"); + asm (".long _start"); +start() +{ + register int dev_lun asm ("r2"); + register int ctrl_lun asm ("r3"); + register int flags asm ("r4"); + register int ctrl_addr asm ("r5"); + register int entry asm ("r6"); + register int conf_blk asm ("r7"); + register char *arg_start asm ("r8"); + register char *arg_end asm ("r9"); + extern int edata, end; + +asm ("# enable SFU1"); +asm (" ldcr r10,cr1"); +asm (" xor r10,r10,0x8"); +asm (" stcr r10,cr1"); + + bugargs.dev_lun = dev_lun; + bugargs.ctrl_lun = ctrl_lun; + bugargs.flags = flags; + bugargs.ctrl_addr = ctrl_addr; + bugargs.entry = entry; + bugargs.conf_blk = conf_blk; + bugargs.arg_start = arg_start; + bugargs.arg_end = arg_end; + *arg_end = 0; + + bzero(&edata, (int)&end - (int)&edata); + main(); + mvmeprom_return(); + /* NOTREACHED */ +} + +__main() +{ +} |