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