From a3a0d8c66b6490a8fa7344e1f28f4f06b3c3855f Mon Sep 17 00:00:00 2001 From: rahnds Date: Mon, 3 Mar 1997 20:47:48 +0000 Subject: [PATCH] When importing a tree, make certain that a bunch of garbage isn't left around. --- sys/arch/mvme88k/stand/old/Makefile | 4 - sys/arch/mvme88k/stand/old/boot/Makefile | 30 -- sys/arch/mvme88k/stand/old/boot/boot.1 | Bin 512 -> 0 bytes sys/arch/mvme88k/stand/old/boot/boot.2 | Bin 4608 -> 0 bytes sys/arch/mvme88k/stand/old/boot/foo | Bin 512 -> 0 bytes sys/arch/mvme88k/stand/old/boot/foo.1 | Bin 512 -> 0 bytes sys/arch/mvme88k/stand/old/boot/foo.2 | Bin 4096 -> 0 bytes sys/arch/mvme88k/stand/old/boot/main.c | 264 ------------- sys/arch/mvme88k/stand/old/boot/wrtvid | Bin 7132 -> 0 bytes sys/arch/mvme88k/stand/old/boot/wrtvid.c | 108 ----- sys/arch/mvme88k/stand/old/bootst/Makefile | 28 -- sys/arch/mvme88k/stand/old/bootst/bootst.c | 371 ------------------ sys/arch/mvme88k/stand/old/bugcrt/Makefile | 10 - sys/arch/mvme88k/stand/old/bugcrt/bugcrt.c | 42 -- sys/arch/mvme88k/stand/old/bugexec/Makefile | 26 -- sys/arch/mvme88k/stand/old/bugexec/hello | Bin 8608 -> 0 bytes sys/arch/mvme88k/stand/old/bugexec/hello.c | 54 --- sys/arch/mvme88k/stand/old/bugexec/wrtos.c | 64 --- sys/arch/mvme88k/stand/old/bugexec/xyz | Bin 4512 -> 0 bytes sys/arch/mvme88k/stand/old/include/bug.h | 8 - sys/arch/mvme88k/stand/old/include/bugio.h | 62 --- sys/arch/mvme88k/stand/old/kerncrt/Makefile | 22 -- sys/arch/mvme88k/stand/old/kerncrt/kerncrt.c | 11 - .../mvme88k/stand/old/kerncrt/m88k/kerncrt.c | 9 - sys/arch/mvme88k/stand/old/libbug/Makefile | 30 -- sys/arch/mvme88k/stand/old/libbug/bug.c | 133 ------- sys/arch/mvme88k/stand/old/libbug/bugio.c | 101 ----- sys/arch/mvme88k/stand/old/libbug/bugsupp.c | 7 - 28 files changed, 1384 deletions(-) delete mode 100644 sys/arch/mvme88k/stand/old/Makefile delete mode 100644 sys/arch/mvme88k/stand/old/boot/Makefile delete mode 100644 sys/arch/mvme88k/stand/old/boot/boot.1 delete mode 100644 sys/arch/mvme88k/stand/old/boot/boot.2 delete mode 100644 sys/arch/mvme88k/stand/old/boot/foo delete mode 100644 sys/arch/mvme88k/stand/old/boot/foo.1 delete mode 100644 sys/arch/mvme88k/stand/old/boot/foo.2 delete mode 100644 sys/arch/mvme88k/stand/old/boot/main.c delete mode 100644 sys/arch/mvme88k/stand/old/boot/wrtvid delete mode 100644 sys/arch/mvme88k/stand/old/boot/wrtvid.c delete mode 100644 sys/arch/mvme88k/stand/old/bootst/Makefile delete mode 100644 sys/arch/mvme88k/stand/old/bootst/bootst.c delete mode 100644 sys/arch/mvme88k/stand/old/bugcrt/Makefile delete mode 100644 sys/arch/mvme88k/stand/old/bugcrt/bugcrt.c delete mode 100644 sys/arch/mvme88k/stand/old/bugexec/Makefile delete mode 100644 sys/arch/mvme88k/stand/old/bugexec/hello delete mode 100644 sys/arch/mvme88k/stand/old/bugexec/hello.c delete mode 100644 sys/arch/mvme88k/stand/old/bugexec/wrtos.c delete mode 100644 sys/arch/mvme88k/stand/old/bugexec/xyz delete mode 100644 sys/arch/mvme88k/stand/old/include/bug.h delete mode 100644 sys/arch/mvme88k/stand/old/include/bugio.h delete mode 100644 sys/arch/mvme88k/stand/old/kerncrt/Makefile delete mode 100644 sys/arch/mvme88k/stand/old/kerncrt/kerncrt.c delete mode 100644 sys/arch/mvme88k/stand/old/kerncrt/m88k/kerncrt.c delete mode 100644 sys/arch/mvme88k/stand/old/libbug/Makefile delete mode 100644 sys/arch/mvme88k/stand/old/libbug/bug.c delete mode 100644 sys/arch/mvme88k/stand/old/libbug/bugio.c delete mode 100644 sys/arch/mvme88k/stand/old/libbug/bugsupp.c diff --git a/sys/arch/mvme88k/stand/old/Makefile b/sys/arch/mvme88k/stand/old/Makefile deleted file mode 100644 index 39788d542fb..00000000000 --- a/sys/arch/mvme88k/stand/old/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -SUBDIRS = libbug kerncrt boot bugexec -SUBDIR = libbug kerncrt boot bugexec - -.include diff --git a/sys/arch/mvme88k/stand/old/boot/Makefile b/sys/arch/mvme88k/stand/old/boot/Makefile deleted file mode 100644 index df343d81f70..00000000000 --- a/sys/arch/mvme88k/stand/old/boot/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -all: boot boot.out -CFLAGS+=-fwritable-strings -I${.CURDIR}/../include -CFLAGS+=-I${.CURDIR}/../.. -I${.CURDIR}/../../machine -CFLAGS+=-I/usr/src/sys -LDFLAGS+= -L ${.CURDIR}/../libbug -L/usr/local/lib -BOOT=FC0000 -#BOOT=1000000 - -LIBBUG!= cd $(.CURDIR)/../libbug; \ - printf "xxx:\n\techo \$${.OBJDIR}/libbug.a\n" | ${MAKE} -r -s -f - xxx - -LDADD+=${LIBBUG} #/usr/local/lib/libgcc.a -SRCS+=bugcrt.c bugio.c main.c - -.PATH: ${.CURDIR}/../bugcrt ${.CURDIR}/../libbug ${.CURDIR}/../../../../lib/libc_sa ${.CURDIR}/${MACHINE_ARCH} - -boot: bugcrt.o main.o bcopy.o memset.o printf.o ${LIBBUG} -# ld -o {.TARGET} -x -n -Ttext ${BOOT} bugcrt.o bugio.o main.o bcopy.o memset.o printf.o /usr/local/lib/libgcc.a - ld -o ${.TARGET} -x -N -Ttext ${BOOT} ${.ALLSRC} ${LDADD} - -boot.out: - ${.CURDIR}/wrtvid ${.OBJDIR}/boot && mv ${.OBJDIR}/boot.? ${.CURDIR} - -#main.o: main.c -# ${CC} ${CFLAGS} -c -O ${.ALLSRC} -# ${LD} -x -r ${.TARGET} -# ${LD} -x ${.TARGET} -# mv a.out ${.TARGET} - -.include diff --git a/sys/arch/mvme88k/stand/old/boot/boot.1 b/sys/arch/mvme88k/stand/old/boot/boot.1 deleted file mode 100644 index 03aa792830931768d2aefa1fb61ac2398bfd8755..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 512 wcmeZs3U*<@1dI$qV8K6_QZyG~WTd$j3=F>hA^t)BK8^^hu-VFlkRGNi0LlIYsQ>@~ diff --git a/sys/arch/mvme88k/stand/old/boot/boot.2 b/sys/arch/mvme88k/stand/old/boot/boot.2 deleted file mode 100644 index f1ebc35b44535274fbcde4670bd9a8de0ab0f220..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4608 zcmeHKU2I!t8Gdb_Bu;XUn{7^Oi%L0N?KEi}6h_yjQb&z9q@+zD(}a3V*ZDX;r-`X! zM~*|2lB#C(Zixg4so5knuiFKP2K6Q)g^Q$GB?_%rr>)aK9jmxN0USt&Ptq|rhvz*$ z$*hV3JgJd zNeE1mJ8*+UBd@rlDv@PBA}tsNQ8a!UYKTvg!?-x%{;ug)o(sh_p~@3^{KQ zd9(;MT_b1F3!V~PbtJ&K&U=HLSGyx*R@+LX(7JusL6UEfqkdIZoRz%dU`h4*p?lH$ z3JJ&aRF*E2tK*{QijC{QS%>}t=iG+)bxu2PAI2MQou|;w7V3KZBkGJ1Ie1LXQ=%H3 zq(~4ga(tkK$q8`)|FWbiJ~cv)r3+NMa!2uTEmw&WN<^ICyz%oSH~*Zx#>|9xbBF}C zqsAv;|DpF33EuPMUfrn*1N)t1+ddE5+~PPn6Z;+Ja`b!k;CWpgbCS(taoM}$sT^{Eou>{hhfrs5I$s(O@~cs$^nRq`Yx ze3g2^vxppSR@>GK+q(-ywXC;weaQb?&TkaF z%`3C2)IUqE$gEkm_V$eD8rK*^?Z{c%Iz#SteL%u_kUs10l1PrpRF2PXF~2;sOu@^Z zB69bj4wn*kVLmD39rqM5S8nD;{}Sdw+2;2Yk-MH_xvt9o^Ayq6MQ3i(s;EkA;~4l4 zW4z7YSFGHHQbF-GpCT{scaGaW<+-wa?scn1X~wfqI;Tj1Nl{~)_lT(STp^~pL^m3} zzw;DP8{uq(x8e*uhBNRe&VYSJ`f%>Td>?Qua$V_|r#2fe0Jpcb(C)xl3I$rIb2(CQ zw8dy|v_MYS_JvyLDeRv=sxfNw#c20Lgb4d(XVuvbmuSISpADXT&EmNxd;V$-+_fb&RIi=GnBO$l;_ZBFX?|;m5!Mde6^FHfPTW&Fmckkb<%{v{`R5i~{ zye6B~0pIF%tYKd}c4IAzV|Yivk2-E*UOHAu^Kl>VZv)<$Bx-q%^FOS5Y;HHW4}trM zhs?`k4uRMEka_WYl00vjYb#iXG}a+ljIP~9o4Rh^|0eW*!`slg6?YWgw>JB2%k#Pn zn7Er@3>rU&vr&hgMcvWfor z2jUaeeaxHnKLNibn16UZ2kw`Ek|(*k7OMI@lNwFS!7=&SO54DuuczbvDP7KG@~=Q_CmyY+6sjaVR-5qH7i(CrD&Q(>XbFLLM0( z>d&M`8l*}NrrI=ze7u47@F39+CDX}lCXKt8N_$*=55X=3bkg)<$H8?Uol& z=NF#%;@&6sJ=L{8-k;F)6Fdg{Bh)a!e>QwK)>~M*gyu0@UjX)3uqXou>hMKnQN{Nj z8*9LOZT~#*(-qt}4cuM9!cE}53a;$}Rw`VcE5I+>cmY_m^V|bY*|B-x(>C@2f7i~# z_+?xF0q_s(JlNXws*Q`lZ&rL7?*RYI_8$YDwe`cm^ES={|Hj5#^LsYF2mFT$7Mp+< zZQKd`v5i&WPbzc5bLb$uhGpQI*hns(%~7m>bU;ski(*6ZWZLRw_1tI{a4>T!mw^WB ztm$wV9?c~N<5|lm!x%7ThYe?w>D&p5@j;*%9|MZhA^t)BK8^^hu-VFlkRGNi0LCx`rvLx| diff --git a/sys/arch/mvme88k/stand/old/boot/foo.1 b/sys/arch/mvme88k/stand/old/boot/foo.1 deleted file mode 100644 index 53aac89a35e4036110e66ab5bfdbe6d0e72c6b90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 512 wcmeZs3U*<@1dI#hA^t)BK8^^hu-VFlkRGNi0LCx`rvLx| diff --git a/sys/arch/mvme88k/stand/old/boot/foo.2 b/sys/arch/mvme88k/stand/old/boot/foo.2 deleted file mode 100644 index dcef04fabfb6995643e0fb5ded5f44eea22db18b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4096 zcmd5wN(?n(omeIwI(0%kWRO5AeB+h5x%|HC z<1DI(1TPhqzMkLx{{6ml&Uem9sY*muat&J489G9t??$7_b4STlY%1WXVbw*6Rhz%04l=IfEBpDI$-bDf+WQ@)_Ujqq>8cYt#~iugLG$lH(kM)%B8WOo~NJ$8pW6GRfvspYb- zCq6;3Fh=Bg_M?GlHZ&@@4hue zGTTw(=V6cd&ynoELaxegO&&btAYp5Tt$%Tx9H~Q+wGw}MD|lYg#vCMg>>S`Y3O`NE zeGEBW$mjMSC%LR@4sg24G0mf5Ul4x}JZ|XZN*oD~d^EzWtdC@AK619kiX``nT` zC|S|?8Z8cxLyN8R9})bG!hil9qThn!N!~B619@A8?JuzXdX8ud>xFI+`QPIFX35{O z`ljZwdwSZZaBX4Kj9gpxOp~jw4|#A7JfD5<^^lTKsG59pht)g1!wO&bbt5P9%WBlg z`CI+tzHa|LU-wCk8r9S-YB^4R&c}UvN~5a(n6IZis5y5|_<}oM_XWx{-&CGcTabg$ zyU|wk=p*P+A9_^ua6isPl+P>Y@l5-I9kbLfZ~%B;dmHT!U8G2;jXGCiC8<3@2jV4i zz;-awMo*!C{;VaaJ&>UN=VRFH*vq>&oV{q7=Ir%b=PB0C#%5gM*T9vaPVgQ;{yN9+ znd8B{gx^v(?K5|ucic)--$F0#HA!`t?W(hPA32wL$!E6r+j#jGBwq-Tb73FJy)JTM zKVsvI0M1*u7mD5qR&CT3AqTVLOzB3 z3vv(g38Vs9h3tToA^(I-LheFVApd}H{4(SX$loA;h1{(7>+dY!XH_p;w9xLQ`Y!b6&LrjA?p?U244RMSsir-zpE|G+DCz;bFw>cB_EFPonOV5&1jnZLA1nU@upYvU7?P<?D}3Vjp3dL|GU=xMXXClh4cV_<9%$xJCH^#&vE{TRgd6yf%_=9pLoc; zJm&~_{STQJfA7)ux2?5R?8Eo458WYgUi=&2bWYg+n1*; z6YK6twNV$J7t~rn|8u%^7T({!9Hn1JM4#X-PyW#!oglZ&h`yZ9=kj(Q z))vkf%GaJ}M;K4>hy*9VPowLcoLV_+3lf>Bhg(sdo@Wq2qbsb6$q;%sn!sMgnzefwQ)1!M})ov z9IWAObHE{?F9LT6eHU<74a>v8(Hd^}6L3#0r!NTnRe=M*Ul(~k0X`}8J-{iEM*;p; z4LfImUl2JNUlKlJz%Pkd1^5+#yMcdF^VwDe{+aL(08a_M7x*oK72w|p%=OlNc!^^94!_j1C&vZ&P9@naT3bP#&ZhIZT&*5` -#include -#include "bug.h" -#include "bugio.h" -#include "machine/exec.h" - -int readblk __P((int, char *)); -int loados __P((void)); -void putchar __P((char)); -void _main __P((void)); -void tapefileseek __P((int)); - -char Clun, Dlun; - -#define DEV_BSIZE 512 -#define KERNEL_LOAD_ADDR 0x10000 -#if !defined(BUG_BLKSIZE) -#define BUG_BLKSIZE 256 -#endif /* BUG_BLKSIZE */ -#define sec2blk(x) ((x) * (DEV_BSIZE/BUG_BLKSIZE)) - -struct kernel { - void *entry; - void *symtab; - void *esym; - int bflags; - int bdev; - char *kname; - void *smini; - void *emini; - unsigned int end_loaded; -} kernel; - -int howto = 0; -int bootdev = 0; -int *miniroot; - -void -putchar(char c) -{ - bugoutchr(c); -} - -main(struct bugenv *env) -{ - printf("Clun %x Dlun %x\n", env->clun, env->dlun); - Clun = (char)env->clun; - Dlun = (char)env->dlun; - loados(); - return; -} - - -loados(void) -{ - int i, size; - register char *loadaddr = (char *)KERNEL_LOAD_ADDR; /* load addr 64k*/ - struct exec *hdr; - int (*fptr)(); - int *esym; - int cnt, strtablen, ret; - char *addr; - - howto |= RB_SINGLE|RB_KDB; - - tapefileseek(2); /* seek to file 2 - the OS */ - if (readblk(1, loadaddr) == -1) { - printf("Unable to read blk 0\n"); - return 1; - } - hdr = (struct exec *)loadaddr; - - /* We only deal with ZMAGIC files */ - if ((int)hdr->a_entry != (int)(loadaddr + sizeof(struct exec))) { - printf("a_entry != loadaddr + exec size\n"); - } - size = hdr->a_text + hdr->a_data; - size -= DEV_BSIZE; /* account for the block already read */ - - printf("Loading [%x+%x", hdr->a_text, hdr->a_data); - if (readblk(size / DEV_BSIZE, loadaddr + DEV_BSIZE) == -1) { - printf("Error reading the OS\n"); - return 1; - } - - /* zero out BSS */ - - printf("+%x]", hdr->a_bss); -#if DEBUG - printf("zero'd out %x (%x)\n", loadaddr + hdr->a_text + hdr->a_data, - hdr->a_bss); -#endif - memset(loadaddr + hdr->a_text + hdr->a_data, 0, hdr->a_bss); - - addr = loadaddr + hdr->a_text + hdr->a_data + hdr->a_bss; - - if (hdr->a_syms != 0 /* && !(kernel.bflags & RB_NOSYM)*/) { - /* - * DDB expects the following layout: - * no. of syms - * symbols - * size of strtab - * entries of strtab - * esym->... - * Where as size of strtab is part of strtab, we need - * to prepend the size of symtab to satisfy ddb. - * esym is expected to point past the last byte of - * string table, rouded up to an int. - */ - bcopy(&hdr->a_syms, addr, sizeof(hdr->a_syms)); - addr += 4; /* account for a_syms copied above */ - printf (" + [ %x",hdr->a_syms); - - cnt = (hdr->a_syms + DEV_BSIZE - 1) & ~(DEV_BSIZE - 1); - - ret = readblk(cnt / DEV_BSIZE, addr); - if (ret != 0) { - printf("unable to load kernel\n"); - return 1; - } - - esym = (void *) ((int)addr + hdr->a_syms); - - if ((int)addr + cnt <= (int)esym) { - printf("missed loading count of symbols\n\r"); - return 1; - } - - addr += cnt; - - strtablen = *esym; -#if 0 - printf("start load %x end load %x %x\n", addr, - len, addr +len); - printf("esym %x *esym %x\n",esym, len); -#endif - /* - * If symbol table size is not a sector multiple, we - * already read part of the string table. Look at the - * part already read, and figure out the string table - * size. Also, adjust the size yet to read. - */ - if (hdr->a_syms != cnt) { - /* already read part of the string table */ - strtablen -= (cnt - hdr->a_syms); - } - - if (strtablen > 0) { - printf(" + %x",*esym); - - cnt = (strtablen + DEV_BSIZE -1) & ~(DEV_BSIZE - 1); - - ret = readblk(cnt / DEV_BSIZE, addr); - if (ret != 0) { - printf("unable to load kernel\n"); - return 1; - } - addr += strtablen; - printf(" ]\n"); - } else { - printf("+ %x ]\n", *esym); - } - esym = (int *)(((int)esym) + *esym); - esym = (int *)(((int)esym + 4 - 1) & ~3); - - kernel.symtab = (void *)hdr->a_syms; - kernel.esym = esym; - } else { - kernel.symtab = 0; - kernel.esym = 0; - } - - kernel.end_loaded = (unsigned int)addr; - miniroot = (int *)esym; - miniroot = (int *)(((int)miniroot + 0x1000 - 1) & ~0xFFF); - tapefileseek(3); /* seek to file 3 - minroot */ - if (readblk(1000, miniroot) != 0) { - printf("miniroot not loaded\n"); - addr = (char *)miniroot; - } else { - addr = (char *)((int)miniroot + 1000 * DEV_BSIZE); - } - printf("esym %x miniroot @ %x (ends @ %x)\n", esym, miniroot, addr); -#if 0 - { - char *symaddr = (char *)0x01F00000; - int i; - - tapefileseek(4); /* seek to file 4 - syms */ - readblk(1, symaddr); - i = *symaddr; - i = (i * 0x1C + 4 + DEV_BSIZE) & ~(DEV_BSIZE - 1); - printf("loading %d symbols (%d sectors)\n", - *symaddr, (i + 1) * DEV_BSIZE); - readblk(i / DEV_BSIZE, symaddr + DEV_BSIZE); - readblk(100, 0x01F00000); - } -#endif - - fptr = (int (*)())hdr->a_entry; - /* - * Args are passed as - * r2 howto - * r3 end addr - * r4 (Clun << 8) | Dlun & FF - * r5 esym - * r6 miniroot - */ - bootdev = ((Clun << 8) & 0xFF00 | Dlun & 0xFF) & 0xFFFF; -#if 0 - asm volatile ("or r2, r0, %0\n\tor r3, r0, %1\n\tor r4, r0, %2\n\tor r5, r0, %3\n\tor r6, r0, %4\n\tor r7, r0, %5" - : /* no outputs */ - : "r" (howto), "r" (addr), "r" (Clun), "r" (Dlun), "r" (esym), "r" (miniroot) - : "r2", "r3", "r4", "r5", "r6", "r7"); -#endif /* 0 */ - (*fptr)(howto, addr, bootdev, esym, miniroot); - return 0; -} - -int -readblk(int n, char *addr) -{ - struct bugdisk_io io; - - io.clun = Clun; - io.dlun = Dlun; - io.status = 0; - io.addr = (void *)addr; - io.fileno = 0; /* for tape reads, start io at current pos */ - io.nblks = sec2blk(n); - io.flag = IGNOREFILENO; - io.am = 0; - bugdskrd(&io); - if (io.status) - return -1; - return 0; -} - -void -_main(void) -{ - return; -} - -void -tapefileseek(int i) -{ - struct bugdisk_io io; - void *addr = (void *)KERNEL_LOAD_ADDR; /* some number - don't care */ - - io.clun = Clun; - io.dlun = Dlun; - io.status = 0; - io.addr = addr; - io.fileno = i; /* for tape reads, this is the file no. */ - io.nblks = 0; - io.flag = 0; /* we want to turn off IFN and EOF bits */ - io.am = 0; - bugdskrd(&io); -} - -__main() -{ -} diff --git a/sys/arch/mvme88k/stand/old/boot/wrtvid b/sys/arch/mvme88k/stand/old/boot/wrtvid deleted file mode 100644 index 647a59d253f0e4fbdcf4460376bad51bc14e208e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7132 zcmb_heQaA-6+iFUY2(J-($!frRF${luynMJ?W9>!Ce>-W(Tz2Y)`A?-&T;G)$HZUw zy=0BFwb7`=V5t_Nf{G|x*($AwR+>Z^o2ar#Y!Hbeh6bX4fL2&Ro%p8{sn{RY!tdOV zkhscu_k7)R&pr3v_s(&SKJdtchH21ZGpP=^L1tYu`VOMzjY8Hz7OkdMYNk6u zuM#qo<)U4|lfe(*=7WilM8$Kx!iBuT_9+k|6Cj%&r+ap&gBI-vEPEGIO`!KcuIYQozb?u8 zYW!Bj^q_}s2hDOng2z7J5Bn$4SCqXT&|-ax-UGUy$1DH($dr4m?0*IG4?=uU=^xbg z@0Rwn|F*qrS#8$o&|kb(LaU1bD(9s$`!jrsjNLTmP_SJ!)2=4=`0n~g+e()sZ7C6 zm&PiTvP)S?xmnu*(=LtYtK||6S8bb$cG0n2Dmb=13Xy9cb}5Z#-X*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I41AqeH7=ZJr3xG?2 ztALxh8zI0}z;3`nfD4!cAjfLB2x&jhazw44t#*B_w8x>+vj7*)eDE$apu52ov- zzQ|>n=3ExzWjzL39t%|)faVynyo)=~LGC#oqSJMas<$AQ^@*wlKy$qWujN?)&GBZM zp}N3E&Vg@!g>-QFG_pH z=H<1au?7APLau5b%6hFB0uVVn zQZ&)T_YoN9W}I`f9&%s-r$MuvZE?@vTF%*cEc7_H7x_Ks^t$PJxhCf^(Bqt0 zgMXYu$UH)t5>GvEuSXAdM82+Ntf=vQ9zFOb^1_X*pqlpYYoK`@JZ~5D0Qk9NscF3- zu;hA0&d+(j_ -#include -#include -#include -#include -#include "vid.h" - -#define sec2blk(x) ((x) * 2) - -main(int argc, char **argv) -{ - struct vid *pvid; - struct cfg *pcfg; - struct stat stat; - int exe_file; - int tape_vid; - int tape_exe; - unsigned int exe_addr; - unsigned short exe_addr_u; - unsigned short exe_addr_l; - char *filename; - char fileext[256]; - - if (argc == 0){ - filename = "a.out"; - } else { - filename = argv[1]; - } - exe_file = open(filename, O_RDONLY,0444); - if (exe_file == -1) - { - printf("file %s does not exist\n",filename); - exit(2); - } - sprintf (fileext,"%s%s",filename,".1"); - tape_vid = open(fileext, O_WRONLY|O_CREAT|O_TRUNC,0644); - sprintf (fileext,"%s%s",filename,".2"); - tape_exe = open(fileext, O_WRONLY|O_CREAT|O_TRUNC,0644); - - pvid = (struct vid *) malloc(sizeof (struct vid)); - - memset(pvid,0,sizeof(struct vid)); - - strcpy(pvid->vid_id, "NBSD"); - - fstat (exe_file,&stat); - /* size in 512 byte blocks round up after a.out header removed */ - /* Actually, blocks == 256 bytes */ - - pvid->vid_oss = 1; - pvid->vid_osl = (short)sec2blk((stat.st_size - 0x20 + 511) / 512); - - lseek(exe_file,0x14,SEEK_SET); - read(exe_file,&exe_addr,4); - { - union { - struct { - short osa_u; - short osa_l; - } osa_u_l; - int osa; - } u; - u.osa = exe_addr; - pvid->vid_osa_u = u.osa_u_l.osa_u; - pvid->vid_osa_l = u.osa_u_l.osa_l; - } - pvid->vid_cas = 1; - pvid->vid_cal = 1; - /* do not want to write past end of structure, not null terminated */ - strcpy(pvid->vid_mot,"MOTOROL"); - pvid->vid_mot[7] = 'A'; - - write(tape_vid,pvid,sizeof(struct vid)); - - free(pvid); - - pcfg = (struct cfg *) malloc (sizeof(struct cfg)); - - memset(pcfg,0,sizeof(struct cfg)); - - pcfg->cfg_rec = 0x100; - pcfg->cfg_psm = 0x200; - - write(tape_vid,pcfg,sizeof(struct cfg)); - - free(pcfg); - - copy_exe(exe_file,tape_exe); - close (exe_file); - close (tape_vid); - close (tape_exe); -} - -#define BUF_SIZ 512 -copy_exe(exe_file,tape_exe) -{ - char *buf; - int cnt = 0; - - buf = (char *)malloc (BUF_SIZ); - - lseek (exe_file,0x20,SEEK_SET); - while (BUF_SIZ == (cnt = read(exe_file, buf , BUF_SIZ))) { - write (tape_exe,buf,cnt); - } - memset (&buf[cnt],0,BUF_SIZ-cnt); - write (tape_exe,buf,BUF_SIZ); -} diff --git a/sys/arch/mvme88k/stand/old/bootst/Makefile b/sys/arch/mvme88k/stand/old/bootst/Makefile deleted file mode 100644 index 7e8fba43288..00000000000 --- a/sys/arch/mvme88k/stand/old/bootst/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -STRIP_AOUT_HDR=rmaouthdr -all: bootst.bug -STRIP=-s -SRCS=bootst.c -S=${.CURDIR}/../../../.. - -CFLAGS+=-I${.CURDIR}/../../include -I${.CURDIR}/${MACHINE_ARCH} - -.include "${S}/arch/${MACHINE}/stand/libbug/Makefile.inc" -.include "${S}/arch/${MACHINE}/stand/bugcrt/Makefile.inc" -.include "${S}/lib/libsa/Makefile.inc" -.include "${S}/lib/libc_sa/Makefile.inc" -.include "${S}/lib/libkern/Makefile.inc" - -LDADD+=${LIBBUG} ${SA_LIB} ${C_SA_LIB} ${KERNLIB} - -bootst.bug: bootst.o ${LDADD} ${BUGCRT} - ${LD} ${STRIP} -N -T 0x3F0000 ${BUGCRT} bootst.o ${LDADD} -o bootst.bug - ${.CURDIR}/../wrtvid/wrtvid bootst.bug - -clean: - rm -f a.out *.core - rm -f bootst.o bootst.bug stboot bootst - -install: - install -c -m 555 -g bin -o bin bootst stboot /usr/mdec/ - -.include diff --git a/sys/arch/mvme88k/stand/old/bootst/bootst.c b/sys/arch/mvme88k/stand/old/bootst/bootst.c deleted file mode 100644 index fc3336b2643..00000000000 --- a/sys/arch/mvme88k/stand/old/bootst/bootst.c +++ /dev/null @@ -1,371 +0,0 @@ -#include "bug.h" -#include -#include -#include -#include -/* -#include -*/ - -#define KERNEL_LOAD_ADDRESS ((void *)0x4000) -#define BUG_BLOCK_SIZE 512 -#define VERSION 0x0000 - -#define RB_NOSYM 0x400 - - - -void memset(void *,char,size_t); -void printf(char *,...); -void parse_args(struct bugargs *pbugargs); -int read_tape_block(short ctrl, short dev, short *status, void *addr, - int *cnt, int blk_num, unsigned char *flags,int verbose); -int load_kern(); - -struct kernel { - void *entry; - void *symtab; - void *esym; - int bflags; - int bdev; - char *kname; - void *smini; - void *emini; - u_int end_loaded; -} kernel; - -typedef (* kernel_entry)(struct bugargs *,struct kernel *); - -void main(struct bugargs *pbugargs) -{ - kernel_entry addr; - - /* - print_bugargs(pbugargs); - print_time(); - print_brdid(); - print_memory(); - */ - parse_args(pbugargs); - if (1 == load_kern(pbugargs)) { - printf("unsuccessful in loading kernel\n\r"); - } else { - addr = kernel.entry; - printf("kernel loaded at %x\n\r",addr); - printf("kernel.entry %x\n\r",kernel.entry); - printf("kernel.symtab %x\n\r",kernel.symtab); - printf("kernel.esym %x\n\r",kernel.esym); - printf("kernel.bflags %x\n\r",kernel.bflags); - printf("kernel.bdev %x\n\r",kernel.bdev); - if (kernel.kname) { - printf("kernel.kname <%s>\n\r",kernel.kname); - } else { - printf("kernel.kname \n\r"); - } - printf("kernel.end_loaded %x\n\r",kernel.end_loaded); - if (kernel.bflags & RB_MINIROOT) { - loadmini(kernel.end_loaded,pbugargs); - } - printf("kernel.smini %x\n\r",kernel.smini); - printf("kernel.emini %x\n\r",kernel.emini); - printf("kernel.end_loaded %x\n\r",kernel.end_loaded); - if (*pbugargs->arg_start == 'e') - bug_return(); - (addr)(pbugargs,&kernel); - } - - return; -} -int -read_tape_block(short ctrl, short dev, short *status, void *addr, - int *cnt, int blk_num, unsigned char *flags,int verbose) -{ - struct bug_dskio dio; - int ret; - - dio.ctrl_lun = ctrl; - dio.dev_lun = dev; - dio.status = *status; - dio.pbuffer = addr; - dio.blk_num = blk_num; - dio.blk_cnt = *cnt * 2; - dio.flag = *flags; - dio.addr_mod = 0; - - if (verbose){ - printf("saddr %x eaddr %x", dio.pbuffer, - (int)dio.pbuffer + (dio.blk_cnt * BUG_BLOCK_SIZE/2 )); - } - - ret = bug_diskrd(&dio); - - *status = dio.status; - *cnt = dio.blk_cnt/2; - if (verbose) { - printf("status %x ret %d ",*status, ret); - printf("flags %x\n\r",*flags); - } - return ret; -} -int load_kern(struct bugargs *pbugargs) -{ - int ret; - char *addr; - unsigned char flags; - short status = 0; - int verbose = 0; - int blk_num; - struct exec *pexec; - int magic; - int *esym; - int *symtab; - int cnt, len; - - blk_num = 0; - flags = IGNORE_FILENUM ; - cnt = 512 / BUG_BLOCK_SIZE; - addr = KERNEL_LOAD_ADDRESS; - ret = read_tape_block(pbugargs->ctrl_lun, pbugargs->dev_lun, &status, addr, - &cnt, blk_num, &flags, verbose); - if (ret != 0) { - printf("unable to load kernel\n\r"); - return 1; - } - pexec = (struct exec *) addr; - if ((N_GETMID(*pexec) != MID_M68K) && - ( N_GETMID(*pexec) != MID_M68K4K )) - { - printf("invalid mid on kernel\n\r"); - return 1; - } - { - short *pversion = (void *)0x4020; - if (VERSION != *pversion) { - printf("invalid version of kernel/loader\n\r"); - bug_return(); - } - } - magic = N_GETMAGIC(*pexec); - switch (magic) { - case ZMAGIC: - break; - case NMAGIC: - printf ("NMAGIC not yet supported"); - case OMAGIC: - case QMAGIC: - default: - printf("Unknown or unsupported magic type <%x>\n\r", - magic); - return 1; - break; - } - if ( magic == ZMAGIC ) { - - status = 0; - /* 2nd block of exe */ - addr += 512; - - if ((int)pexec->a_entry != (int)KERNEL_LOAD_ADDRESS + 0x22) { - printf ("warning kernel start address not %x, %x\n\r", - (int)KERNEL_LOAD_ADDRESS + 0x22,pexec->a_entry); - printf ("kernel loaded at %x\n\r",KERNEL_LOAD_ADDRESS); - - } - printf ("text 0x%x data 0x%x bss 0x%x\n\r", - pexec->a_text, pexec->a_data, pexec->a_bss); - - len = (pexec->a_text - 512) ; /* XXX */ - len += (pexec->a_data ); - - printf ("loading [ %x + %x ",pexec->a_text,pexec->a_data); - - cnt = (len + BUG_BLOCK_SIZE -1)/ BUG_BLOCK_SIZE; - flags = IGNORE_FILENUM ; - ret = read_tape_block(pbugargs->ctrl_lun, pbugargs->dev_lun, &status, addr, - &cnt, blk_num, &flags, verbose); - if (ret != 0 || cnt != (len + BUG_BLOCK_SIZE -1)/ BUG_BLOCK_SIZE) { - printf("unable to load kernel\n\r"); - return 1; - } - addr += len; - - /* Skip over text and data and zero bss. */ - len = pexec->a_bss; - printf ("+ %x",len); - memset (KERNEL_LOAD_ADDRESS + (pexec->a_text + pexec->a_data), - 0, pexec->a_bss); - addr +=len; - - if (pexec->a_syms != 0 && !(kernel.bflags & RB_NOSYM)) { - printf (" + [ %x",pexec->a_syms); - /* align addr */ -#if 0 -#define ALIGN_F 0x200 - addr = (void *)((((int)addr + ALIGN_F -1)/ALIGN_F) * ALIGN_F); -#endif - addr += 4; /* skip over _end symbol */ - symtab = (void *)pexec->a_syms; - len = pexec->a_syms; - cnt = (len+(BUG_BLOCK_SIZE-1)) / BUG_BLOCK_SIZE; - flags = IGNORE_FILENUM ; - ret = read_tape_block(pbugargs->ctrl_lun, pbugargs->dev_lun, &status, addr, - &cnt, blk_num, &flags, verbose); - if (ret != 0 || cnt != (len+(BUG_BLOCK_SIZE-1)) / BUG_BLOCK_SIZE) - { - printf("unable to load kernel\n\r"); - return 1; - } - - /* this value should have already been loaded XXX */ - esym = (void *) ((u_int)addr + pexec->a_syms); - if ((int)addr +(cnt * BUG_BLOCK_SIZE) <= (int) esym) { - printf("missed loading count of symbols\n\r"); - return 1; - } - addr +=cnt * BUG_BLOCK_SIZE; - - - len = *esym; -#if 0 - printf("start load %x end load %x %x\n\r", addr, - len, addr +len); - printf("esym %x *esym %x\n\r",esym, len); -#endif - /* dont load tail of already loaded */ - len -= (u_int)addr - (u_int)esym; - - if (len > 0) { - printf(" + %x",*esym); - esym = (void *)(addr + len); - cnt = (len+(BUG_BLOCK_SIZE-1)) / BUG_BLOCK_SIZE; - flags = IGNORE_FILENUM ; - ret = read_tape_block(pbugargs->ctrl_lun, pbugargs->dev_lun, &status, addr, - &cnt, blk_num, &flags, verbose); - if (ret != 0 || - cnt != (len+(BUG_BLOCK_SIZE-1)) / BUG_BLOCK_SIZE) - { - printf("unable to load kernel\n\r"); - return 1; - } - addr += len; - printf(" ]"); - } else { - printf("+ %x ]",*esym); - } - esym = (int *)(((int)esym) + *esym); - - kernel.symtab = symtab; - kernel.esym = esym; - } else { - kernel.symtab = 0; - kernel.esym = 0; - } - kernel.end_loaded = (int)addr; - flags = IGNORE_FILENUM | END_OF_FILE; - cnt = 1000; - printf ("removing pad ["); - ret = read_tape_block(pbugargs->ctrl_lun, pbugargs->dev_lun, &status, addr, - &cnt, blk_num, &flags, verbose); - if (ret != 0) { - printf("unable to load kernel\n\r"); - return 1; - } - printf (" %d ]",cnt * BUG_BLOCK_SIZE); - - printf("]\n\r"); - } - - - kernel.entry = (void *)pexec->a_entry; - return 0; -} -loadmini(u_int addr,struct bugargs *pbugargs) -{ - int ret; - unsigned char flags; - short status = 0; - int verbose = 0; - int blk_num; - int cnt; - blk_num = 3; - /* - flags = IGNORE_FILENUM | END_OF_FILE; - */ - /* align addr to some boundary */ -#define ALIGN_F 0x4 - addr = (u_int)((((int)addr + ALIGN_F -1)/ALIGN_F) * ALIGN_F); -#undef ALIGN_F - flags = END_OF_FILE; - cnt = 6144; /* some abserdly large value. (3meg / 512) */ - printf("loading miniroot[ "); - ret = read_tape_block(4, pbugargs->dev_lun, &status, (void*)addr, - &cnt, blk_num, &flags, verbose); - if (ret != 0) { - printf("unable to load miniroot\n\r"); - return 1; - } - kernel.smini = (void *)addr; - printf("%d ]\n\r",(BUG_BLOCK_SIZE * cnt)); - kernel.emini = (void*)((u_int)addr + (BUG_BLOCK_SIZE * cnt)); - kernel.end_loaded = (u_int)kernel.emini; -} -void -parse_args(struct bugargs *pargs) -{ - char * ptr = pargs->arg_start; - char c, *name; - int howto; - howto = ( 0 | RB_DFLTROOT ); - name = NULL; - - if (pargs->arg_start != pargs->arg_end) { - while (c = *ptr) { - while (c == ' ') - c = *++ptr; - if (!c) - return; - if (c == '-') - while ((c = *++ptr) && c != ' ') { - if (c == 'a') - howto |= RB_ASKNAME; - else if (c == 'b') - howto |= RB_HALT; - else if (c == 'y') - howto |= RB_NOSYM; -#ifdef CHECKSUM - else if (c == 'c') - cflag = 1; -#endif - else if (c == 'd') - howto |= RB_KDB; - else if (c == 'm') - howto |= RB_MINIROOT; - else if (c == 'r') -/* change logic to have force root to config device UNLESS arg given */ - howto &= ~RB_DFLTROOT; - else if (c == 's') - howto |= RB_SINGLE; - } - else { - name = ptr; - while ((c = *++ptr) && c != ' '); - if (c) - *ptr++ = 0; - } - } - if (RB_NOSYM & howto) printf("RB_NOSYM\n\r"); - if (RB_AUTOBOOT & howto) printf("RB_AUTOBOOT\n\r"); - if (RB_SINGLE & howto) printf("RB_SINGLE\n\r"); - if (RB_NOSYNC & howto) printf("RB_NOSYNC\n\r"); - if (RB_HALT & howto) printf("RB_HALT\n\r"); - if (RB_DFLTROOT & howto) printf("RB_DFLTROOT\n\r"); - if (RB_KDB & howto) printf("RB_KDB\n\r"); - if (RB_RDONLY & howto) printf("RB_RDONLY\n\r"); - if (RB_DUMP & howto) printf("RB_DUMP\n\r"); - if (RB_MINIROOT & howto) printf("RB_MINIROOT\n\r"); - - } - kernel.bflags = howto; - kernel.kname = name; -} - diff --git a/sys/arch/mvme88k/stand/old/bugcrt/Makefile b/sys/arch/mvme88k/stand/old/bugcrt/Makefile deleted file mode 100644 index 821ec7508d4..00000000000 --- a/sys/arch/mvme88k/stand/old/bugcrt/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJ=bugcrt.o -CFLAGS+=-I${.CURDIR}/../include -CFLAGS+=-I${.CURDIR}/../.. -CFLAGS+=-I/usr/src/sys -CFLAGS+=-fwritable-strings - -SRCS=bugcrt.c -all: bugcrt.o - -.include diff --git a/sys/arch/mvme88k/stand/old/bugcrt/bugcrt.c b/sys/arch/mvme88k/stand/old/bugcrt/bugcrt.c deleted file mode 100644 index d01c20b6e2d..00000000000 --- a/sys/arch/mvme88k/stand/old/bugcrt/bugcrt.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "bug.h" - -asm (" text"); -/*asm ("_stack: word _stack0xFC0000; stack");*/ -asm ("stack: word stack"); -asm (" word _start"); -asm (" align 8"); - -struct bugenv bugenv; -extern char *end, *edata; - -start() -{ - register int dlun asm("r2"); - register int clun asm("r3"); - register int ipl asm("r4"); - register int (*entryptr)() asm("r6"); - register int *cfg asm("r7"); - register char *strstr asm("r8"); - register char *endstr asm("r9"); - int i; - char *str; - -asm ("; enable SFU1"); -asm (" ldcr r10,cr1"); -asm (" xor r10,r10,0x8"); -asm (" stcr r10,cr1"); - - bugenv.clun = clun; - bugenv.dlun = dlun; - bugenv.ipl = ipl; - bugenv.entry= entryptr; - - bzero(&edata,((char *)&end - (char *)&edata)); - for (str = strstr, i = 0; str <= strstr; str++, i++) { - bugenv.bootargs[i] = *str; - } - bugenv.bootargs[i] = 0; - - main(&bugenv); - bugreturn(); -} diff --git a/sys/arch/mvme88k/stand/old/bugexec/Makefile b/sys/arch/mvme88k/stand/old/bugexec/Makefile deleted file mode 100644 index 3ed0ff02de6..00000000000 --- a/sys/arch/mvme88k/stand/old/bugexec/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -all: hello -SRCS= hello.c -OBJS= hello.o - -CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/${MACHINE_ARCH} -CFLAGS+=-I${.CURDIR}/../include -I${.CURDIR}/../.. -I/usr/src/sys -CFLAGS+=-fwritable-strings - -LIBBUG!= cd $(.CURDIR)/../libbug; \ - printf "xxx:\n\techo \$${.OBJDIR}/libbug.a\n" | ${MAKE} -r -s -f - xxx - -BUGCRT!= cd $(.CURDIR)/../bugcrt; \ - printf "xxx:\n\techo \$${.OBJDIR}/bugcrt.o\n" | ${MAKE} -r -s -f - xxx - -KERNCRT!= cd $(.CURDIR)/../kerncrt; \ - printf "xxx:\n\techo \$${.OBJDIR}/kerncrt.o\n" | ${MAKE} -r -s -f - xxx - -LDADD+=${LIBBUG} /usr/local/lib/libgcc.a - -hello: $(OBJS) ${LIBBUG} - ${LD} -x -Ttext 10020 ${KERNCRT} $(OBJS) ${LDADD} -o ${.TARGET} -clean: - rm -f a.out *.core - rm -f hello.o hello.bug hello.bug.1 hello.bug.2 - -.include diff --git a/sys/arch/mvme88k/stand/old/bugexec/hello b/sys/arch/mvme88k/stand/old/bugexec/hello deleted file mode 100644 index 8670fd2b147a31f2300a2aadee7dc2f3a6c4090c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8608 zcmeHNT})GF7=BNCkOD<y?7OJ>8HQA{@Y0EhU8i97TM9d@- zvusPI7rSv}iJ`$=XeNo5xEo9~*%D2hS-5kNOWaxqv4`qZ&Yt)5R68Tdc4J&}NZx+W z_x^p)_k8Dv2IyO%f~bn}hJk2~1dCk840klYTztg6%_chBvY0y3!GcX zyH1qs@R9y(9^xVNXoiiJf*JMXz7izx9rsNuoO~`3A`!oW-Z}xc;c&piG18`eW zpG`%5lHAAS_9@obi=GPjdNJ0xg4BuJ!uqOfj5?iD^dVy1&fD~n>?MK*O{=lrRoJVk zStvUr+Yl4d+h|$DPD0k#R~m7U5UwNP&UyVY>&d!8FK$VaWjwZ&%+-}-$2{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FQq)NIODL5^$x^^lz*4|cz*4|cz*4|cz*4|cz*4|cz*6A< ztbka;?DK!~uP|{hJS+3qb`H4K^m~EbChh=kG;<{2W)qJB`%F9wygiQv_U|$MlfVZ} ze;imb@qOTaGsgiuWMUckgo%5BPnviH_;emSB;Yf7%>U0o-gfo!LGrcL?k(w01TS0_+V1$4JV9PjBy?&l1f6QU_22WNOmKrs2hQdtgeI_ zMJO7N9Wmz7fkIJq0ITJb;!2{A>jrz&!-u$29v$KCN-Tbqf{|oo2)Pk8oD5?aQ0Z^k C3YRVb diff --git a/sys/arch/mvme88k/stand/old/bugexec/hello.c b/sys/arch/mvme88k/stand/old/bugexec/hello.c deleted file mode 100644 index 08ab75d2a27..00000000000 --- a/sys/arch/mvme88k/stand/old/bugexec/hello.c +++ /dev/null @@ -1,54 +0,0 @@ -#include "bug.h" -#include "bugio.h" - -void putchar __P((char)); -int bcd2int __P((unsigned int)); - -void -putchar(char c) -{ - bugoutchr(c); -} - -main(struct bugenv *env) -{ - struct bugrtc rtc; - struct bugbrdid brdid; - - bugrtcrd(&rtc); - printf("From RTC:\n"); - printf("Year %d\tMonth %d\tDay %d\tDay of Week %d\n", - bcd2int(rtc.Y), bcd2int(rtc.M), bcd2int(rtc.D), bcd2int(rtc.d)); - printf("Hour %d\tMin %d\tSec %d\tCal %d\n", - bcd2int(rtc.H), bcd2int(rtc.m), bcd2int(rtc.s), bcd2int(rtc.c)); - printf("From BRDID:\n"); - bugbrdid(&brdid); -/* printf("Eye catcher %c%c%c%c\n", brdid.eye[0], brdid.eye[1], - brdid.eye[2], brdid.eye[3]); */ - printf("Board no %d (%d) \tsuffix %c%c\n", bcd2int(brdid.brdno), - brdid.brdno, brdid.brdsuf[0], brdid.brdsuf[1]); -/* printf("Clun %x\tdlun %x\n", brdid.clun, brdid.dlun); */ - return 0; -} - -ipow(int base, int i) -{ - int cnt = 1; - while (i--) { - cnt *= base; - } - return cnt; -} - -int -bcd2int(unsigned int i) -{ - unsigned val = 0; - int cnt = 0; - while (i) { - val += (i&0xf) * ipow(10,cnt); - cnt++; - i >>= 4; - } - return val; -} diff --git a/sys/arch/mvme88k/stand/old/bugexec/wrtos.c b/sys/arch/mvme88k/stand/old/bugexec/wrtos.c deleted file mode 100644 index 1e01b697399..00000000000 --- a/sys/arch/mvme88k/stand/old/bugexec/wrtos.c +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include -#include -#include -#include -#include "vid.h" - -#define sec2blk(x) ((x) * 2) -#define BUF_SIZ 512 - -main(int argc, char **argv) -{ - struct vid *pvid; - struct cfg *pcfg; - struct stat stat; - int exe_file; - int tape_vid; - int tape_exe; - char *filename; - char fileext[256]; - char hdrbuf[BUF_SIZ]; - - if (argc == 0){ - filename = "a.out"; - } else { - filename = argv[1]; - } - exe_file = open(filename, O_RDONLY,0444); - if (exe_file == -1) - { - printf("file %s does not exist\n",filename); - exit(2); - } - sprintf (fileext,"%s%s",filename,".1"); - tape_vid = open(fileext, O_WRONLY|O_CREAT|O_TRUNC,0644); - sprintf (fileext,"%s%s",filename,".2"); - tape_exe = open(fileext, O_WRONLY|O_CREAT|O_TRUNC,0644); - - lseek(exe_file,0,SEEK_SET); - memset (hdrbuf,0,BUF_SIZ); - read(exe_file,hdrbuf, 0x20); /* read the header */ - - write(tape_vid,hdrbuf,BUF_SIZ); - - copy_exe(exe_file,tape_exe); - close (exe_file); - close (tape_vid); - close (tape_exe); -} - -copy_exe(exe_file,tape_exe) -{ - char *buf; - int cnt = 0; - - buf = (char *)malloc (BUF_SIZ); - - lseek (exe_file,0x20,SEEK_SET); - while (BUF_SIZ == (cnt = read(exe_file, buf , BUF_SIZ))) { - write (tape_exe,buf,cnt); - } - memset (&buf[cnt],0,BUF_SIZ-cnt); - write (tape_exe,buf,BUF_SIZ); -} diff --git a/sys/arch/mvme88k/stand/old/bugexec/xyz b/sys/arch/mvme88k/stand/old/bugexec/xyz deleted file mode 100644 index dbdee90a4e1f524e5c812389c4bac6a7c39e16a1..0000000000000000000000000000000000000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pR)JYu51@I z>+6qNeu_}fw2wCGBwO?*S@boNnDxYX!HV_?y4R#2IK-6|vX^+-T}Oz)ll)1Gg5jB@NtW`a6KV zCLREO)AV8e9#h{2e4vQ&vk$*(O`j3qArpTBJYwQsfsdOw1AL;0ML_zph;8S9PZn|E z{~6y@vQ;SH@2Vc+bAdz2P$Efzp-?1Bf!^W%L^wH|01TL__;6Ag2qg-(7~>*LB$b3p zfp{VkP4>a4sGEQaUcCu50#hU&J6zaDqNSin6xE7OaV0Uxal`%Up@W>Mhz@ghB^EzI Sfp9WB0^hJ2N`|mRRr&`kQIzNa diff --git a/sys/arch/mvme88k/stand/old/include/bug.h b/sys/arch/mvme88k/stand/old/include/bug.h deleted file mode 100644 index 93fe1e6ccd5..00000000000 --- a/sys/arch/mvme88k/stand/old/include/bug.h +++ /dev/null @@ -1,8 +0,0 @@ -struct bugenv { - int clun; - int dlun; - int ipl; - int (*entry)(); - char bootargs[256]; -}; - diff --git a/sys/arch/mvme88k/stand/old/include/bugio.h b/sys/arch/mvme88k/stand/old/include/bugio.h deleted file mode 100644 index 74bb77bd336..00000000000 --- a/sys/arch/mvme88k/stand/old/include/bugio.h +++ /dev/null @@ -1,62 +0,0 @@ -#include "sys/cdefs.h" - -struct bugdisk_io { - char clun; - char dlun; - short status; - void *addr; - int blkno; -#define fileno blkno - short nblks; - char flag; -#define FILEMARKFLAG 0x80 -#define IGNOREFILENO 0x02 -#define ENDOFFILE 0x01 - char am; -}; - -/* values are in BCD {upper nibble+lower nibble} */ - -struct bugrtc { - unsigned char Y; - unsigned char M; - unsigned char D; - unsigned char d; - unsigned char H; - unsigned char m; - unsigned char s; - unsigned char c; -}; - -/* Board ID - lots of info */ - -struct bugbrdid { - unsigned char eye[4]; - char rev; - char month; - char day; - char year; - short packetsize; - short dummy; - short brdno; - unsigned char brdsuf[2]; - char options[3]; - char family:4; - char cpu:4; - short clun; - short dlun; - short type; - short dev; - int option; -}; - -char buginchr __P((void)); -int buginstat __P((void)); -int bugoutchr __P((unsigned char)); -int bugoutstr __P((char *, char *)); -int bugpcrlf __P((void)); -int bugdskrd __P((struct bugdisk_io *)); -int bugdskwr __P((struct bugdisk_io *)); -int bugrtcrd __P((struct bugrtc *)); -int bugreturn __P((void)); -int bugbrdid __P((struct bugbrdid *)); diff --git a/sys/arch/mvme88k/stand/old/kerncrt/Makefile b/sys/arch/mvme88k/stand/old/kerncrt/Makefile deleted file mode 100644 index b8459e982eb..00000000000 --- a/sys/arch/mvme88k/stand/old/kerncrt/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $Id: Makefile,v 1.1.1.1 1997/03/03 19:30:46 rahnds Exp $ - -CFLAGS+=-I${.CURDIR}/../include -I${.CURDIR}/${MACHINE_ARCH} - -.PATH: ${.CURDIR}/${MACHINE_ARCH} - -SRCS= kerncrt.c - -OBJS=${SRCS:.c=.o} - -all: ${OBJS} - -kerncrt.o: ${SRCS} - ${CC} ${CFLAGS} -c -O ${.ALLSRC} - ${LD} -x -r ${.TARGET} - mv a.out ${.TARGET} - -install: - -lint tags: - -.include diff --git a/sys/arch/mvme88k/stand/old/kerncrt/kerncrt.c b/sys/arch/mvme88k/stand/old/kerncrt/kerncrt.c deleted file mode 100644 index a5f04d2398a..00000000000 --- a/sys/arch/mvme88k/stand/old/kerncrt/kerncrt.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "bug.h" -start(struct bugenv *bugarea) -{ - main(bugarea); - bugreturn(); -} - -__main() -{ - return; -} diff --git a/sys/arch/mvme88k/stand/old/kerncrt/m88k/kerncrt.c b/sys/arch/mvme88k/stand/old/kerncrt/m88k/kerncrt.c deleted file mode 100644 index 809750bdbfc..00000000000 --- a/sys/arch/mvme88k/stand/old/kerncrt/m88k/kerncrt.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "bugargs.h" -#define volatile -int _DYNAMIC; -start(struct bugargs *bugarea) -{ - main(bugarea); - bug_return(); - /* NOTREACHED */ -} diff --git a/sys/arch/mvme88k/stand/old/libbug/Makefile b/sys/arch/mvme88k/stand/old/libbug/Makefile deleted file mode 100644 index 5359fb435bd..00000000000 --- a/sys/arch/mvme88k/stand/old/libbug/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -LIB=bug - -CFLAGS+=-I${.CURDIR}/../include -CFLAGS+=-I${.CURDIR}/../../include -CFLAGS+=-I${.CURDIR}/../.. -CFLAGS+=-I/usr/src/sys -CFLAGS+=-fwritable-strings - -NOPIC= - -SRCS+=bug.c -#SRCS+=bugcrt.c bugio.c main.c - -.if (${MACHINE_ARCH} == "m68k") -SRCS+=mvme147.c bcopy.c bzero.c -.endif -.if (${MACHINE_ARCH} == "m88k") -SRCS+=bcopy.c bzero.c printf.c bugsupp.c -.endif - -.PATH: ${.CURDIR}/../../../../lib/libkern ${.CURDIR}/../../../../lib/libsa ${.CURDIR}/${MACHINE_ARCH} - -all: bugio.o - -#bugio.o: bugio.c -# ${CC} ${CFLAGS} -c -O ${.ALLSRC} -# ${LD} -x -r ${.TARGET} -# mv a.out ${.TARGET} - -.include diff --git a/sys/arch/mvme88k/stand/old/libbug/bug.c b/sys/arch/mvme88k/stand/old/libbug/bug.c deleted file mode 100644 index 0595dbd2879..00000000000 --- a/sys/arch/mvme88k/stand/old/libbug/bug.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * bug routines -- assumes that the necessary sections of memory - * are preserved. - */ -#include "bug.h" - -#define _INCHR "00" -#define _INSTAT "01" -#define _INLN "02" -#define _READSTR "03" -#define _READLN "04" -#define _DSKRD "16" -#define _DSKWR "17" -#define _DSKCFIG "18" -#define _DSKFMT "20" -#define _DSKCTRL "12" -#define _OUTCHR "32" -#define _OUTSTR "33" -#define _OUTLN "34" -#define _WRITE "35" -#define _WRITELN "36" -#define _DELAY "67" -#define _RTC_RD "83" -#define _RETURN "99" -#define _BRD_ID "112" - -/* BUG - tty routines */ - -#define BUG_CALL(x) \ - asm volatile ("or r9,r0," x); \ - asm volatile ("tb0 0,r0,496"); - -char bug_inchr() -{ - register char a; - asm volatile ("sub r31,r31,4"); - BUG_CALL(_INCHR); - asm volatile ("or %0,r0,r2" : "=r" (a)); - return a; -} - -/* returns 0 if no characters ready to read */ -int bug_instat() -{ - short ret; - BUG_CALL(_INSTAT); - asm volatile ("or %0,r0,r2" : "=r" (ret)); - return (!(ret & 0x4)); - -} - -void bug_outchr(char a) -{ - asm volatile ("or r2, r0, %0" : :"r" (a)); - BUG_CALL(_OUTCHR); - return; -} - -void bug_outstr(char *pstrb, char *pstre) -{ - asm volatile ("or r2,r0,%0": : "r" (pstrb) ); - asm volatile ("or r3,r0,%0": : "r" (pstre) ); - BUG_CALL(_OUTSTR); - return; -} - -void bug_outln(char *pstrb, char *pstre) -{ - asm volatile ("or r2,r0,%0": : "r" (pstrb) ); - asm volatile ("or r3,r0,%0": : "r" (pstre) ); - BUG_CALL(_OUTLN); - return; -} - -/* BUG - disk routines */ - -/* returns 0: success, nonzero: error */ -int bug_diskrd(bug_dskio *arg) -{ - int ret; - asm volatile ("or r2,r0,%0": : "r" (arg) ); - BUG_CALL(_DSKRD); - return (!(ret & 0x4)); -} -/* returns 0: success, nonzero: error */ -int bug_diskwr(bug_dskio *arg) -{ - int ret; - asm volatile ("or r2,r0,%0": : "r" (arg) ); - BUG_CALL(_DSKWR); - return (!(ret & 0x4)); -} -#ifdef NOTYET -bug_diskcfig() -{ - -} -bug_diskfmt(){} -bug_diskctrl(){} -#endif - -/* BUG - timing routine */ - -void bug_delay(int delay_msec) -{ - asm volatile ("or r2,r0,%0": : "r" (delay_msec) ); - BUG_CALL(_DELAY); - return ; -} - -/* BUG - return to bug routine */ - -void bug_return() -{ - BUG_CALL(_RETURN); - /*NOTREACHED*/ -} - -/* BUG - query board routines */ - -struct bug_brdid *bug_brdid() -{ - struct bug_brdid *pbrd_id; - BUG_CALL(_BRD_ID); - asm volatile ("or %0,r0,r2": "=r" (pbrd_id):); - return pbrd_id; -} -void bug_rtc_rd(struct bug_time *ptime) -{ - asm volatile ("or r2,r0,%0": : "r" (ptime)); - BUG_CALL(_RTC_RD); - return; -} diff --git a/sys/arch/mvme88k/stand/old/libbug/bugio.c b/sys/arch/mvme88k/stand/old/libbug/bugio.c deleted file mode 100644 index 6406dac3e13..00000000000 --- a/sys/arch/mvme88k/stand/old/libbug/bugio.c +++ /dev/null @@ -1,101 +0,0 @@ -#include "bugio.h" - -#define INCHR "0x0000" -#define INSTAT "0x0001" -#define INLN "0x0002" -#define READSTR "0x0003" -#define READLN "0x0004" -#define DSKRD "0x0010" -#define DSKWR "0x0011" -#define DSKCFIG "0x0012" -#define OUTCHR "0x0020" -#define PCRLF "0x0026" -#define TMDISP "0x0042" -#define DELAY "0x0043" -#define RTC_DSP "0x0052" -#define RTC_RD "0x0053" -#define RETURN "0x0063" -#define BRD_ID "0x0070" -#define BUGTRAP "0x01F0" - -char -buginchr(void) -{ - register int cc asm("r2"); - asm("or r9,r0," INCHR); - asm("tb0 0,r0,0x1F0"); - /*asm("or %0,r0,r2" : "=r" (cc) : );*/ - return ((char)cc & 0xFF); -} - -/* return 1 if not empty else 0 */ - -buginstat(void) -{ - int ret; - asm("or r9,r0," INSTAT); - asm("tb0 0,r0,0x1F0"); - asm("or %0,r0,r2" : "=r" (ret) : ); - return (ret & 0x40 ? 1 : 0); -} - -bugoutchr(unsigned char c) -{ - unsigned char cc; - - if ((cc = c) == '\n') { - bugpcrlf(); - return; - } - asm("or r2,r0,%0" : : "r" (cc)); - asm("or r9,r0," OUTCHR); - asm("tb0 0,r0,0x1F0"); -} - -bugpcrlf(void) -{ - asm("or r9,r0," PCRLF); - asm("tb0 0,r0,0x1F0"); -} -/* return 0 on success */ - -bugdskrd(struct bugdisk_io *arg) -{ - int ret; - asm("or r9,r0, " DSKRD); - asm("tb0 0,r0,0x1F0"); - asm("or %0,r0,r2" : "=r" (ret) : ); - return ((ret&0x4) == 0x4 ? 1 : 0); -} - -/* return 0 on success */ - -bugdskwr(struct bugdisk_io *arg) -{ - int ret; - asm("or r9,r0, " DSKWR); - asm("tb0 0,r0,0x1F0"); - asm("or %0,r0,r2" : "=r" (ret) : ); - return ((ret&0x4) == 0x4 ? 1 : 0); -} - -bugrtcrd(struct bugrtc *rtc) -{ - asm("or r9,r0, " RTC_RD); - asm("tb0 0,r0,0x1F0"); -} - -bugreturn(void) -{ - asm("or r9,r0, " RETURN); - asm("tb0 0,r0,0x1F0"); -} - -bugbrdid(struct bugbrdid *id) -{ - struct bugbrdid *ptr; - asm("or r9,r0, " BRD_ID); - asm("tb0 0,r0,0x1F0"); - asm("or %0,r0,r2" : "=r" (ptr) : ); - bcopy(ptr, id, sizeof(struct bugbrdid)); -} diff --git a/sys/arch/mvme88k/stand/old/libbug/bugsupp.c b/sys/arch/mvme88k/stand/old/libbug/bugsupp.c deleted file mode 100644 index 51f0fb49bc4..00000000000 --- a/sys/arch/mvme88k/stand/old/libbug/bugsupp.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "bug.h" - -int putchar(char a) -{ - bug_outchr(a); -} -__main(){} -- 2.20.1