diff --git a/sys/arch/pmax/stand/lib/callvec.c b/sys/arch/pmax/stand/lib/callvec.c index bfa7ee2cb3a3..33a013a6e06d 100644 --- a/sys/arch/pmax/stand/lib/callvec.c +++ b/sys/arch/pmax/stand/lib/callvec.c @@ -1,4 +1,4 @@ -/* $NetBSD: callvec.c,v 1.10 1999/01/29 05:37:46 simonb Exp $ */ +/* $NetBSD: callvec.c,v 1.11 1999/03/01 04:05:18 simonb Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -72,7 +72,7 @@ const struct callback callvec = { (void (*) __P((void)))0, (void (*) __P((int delay)))0, (void (*) __P((int value)))0, - (void (*) __P((void)))0, + (void (*) __P((char *addr, int len)))DEC_PROM_CLEARCACHE, (int (*) __P((void)))0, (int (*) __P((memmap *map)))0, (int (*) __P((int sn)))0, diff --git a/sys/arch/pmax/stand/libsa/Makefile b/sys/arch/pmax/stand/libsa/Makefile index 41d1926f6e7e..1f8d820459f0 100644 --- a/sys/arch/pmax/stand/libsa/Makefile +++ b/sys/arch/pmax/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 1999/02/22 11:31:46 simonb Exp $ +# $NetBSD: Makefile,v 1.13 1999/03/01 04:05:18 simonb Exp $ # @(#)Makefile 8.2 (Berkeley) 2/16/94 S= ${.CURDIR}/../../../.. @@ -8,7 +8,8 @@ LIB= sa # from sys/arch/pmax/stand/libsa: SRCS= alloc.c callvec.c devopen.c memcpy.c memset.c ufs.c # PROM callbacks -SRCS+= bootinit.S bootread.S printf.S strcat.S strcmp.S strcpy.S strlen.S +SRCS+= bootinit.S bootread.S clear_cache.S printf.S strcat.S strcmp.S \ + strcpy.S strlen.S # from sys/lib/libsa: SRCS+= disklabel.c dkcksum.c open.c read.c twiddle.c diff --git a/sys/arch/pmax/stand/libsa/callvec.c b/sys/arch/pmax/stand/libsa/callvec.c index bfa7ee2cb3a3..33a013a6e06d 100644 --- a/sys/arch/pmax/stand/libsa/callvec.c +++ b/sys/arch/pmax/stand/libsa/callvec.c @@ -1,4 +1,4 @@ -/* $NetBSD: callvec.c,v 1.10 1999/01/29 05:37:46 simonb Exp $ */ +/* $NetBSD: callvec.c,v 1.11 1999/03/01 04:05:18 simonb Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -72,7 +72,7 @@ const struct callback callvec = { (void (*) __P((void)))0, (void (*) __P((int delay)))0, (void (*) __P((int value)))0, - (void (*) __P((void)))0, + (void (*) __P((char *addr, int len)))DEC_PROM_CLEARCACHE, (int (*) __P((void)))0, (int (*) __P((memmap *map)))0, (int (*) __P((int sn)))0, diff --git a/sys/arch/pmax/stand/libsa/clear_cache.S b/sys/arch/pmax/stand/libsa/clear_cache.S new file mode 100644 index 000000000000..08662bc1e5de --- /dev/null +++ b/sys/arch/pmax/stand/libsa/clear_cache.S @@ -0,0 +1,47 @@ +/* $NetBSD: clear_cache.S,v 1.1 1999/03/01 04:05:18 simonb Exp $ */ + +/*- + * Copyright (c) 1999 The NetBSD Foundation, Inc. + * 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 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. + */ + +#include +#include +#include +#include + +LEAF(clear_cache) + lw v0, _C_LABEL(callv) # get pointer to call back vectors + lw v0, 0x7c(v0) # offset for callv->_clear_cache + nop + j v0 # call PROM printf + nop +END(clear_cache) diff --git a/sys/arch/pmax/stand/scsiboot/clear_cache.S b/sys/arch/pmax/stand/scsiboot/clear_cache.S new file mode 100644 index 000000000000..08662bc1e5de --- /dev/null +++ b/sys/arch/pmax/stand/scsiboot/clear_cache.S @@ -0,0 +1,47 @@ +/* $NetBSD: clear_cache.S,v 1.1 1999/03/01 04:05:18 simonb Exp $ */ + +/*- + * Copyright (c) 1999 The NetBSD Foundation, Inc. + * 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 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. + */ + +#include +#include +#include +#include + +LEAF(clear_cache) + lw v0, _C_LABEL(callv) # get pointer to call back vectors + lw v0, 0x7c(v0) # offset for callv->_clear_cache + nop + j v0 # call PROM printf + nop +END(clear_cache)