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