1178172Simp/*	$NetBSD: cpu.h,v 1.70 2003/01/17 23:36:08 thorpej Exp $	*/
2178172Simp
3178172Simp/*-
4178172Simp * Copyright (c) 1992, 1993
5178172Simp *	The Regents of the University of California.  All rights reserved.
6178172Simp *
7178172Simp * This code is derived from software contributed to Berkeley by
8178172Simp * Ralph Campbell and Rick Macklem.
9178172Simp *
10178172Simp * Redistribution and use in source and binary forms, with or without
11178172Simp * modification, are permitted provided that the following conditions
12178172Simp * are met:
13178172Simp * 1. Redistributions of source code must retain the above copyright
14178172Simp *    notice, this list of conditions and the following disclaimer.
15178172Simp * 2. Redistributions in binary form must reproduce the above copyright
16178172Simp *    notice, this list of conditions and the following disclaimer in the
17178172Simp *    documentation and/or other materials provided with the distribution.
18178172Simp * 3. All advertising materials mentioning features or use of this software
19178172Simp *    must display the following acknowledgement:
20178172Simp *	This product includes software developed by the University of
21178172Simp *	California, Berkeley and its contributors.
22178172Simp * 4. Neither the name of the University nor the names of its contributors
23178172Simp *    may be used to endorse or promote products derived from this software
24178172Simp *    without specific prior written permission.
25178172Simp *
26178172Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27178172Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28178172Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29178172Simp * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30178172Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31178172Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32178172Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33178172Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34178172Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35178172Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36178172Simp * SUCH DAMAGE.
37178172Simp *
38178172Simp * $FreeBSD$
39178172Simp *	@(#)cpu.h	8.4 (Berkeley) 1/4/94
40178172Simp */
41178172Simp
42178172Simp#ifndef _CPUINFO_H_
43178172Simp#define _CPUINFO_H_
44178172Simp
45178172Simp/*
46178172Simp * Exported definitions unique to NetBSD/mips cpu support.
47178172Simp */
48178172Simp
49178172Simp#ifdef _KERNEL
50178172Simp#ifndef LOCORE
51178172Simp
52178172Simpstruct mips_cpuinfo {
53178172Simp	u_int8_t	cpu_vendor;
54178172Simp	u_int8_t	cpu_rev;
55178172Simp	u_int8_t	cpu_impl;
56178172Simp	u_int8_t	tlb_type;
57292609Sadrian	u_int32_t	tlb_pgmask;
58178172Simp	u_int16_t	tlb_nentries;
59178172Simp	u_int8_t	icache_virtual;
60204689Sneel	boolean_t	cache_coherent_dma;
61178172Simp	struct {
62202031Simp		u_int32_t	ic_size;
63178172Simp		u_int8_t	ic_linesize;
64178172Simp		u_int8_t	ic_nways;
65178172Simp		u_int16_t	ic_nsets;
66202031Simp		u_int32_t	dc_size;
67178172Simp		u_int8_t	dc_linesize;
68178172Simp		u_int8_t	dc_nways;
69178172Simp		u_int16_t	dc_nsets;
70178172Simp	} l1;
71274752Sbr	struct {
72274752Sbr		u_int32_t	dc_size;
73274752Sbr		u_int8_t	dc_linesize;
74274752Sbr		u_int8_t	dc_nways;
75274752Sbr		u_int16_t	dc_nsets;
76274752Sbr	} l2;
77178172Simp};
78178172Simp
79204689Sneelextern struct mips_cpuinfo cpuinfo;
80204689Sneel
81178172Simp#endif /* !LOCORE */
82178172Simp#endif /* _KERNEL */
83178172Simp#endif /* _CPUINFO_H_ */
84