summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-11-04 13:36:48 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-11-04 13:36:48 +0000
commit9567d4b067ba8ddbbc83c506725dd0a9187dce24 (patch)
tree748554c5c398424aa52e633b7993149170d5f7a0 /sys
parent5a7e93c1d8b1d030a7ef264aa8931c1f02dfdeb1 (diff)
Make the s-records boot loader use the same stage1/stage2 addresses as the
other boot blocks. Crank stage1 from 64KB to 1MB to accomodate non-mvme147 BUG.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme68k/stand/Makefile.inc4
-rw-r--r--sys/arch/mvme68k/stand/sboot/Makefile10
-rw-r--r--sys/arch/mvme68k/stand/sboot/etherfun.c4
-rw-r--r--sys/arch/mvme68k/stand/sboot/sboot.c6
-rw-r--r--sys/arch/mvme68k/stand/sboot/sboot.h3
5 files changed, 14 insertions, 13 deletions
diff --git a/sys/arch/mvme68k/stand/Makefile.inc b/sys/arch/mvme68k/stand/Makefile.inc
index a05b612bd09..95ad8cc0e50 100644
--- a/sys/arch/mvme68k/stand/Makefile.inc
+++ b/sys/arch/mvme68k/stand/Makefile.inc
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile.inc,v 1.7 2006/01/10 07:36:29 miod Exp $
+# $OpenBSD: Makefile.inc,v 1.8 2012/11/04 13:36:47 miod Exp $
MDEC_DIR?=/usr/mdec
CFLAGS+= -fno-stack-protector
# Load addresses for first and second stage bootstraps
-STAGE1_RELOC=0x10000
+STAGE1_RELOC=0x100000
STAGE2_RELOC=0x6F0000
diff --git a/sys/arch/mvme68k/stand/sboot/Makefile b/sys/arch/mvme68k/stand/sboot/Makefile
index 181391c954d..f0b5d605a50 100644
--- a/sys/arch/mvme68k/stand/sboot/Makefile
+++ b/sys/arch/mvme68k/stand/sboot/Makefile
@@ -1,7 +1,9 @@
-# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:19 pascal Exp $
+# $OpenBSD: Makefile,v 1.11 2012/11/04 13:36:47 miod Exp $
S= ${.CURDIR}/../../../..
INCL?= -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
+HOSTCFLAGS?= ${CFLAGS}
+CFLAGS+=-DSTAGE2_RELOC=${STAGE2_RELOC}
COPTS+= ${DEFS} ${INCL}
.include "${S}/arch/mvme68k/stand/libbug/Makefile.inc"
@@ -20,7 +22,7 @@ NOPIE=
all: sboot rboot
sboot.tmp: XSRT0.o oc_cksum.o ${OBJS} ${LIBS}
- ${LD} ${LDFLAGS} -T 0x4000 XSRT0.o ${OBJS} oc_cksum.o -o $@ \
+ ${LD} ${LDFLAGS} -T ${STAGE1_RELOC} XSRT0.o ${OBJS} oc_cksum.o -o $@ \
${LIBS} `cc -print-libgcc-file-name`
rboot.tmp: XBUG.o XSRT0.o oc_cksum.o ${OBJS} ${LIBS}
@@ -28,10 +30,10 @@ rboot.tmp: XBUG.o XSRT0.o oc_cksum.o ${OBJS} ${LIBS}
${OBJS} oc_cksum.o -o $@ ${LIBS} `cc -print-libgcc-file-name`
srec: srec.c
- ${HOSTCC} -o $@ ${.CURDIR}/srec.c
+ ${HOSTCC} ${HOSTCFLAGS} -o $@ ${.CURDIR}/srec.c
sboot: sboot.tmp srec
- dd ibs=32 skip=1 if=sboot.tmp | ${.OBJDIR}/srec 4 0x4000 sboot > sboot
+ dd ibs=32 skip=1 if=sboot.tmp | ${.OBJDIR}/srec 4 ${STAGE1_RELOC} sboot > sboot
rboot: rboot.tmp srec
dd ibs=32 skip=1 if=rboot.tmp | ${.OBJDIR}/srec 4 0x4000 rboot > rboot
diff --git a/sys/arch/mvme68k/stand/sboot/etherfun.c b/sys/arch/mvme68k/stand/sboot/etherfun.c
index 276ca1768e6..3621b5e3071 100644
--- a/sys/arch/mvme68k/stand/sboot/etherfun.c
+++ b/sys/arch/mvme68k/stand/sboot/etherfun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: etherfun.c,v 1.6 2003/08/19 10:22:30 deraadt Exp $ */
+/* $OpenBSD: etherfun.c,v 1.7 2012/11/04 13:36:47 miod Exp $ */
/*
*
@@ -156,7 +156,7 @@ int
do_get_file(void)
{
int fail = 0, oldlen;
- char *loadat = (char *) LOAD_ADDR;
+ char *loadat = (char *)STAGE2_RELOC;
last_ack = 0;
do_send_tftp(READ);
diff --git a/sys/arch/mvme68k/stand/sboot/sboot.c b/sys/arch/mvme68k/stand/sboot/sboot.c
index 81608674c16..8817b69e8ff 100644
--- a/sys/arch/mvme68k/stand/sboot/sboot.c
+++ b/sys/arch/mvme68k/stand/sboot/sboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sboot.c,v 1.9 2003/08/19 10:22:30 deraadt Exp $ */
+/* $OpenBSD: sboot.c,v 1.10 2012/11/04 13:36:47 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -131,7 +131,7 @@ do_cmd(char *buf, char *ebuf)
}
if (*++buf == '\0')
buf = " bsd";
- go(LOAD_ADDR, buf+1, ebuf);
+ go(STAGE2_RELOC, buf+1, ebuf);
break;
case 'h':
case '?':
@@ -148,7 +148,7 @@ do_cmd(char *buf, char *ebuf)
le_init();
break;
case 'g':
- go(LOAD_ADDR, buf+1, ebuf);
+ go(STAGE2_RELOC, buf+1, ebuf);
break;
default:
printf("sboot: %s: Unknown command\n", buf);
diff --git a/sys/arch/mvme68k/stand/sboot/sboot.h b/sys/arch/mvme68k/stand/sboot/sboot.h
index 31b40d75d8a..45422ac74b5 100644
--- a/sys/arch/mvme68k/stand/sboot/sboot.h
+++ b/sys/arch/mvme68k/stand/sboot/sboot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sboot.h,v 1.8 2002/03/14 03:15:56 millert Exp $ */
+/* $OpenBSD: sboot.h,v 1.9 2012/11/04 13:36:47 miod Exp $ */
/*
* Copyright (c) 1995 Charles D. Cranor and Seth Widoff
@@ -72,7 +72,6 @@ u_long oc_cksum(void *, u_long, u_long);
#define CONS_ZS_ADDR (0xfffe3002)
#define CLOCK_ADDR (0xfffe07f8)
-#define LOAD_ADDR 0x7000
unsigned char myea[6]; /* my ether addr */
unsigned char myip[4];