diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-10-10 05:26:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-10-10 05:26:55 +0000 |
commit | 0771077c69e03d9bd8e46d76c3ea1f880c93333e (patch) | |
tree | 2692461c0babbcd9a6d60e1b066381c491622894 | |
parent | c2d0836b8e2158302cb1e6a389fe9a561a9e1501 (diff) |
Minor tweaks.
-rw-r--r-- | sys/arch/landisk/include/loadfile_machdep.h | 56 | ||||
-rw-r--r-- | sys/arch/landisk/stand/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/landisk/stand/boot/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/landisk/stand/boot/getsecs.c | 4 | ||||
-rw-r--r-- | sys/arch/landisk/stand/boot/scifcons.c | 4 | ||||
-rw-r--r-- | sys/arch/landisk/stand/bootxx/pbr.S | 4 |
6 files changed, 67 insertions, 9 deletions
diff --git a/sys/arch/landisk/include/loadfile_machdep.h b/sys/arch/landisk/include/loadfile_machdep.h new file mode 100644 index 00000000000..0878036e99c --- /dev/null +++ b/sys/arch/landisk/include/loadfile_machdep.h @@ -0,0 +1,56 @@ +/* $OpenBSD: loadfile_machdep.h,v 1.1 2006/10/10 05:26:52 miod Exp $ */ +/* $NetBSD: loadfile_machdep.h,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ + +/*- + * Copyright (c) 1999 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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. + */ + +#define BOOT_ELF +#define ELFSIZE 32 + +#define LOAD_KERNEL (LOAD_ALL & ~LOAD_TEXTA) +#define COUNT_KERNEL (COUNT_ALL & ~COUNT_TEXTA) + +#define LOADADDR(a) (((u_long)(a)) + offset) +#define ALIGNENTRY(a) ((u_long)(a)) +#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c)) +#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c)) +#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c)) +#define WARN(a) (void)(printf a, \ + printf((errno ? ": %s\n" : "\n"), \ + strerror(errno))) +#define PROGRESS(a) (void) printf a +#define ALLOC(a) alloc(a) +#define FREE(a, b) free(a, b) diff --git a/sys/arch/landisk/stand/Makefile b/sys/arch/landisk/stand/Makefile index 4e1ab704b8f..d060d47eae5 100644 --- a/sys/arch/landisk/stand/Makefile +++ b/sys/arch/landisk/stand/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.2 2006/10/06 22:06:46 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 2006/10/10 05:26:54 miod Exp $ SUBDIR= mbr bootxx -.if ${MACHINE} == "landisn" +.if ${MACHINE} == "landisk" SUBDIR+= boot .endif diff --git a/sys/arch/landisk/stand/boot/Makefile b/sys/arch/landisk/stand/boot/Makefile index eda9d8989c3..1e2e5f5c85b 100644 --- a/sys/arch/landisk/stand/boot/Makefile +++ b/sys/arch/landisk/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2006/10/06 21:48:50 mickey Exp $ +# $OpenBSD: Makefile,v 1.2 2006/10/10 05:26:54 miod Exp $ PROG= boot SRCS= srt0.S conf.c devs.c getsecs.c scifcons.c delay.c @@ -39,4 +39,6 @@ ${PROG}: ${OBJS} ${DPADD} -Map ${PROG}.map -cref ${OBJS} ${LDADD} ${OBJCOPY} -O binary ${PROG}.sym ${PROG} +NOMAN= + .include <bsd.prog.mk> diff --git a/sys/arch/landisk/stand/boot/getsecs.c b/sys/arch/landisk/stand/boot/getsecs.c index 64c21d7ad31..b7270963823 100644 --- a/sys/arch/landisk/stand/boot/getsecs.c +++ b/sys/arch/landisk/stand/boot/getsecs.c @@ -10,9 +10,9 @@ #include <lib/libsa/netif.h> #include <sh/devreg.h> -#include <sh/scireg.h> +#include <arch/sh/dev/scireg.h> -#include <dev/ic/rs5c313reg.h> +#include <arch/landisk/dev/rs5c313reg.h> /** * RICOH RS5C313 diff --git a/sys/arch/landisk/stand/boot/scifcons.c b/sys/arch/landisk/stand/boot/scifcons.c index 63551234f13..8d4db30a973 100644 --- a/sys/arch/landisk/stand/boot/scifcons.c +++ b/sys/arch/landisk/stand/boot/scifcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scifcons.c,v 1.1 2006/10/06 21:48:50 mickey Exp $ */ +/* $OpenBSD: scifcons.c,v 1.2 2006/10/10 05:26:54 miod Exp $ */ /* $NetBSD: scifcons.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ /* NetBSD: scif.c,v 1.38 2004/12/13 02:14:13 chs Exp */ @@ -100,7 +100,7 @@ #include <libsa.h> -#include <sh/scifreg.h> +#include <arch/sh/dev/scifreg.h> #define scif_smr_read() SHREG_SCSMR2 #define scif_smr_write(v) (SHREG_SCSMR2 = (v)) diff --git a/sys/arch/landisk/stand/bootxx/pbr.S b/sys/arch/landisk/stand/bootxx/pbr.S index 8e17bef2d83..24513a1936b 100644 --- a/sys/arch/landisk/stand/bootxx/pbr.S +++ b/sys/arch/landisk/stand/bootxx/pbr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: pbr.S,v 1.1 2006/10/06 21:48:50 mickey Exp $ */ +/* $OpenBSD: pbr.S,v 1.2 2006/10/10 05:26:54 miod Exp $ */ /* $NetBSD: pbr.S,v 1.1 2006/09/01 21:26:19 uwe Exp $ */ /*- @@ -37,7 +37,7 @@ ENTRY(start) bra start0 - .byte 0x11 /* 0x4e11: cmp/pz r14... */ + .byte 0x11 /* 0x4f11: cmp/pz r15... */ .asciz "OpenBSD" . = _C_LABEL(start) + 0x0b /* move to start of BPB */ |