Home | History | Annotate | Line # | Download | only in include
hp300spu.h revision 1.6.2.1
      1  1.6.2.1   nathanw /*	$NetBSD: hp300spu.h,v 1.6.2.1 2001/06/21 19:22:02 nathanw Exp $	*/
      2      1.1   thorpej 
      3      1.1   thorpej /*-
      4      1.1   thorpej  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
      5      1.1   thorpej  * All rights reserved.
      6      1.1   thorpej  *
      7      1.1   thorpej  * This code is derived from software contributed to The NetBSD Foundation
      8      1.1   thorpej  * by Jason R. Thorpe.
      9      1.1   thorpej  *
     10      1.1   thorpej  * Redistribution and use in source and binary forms, with or without
     11      1.1   thorpej  * modification, are permitted provided that the following conditions
     12      1.1   thorpej  * are met:
     13      1.1   thorpej  * 1. Redistributions of source code must retain the above copyright
     14      1.1   thorpej  *    notice, this list of conditions and the following disclaimer.
     15      1.1   thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     16      1.1   thorpej  *    notice, this list of conditions and the following disclaimer in the
     17      1.1   thorpej  *    documentation and/or other materials provided with the distribution.
     18      1.1   thorpej  * 3. All advertising materials mentioning features or use of this software
     19      1.1   thorpej  *    must display the following acknowledgement:
     20      1.1   thorpej  *        This product includes software developed by the NetBSD
     21      1.1   thorpej  *        Foundation, Inc. and its contributors.
     22      1.1   thorpej  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23      1.1   thorpej  *    contributors may be used to endorse or promote products derived
     24      1.1   thorpej  *    from this software without specific prior written permission.
     25      1.1   thorpej  *
     26      1.1   thorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27      1.1   thorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28      1.1   thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29      1.3       jtc  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30      1.3       jtc  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31      1.1   thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32      1.1   thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33      1.1   thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34      1.1   thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35      1.1   thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36      1.1   thorpej  * POSSIBILITY OF SUCH DAMAGE.
     37      1.1   thorpej  */
     38      1.1   thorpej 
     39      1.1   thorpej #ifndef _HP300_HP300SPU_H_
     40      1.1   thorpej #define	_HP300_HP300SPU_H_
     41      1.1   thorpej 
     42      1.1   thorpej /*
     43      1.1   thorpej  * This file describes various constants that describe and/or
     44      1.1   thorpej  * are unique to the HP 9000/300 or 400 SPUs.
     45      1.1   thorpej  */
     46      1.1   thorpej 
     47      1.1   thorpej /* values for machineid */
     48      1.1   thorpej #define	HP_320		0	/* 16MHz 68020+HP MMU+16K external cache */
     49      1.1   thorpej #define	HP_330		1	/* 16MHz 68020+68851 MMU */
     50      1.1   thorpej #define	HP_350		2	/* 25MHz 68020+HP MMU+32K external cache */
     51      1.1   thorpej #define	HP_360		3	/* 25MHz 68030 */
     52      1.1   thorpej #define	HP_370		4	/* 33MHz 68030+64K external cache */
     53      1.1   thorpej #define	HP_340		5	/* 16MHz 68030 */
     54      1.1   thorpej #define	HP_345		6	/* 50MHz 68030+32K external cache */
     55      1.1   thorpej #define	HP_375		7	/* 50MHz 68030+32K external cache */
     56      1.1   thorpej #define	HP_400		8	/* 50MHz 68030+32K external cache */
     57      1.1   thorpej #define	HP_380		9	/* 25MHz 68040 */
     58      1.1   thorpej #define	HP_425		10	/* 26MHz 68040 */
     59      1.5   thorpej #define	HP_433		11	/* 33MHz 68040 */
     60      1.5   thorpej #define	HP_385		12	/* 33MHz 68040 */
     61      1.1   thorpej 
     62      1.1   thorpej /* values for mmuid - used to differentiate similar CPU/cache combos */
     63      1.1   thorpej #define	MMUID_345	1	/* 345 */
     64      1.1   thorpej #define	MMUID_375	3	/* 375 */
     65      1.5   thorpej #define	MMUID_385	2	/* 385 */
     66      1.2   thorpej #define	MMUID_425_T	5	/* 425t - 25MHz Trailways */
     67      1.2   thorpej #define	MMUID_425_S	7	/* 425s - 25MHz Strider */
     68      1.2   thorpej #define	MMUID_433_T	4	/* 433t - 33MHz Trailways */
     69      1.2   thorpej #define	MMUID_433_S	6	/* 433s - 33MHz Strider */
     70      1.5   thorpej #define	MMUID_425_E	9	/* 425e - 25MHz Woody */
     71      1.1   thorpej 
     72      1.1   thorpej #define	MMUID_SHIFT	8	/* left shift by this... */
     73      1.1   thorpej #define	MMUID_MASK	0xff	/* ...and mask with this to get mmuid */
     74      1.1   thorpej 
     75      1.1   thorpej #if defined (_KERNEL) && !defined(_LOCORE)
     76      1.1   thorpej extern	int machineid;		/* CPU model */
     77      1.1   thorpej extern	int cpuspeed;		/* CPU speed, in MHz */
     78      1.1   thorpej extern	int mmuid;		/* MMU id */
     79      1.1   thorpej #endif /* _KERNEL && ! _LOCORE */
     80      1.1   thorpej 
     81      1.1   thorpej #ifdef _KERNEL
     82      1.1   thorpej 
     83      1.1   thorpej /*
     84      1.1   thorpej  * This section associates hp300 model configurations with certain
     85      1.1   thorpej  * combindations of CPU, MMU, and cache.
     86      1.1   thorpej  */
     87      1.1   thorpej 
     88      1.1   thorpej /*
     89      1.1   thorpej  * Pull in user-defined SPU configuration options.
     90      1.1   thorpej  */
     91  1.6.2.1   nathanw #if defined(_KERNEL_OPT)
     92      1.4   thorpej #include "opt_spuconf.h"
     93      1.6  jdolecek #endif
     94      1.1   thorpej 
     95      1.1   thorpej /*
     96      1.1   thorpej  * CPU configuration.
     97      1.1   thorpej  */
     98      1.1   thorpej #if defined(HP320) || defined(HP330) || defined(HP350)
     99      1.1   thorpej #define M68020
    100      1.1   thorpej #endif
    101      1.1   thorpej 
    102      1.1   thorpej #if defined(HP340) || defined(HP345) || defined(HP360) || defined(HP370) || \
    103      1.1   thorpej     defined(HP375) || defined(HP400)
    104      1.1   thorpej #define M68030
    105      1.1   thorpej #endif
    106      1.1   thorpej 
    107      1.5   thorpej #if defined(HP380) || defined(HP385) || defined(HP425) || defined(HP433)
    108      1.1   thorpej #define M68040
    109      1.1   thorpej #endif
    110      1.1   thorpej 
    111      1.1   thorpej /*
    112      1.1   thorpej  * MMU configuration.
    113      1.1   thorpej  */
    114      1.1   thorpej #if defined(HP320) || defined(HP350)
    115      1.1   thorpej #define M68K_MMU_HP
    116      1.1   thorpej #endif
    117      1.1   thorpej 
    118      1.1   thorpej #if defined(HP330) || defined(M68030) || defined(M68040)
    119      1.1   thorpej #define	M68K_MMU_MOTOROLA
    120      1.1   thorpej #endif
    121      1.1   thorpej 
    122      1.1   thorpej /*
    123      1.1   thorpej  * Cache configuration.
    124      1.1   thorpej  */
    125      1.1   thorpej #if defined(M68K_MMU_HP)
    126      1.1   thorpej #define	CACHE_HAVE_VAC
    127      1.1   thorpej #endif
    128      1.1   thorpej 
    129      1.1   thorpej #if defined(HP345) || defined(HP360) || defined(HP370) || \
    130      1.1   thorpej     defined(HP375) || defined(HP400)
    131      1.1   thorpej #define	CACHE_HAVE_PAC
    132      1.1   thorpej #endif
    133      1.1   thorpej 
    134      1.1   thorpej #endif /* _KERNEL */
    135      1.1   thorpej 
    136      1.1   thorpej #endif /* _HP300_HP300SPU_H_ */
    137