diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1996-02-16 00:13:23 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1996-02-16 00:13:23 +0000 |
commit | 2713b15b3db2be7a272244702deaa00bb955198b (patch) | |
tree | 33f687791e892c6e919546a534bc895866b505b5 /sys/arch/mvme68k/stand | |
parent | 9c4fda775695243450930786c3a558ec235d53a4 (diff) |
Fixes for mvme68k tape and disk bootloaders.
fix argument parsing for disk and tape boot
bootsd/boot.c
bugcrt/m68k/Makefile.inc
tape boot was broken completely
bootst/bootst.c
minor bug if bootloader was specific size (aout exec header is 0x20 not 0x30).
writvid/wrtvid.c
Diffstat (limited to 'sys/arch/mvme68k/stand')
-rw-r--r-- | sys/arch/mvme68k/stand/bootsd/boot.c | 7 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/bootst/bootst.c | 27 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc | 1 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/wrtvid/wrtvid.c | 2 |
4 files changed, 27 insertions, 10 deletions
diff --git a/sys/arch/mvme68k/stand/bootsd/boot.c b/sys/arch/mvme68k/stand/bootsd/boot.c index b10b16b5f75..e649328f1ee 100644 --- a/sys/arch/mvme68k/stand/bootsd/boot.c +++ b/sys/arch/mvme68k/stand/bootsd/boot.c @@ -1,4 +1,4 @@ -/* $Id: boot.c,v 1.5 1995/12/06 10:54:55 deraadt Exp $ */ +/* $Id: boot.c,v 1.6 1996/02/16 00:13:18 rahnds Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -274,7 +274,7 @@ parse_args() int i, howto = 0; char c; - if (bugargs.arg_start == bugargs.arg_end) { + if (bugargs.arg_start != bugargs.arg_end) { ptr = bugargs.arg_start; while (c = *ptr) { while (c == ' ') @@ -291,8 +291,9 @@ parse_args() } while ((c = *++ptr) && c != ' ') { for (i = 0; i < sizeof(bf)/sizeof(bf[0]); i++) - if (bf[i].c == c) + if (bf[i].c == c) { howto |= bf[i].bit; + } } } } diff --git a/sys/arch/mvme68k/stand/bootst/bootst.c b/sys/arch/mvme68k/stand/bootst/bootst.c index 4d850195e5d..5b346aeaeba 100644 --- a/sys/arch/mvme68k/stand/bootst/bootst.c +++ b/sys/arch/mvme68k/stand/bootst/bootst.c @@ -25,12 +25,14 @@ struct kernel { typedef(*kernel_entry) __P((struct mvmeprom_args *, struct kernel *)); +extern struct mvmeprom_args bugargs; int -main(pbugargs) - struct mvmeprom_args *pbugargs; +main() { kernel_entry addr; + struct mvmeprom_args *pbugargs; + pbugargs = &bugargs; /* print_bugargs(pbugargs); print_time(); @@ -43,6 +45,7 @@ main(pbugargs) } else { addr = kernel.entry; +#if 0 printf("kernel loaded at %x\n", addr); printf("kernel.entry %x\n", kernel.entry); printf("kernel.symtab %x\n", kernel.symtab); @@ -54,16 +57,29 @@ main(pbugargs) else printf("kernel.kname <null>\n"); printf("kernel.end_loaded %x\n", kernel.end_loaded); +#endif if (kernel.bflags & RB_MINIROOT) loadmini(kernel.end_loaded, pbugargs); +#if 0 printf("kernel.smini %x\n", kernel.smini); printf("kernel.emini %x\n", kernel.emini); printf("kernel.end_loaded %x\n", kernel.end_loaded); +#endif if (kernel.bflags & RB_HALT) mvmeprom_return(); - (addr) (pbugargs, &kernel); + if (((u_long)addr &0xf) == 0x2) { + (addr)(pbugargs, &kernel); + } else { + /* is type fixing anything like price fixing? */ + typedef (* kernel_start) __P((int, int, void *,void *, void *)); + kernel_start addr1; + addr1 = (void *)addr; + (addr1)(kernel.bflags, 0, kernel.esym, kernel.smini, kernel.emini + ); + } + } return (0); } @@ -136,7 +152,7 @@ load_kern(pbugargs) ret = read_tape_block(pbugargs->ctrl_lun, pbugargs->dev_lun, &status, buf, &cnt, blk_num, &flags, verbose); if (ret != 0) { - printf("unable to load kernel 1\n"); + printf("unable to load kernel 1 status %x\n", status); return (1); } pexec = (struct exec *) buf; @@ -163,7 +179,6 @@ load_kern(pbugargs) addr = (char *) (pexec->a_entry & ~0x0FFF); if ((int) pexec->a_entry != (int) addr + 0x22) { - printf("warning kernel start address not %x, %x\n", (int) addr + 0x22, pexec->a_entry); printf("kernel loaded at %x\n", addr); } @@ -184,7 +199,7 @@ load_kern(pbugargs) ret = read_tape_block(pbugargs->ctrl_lun, pbugargs->dev_lun, &status, addr, &cnt, blk_num, &flags, verbose); if (ret != 0 || cnt != len) { - printf("unable to load kernel 2\n"); + printf("unable to load kernel 2 status %x\n", status); return 1; } addr += len; diff --git a/sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc b/sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc index e69de29bb2d..f44c6aa6c1d 100644 --- a/sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc +++ b/sys/arch/mvme68k/stand/bugcrt/m68k/Makefile.inc @@ -0,0 +1 @@ +CFLAGS+=-fomit-frame-pointer diff --git a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c index 6d78b7d8660..b2a21ad4f18 100644 --- a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c +++ b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c @@ -51,7 +51,7 @@ main(argc, argv) }else { pcpul->vid_oss = 2; } - pcpul->vid_osl = (((stat.st_size -0x30) +511) / 512) *2; + pcpul->vid_osl = (((stat.st_size -0x20) +511) / 512) *2; lseek(exe_file, 0x14, SEEK_SET); read(exe_file, &exe_addr, 4); |