cpuinfo.h revision 292609
190075Sobrien/*	$NetBSD: cpu.h,v 1.70 2003/01/17 23:36:08 thorpej Exp $	*/
290075Sobrien
390075Sobrien/*-
490075Sobrien * Copyright (c) 1992, 1993
590075Sobrien *	The Regents of the University of California.  All rights reserved.
690075Sobrien *
790075Sobrien * This code is derived from software contributed to Berkeley by
890075Sobrien * Ralph Campbell and Rick Macklem.
990075Sobrien *
1090075Sobrien * Redistribution and use in source and binary forms, with or without
1190075Sobrien * modification, are permitted provided that the following conditions
1290075Sobrien * are met:
1390075Sobrien * 1. Redistributions of source code must retain the above copyright
1490075Sobrien *    notice, this list of conditions and the following disclaimer.
1590075Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1690075Sobrien *    notice, this list of conditions and the following disclaimer in the
1790075Sobrien *    documentation and/or other materials provided with the distribution.
1890075Sobrien * 3. All advertising materials mentioning features or use of this software
1990075Sobrien *    must display the following acknowledgement:
2090075Sobrien *	This product includes software developed by the University of
2190075Sobrien *	California, Berkeley and its contributors.
2290075Sobrien * 4. Neither the name of the University nor the names of its contributors
2390075Sobrien *    may be used to endorse or promote products derived from this software
2490075Sobrien *    without specific prior written permission.
2590075Sobrien *
2690075Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2790075Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2890075Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2990075Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3090075Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3190075Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3290075Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3390075Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3490075Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3590075Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3690075Sobrien * SUCH DAMAGE.
3790075Sobrien *
3890075Sobrien * $FreeBSD: head/sys/mips/include/cpuinfo.h 292609 2015-12-22 15:59:41Z adrian $
3990075Sobrien *	@(#)cpu.h	8.4 (Berkeley) 1/4/94
4090075Sobrien */
4190075Sobrien
4290075Sobrien#ifndef _CPUINFO_H_
4390075Sobrien#define _CPUINFO_H_
4490075Sobrien
4590075Sobrien/*
4690075Sobrien * Exported definitions unique to NetBSD/mips cpu support.
4790075Sobrien */
4890075Sobrien
4990075Sobrien#ifdef _KERNEL
5090075Sobrien#ifndef LOCORE
5190075Sobrien
5290075Sobrienstruct mips_cpuinfo {
5390075Sobrien	u_int8_t	cpu_vendor;
5490075Sobrien	u_int8_t	cpu_rev;
5590075Sobrien	u_int8_t	cpu_impl;
5690075Sobrien	u_int8_t	tlb_type;
5790075Sobrien	u_int32_t	tlb_pgmask;
5890075Sobrien	u_int16_t	tlb_nentries;
5990075Sobrien	u_int8_t	icache_virtual;
6090075Sobrien	boolean_t	cache_coherent_dma;
6190075Sobrien	struct {
6290075Sobrien		u_int32_t	ic_size;
6390075Sobrien		u_int8_t	ic_linesize;
6490075Sobrien		u_int8_t	ic_nways;
6590075Sobrien		u_int16_t	ic_nsets;
6690075Sobrien		u_int32_t	dc_size;
6790075Sobrien		u_int8_t	dc_linesize;
6890075Sobrien		u_int8_t	dc_nways;
6990075Sobrien		u_int16_t	dc_nsets;
7090075Sobrien	} l1;
7190075Sobrien	struct {
7290075Sobrien		u_int32_t	dc_size;
7390075Sobrien		u_int8_t	dc_linesize;
7490075Sobrien		u_int8_t	dc_nways;
7590075Sobrien		u_int16_t	dc_nsets;
7690075Sobrien	} l2;
7790075Sobrien};
7890075Sobrien
7990075Sobrienextern struct mips_cpuinfo cpuinfo;
8090075Sobrien
8190075Sobrien#endif /* !LOCORE */
8290075Sobrien#endif /* _KERNEL */
8390075Sobrien#endif /* _CPUINFO_H_ */
8490075Sobrien