Deleted Added
sdiff udiff text old ( 97001 ) new ( 112399 )
full compact
1/*
2 * Copyright (c) 1996
3 * The President and Fellows of Harvard College. All rights reserved.
4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and

--- 27 unchanged lines hidden (view full) ---

36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * from: @(#)cache.h 8.1 (Berkeley) 6/11/93
42 * from: NetBSD: cache.h,v 1.3 2000/08/01 00:28:02 eeh Exp
43 *
44 * $FreeBSD: head/sys/sparc64/include/cache.h 112399 2003-03-19 06:55:37Z jake $
45 */
46
47#ifndef _MACHINE_CACHE_H_
48#define _MACHINE_CACHE_H_
49
50#include <dev/ofw/openfirm.h>
51
52#define DCACHE_COLOR_BITS (1)
53#define DCACHE_COLORS (1 << DCACHE_COLOR_BITS)
54#define DCACHE_COLOR_MASK (DCACHE_COLORS - 1)
55#define DCACHE_COLOR(va) (((va) >> PAGE_SHIFT) & DCACHE_COLOR_MASK)
56#define DCACHE_OTHER_COLOR(color) \
57 ((color) ^ DCACHE_COLOR_BITS)
58
59#define DC_TAG_SHIFT 2
60#define DC_VALID_SHIFT 0
61
62#define DC_TAG_BITS 28
63#define DC_VALID_BITS 2
64
65#define DC_TAG_MASK ((1 << DC_TAG_BITS) - 1)
66#define DC_VALID_MASK ((1 << DC_VALID_BITS) - 1)

--- 23 unchanged lines hidden (view full) ---

90 u_int dc_linesize;
91 u_int ec_size; /* external cache info */
92 u_int ec_assoc;
93 u_int ec_l2set;
94 u_int ec_linesize;
95 u_int ec_l2linesize;
96};
97
98typedef void dcache_page_inval_t(vm_offset_t pa);
99typedef void icache_page_inval_t(vm_offset_t pa);
100
101void cache_init(phandle_t node);
102
103void cheetah_dcache_page_inval(vm_offset_t pa);
104void cheetah_icache_page_inval(vm_offset_t pa);
105void spitfire_dcache_page_inval(vm_offset_t pa);
106void spitfire_icache_page_inval(vm_offset_t pa);
107
108extern dcache_page_inval_t *dcache_page_inval;
109extern icache_page_inval_t *icache_page_inval;
110
111extern struct cacheinfo cache;
112
113#endif /* !_MACHINE_CACHE_H_ */