From 32587dfa4213cd879816b4baa96dbc08f2d071dd Mon Sep 17 00:00:00 2001 From: downsj Date: Fri, 21 Mar 1997 07:16:20 +0000 Subject: [PATCH] Fix alignment in srt0.c, from NetBSD. --- sys/arch/hp300/stand/inst.c | 8 +++----- sys/arch/hp300/stand/srt0.s | 12 ++++++++---- sys/arch/hp300/stand/uboot.c | 8 +++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/arch/hp300/stand/inst.c b/sys/arch/hp300/stand/inst.c index 7c39488156b..1c368924b51 100644 --- a/sys/arch/hp300/stand/inst.c +++ b/sys/arch/hp300/stand/inst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inst.c,v 1.3 1997/02/06 01:06:18 downsj Exp $ */ +/* $OpenBSD: inst.c,v 1.4 1997/03/21 07:16:20 downsj Exp $ */ /* $NetBSD: inst.c,v 1.6 1996/12/21 21:23:43 thorpej Exp $ */ /* @@ -110,7 +110,7 @@ main() printf("\n>> OpenBSD [%dKB] MINIROOT INSTALLATION HP9000/%s CPU\n", (__LDPGSZ / 1024), getmachineid()); - printf(">> $OpenBSD: inst.c,v 1.3 1997/02/06 01:06:18 downsj Exp $\n"); + printf(">> $OpenBSD: inst.c,v 1.4 1997/03/21 07:16:20 downsj Exp $\n"); gethelp(); for (;;) { @@ -631,9 +631,7 @@ bootmini() howto = RB_SINGLE; /* _Always_ */ printf("booting: %s -s\n", bootname); -#define LOADALIGN(_x) ((u_long)_x + ((u_long)_x % __LDPGSZ)) - exec(bootname, (char *)LOADALIGN(lowram), howto); -#undef LOADALIGN + exec(bootname, lowram, howto); printf("boot: %s\n", strerror(errno)); } diff --git a/sys/arch/hp300/stand/srt0.s b/sys/arch/hp300/stand/srt0.s index 638f9ed8046..54dee11a41d 100644 --- a/sys/arch/hp300/stand/srt0.s +++ b/sys/arch/hp300/stand/srt0.s @@ -1,5 +1,5 @@ -/* $OpenBSD: srt0.s,v 1.2 1997/01/17 08:33:00 downsj Exp $ */ -/* $NetBSD: srt0.s,v 1.3 1995/09/02 05:04:23 thorpej Exp $ */ +/* $OpenBSD: srt0.s,v 1.3 1997/03/21 07:16:21 downsj Exp $ */ +/* $NetBSD: srt0.s,v 1.2 1997/03/10 08:00:47 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -189,8 +189,12 @@ boot1: movl d6,_bootdev | save bootdev and howto movl d7,_howto | globally so all can access movl LOWRAM,d0 | read lowram value from bootrom - addl #NBPG,d0 | must preserve this for bootrom to reboot - andl #0xfffff000,d0 | round to next page + /* + * Must preserve the scratch area for the BOOT ROM. + * Round up to the next 8k boundary. + */ + addl #((2*NBPG)-1),d0 + andl #-(2*NBPG),d0 movl d0,_lowram | stash that value start: movl #_edata,a2 | start of BSS diff --git a/sys/arch/hp300/stand/uboot.c b/sys/arch/hp300/stand/uboot.c index 5e08a75397e..34b5b2baf04 100644 --- a/sys/arch/hp300/stand/uboot.c +++ b/sys/arch/hp300/stand/uboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uboot.c,v 1.5 1997/02/06 02:53:50 downsj Exp $ */ +/* $OpenBSD: uboot.c,v 1.6 1997/03/21 07:16:22 downsj Exp $ */ /* $NetBSD: uboot.c,v 1.2 1996/10/14 07:33:45 thorpej Exp $ */ /*- @@ -72,7 +72,7 @@ main() printf("\n>> OpenBSD [%dKB] UNIFIED BOOT HP9000/%s CPU\n", (__LDPGSZ / 1024), getmachineid()); - printf(">> $OpenBSD: uboot.c,v 1.5 1997/02/06 02:53:50 downsj Exp $\n"); + printf(">> $OpenBSD: uboot.c,v 1.6 1997/03/21 07:16:22 downsj Exp $\n"); printf(">> Enter \"reset\" to reset system.\n"); bdev = B_TYPE(bootdev); @@ -92,9 +92,7 @@ main() } else printf(": %s\n", name); -#define LOADALIGN(_x) ((u_long)_x + ((u_long)_x % __LDPGSZ)) - exec(name, (char *)LOADALIGN(lowram), howto); -#undef LOADALIGN + exec(name, lowram, howto); printf("boot: %s\n", strerror(errno)); } } -- 2.20.1