From 7d2e12f3306cace9de6ce49080244dd4e86c1524 Mon Sep 17 00:00:00 2001 From: pk Date: Fri, 1 Jul 1994 10:46:55 +0000 Subject: [PATCH] Adapt to current libsa. --- sys/arch/sparc/stand/Makefile | 4 +-- sys/arch/sparc/stand/boot.c | 11 ++++++-- sys/arch/sparc/stand/filesystem.c | 44 +++++++++++++++++++++++++++++++ sys/arch/sparc/stand/promdev.c | 4 +-- 4 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 sys/arch/sparc/stand/filesystem.c diff --git a/sys/arch/sparc/stand/Makefile b/sys/arch/sparc/stand/Makefile index 7c4c9e0361b6..7c1ce7833947 100644 --- a/sys/arch/sparc/stand/Makefile +++ b/sys/arch/sparc/stand/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $Id: Makefile,v 1.1 1994/02/26 10:57:09 pk Exp $ +# $Id: Makefile,v 1.2 1994/07/01 10:46:55 pk Exp $ DESTDIR= @@ -12,7 +12,7 @@ RELOC= ${RELOC_SUN4C} DEFS= -DSTANDALONE -DCOMPAT_NOLABEL # -DROMPRF CFLAGS= -O2 ${INCPATH} ${DEFS} -SRCS= boot.c promdev.c version.c +SRCS= boot.c filesystem.c promdev.c version.c #SRCS+= io.c strerror.c S= ${.CURDIR}/../../.. diff --git a/sys/arch/sparc/stand/boot.c b/sys/arch/sparc/stand/boot.c index e17c1c1fd84d..842c9d08c9ac 100644 --- a/sys/arch/sparc/stand/boot.c +++ b/sys/arch/sparc/stand/boot.c @@ -32,7 +32,7 @@ * * from: @(#)boot.c 8.1 (Berkeley) 6/10/93 * - * $Id: boot.c,v 1.2 1994/03/20 09:13:37 pk Exp $ + * $Id: boot.c,v 1.3 1994/07/01 10:46:56 pk Exp $ */ #include @@ -41,6 +41,9 @@ #include #include "stand.h" +int debug; +int netif_debug; + /* * Boot device is derived from ROM provided information. */ @@ -75,7 +78,7 @@ struct promvec *pp; printf("Booting %s @ 0x%x\n", file, LOADADDR); copyunix(io, LOADADDR); - promvec->pv_halt(); + _rtt(); } /*ARGSUSED*/ @@ -191,3 +194,7 @@ twiddle() tw_pos %= (sizeof(tw_chars) - 1); } +_rtt() +{ + promvec->pv_halt(); +} diff --git a/sys/arch/sparc/stand/filesystem.c b/sys/arch/sparc/stand/filesystem.c new file mode 100644 index 000000000000..34122b7311ad --- /dev/null +++ b/sys/arch/sparc/stand/filesystem.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 1993 Philip A. Nelson. + * 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 Philip A. Nelson. + * 4. The name of Philip A. Nelson may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY PHILIP NELSON ``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 PHILIP NELSON 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. + * + * filesystem.c + * + * $Id: filesystem.c,v 1.1 1994/07/01 10:46:58 pk Exp $ + */ + +#include +#include + +struct fs_ops file_system[] = { + { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat }, +}; + +int nfsys = sizeof(file_system)/sizeof(struct fs_ops); + diff --git a/sys/arch/sparc/stand/promdev.c b/sys/arch/sparc/stand/promdev.c index 217bd020c88e..de9b288a5661 100644 --- a/sys/arch/sparc/stand/promdev.c +++ b/sys/arch/sparc/stand/promdev.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: promdev.c,v 1.1 1994/02/26 10:57:18 pk Exp $ + * $Id: promdev.c,v 1.2 1994/07/01 10:46:59 pk Exp $ */ #include @@ -165,7 +165,7 @@ promstrategy(devdata, func, dblk, size, buf, rsize) u_int *rsize; { register struct prom_softc *pp = (struct prom_softc *)devdata; - u_int (*pf)(); + register u_int (*pf)(); int v2 = promvec->pv_romvec_vers == 2; daddr_t blk = dblk + pp->poff; int error = 0;