summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Murphree <smurph@cvs.openbsd.org>1998-08-22 08:38:06 +0000
committerSteve Murphree <smurph@cvs.openbsd.org>1998-08-22 08:38:06 +0000
commit8bc5e837f9f723112bee6c855bf1d2f46b8cf0de (patch)
tree05d0bd6b7ef89545f4fda128a7842caf68d705d1
parent40e92a9b193ae6946e51d01ebccc6d71a84c80e0 (diff)
working netboot.
-rw-r--r--sys/arch/mvme88k/stand/netboot/Makefile34
-rw-r--r--sys/arch/mvme88k/stand/netboot/boot.c49
-rw-r--r--sys/arch/mvme88k/stand/netboot/conf.c4
-rw-r--r--sys/arch/mvme88k/stand/netboot/config.h67
-rw-r--r--sys/arch/mvme88k/stand/netboot/dev_net.c41
-rw-r--r--sys/arch/mvme88k/stand/netboot/dev_net.h1
-rw-r--r--sys/arch/mvme88k/stand/netboot/devopen.c32
-rw-r--r--sys/arch/mvme88k/stand/netboot/i82586.h2
-rw-r--r--sys/arch/mvme88k/stand/netboot/if_ie.c15
-rw-r--r--sys/arch/mvme88k/stand/netboot/if_iereg.h2
-rw-r--r--sys/arch/mvme88k/stand/netboot/if_le.c11
-rw-r--r--sys/arch/mvme88k/stand/netboot/if_lereg.h2
-rw-r--r--sys/arch/mvme88k/stand/netboot/nfs.s542
-rw-r--r--sys/arch/mvme88k/stand/netboot/version.c9
14 files changed, 180 insertions, 631 deletions
diff --git a/sys/arch/mvme88k/stand/netboot/Makefile b/sys/arch/mvme88k/stand/netboot/Makefile
index 9d9d9cfc850..a14ac466850 100644
--- a/sys/arch/mvme88k/stand/netboot/Makefile
+++ b/sys/arch/mvme88k/stand/netboot/Makefile
@@ -1,28 +1,38 @@
-# $Id: Makefile,v 1.2 1997/04/27 20:56:32 millert Exp $
+# $OpenBSD: Makefile,v 1.3 1998/08/22 08:37:52 smurph Exp $
RELOC=0x3F0000
+SIZE?= size
S= ${.CURDIR}/../../../..
-DEFS= -DSTANDALONE -DSUN_BOOTPARAMS
-INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${S} -I${S}/lib/libsa
-CFLAGS= -O2 ${INCPATH} ${DEFS} ${COPTS}
-
+DEFS= -DSUN_BOOTPARAMS #-DNETIF_DEBUG
+INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \
+ -I${S} -I${S}/lib/libsa
+CFLAGS= -O2 ${DEFS} ${INCPATH} ${COPTS}
+CLEANFILES+=netboot netboot.bin
+
+.include "${S}/arch/${MACHINE}/stand/bugcrt/Makefile.inc"
+.include "${S}/arch/${MACHINE}/stand/libbug/Makefile.inc"
.include "${S}/arch/${MACHINE}/stand/libsa/Makefile.inc"
-.PATH: ${S}/arch/${MACHINE}/stand/libsa
-SRTOBJ= SRT0.o SRT1.o
+.include "${S}/arch/${MACHINE}/stand/libz/Makefile.inc"
-SRCS= boot.c conf.c version.c dev_net.c
+SRCS= boot.c conf.c version.c devopen.c dev_net.c
SRCS+= if_ie.c if_le.c
-OBJS= ${SRTOBJ} ${SRCS:S/.c/.o/g}
+OBJS= ${SRCS:S/.c/.o/g}
+LIBS= ${LIBSA} ${LIBBUG} ${LIBZ}
+LDFLAGS+= -nostdlib -s -N -T ${RELOC}
all: netboot.bin
-netboot: ${OBJS} ${LIBSA}
- ${LD} -s -N -T ${RELOC} -e start -o $@ ${OBJS} ${LIBSA}
- @size $@
+netboot: ${OBJS} ${BUGCRT} ${LIBS}
+ ${LD} ${LDFLAGS} -o $@ \
+ ${BUGCRT} ${OBJS} ${LIBS}
+ @${SIZE} $@
netboot.bin: netboot
+ ${STRIP} netboot
dd ibs=32 skip=1 if=netboot of=$@
+ chown ${LIBOWN}.${LIBGRP} netboot.bin
+ chmod ${LIBMODE} netboot.bin
install:
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
diff --git a/sys/arch/mvme88k/stand/netboot/boot.c b/sys/arch/mvme88k/stand/netboot/boot.c
index e7330a080af..bb07754d4ab 100644
--- a/sys/arch/mvme88k/stand/netboot/boot.c
+++ b/sys/arch/mvme88k/stand/netboot/boot.c
@@ -1,4 +1,4 @@
-/* $Id: boot.c,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: boot.c,v 1.2 1998/08/22 08:37:53 smurph Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -66,54 +66,53 @@
#include <sys/param.h>
#include <sys/reboot.h>
+#include <machine/prom.h>
#include "stand.h"
-#include "promboot.h"
+#include "libsa.h"
+
/*
* Boot device is derived from ROM provided information.
*/
#define LOADADDR 0x10000
-extern char *version;
-char defname[32] = "bsd";
+extern char *version;
char line[80];
-#if 0
-u_int bootdev = MAKEBOOTDEV(0, sdmajor, 0, 0, 0); /* disk boot */
-#endif
-u_int bootdev = MAKEBOOTDEV(1, 0, 0, 0, 0); /* network boot */
-
main()
{
char *cp, *file;
- int io;
- extern int cputyp;
- extern char *oparg, *opargend;
- int ask = 0;
+ int ask = 0, howto, ret;
- printf(">> OpenBSD netboot [%s]\n", version);
- printf("model MVME%x\n", cputyp);
+ /* cycle in the correct args */
+ bugargs.arg_start = bugargs.nbarg_start;
+ bugargs.arg_end = bugargs.nbarg_end;
+ *bugargs.arg_end = 0; /* ensure */
- *opargend = '\0';
- prom_get_boot_info();
- file = defname;
+ printf("\n>> OpenBSD MVME187 netboot [%s]\n", version);
- cp = prom_bootfile;
- if (cp && *cp)
- file = cp;
+ ret = parse_args(&file, &howto);
for (;;) {
if (ask) {
printf("boot: ");
gets(line);
if (line[0]) {
- oparg = line;
- prom_get_boot_info();
+ bugargs.arg_start = line;
+ cp = line;
+ while (cp < (line + sizeof(line) - 1) && *cp)
+ cp++;
+ bugargs.arg_end = cp;
+ ret =parse_args(&file, &howto);
}
}
- exec_sun(file, (char *)LOADADDR, prom_boothow);
- printf("boot: %s\n", strerror(errno));
+ if (ret) {
+ printf("boot: -q returning to MVME-Bug\n");
+ break;
+ }
+ exec_mvme(file, howto);
+ printf("boot: %s: %s\n", file, strerror(errno));
ask = 1;
}
}
diff --git a/sys/arch/mvme88k/stand/netboot/conf.c b/sys/arch/mvme88k/stand/netboot/conf.c
index 2f41cb21c84..2c87bf0484c 100644
--- a/sys/arch/mvme88k/stand/netboot/conf.c
+++ b/sys/arch/mvme88k/stand/netboot/conf.c
@@ -1,4 +1,4 @@
-/* $Id: conf.c,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: conf.c,v 1.2 1998/08/22 08:37:55 smurph Exp $ */
#include <sys/types.h>
#include <netinet/in.h>
@@ -22,8 +22,8 @@ extern struct netif_driver le_driver;
extern struct netif_driver ie_driver;
struct netif_driver *netif_drivers[] = {
- &le_driver,
&ie_driver,
+ &le_driver,
};
int n_netif_drivers = sizeof(netif_drivers) / sizeof(netif_drivers[0]);
diff --git a/sys/arch/mvme88k/stand/netboot/config.h b/sys/arch/mvme88k/stand/netboot/config.h
new file mode 100644
index 00000000000..b79bd88e9ad
--- /dev/null
+++ b/sys/arch/mvme88k/stand/netboot/config.h
@@ -0,0 +1,67 @@
+/* $OpenBSD: config.h,v 1.1 1998/08/22 08:37:56 smurph Exp $ */
+
+/*
+ * Copyright (c) 1995 Theo de Raadt
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Theo de Raadt
+ * 4. The name of the Author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* configuration information for base-line code */
+
+#define ETHER_ADDR_147 (0xfffe0778)
+#define ETHER_ADDR_16X (0xfffc0000+7980)
+#define ERAM_ADDR (0xfffe0774)
+#define LANCE_REG_ADDR (0xfffe1800)
+#define INTEL_REG_ADDR (0xfff46000)
+
+#define CPU_147 0x147
+#define CPU_162 0x162
+#define CPU_167 0x167
+#define CPU_172 0x172
+#define CPU_177 0x177
+#define CPU_187 0x187
+
+struct brdid {
+ u_long eye_catcher;
+ u_char rev;
+ u_char month;
+ u_char day;
+ u_char year;
+ u_short size;
+ u_short rsv1;
+ u_short model;
+ u_short suffix;
+ u_short options;
+ u_char family;
+ u_char cpu;
+ u_short ctrlun;
+ u_short devlun;
+ u_short devtype;
+ u_short devnum;
+ u_long bug;
+};
diff --git a/sys/arch/mvme88k/stand/netboot/dev_net.c b/sys/arch/mvme88k/stand/netboot/dev_net.c
index ffba93b71aa..16a494e7692 100644
--- a/sys/arch/mvme88k/stand/netboot/dev_net.c
+++ b/sys/arch/mvme88k/stand/netboot/dev_net.c
@@ -1,4 +1,4 @@
-/* $Id: dev_net.c,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: dev_net.c,v 1.2 1998/08/22 08:37:56 smurph Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -55,7 +55,10 @@
#include <netinet/if_ether.h>
#include <netinet/in_systm.h>
+#include <machine/prom.h>
+
#include "stand.h"
+#include "libsa.h"
#include "net.h"
#include "netif.h"
#include "config.h"
@@ -183,29 +186,15 @@ machdep_common_ether(ether)
u_char *ether;
{
u_char *ea;
- extern int cputyp;
-
- if (cputyp == CPU_147) {
- ea = (u_char *) ETHER_ADDR_147;
-
- if ((*(int *) ea & 0x2fffff00) == 0x2fffff00)
- panic("ERROR: ethernet address not set!\r\n");
- ether[0] = 0x08;
- ether[1] = 0x00;
- ether[2] = 0x3e;
- ether[3] = ea[0];
- ether[4] = ea[1];
- ether[5] = ea[2];
- } else {
- ea = (u_char *) ETHER_ADDR_16X;
-
- if (ea[0] + ea[1] + ea[2] + ea[3] + ea[4] + ea[5] == 0)
- panic("ERROR: ethernet address not set!\r\n");
- ether[0] = ea[0];
- ether[1] = ea[1];
- ether[2] = ea[2];
- ether[3] = ea[3];
- ether[4] = ea[4];
- ether[5] = ea[5];
- }
+
+ ea = (u_char *) ETHER_ADDR_16X;
+
+ if (ea[0] + ea[1] + ea[2] + ea[3] + ea[4] + ea[5] == 0)
+ panic("ERROR: ethernet address not set!\r\n");
+ ether[0] = ea[0];
+ ether[1] = ea[1];
+ ether[2] = ea[2];
+ ether[3] = ea[3];
+ ether[4] = ea[4];
+ ether[5] = ea[5];
}
diff --git a/sys/arch/mvme88k/stand/netboot/dev_net.h b/sys/arch/mvme88k/stand/netboot/dev_net.h
index 093ba193bfd..0a99721e89d 100644
--- a/sys/arch/mvme88k/stand/netboot/dev_net.h
+++ b/sys/arch/mvme88k/stand/netboot/dev_net.h
@@ -1,3 +1,4 @@
+/* $OpenBSD: dev_net.h,v 1.2 1998/08/22 08:37:57 smurph Exp $ */
int net_open __P((struct open_file *, ...));
int net_close __P((struct open_file *));
diff --git a/sys/arch/mvme88k/stand/netboot/devopen.c b/sys/arch/mvme88k/stand/netboot/devopen.c
new file mode 100644
index 00000000000..7e02e4bb845
--- /dev/null
+++ b/sys/arch/mvme88k/stand/netboot/devopen.c
@@ -0,0 +1,32 @@
+/* $OpenBSD: devopen.c,v 1.1 1998/08/22 08:37:58 smurph Exp $ */
+
+#include <sys/param.h>
+#include <stand.h>
+
+/*
+ * Open the device named by the combined device/file name
+ * given as the "fname" arg, something like: "sd()bsd"
+ *
+ * However, Sun PROMs don't really let you choose which
+ * device you will talk to. You can only open the device
+ * that was used to load the boot program. Therefore, we
+ * do not accept a "device" part in the "fname" string.
+ * Pass the PROM device name to open in case it needs it.
+ */
+int
+devopen(f, fname, file)
+ struct open_file *f;
+ const char *fname;
+ char **file;
+{
+ struct devsw *dp;
+ char *cp, *path, *devname;
+ int error;
+
+ *file = (char*)fname;
+ dp = &devsw[0];
+ f->f_dev = dp;
+ error = (*dp->dv_open)(f, NULL);
+
+ return (error);
+}
diff --git a/sys/arch/mvme88k/stand/netboot/i82586.h b/sys/arch/mvme88k/stand/netboot/i82586.h
index 471cadfde19..6210d97e80f 100644
--- a/sys/arch/mvme88k/stand/netboot/i82586.h
+++ b/sys/arch/mvme88k/stand/netboot/i82586.h
@@ -1,4 +1,4 @@
-/* $Id: i82586.h,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: i82586.h,v 1.2 1998/08/22 08:37:58 smurph Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
diff --git a/sys/arch/mvme88k/stand/netboot/if_ie.c b/sys/arch/mvme88k/stand/netboot/if_ie.c
index 7b3237af9a5..c856f8a5f81 100644
--- a/sys/arch/mvme88k/stand/netboot/if_ie.c
+++ b/sys/arch/mvme88k/stand/netboot/if_ie.c
@@ -1,4 +1,4 @@
-/* $Id: if_ie.c,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: if_ie.c,v 1.2 1998/08/22 08:38:00 smurph Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -44,7 +44,10 @@
#define NRXBUF 16
#define IE_RBUF_SIZE ETHER_MAX_LEN
+#include <machine/prom.h>
+
#include "stand.h"
+#include "libsa.h"
#include "netif.h"
#include "config.h"
@@ -107,10 +110,7 @@ ie_match(nif, machdep_hint)
{
char *name;
int i, val = 0;
- extern int cputyp;
- if (cputyp == CPU_147)
- return (0);
name = machdep_hint;
if (name && !bcmp(ie_driver.netif_bname, name, 2))
val += 10;
@@ -132,15 +132,12 @@ ie_probe(nif, machdep_hint)
struct netif *nif;
void *machdep_hint;
{
- extern int cputyp;
/* the set unit is the current unit */
if (ie_debug)
printf("ie%d: ie_probe called\n", nif->nif_unit);
-
- if (cputyp != CPU_147)
- return (0);
- return (1);
+ return (0);
+/* return (1);*/
}
void
diff --git a/sys/arch/mvme88k/stand/netboot/if_iereg.h b/sys/arch/mvme88k/stand/netboot/if_iereg.h
index d3a16e2ceaf..35a1f5d4f5a 100644
--- a/sys/arch/mvme88k/stand/netboot/if_iereg.h
+++ b/sys/arch/mvme88k/stand/netboot/if_iereg.h
@@ -1,4 +1,4 @@
-/* $Id: if_iereg.h,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: if_iereg.h,v 1.2 1998/08/22 08:38:01 smurph Exp $ */
/*
* if_sunie.h
diff --git a/sys/arch/mvme88k/stand/netboot/if_le.c b/sys/arch/mvme88k/stand/netboot/if_le.c
index 0d08efc1077..3f3e4e556d8 100644
--- a/sys/arch/mvme88k/stand/netboot/if_le.c
+++ b/sys/arch/mvme88k/stand/netboot/if_le.c
@@ -1,4 +1,4 @@
-/* $Id: if_le.c,v 1.1 1997/03/03 19:30:37 rahnds Exp $ */
+/* $OpenBSD: if_le.c,v 1.2 1998/08/22 08:38:02 smurph Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -66,7 +66,10 @@
#include <netinet/in.h>
#include <netinet/in_systm.h>
+#include <machine/prom.h>
+
#include "stand.h"
+#include "libsa.h"
#include "netif.h"
#include "config.h"
@@ -129,10 +132,7 @@ le_match(nif, machdep_hint)
{
char *name;
int i, val = 0;
- extern int cputyp;
- if (cputyp != CPU_147)
- return (0);
name = machdep_hint;
if (name && !bcmp(le_driver.netif_bname, name, 2))
val += 10;
@@ -154,14 +154,11 @@ le_probe(nif, machdep_hint)
struct netif *nif;
void *machdep_hint;
{
- extern int cputyp;
/* the set unit is the current unit */
if (le_debug)
printf("le%d: le_probe called\n", nif->nif_unit);
- if (cputyp == CPU_147)
- return 0;
return 1;
}
diff --git a/sys/arch/mvme88k/stand/netboot/if_lereg.h b/sys/arch/mvme88k/stand/netboot/if_lereg.h
index 92b8a5fb773..b93c09555a0 100644
--- a/sys/arch/mvme88k/stand/netboot/if_lereg.h
+++ b/sys/arch/mvme88k/stand/netboot/if_lereg.h
@@ -1,4 +1,4 @@
-/* $Id: if_lereg.h,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: if_lereg.h,v 1.2 1998/08/22 08:38:03 smurph Exp $ */
/*-
* Copyright (c) 1982, 1992, 1993
diff --git a/sys/arch/mvme88k/stand/netboot/nfs.s b/sys/arch/mvme88k/stand/netboot/nfs.s
deleted file mode 100644
index 067b5084976..00000000000
--- a/sys/arch/mvme88k/stand/netboot/nfs.s
+++ /dev/null
@@ -1,542 +0,0 @@
-#NO_APP
-gcc2_compiled.:
-___gnu_compiled_c:
-.text
- .even
-.globl _nfs_getrootfh
- .type _nfs_getrootfh,@function
-_nfs_getrootfh:
- link a6,#-392
- moveml #0x3038,sp@-
- movel a6@(12),d3
- lea a6@(-132),a2
- lea a6@(-280),a3
- pea 132:w
- movel a2,sp@-
- jbsr _bzero
- movel d3,sp@-
- jbsr _strlen
- movel d0,d2
- addqw #8,sp
- addqw #4,sp
- moveq #120,d0
- addqw #8,d0
- cmpl d2,d0
- jcc L2
- movel d0,d2
-L2:
- movel d2,a2@
- movel d2,sp@-
- pea a6@(-128)
- movel d3,sp@-
- lea _bcopy,a4
- jbsr a4@
- movel d2,d0
- addql #3,d0
- jpl L3
- movel d2,d0
- addql #6,d0
-L3:
- moveq #-4,d1
- andl d1,d0
- pea 36:w
- movel a3,sp@-
- movel d0,a0
- pea a0@(4)
- movel a2,sp@-
- pea 1:w
- pea 1:w
- movel #100005,sp@-
- movel a6@(8),sp@-
- jbsr _rpc_call
- addw #44,sp
- moveq #-1,d1
- cmpl d0,d1
- jeq L7
- moveq #3,d1
- cmpl d0,d1
- jcs L5
- moveq #72,d1
- movel d1,_errno
- jra L8
-L5:
- tstl a3@
- jne L6
- pea 32:w
- movel a6@(16),sp@-
- pea a3@(4)
- jbsr a4@
- clrl d0
- jra L7
-L6:
- movel a3@,_errno
-L8:
- moveq #-1,d0
-L7:
- moveml a6@(-412),#0x1c0c
- unlk a6
- rts
-Lfe1:
- .size _nfs_getrootfh,Lfe1-_nfs_getrootfh
- .even
-.globl _nfs_lookupfh
- .type _nfs_lookupfh,@function
-_nfs_lookupfh:
- link a6,#-492
- moveml #0x303c,sp@-
- movel a6@(8),a5
- movel a6@(12),d3
- lea a6@(-164),a2
- lea a6@(-380),a3
- pea 164:w
- movel a2,sp@-
- jbsr _bzero
- pea 32:w
- movel a2,sp@-
- pea a5@(12)
- lea _bcopy,a4
- jbsr a4@
- movel d3,sp@-
- jbsr _strlen
- movel d0,d2
- addw #24,sp
- moveq #120,d0
- addqw #8,d0
- cmpl d2,d0
- jcc L10
- movel d0,d2
-L10:
- movel d2,sp@-
- pea a6@(-128)
- movel d3,sp@-
- jbsr a4@
- movel d2,a6@(-132)
- movel d2,d0
- addql #3,d0
- jpl L11
- movel d2,d0
- addql #6,d0
-L11:
- moveq #-4,d1
- andl d1,d0
- pea 104:w
- movel a3,sp@-
- movel d0,a0
- pea a0@(36)
- movel a2,sp@-
- pea 4:w
- pea 2:w
- movel #100003,sp@-
- movel a5@,sp@-
- jbsr _rpc_call
- addw #44,sp
- moveq #-1,d1
- cmpl d0,d1
- jne L12
- movel _errno,d0
- jra L15
-L12:
- moveq #3,d1
- cmpl d0,d1
- jlt L13
- moveq #5,d0
- jra L15
-L13:
- tstl a3@
- jne L14
- pea 32:w
- movel a6@(16),a0
- pea a0@(12)
- pea a3@(4)
- jbsr a4@
- pea 68:w
- movel a6@(16),a0
- pea a0@(44)
- pea a3@(36)
- jbsr a4@
- clrl d0
- jra L15
-L14:
- movel a3@,d0
-L15:
- moveml a6@(-516),#0x3c0c
- unlk a6
- rts
-Lfe2:
- .size _nfs_lookupfh,Lfe2-_nfs_lookupfh
-LC0:
- .ascii "nfsread: short packet, %d < %d\12\0"
- .even
-.globl _nfs_readdata
- .type _nfs_readdata,@function
-_nfs_readdata:
- link a6,#-1368
- moveml #0x383c,sp@-
- movel a6@(8),a4
- movel a6@(12),d2
- movel a6@(16),d3
- movel a6@(24),d4
- lea a6@(-44),a3
- lea a6@(-1256),a2
- pea 32:w
- movel a3,sp@-
- pea a4@(12)
- lea _bcopy,a5
- jbsr a5@
- movel d3,a6@(-12)
- addqw #8,sp
- addqw #4,sp
- movel #1024,d0
- cmpl d4,d0
- jcc L17
- movel d0,d4
-L17:
- movel d4,a6@(-8)
- clrl a6@(-4)
- pea 1100:w
- movel a2,sp@-
- pea 44:w
- movel a3,sp@-
- pea 6:w
- pea 2:w
- movel #100003,sp@-
- movel a4@,sp@-
- jbsr _rpc_call
- movel d0,a0
- addw #32,sp
- moveq #-1,d1
- cmpl a0,d1
- jeq L22
- moveq #76,d1
- cmpl a0,d1
- jhi L23
- tstl a2@
- jeq L20
- movel a2@,_errno
- jra L24
-L20:
- addw #-76,a0
- movel a6@(-1184),d2
- cmpl a0,d2
- jgt L21
- movel d2,sp@-
- movel a6@(20),sp@-
- pea a2@(76)
- jbsr a5@
- movel d2,d0
- jra L22
-L21:
- movel d2,sp@-
- movel a0,sp@-
- pea LC0
- jbsr _printf
-L23:
- moveq #72,d1
- movel d1,_errno
-L24:
- moveq #-1,d0
-L22:
- moveml a6@(-1396),#0x3c1c
- unlk a6
- rts
-Lfe3:
- .size _nfs_readdata,Lfe3-_nfs_readdata
- .even
-.globl _nfs_mount
- .type _nfs_mount,@function
-_nfs_mount:
- link a6,#0
- movel a2,sp@-
- movel a6@(8),sp@-
- jbsr _socktodesc
- movel d0,a2
- addqw #4,sp
- tstl a2
- jeq L26
- movel _rpc_port,d0
- subql #1,d0
- movel d0,_rpc_port
- movew d0,a2@(10)
- movel a6@(12),a2@
- pea _nfs_root_node+12
- movel a6@(16),sp@-
- movel a2,sp@-
- jbsr _nfs_getrootfh
- tstl d0
- jne L27
- movel a2,_nfs_root_node
- moveq #2,d1
- movel d1,_nfs_root_node+44
- movel #493,_nfs_root_node+48
- movel d1,_nfs_root_node+52
- clrl d0
- jra L28
-L26:
- moveq #22,d1
- movel d1,_errno
-L27:
- moveq #-1,d0
-L28:
- movel a6@(-4),a2
- unlk a6
- rts
-Lfe4:
- .size _nfs_mount,Lfe4-_nfs_mount
-LC1:
- .ascii "nfs_open: must mount first.\12\0"
- .even
-.globl _nfs_open
- .type _nfs_open,@function
-_nfs_open:
- link a6,#0
- moveml #0x2038,sp@-
- movel a6@(12),a4
- lea _nfs_root_node,a3
- tstl a3@
- jne L30
- pea LC1
- jbsr _printf
- moveq #6,d0
- jra L32
-L30:
- pea 112:w
- jbsr _alloc
- movel d0,a2
- movel a3@,a2@
- clrl a2@(4)
- clrl a2@(8)
- movel a2,sp@-
- movel a6@(8),sp@-
- movel a3,sp@-
- jbsr _nfs_lookupfh
- movel d0,d2
- addqw #8,sp
- addqw #8,sp
- jeq L31
- pea 112:w
- movel a2,sp@-
- jbsr _free
- movel d2,d0
- jra L32
-L31:
- movel a2,a4@(16)
- clrl d0
-L32:
- moveml a6@(-16),#0x1c04
- unlk a6
- rts
-Lfe5:
- .size _nfs_open,Lfe5-_nfs_open
- .even
-.globl _nfs_close
- .type _nfs_close,@function
-_nfs_close:
- link a6,#0
- movel a2,sp@-
- movel a6@(8),a2
- movel a2@(16),d0
- jeq L34
- pea 112:w
- movel d0,sp@-
- jbsr _free
-L34:
- clrl a2@(16)
- clrl d0
- movel a6@(-4),a2
- unlk a6
- rts
-Lfe6:
- .size _nfs_close,Lfe6-_nfs_close
-LC2:
- .ascii "nfs_read: hit EOF unexpectantly\0"
- .even
-.globl _nfs_read
- .type _nfs_read,@function
-_nfs_read:
- link a6,#0
- moveml #0x3f3c,sp@-
- movel a6@(8),a0
- movel a6@(16),a3
- movel a6@(20),a5
- movel a0@(16),a2
- movel a6@(12),a4
- tstl a3
- jle L41
-L42:
- jbsr _twiddle
- movel a3,sp@-
- movel a4,sp@-
- movel a2@(8),sp@-
- movel a2@(4),sp@-
- movel a2,sp@-
- jbsr _nfs_readdata
- movel d0,d7
- addw #20,sp
- moveq #-1,d5
- cmpl d7,d5
- jne L38
- movel _errno,d0
- jra L44
-L38:
- tstl d7
- jne L39
- tstl _debug
- jeq L41
- pea LC2
- jbsr _printf
- jra L41
-L39:
- movel d7,d4
- movel d7,d3
- moveq #31,d5
- asrl d5,d3
- movel d4,d2
- addl a2@(8),d2
- cmpl d2,d4
- shi d0
- extbl d0
- movel d3,d1
- addl a2@(4),d1
- subl d0,d1
- movel d1,a2@(4)
- movel d2,a2@(8)
- addl d7,a4
- subl d7,a3
- tstl a3
- jgt L42
-L41:
- tstl a5
- jeq L43
- movel a3,a5@
-L43:
- clrl d0
-L44:
- moveml a6@(-40),#0x3cfc
- unlk a6
- rts
-Lfe7:
- .size _nfs_read,Lfe7-_nfs_read
- .even
-.globl _nfs_write
- .type _nfs_write,@function
-_nfs_write:
- link a6,#0
- moveq #30,d0
- unlk a6
- rts
-Lfe8:
- .size _nfs_write,Lfe8-_nfs_write
- .even
-.globl _nfs_seek
- .type _nfs_seek,@function
-_nfs_seek:
- link a6,#0
- moveml #0x3f00,sp@-
- movel a6@(8),a0
- movel a6@(12),d5
- movel a6@(16),d6
- movel a6@(20),d0
- movel a0@(16),a0
- movel a0@(64),d1
- moveq #1,d7
- cmpl d0,d7
- jeq L49
- jlt L53
- tstl d0
- jeq L48
- jra L51
-L53:
- moveq #2,d7
- cmpl d0,d7
- jeq L50
- jra L51
-L48:
- movel d5,a0@(4)
- movel d6,a0@(8)
- jra L47
-L49:
- movel a0@(4),d3
- movel a0@(8),d4
- movel d6,d2
- addl d4,d2
- cmpl d2,d6
- shi d0
- extbl d0
- movel d5,d1
- addl d3,d1
- subl d0,d1
- movel d1,a0@(4)
- movel d2,a0@(8)
- jra L47
-L50:
- movel d1,d4
- clrl d3
- movel d4,d2
- subl d6,d2
- cmpl d2,d4
- scs d0
- extbl d0
- movel d3,d1
- subl d5,d1
- addl d0,d1
- movel d1,a0@(4)
- movel d2,a0@(8)
- jra L47
-L51:
- moveq #-1,d0
- moveq #-1,d1
- jra L54
-L47:
- movel a0@(4),d0
- movel a0@(8),d1
-L54:
- moveml a6@(-24),#0xfc
- unlk a6
- rts
-Lfe9:
- .size _nfs_seek,Lfe9-_nfs_seek
-.globl _nfs_stat_types
-.data
- .even
- .type _nfs_stat_types,@object
- .size _nfs_stat_types,32
-_nfs_stat_types:
- .long 0
- .long 32768
- .long 16384
- .long 24576
- .long 8192
- .long 40960
- .long 0
- .skip 4
-.text
- .even
-.globl _nfs_stat
- .type _nfs_stat,@function
-_nfs_stat:
- link a6,#0
- movel a2,sp@-
- movel d2,sp@-
- movel a6@(8),a0
- movel a6@(12),a2
- movel a0@(16),a1
- moveq #7,d0
- andl a1@(44),d0
- lea _nfs_stat_types,a0
- movew a1@(50),d2
- orw a0@(2,d0:l:4),d2
- movew d2,a2@(8)
- movew a1@(54),a2@(10)
- movel a1@(56),a2@(12)
- movel a1@(60),a2@(16)
- movel a1@(64),d1
- clrl d0
- movel d0,a2@(48)
- movel d1,a2@(52)
- movel a6@(-8),d2
- movel a6@(-4),a2
- unlk a6
- rts
-Lfe10:
- .size _nfs_stat,Lfe10-_nfs_stat
-.comm _nfs_root_node,112
diff --git a/sys/arch/mvme88k/stand/netboot/version.c b/sys/arch/mvme88k/stand/netboot/version.c
index 279f398c44d..90643142688 100644
--- a/sys/arch/mvme88k/stand/netboot/version.c
+++ b/sys/arch/mvme88k/stand/netboot/version.c
@@ -1,9 +1,8 @@
-/* $Id: version.c,v 1.1 1997/03/03 19:30:38 rahnds Exp $ */
+/* $OpenBSD: version.c,v 1.2 1998/08/22 08:38:05 smurph Exp $ */
/*
- * NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.
- *
- * 1.1
+ * make a random change to this file when you want the bootblock
+ * revision to increase. like change this q to an x, or something.
*/
-char *version = "$Revision: 1.1 $";
+char *version = "$Revision: 1.2 $";