xref: /netbsd/sys/arch/newsmips/newsmips/machid.h (revision c4a72b64)
1 /*	$NetBSD: machid.h,v 1.4 2002/05/31 21:50:18 thorpej Exp $	*/
2 /*
3  * Copyright (c) 1992, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. All advertising materials mentioning features or use of this software
18  *    must display the following acknowledgement:
19  *	This product includes software developed by the University of
20  *	California, Berkeley and its contributors.
21  * 4. Neither the name of the University nor the names of its contributors
22  *    may be used to endorse or promote products derived from this software
23  *    without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35  * SUCH DAMAGE.
36  *
37  * from: $Hdr: machid.h,v 4.300 91/06/09 06:35:19 root Rel41 $ SONY
38  *
39  *	@(#)machid.h	8.1 (Berkeley) 6/11/93
40  */
41 
42 #ifndef __MACHID__
43 #define __MACHID__ 1
44 
45 /*
46  * machine id number definition.
47  */
48 #define	ICK001	1
49 #define	ICK00X	2
50 #define	NWS799	3
51 #define	NWS800	4
52 #define	NWS801	5
53 #define	NWS802	6
54 #define	NWS711	7
55 #define	NWS721	8
56 #define	NWS1850	9
57 #define	NWS810	10
58 #define	NWS811	11
59 #define	NWS1830	12
60 #define	NWS1750	13
61 #define	NWS1720	14
62 #define	NWS1930	15
63 #define	NWS1960	16
64 #define	NWS712	17
65 #define	NWS1860	18
66 #define	PWS1630	19
67 #define	NWS820	20
68 #define	NWS821	21
69 #define	NWS1760	22
70 #define	NWS1710	23
71 #define	NWS830	30
72 #define	NWS831	31
73 #define	NWS841	41
74 #define	PWS1570	52
75 #define	PWS1590	54
76 #define	NWS1520	56
77 #define	PWS1550	73
78 #define	PWS1520	74
79 #define	PWS1560	75
80 #define	NWS1530	76
81 #define	NWS1580	77
82 #define	NWS1510	78
83 #define	NWS1410	81
84 #define	NWS1450	85
85 #define	NWS1460	86
86 #define	NWS891	91
87 #define	NWS911	111
88 #define	NWS921	121
89 #define	NWB235	235
90 #define	NWB235A	236
91 #define	NWXRES	255
92 
93 #ifdef __mips__
94 #define	MACHID_MODEL(X)		(((X)>>18)&0x1f)
95 #define	MACHID_SERIAL(X)	((X)&0x3ffff)
96 #else /* __mips__ */
97 #define	MACHID_MODEL(X)		(((X)>>16)&0xff)
98 #define	MACHID_SERIAL(X)	((X)&0xffff)
99 #endif /* __mips__ */
100 
101 #ifndef LOCORE
102 
103 /*
104  * MPU board id number definition.
105  */
106 #define MPU0 0				/* not used */
107 #define MPU1 1				/* ICKI */
108 #define MPU2 2				/* 799/801/810/811/820/821 */
109 #define MPU3 3				/* 802/830/841/911/921 */
110 #define MPU4 4				/* 711 */
111 #define MPU5 5				/* 1830/1850/1860/1930/1960 */
112 #define MPU6 6				/* 712/721 */
113 #define MPU7 7				/* 14XX/15XX */
114 #define MPU8 8				/* 16XX/17XX */
115 #define MPU9 9				/*  */
116 
117 struct machid {
118 /*00*/	u_short	m_pwb;			/* MPU board number */
119 /*02*/	u_short	m_model;		/* MPU dependent model code */
120 /*04*/	u_int	m_serial;		/* machine serial number */
121 /*08*/	u_int	m_reserve0;
122 /*0c*/	u_int	m_reserve1;
123 /*10*/
124 };
125 
126 union omachid {
127 /*00*/	struct om_field {
128 		u_int	fi_reserve:2,
129 			fi_pwb:7,	/* MPU (printed wired) board number */
130 			fi_model:5,	/* MPU dependent model code */
131 			fi_serial:18;	/* machine serial number */
132 	} om_fi;
133 /*00*/	u_int	om_data;
134 /*04*/
135 };
136 
137 struct machine_type {
138 /*00*/	int	m_model_id;
139 /*04*/	char	*m_model_name;
140 /*08*/	char	*m_machine_name;
141 /*0c*/	char	*m_maincpu;
142 /*10*/	char	*m_subcpu;
143 /*14*/	char	*m_fpa;
144 /*18*/	int	m_board_id;
145 /*1c*/	int	m_cachecntl;
146 /*20*/	int	m_maxusers;		/* not used */
147 /*24*/	int	m_dcachesize;		/* not used */
148 /*28*/	int	m_icachesize;		/* not used */
149 /*2c*/
150 };
151 
152 #if defined(news700) || defined(news800) || defined(news1700) || defined(news1800)
153 struct idrom {
154 /*00*/	unsigned char	id_model;
155 /*01*/	unsigned char	id_serial[2];
156 /*03*/	unsigned char	id_lot;
157 /*04*/	unsigned char	id_reserved[2];
158 /*06*/	unsigned char	id_chksum0[2];
159 /*08*/	unsigned char	id_ether[6];
160 /*0e*/	unsigned char	id_chksum1[2];
161 /*10*/
162 };
163 #endif /* news700 || news800 || news1700 || news1800 */
164 
165 #if defined(news1200) || defined(news3400) || defined(news3800) || defined(news5000)
166 struct idrom {
167 /*00*/	unsigned char	id_id;          	/* always 0xff */
168 /*01*/	unsigned char	id_netid[5];    	/* network ID */
169 /*06*/	unsigned short	id_csum1;       	/* checksum 1 */
170 /*08*/	unsigned char	id_macadrs[6];  	/* MAC (ethernet) address */
171 /*0e*/	unsigned short	id_csum2;       	/* checksum 2 */
172 /*10*/	unsigned short	id_boardid;     	/* CPU board ID */
173 /*12*/	unsigned short	id_modelid;     	/* model ID */
174 /*14*/	unsigned int	id_serial;      	/* serial number */
175 /*18*/	unsigned short	id_year;
176 /*1a*/	unsigned short	id_month;
177 /*1c*/	unsigned char	id_zone[4];
178 /*20*/	char		id_board[16];
179 /*30*/	char		id_model[16];
180 /*40*/	char		id_machine[16];
181 /*50*/	char		id_cpu[16];
182 /*60*/	char		id_iop[16];
183 /*70*/	unsigned char	id_reserved[12];
184 /*7c*/	unsigned int	id_csum3;
185 /*80*/
186 };
187 #endif /* news1200 || news3400 || news3800 */
188 
189 #endif /* !LOCORE */
190 
191 #endif /* __MACHID__ */
192