Home | History | Annotate | Line # | Download | only in include
hp300spu.h revision 1.12.58.1
      1 /*	$NetBSD: hp300spu.h,v 1.12.58.1 2008/06/02 13:22:07 mjf 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  *
     19  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29  * POSSIBILITY OF SUCH DAMAGE.
     30  */
     31 
     32 #ifndef _HP300_HP300SPU_H_
     33 #define	_HP300_HP300SPU_H_
     34 
     35 /*
     36  * This file describes various constants that describe and/or
     37  * are unique to the HP 9000/300 or 400 SPUs.
     38  */
     39 
     40 /* values for machineid */
     41 #define	HP_320		0	/* 16MHz 68020+HP MMU+16K external cache */
     42 #define	HP_330		1	/* 16MHz 68020+68851 MMU */
     43 #define	HP_350		2	/* 25MHz 68020+HP MMU+32K external cache */
     44 #define	HP_360		3	/* 25MHz 68030 */
     45 #define	HP_370		4	/* 33MHz 68030+64K external cache */
     46 #define	HP_340		5	/* 16MHz 68030 */
     47 #define	HP_345		6	/* 50MHz 68030+32K external cache */
     48 #define	HP_375		7	/* 50MHz 68030+32K external cache */
     49 #define	HP_400		8	/* 50MHz 68030+32K external cache */
     50 #define	HP_380		9	/* 25MHz 68040 */
     51 #define	HP_425		10	/* 25MHz 68040 */
     52 #define	HP_433		11	/* 33MHz 68040 */
     53 #define	HP_385		12	/* 33MHz 68040 */
     54 #define	HP_362		13	/* 25MHz 68030 */
     55 #define	HP_382		14	/* 25MHz 68040 */
     56 
     57 /* values for mmuid - used to differentiate similar CPU/cache combos */
     58 #define	MMUID_345	1	/* 345 */
     59 #define	MMUID_375	3	/* 375 */
     60 #define	MMUID_382	11	/* 382 */
     61 #define	MMUID_385	2	/* 385 */
     62 #define	MMUID_425_T	5	/* 425t - 25MHz Trailways */
     63 #define	MMUID_425_S	7	/* 425s - 25MHz Strider */
     64 #define	MMUID_433_T	4	/* 433t - 33MHz Trailways */
     65 #define	MMUID_433_S	6	/* 433s - 33MHz Strider */
     66 #define	MMUID_425_E	9	/* 425e - 25MHz Woody */
     67 
     68 #define	MMUID_SHIFT	8	/* left shift by this... */
     69 #define	MMUID_MASK	0xff	/* ...and mask with this to get mmuid */
     70 
     71 #if defined (_KERNEL) && !defined(_LOCORE)
     72 extern	int machineid;		/* CPU model */
     73 extern	int cpuspeed;		/* CPU speed, in MHz */
     74 extern	int mmuid;		/* MMU id */
     75 #endif /* _KERNEL && ! _LOCORE */
     76 
     77 #ifdef _KERNEL
     78 
     79 /*
     80  * This section associates hp300 model configurations with certain
     81  * combindations of CPU, MMU, and cache.
     82  */
     83 
     84 /*
     85  * Pull in user-defined SPU configuration options.
     86  */
     87 #if defined(_KERNEL_OPT)
     88 #include "opt_spuconf.h"
     89 #endif
     90 
     91 /*
     92  * CPU configuration.
     93  */
     94 #if defined(HP320) || defined(HP330) || defined(HP350)
     95 #define M68020
     96 #endif
     97 
     98 #if defined(HP340) || defined(HP345) || defined(HP360) || defined(HP362) || \
     99     defined(HP370) || defined(HP375) || defined(HP400)
    100 #define M68030
    101 #endif
    102 
    103 #if defined(HP380) || defined(HP382) || defined(HP385) || defined(HP425) || \
    104     defined(HP433)
    105 #define M68040
    106 #endif
    107 
    108 /*
    109  * MMU configuration.
    110  */
    111 #if defined(HP320) || defined(HP350)
    112 #define M68K_MMU_HP
    113 #endif
    114 
    115 #if defined(HP330) || defined(M68030) || defined(M68040)
    116 #define	M68K_MMU_MOTOROLA
    117 #endif
    118 
    119 /*
    120  * Cache configuration.
    121  */
    122 #if defined(M68K_MMU_HP)
    123 #define	CACHE_HAVE_VAC
    124 #define M68K_VAC
    125 #endif
    126 
    127 #if defined(HP345) || defined(HP370) || defined(HP375) || defined(HP400)
    128 #define	CACHE_HAVE_PAC
    129 #endif
    130 
    131 #endif /* _KERNEL */
    132 
    133 #endif /* _HP300_HP300SPU_H_ */
    134