summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k/stand/bugcrt/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme68k/stand/bugcrt/m68k')
-rw-r--r--sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc1
-rw-r--r--sys/arch/mvme68k/stand/bugcrt/m68k/bugcrt.c43
2 files changed, 44 insertions, 0 deletions
diff --git a/sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc b/sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc
new file mode 100644
index 00000000000..f44c6aa6c1d
--- /dev/null
+++ b/sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc
@@ -0,0 +1 @@
+CFLAGS+=-fomit-frame-pointer
diff --git a/sys/arch/mvme68k/stand/bugcrt/m68k/bugcrt.c b/sys/arch/mvme68k/stand/bugcrt/m68k/bugcrt.c
new file mode 100644
index 00000000000..1737f837ced
--- /dev/null
+++ b/sys/arch/mvme68k/stand/bugcrt/m68k/bugcrt.c
@@ -0,0 +1,43 @@
+#include <sys/types.h>
+#include <machine/prom.h>
+
+struct mvmeprom_args bugargs;
+
+ asm (".text");
+ asm (".long 0x003ffff8");
+ asm (".long _start");
+extern int edata;
+extern int end;
+start()
+{
+ register int dev_lun asm ("d0");
+ register int ctrl_lun asm ("d1");
+ register int flags asm ("d4");
+ register int ctrl_addr asm ("a0");
+ register int entry asm ("a1");
+ register int conf_blk asm ("a2");
+ register char *arg_start asm ("a5");
+ register char *arg_end asm ("a6");
+
+ register struct mvmeprom_args *bugarea;
+
+ bugarea = &bugargs;
+ bugarea->dev_lun = dev_lun;
+ bugarea->ctrl_lun = ctrl_lun;
+ bugarea->flags = flags;
+ bugarea->ctrl_addr = ctrl_addr;
+ bugarea->entry = entry;
+ bugarea->conf_blk = conf_blk;
+ bugarea->arg_start = arg_start;
+ bugarea->arg_end = arg_end;
+ *arg_end = 0;
+
+ bzero(&edata, (int)&end-(int)&edata);
+ main(bugarea);
+ mvmeprom_return();
+ /* NOTREACHED */
+}
+
+__main()
+{
+}