hp300spu.h revision 1.3 1 1.3 jtc /* $NetBSD: hp300spu.h,v 1.3 1997/10/09 08:58:45 jtc 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.1 thorpej #define HP_433 11 /* 33MHz 68040 */
60 1.1 thorpej
61 1.1 thorpej /* values for mmuid - used to differentiate similar CPU/cache combos */
62 1.1 thorpej #define MMUID_345 1 /* 345 */
63 1.1 thorpej #define MMUID_375 3 /* 375 */
64 1.2 thorpej #define MMUID_425_T 5 /* 425t - 25MHz Trailways */
65 1.2 thorpej #define MMUID_425_S 7 /* 425s - 25MHz Strider */
66 1.2 thorpej #define MMUID_433_T 4 /* 433t - 33MHz Trailways */
67 1.2 thorpej #define MMUID_433_S 6 /* 433s - 33MHz Strider */
68 1.1 thorpej
69 1.1 thorpej #define MMUID_SHIFT 8 /* left shift by this... */
70 1.1 thorpej #define MMUID_MASK 0xff /* ...and mask with this to get mmuid */
71 1.1 thorpej
72 1.1 thorpej #if defined (_KERNEL) && !defined(_LOCORE)
73 1.1 thorpej extern int machineid; /* CPU model */
74 1.1 thorpej extern int cpuspeed; /* CPU speed, in MHz */
75 1.1 thorpej extern int mmuid; /* MMU id */
76 1.1 thorpej #endif /* _KERNEL && ! _LOCORE */
77 1.1 thorpej
78 1.1 thorpej #ifdef _KERNEL
79 1.1 thorpej
80 1.1 thorpej /*
81 1.1 thorpej * This section associates hp300 model configurations with certain
82 1.1 thorpej * combindations of CPU, MMU, and cache.
83 1.1 thorpej */
84 1.1 thorpej
85 1.1 thorpej /*
86 1.1 thorpej * Pull in user-defined SPU configuration options.
87 1.1 thorpej */
88 1.1 thorpej #include "opt_hp320.h"
89 1.1 thorpej #include "opt_hp330.h"
90 1.1 thorpej #include "opt_hp340.h"
91 1.1 thorpej #include "opt_hp345.h"
92 1.1 thorpej #include "opt_hp350.h"
93 1.1 thorpej #include "opt_hp360.h"
94 1.1 thorpej #include "opt_hp370.h"
95 1.1 thorpej #include "opt_hp375.h"
96 1.1 thorpej #include "opt_hp380.h"
97 1.1 thorpej #include "opt_hp400.h"
98 1.1 thorpej #include "opt_hp425.h"
99 1.1 thorpej #include "opt_hp433.h"
100 1.1 thorpej
101 1.1 thorpej /*
102 1.1 thorpej * CPU configuration.
103 1.1 thorpej */
104 1.1 thorpej #if defined(HP320) || defined(HP330) || defined(HP350)
105 1.1 thorpej #define M68020
106 1.1 thorpej #endif
107 1.1 thorpej
108 1.1 thorpej #if defined(HP340) || defined(HP345) || defined(HP360) || defined(HP370) || \
109 1.1 thorpej defined(HP375) || defined(HP400)
110 1.1 thorpej #define M68030
111 1.1 thorpej #endif
112 1.1 thorpej
113 1.1 thorpej #if defined(HP380) || defined(HP425) || defined(HP433)
114 1.1 thorpej #define M68040
115 1.1 thorpej #endif
116 1.1 thorpej
117 1.1 thorpej /*
118 1.1 thorpej * MMU configuration.
119 1.1 thorpej */
120 1.1 thorpej #if defined(HP320) || defined(HP350)
121 1.1 thorpej #define M68K_MMU_HP
122 1.1 thorpej #endif
123 1.1 thorpej
124 1.1 thorpej #if defined(HP330) || defined(M68030) || defined(M68040)
125 1.1 thorpej #define M68K_MMU_MOTOROLA
126 1.1 thorpej #endif
127 1.1 thorpej
128 1.1 thorpej /*
129 1.1 thorpej * Cache configuration.
130 1.1 thorpej */
131 1.1 thorpej #if defined(M68K_MMU_HP)
132 1.1 thorpej #define CACHE_HAVE_VAC
133 1.1 thorpej #endif
134 1.1 thorpej
135 1.1 thorpej #if defined(HP345) || defined(HP360) || defined(HP370) || \
136 1.1 thorpej defined(HP375) || defined(HP400)
137 1.1 thorpej #define CACHE_HAVE_PAC
138 1.1 thorpej #endif
139 1.1 thorpej
140 1.1 thorpej #endif /* _KERNEL */
141 1.1 thorpej
142 1.1 thorpej #endif /* _HP300_HP300SPU_H_ */
143