xref: /netbsd-src/sys/arch/pmax/stand/common/clear_cache.S (revision 1c53db4943d20877bb426d2c771d85ee4b357fe6)
1*1c53db49Stsutsui/*	$NetBSD: clear_cache.S,v 1.9 2011/03/26 15:49:26 tsutsui Exp $	*/
2ea515c3aSsimonb
3ea515c3aSsimonb/*-
4ea515c3aSsimonb * Copyright (c) 1999 The NetBSD Foundation, Inc.
5ea515c3aSsimonb * All rights reserved.
6ea515c3aSsimonb *
7ea515c3aSsimonb * This code is derived from software contributed to The NetBSD Foundation
8ea515c3aSsimonb * by Jonathan Stone, Michael Hitch and Simon Burge.
9ea515c3aSsimonb *
10ea515c3aSsimonb * Redistribution and use in source and binary forms, with or without
11ea515c3aSsimonb * modification, are permitted provided that the following conditions
12ea515c3aSsimonb * are met:
13ea515c3aSsimonb * 1. Redistributions of source code must retain the above copyright
14ea515c3aSsimonb *    notice, this list of conditions and the following disclaimer.
15ea515c3aSsimonb * 2. Redistributions in binary form must reproduce the above copyright
16ea515c3aSsimonb *    notice, this list of conditions and the following disclaimer in the
17ea515c3aSsimonb *    documentation and/or other materials provided with the distribution.
18ea515c3aSsimonb *
19ea515c3aSsimonb * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20ea515c3aSsimonb * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21ea515c3aSsimonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22ea515c3aSsimonb * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23ea515c3aSsimonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24ea515c3aSsimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25ea515c3aSsimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26ea515c3aSsimonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27ea515c3aSsimonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28ea515c3aSsimonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29ea515c3aSsimonb * POSSIBILITY OF SUCH DAMAGE.
30ea515c3aSsimonb */
31ea515c3aSsimonb
32ea515c3aSsimonb#include <mips/asm.h>
33ea515c3aSsimonb#include <mips/cpuregs.h>
34ea515c3aSsimonb#include <machine/dec_prom.h>
35ea515c3aSsimonb
36*1c53db49Stsutsui	.set	reorder		# make as(1) handle hazard and BDslot
37ea515c3aSsimonbLEAF(clear_cache)
38ea515c3aSsimonb	lw	v0, _C_LABEL(callv)	# get pointer to call back vectors
39ea515c3aSsimonb	lw	v0, 0x7c(v0)	# offset for callv->_clear_cache
40ea515c3aSsimonb	j	v0		# call PROM clear_cache
41ea515c3aSsimonbEND(clear_cache)
42