diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-02-05 11:16:42 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-02-05 11:16:42 +0000 |
commit | 5b889e887219a5c781e612d236c9059501015058 (patch) | |
tree | ddf5de90328cfae15a0b3bd9eefbaac7f6fd8052 /sys/arch/hp300 | |
parent | 819c1557c21e2d7f9573bb311d52a0d5d1a7765a (diff) |
An 8k kernel may not be loaded at a 4k address, as the ROM supplies.
We align it to the the next 8k address, as per our 8k kernels.
(This ain't NetBSD, baby.)
Fixed with debugging help from niklas.
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r-- | sys/arch/hp300/stand/inst.c | 9 | ||||
-rw-r--r-- | sys/arch/hp300/stand/libsa/Makefile | 3 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot.c | 9 |
3 files changed, 14 insertions, 7 deletions
diff --git a/sys/arch/hp300/stand/inst.c b/sys/arch/hp300/stand/inst.c index 4d1b1cfcd02..12be80246a1 100644 --- a/sys/arch/hp300/stand/inst.c +++ b/sys/arch/hp300/stand/inst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inst.c,v 1.1 1997/01/17 08:36:51 downsj Exp $ */ +/* $OpenBSD: inst.c,v 1.2 1997/02/05 11:16:37 downsj Exp $ */ /* $NetBSD: inst.c,v 1.6 1996/12/21 21:23:43 thorpej Exp $ */ /* @@ -60,6 +60,7 @@ #include <sys/param.h> #include <sys/reboot.h> #include <sys/disklabel.h> +#include <machine/exec.h> #include <a.out.h> #include "stand.h" #include "samachdep.h" @@ -109,7 +110,7 @@ main() printf("\n>> OpenBSD MINIROOT INSTALLATION HP9000/%s CPU\n", getmachineid()); - printf(">> $OpenBSD: inst.c,v 1.1 1997/01/17 08:36:51 downsj Exp $\n"); + printf(">> $OpenBSD: inst.c,v 1.2 1997/02/05 11:16:37 downsj Exp $\n"); gethelp(); for (;;) { @@ -630,7 +631,9 @@ bootmini() howto = RB_SINGLE; /* _Always_ */ printf("booting: %s -s\n", bootname); - exec(bootname, lowram, howto); +#define LOADALIGN(_x) ((u_long)_x + ((u_long)_x % __LDPGSZ)) + exec(bootname, (char *)LOADALIGN(lowram), howto); +#undef LOADALIGN printf("boot: %s\n", strerror(errno)); } diff --git a/sys/arch/hp300/stand/libsa/Makefile b/sys/arch/hp300/stand/libsa/Makefile index 840aeba7566..94be65a1a9f 100644 --- a/sys/arch/hp300/stand/libsa/Makefile +++ b/sys/arch/hp300/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 1997/01/18 03:18:19 downsj Exp $ +# $OpenBSD: Makefile,v 1.5 1997/02/05 11:16:41 downsj Exp $ # $NetBSD: Makefile,v 1.5 1996/06/26 17:44:42 thorpej Exp $ LIB= sa @@ -8,6 +8,7 @@ LIB= sa # Don't need these now... # DEBUGFLAGS=-DNETIF_DEBUG -DRPC_DEBUG -DNFS_DEBUG -DRARP_DEBUG -DNET_DEBUG +# DEBUGFLAGS+=-DEXEC_DEBUG CFLAGS+=-Dhp300 -DSTANDALONE -DCOMPAT_UFS -DNO_LSEEK ${DEBUGFLAGS} CFLAGS+=-I${.CURDIR}/.. diff --git a/sys/arch/hp300/stand/uboot.c b/sys/arch/hp300/stand/uboot.c index 8ccd5982714..0fd3df7b5d9 100644 --- a/sys/arch/hp300/stand/uboot.c +++ b/sys/arch/hp300/stand/uboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uboot.c,v 1.2 1997/02/03 04:48:08 downsj Exp $ */ +/* $OpenBSD: uboot.c,v 1.3 1997/02/05 11:16:38 downsj Exp $ */ /* $NetBSD: uboot.c,v 1.2 1996/10/14 07:33:45 thorpej Exp $ */ /*- @@ -38,6 +38,7 @@ #include <sys/param.h> #include <sys/reboot.h> +#include <machine/exec.h> #include <a.out.h> #include "stand.h" #include "samachdep.h" @@ -71,7 +72,7 @@ main() printf("\n>> OpenBSD UNIFIED BOOT HP9000/%s CPU\n", getmachineid()); - printf(">> $OpenBSD: uboot.c,v 1.2 1997/02/03 04:48:08 downsj Exp $\n"); + printf(">> $OpenBSD: uboot.c,v 1.3 1997/02/05 11:16:38 downsj Exp $\n"); printf(">> Enter \"reset\" to reset system.\n"); bdev = B_TYPE(bootdev); @@ -91,7 +92,9 @@ main() } else printf(": %s\n", name); - exec(name, lowram, howto); +#define LOADALIGN(_x) ((u_long)_x + ((u_long)_x % __LDPGSZ)) + exec(name, (char *)LOADALIGN(lowram), howto); +#undef LOADALIGN printf("boot: %s\n", strerror(errno)); } } |