diff options
Diffstat (limited to 'sys/arch/mvme88k/stand/openbsd/bugcrt')
4 files changed, 75 insertions, 0 deletions
diff --git a/sys/arch/mvme88k/stand/openbsd/bugcrt/Makefile b/sys/arch/mvme88k/stand/openbsd/bugcrt/Makefile new file mode 100644 index 00000000000..04c7936ff58 --- /dev/null +++ b/sys/arch/mvme88k/stand/openbsd/bugcrt/Makefile @@ -0,0 +1,24 @@ +# $Id: Makefile,v 1.1 1997/03/03 19:31:03 rahnds Exp $ + +CFLAGS+=-I${.CURDIR}/../../include -O2 + +.include "${MACHINE_ARCH}/Makefile.inc" + +.PATH: ${.CURDIR}/${MACHINE_ARCH} + +OBJS=bugcrt.o + +CLEANFILES+=a.out + +all: ${OBJS} + +bugcrt.o: bugcrt.c + ${CC} ${CFLAGS} -c ${.ALLSRC} + ${LD} -x -r ${.TARGET} + mv a.out ${.TARGET} + +install: + +lint tags: + +.include <bsd.prog.mk> diff --git a/sys/arch/mvme88k/stand/openbsd/bugcrt/Makefile.inc b/sys/arch/mvme88k/stand/openbsd/bugcrt/Makefile.inc new file mode 100644 index 00000000000..f2bae6c888c --- /dev/null +++ b/sys/arch/mvme88k/stand/openbsd/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/openbsd/bugcrt/m88k/Makefile.inc b/sys/arch/mvme88k/stand/openbsd/bugcrt/m88k/Makefile.inc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/sys/arch/mvme88k/stand/openbsd/bugcrt/m88k/Makefile.inc diff --git a/sys/arch/mvme88k/stand/openbsd/bugcrt/m88k/bugcrt.c b/sys/arch/mvme88k/stand/openbsd/bugcrt/m88k/bugcrt.c new file mode 100644 index 00000000000..711b4fe2035 --- /dev/null +++ b/sys/arch/mvme88k/stand/openbsd/bugcrt/m88k/bugcrt.c @@ -0,0 +1,39 @@ +#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; + + 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)&edata - (int)&end); + main(); + mvmeprom_return(); + /* NOTREACHED */ +} + +__main() +{ +} |