diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-11 23:07:21 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-11 23:07:21 +0000 |
commit | 21bca8f77f4a0b76385b34dd701f84774541b996 (patch) | |
tree | b9d7efdac00d36f01866c2b7935c47822347fdc4 /sys/arch/sun3/stand | |
parent | afed71da2ec3c53eeaed07724e300eb301143150 (diff) |
sync + our changes
Diffstat (limited to 'sys/arch/sun3/stand')
-rw-r--r-- | sys/arch/sun3/stand/installboot/installboot.8 | 2 | ||||
-rw-r--r-- | sys/arch/sun3/stand/libsa/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/sun3/stand/libsa/dev_disk.c | 40 | ||||
-rw-r--r-- | sys/arch/sun3/stand/libsa/exec_sun.c | 12 | ||||
-rw-r--r-- | sys/arch/sun3/stand/libsa/netif_sun.c | 2 | ||||
-rw-r--r-- | sys/arch/sun3/stand/libsa/panic.c | 8 | ||||
-rw-r--r-- | sys/arch/sun3/stand/libsa/promdev.c | 10 | ||||
-rw-r--r-- | sys/arch/sun3/stand/netboot/dev_net.c | 4 | ||||
-rw-r--r-- | sys/arch/sun3/stand/netboot/version.c | 2 | ||||
-rw-r--r-- | sys/arch/sun3/stand/ufsboot/version.c | 2 |
10 files changed, 47 insertions, 39 deletions
diff --git a/sys/arch/sun3/stand/installboot/installboot.8 b/sys/arch/sun3/stand/installboot/installboot.8 index d859114b7e8..21cea51f995 100644 --- a/sys/arch/sun3/stand/installboot/installboot.8 +++ b/sys/arch/sun3/stand/installboot/installboot.8 @@ -1,4 +1,4 @@ -.\" $Id: installboot.8,v 1.3 1995/12/14 05:26:56 deraadt Exp $ +.\" $Id: installboot.8,v 1.4 1996/10/11 23:06:41 deraadt Exp $ .\" .Dd 31 May 1995 .Dt INSTALLBOOT 8 diff --git a/sys/arch/sun3/stand/libsa/Makefile b/sys/arch/sun3/stand/libsa/Makefile index 88f8d933115..2147f070661 100644 --- a/sys/arch/sun3/stand/libsa/Makefile +++ b/sys/arch/sun3/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 1995/11/17 23:23:52 gwr Exp $ +# $NetBSD: Makefile,v 1.9.4.1 1996/06/26 20:16:58 jtc Exp $ LIB=sa @@ -13,7 +13,7 @@ DIR_KERN=$S/lib/libkern SRC_net= nfs.c rpc.c net.c ether.c arp.c in_cksum.c \ bootparam.c rarp.c -SRC_sa = alloc.c bcopy.c close.c getfile.c open.c \ +SRC_sa = alloc.c bcopy.c close.c getfile.c memcpy.c open.c \ printf.c read.c strerror.c ufs.c SRC_kern= ashrdi3.c bcmp.c bzero.c strcmp.c strlen.c diff --git a/sys/arch/sun3/stand/libsa/dev_disk.c b/sys/arch/sun3/stand/libsa/dev_disk.c index 2d967f4d0ce..5fd83a61003 100644 --- a/sys/arch/sun3/stand/libsa/dev_disk.c +++ b/sys/arch/sun3/stand/libsa/dev_disk.c @@ -48,11 +48,11 @@ #include "dvma.h" #include "promdev.h" - -#define RETRY_COUNT 5 + +#define RETRY_COUNT 5 extern int debug; -int disk_opencount; +int disk_opencount; struct saioreq disk_ioreq; int @@ -66,22 +66,22 @@ disk_open(f, devname) #ifdef DEBUG_PROM if (debug) - printf("disk_open: %s\n", devname); + printf("disk_open: %s\n", devname); #endif si = &disk_ioreq; if (disk_opencount == 0) { - /* - * Setup our part of the saioreq. - * (determines what gets opened) - */ - bp = *romp->bootParam; - si->si_boottab = bp->bootDevice; - si->si_ctlr = bp->ctlrNum; - si->si_unit = bp->unitNum; - si->si_boff = bp->partNum; - if ((error = prom_iopen(si)) != 0) - return (error); + /* + * Setup our part of the saioreq. + * (determines what gets opened) + */ + bp = *romp->bootParam; + si->si_boottab = bp->bootDevice; + si->si_ctlr = bp->ctlrNum; + si->si_unit = bp->unitNum; + si->si_boff = bp->partNum; + if ((error = prom_iopen(si)) != 0) + return (error); } disk_opencount++; @@ -128,7 +128,7 @@ disk_strategy(devdata, flag, dblk, size, buf, rsize) #ifdef DEBUG_PROM if (debug > 1) - printf("disk_strategy: size=%d dblk=%d\n", size, dblk); + printf("disk_strategy: size=%d dblk=%d\n", size, dblk); #endif dmabuf = dvma_mapin(buf, size); @@ -140,10 +140,10 @@ disk_strategy(devdata, flag, dblk, size, buf, rsize) */ retry = RETRY_COUNT; do { - si->si_bn = dblk; - si->si_ma = dmabuf; - si->si_cc = size; - xcnt = (*ops->b_strategy)(si, si_flag); + si->si_bn = dblk; + si->si_ma = dmabuf; + si->si_cc = size; + xcnt = (*ops->b_strategy)(si, si_flag); } while ((xcnt <= 0) && (--retry > 0)); dvma_mapout(dmabuf, size); diff --git a/sys/arch/sun3/stand/libsa/exec_sun.c b/sys/arch/sun3/stand/libsa/exec_sun.c index c22e9db71a9..d14ac4000ae 100644 --- a/sys/arch/sun3/stand/libsa/exec_sun.c +++ b/sys/arch/sun3/stand/libsa/exec_sun.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec_sun.c,v 1.5 1996/01/29 23:41:06 gwr Exp $ */ +/* $NetBSD: exec_sun.c,v 1.6 1996/06/20 03:59:41 gwr Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993 @@ -89,12 +89,16 @@ exec_sun(file, loadaddr) bcopy(&x, cp - sizeof(x), sizeof(x)); /* - * Read in the text segment. + * Read in the text segment. Note: + * a.out header part of text in zmagic */ printf("%d", x.a_text); - if (read(io, cp, x.a_text) != x.a_text) + cc = x.a_text; + if (magic == ZMAGIC) + cc -= sizeof(x); + if (read(io, cp, cc) != cc) goto shread; - cp += x.a_text; + cp += cc; /* * NMAGIC may have a gap between text and data. diff --git a/sys/arch/sun3/stand/libsa/netif_sun.c b/sys/arch/sun3/stand/libsa/netif_sun.c index f1d7753628a..a72d55e9428 100644 --- a/sys/arch/sun3/stand/libsa/netif_sun.c +++ b/sys/arch/sun3/stand/libsa/netif_sun.c @@ -404,7 +404,7 @@ netif_get(desc, pkt, maxlen, timo) /* Have to receive into our own buffer and copy. */ do { - tick0 = getticks(); + tick0 = getticks(); do { rlen = (*sif->sif_poll)(si->si_devdata, dd->rbuf); if (rlen != 0) diff --git a/sys/arch/sun3/stand/libsa/panic.c b/sys/arch/sun3/stand/libsa/panic.c index 97fddd3e5ff..b8841ad1ad3 100644 --- a/sys/arch/sun3/stand/libsa/panic.c +++ b/sys/arch/sun3/stand/libsa/panic.c @@ -7,11 +7,11 @@ extern __dead void abort(); __dead void panic(const char *fmt, ...) { - va_list ap; + va_list ap; - va_start(ap, fmt); + va_start(ap, fmt); vprintf(fmt, ap); - printf("\n"); - va_end(ap); + printf("\n"); + va_end(ap); abort(); } diff --git a/sys/arch/sun3/stand/libsa/promdev.c b/sys/arch/sun3/stand/libsa/promdev.c index 130e4d8cb28..35fe364c1c5 100644 --- a/sys/arch/sun3/stand/libsa/promdev.c +++ b/sys/arch/sun3/stand/libsa/promdev.c @@ -77,7 +77,7 @@ prom_iopen(si) printf("d_localbytes=%d\n", dip->d_localbytes); printf("d_stdcount=%d\n", dip->d_stdcount); printf("d_stdaddrs[%d]=%x\n", si->si_ctlr, - dip->d_stdaddrs[si->si_ctlr]); + dip->d_stdaddrs[si->si_ctlr]); printf("d_devtype=%d\n", dip->d_devtype); printf("d_maxiobytes=%d\n", dip->d_maxiobytes); } @@ -96,7 +96,7 @@ prom_iopen(si) #ifdef DEBUG_PROM if (debug) printf("prom_iopen: devaddr=0x%x pte=0x%x\n", - si->si_devaddr, get_pte(si->si_devaddr)); + si->si_devaddr, get_pte(si->si_devaddr)); #endif } @@ -109,7 +109,7 @@ prom_iopen(si) si->si_dmaaddr = (char*) addr; #ifdef DEBUG_PROM if (debug) - printf("prom_iopen: dmaaddr=0x%x\n", si->si_dmaaddr); + printf("prom_iopen: dmaaddr=0x%x\n", si->si_dmaaddr); #endif } @@ -122,6 +122,10 @@ prom_iopen(si) } /* OK, call the PROM device open routine. */ +#ifdef DEBUG_PROM + if (debug) + printf("prom_iopen: calling prom open...\n"); +#endif error = (*ops->b_open)(si); if (error != 0) { printf("prom_iopen: \"%s\" error=%d\n", diff --git a/sys/arch/sun3/stand/netboot/dev_net.c b/sys/arch/sun3/stand/netboot/dev_net.c index 069b58ab519..e159174c267 100644 --- a/sys/arch/sun3/stand/netboot/dev_net.c +++ b/sys/arch/sun3/stand/netboot/dev_net.c @@ -139,8 +139,8 @@ net_open(struct open_file *f, ...) fail: netif_close(netdev_sock); netdev_sock = -1; - return (error); - } + return (error); + } if (debug) printf("net_open: NFS mount succeeded\n"); } diff --git a/sys/arch/sun3/stand/netboot/version.c b/sys/arch/sun3/stand/netboot/version.c index aa92d773181..d98db932634 100644 --- a/sys/arch/sun3/stand/netboot/version.c +++ b/sys/arch/sun3/stand/netboot/version.c @@ -4,4 +4,4 @@ * NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. */ -char *version = "$Revision: 1.3 $"; +char *version = "$Revision: 1.4 $"; diff --git a/sys/arch/sun3/stand/ufsboot/version.c b/sys/arch/sun3/stand/ufsboot/version.c index 24bd2f33d1e..1f8b884dcd6 100644 --- a/sys/arch/sun3/stand/ufsboot/version.c +++ b/sys/arch/sun3/stand/ufsboot/version.c @@ -4,4 +4,4 @@ * NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. */ -char *version = "$Revision: 1.1 $"; +char *version = "$Revision: 1.2 $"; |