xref: /csrg-svn/sys/news3400/news3400/machid.h (revision 63309)
153903Smckusick /*
2*63309Sbostic  * Copyright (c) 1992, 1993
3*63309Sbostic  *	The Regents of the University of California.  All rights reserved.
453903Smckusick  *
553903Smckusick  * This code is derived from software contributed to Berkeley by
653903Smckusick  * Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc.
753903Smckusick  *
853903Smckusick  * %sccs.include.redist.c%
953903Smckusick  *
1053903Smckusick  * from: $Hdr: machid.h,v 4.300 91/06/09 06:35:19 root Rel41 $ SONY
1153903Smckusick  *
12*63309Sbostic  *	@(#)machid.h	8.1 (Berkeley) 06/11/93
1353903Smckusick  */
1453903Smckusick 
1553903Smckusick #ifndef __MACHID__
1653903Smckusick #define __MACHID__ 1
1753903Smckusick 
1853903Smckusick /*
1953903Smckusick  * machine id number definition.
2053903Smckusick  */
2153903Smckusick #define	ICK001	1
2253903Smckusick #define	ICK00X	2
2353903Smckusick #define	NWS799	3
2453903Smckusick #define	NWS800	4
2553903Smckusick #define	NWS801	5
2653903Smckusick #define	NWS802	6
2753903Smckusick #define	NWS711	7
2853903Smckusick #define	NWS721	8
2953903Smckusick #define	NWS1850	9
3053903Smckusick #define	NWS810	10
3153903Smckusick #define	NWS811	11
3253903Smckusick #define	NWS1830	12
3353903Smckusick #define	NWS1750	13
3453903Smckusick #define	NWS1720	14
3553903Smckusick #define	NWS1930	15
3653903Smckusick #define	NWS1960	16
3753903Smckusick #define	NWS712	17
3853903Smckusick #define	NWS1860	18
3953903Smckusick #define	PWS1630	19
4053903Smckusick #define	NWS820	20
4153903Smckusick #define	NWS821	21
4253903Smckusick #define	NWS1760	22
4353903Smckusick #define	NWS1710	23
4453903Smckusick #define	NWS830	30
4553903Smckusick #define	NWS831	31
4653903Smckusick #define	NWS841	41
4753903Smckusick #define	PWS1570	52
4853903Smckusick #define	PWS1590	54
4953903Smckusick #define	NWS1520	56
5053903Smckusick #define	PWS1550	73
5153903Smckusick #define	PWS1520	74
5253903Smckusick #define	PWS1560	75
5353903Smckusick #define	NWS1530	76
5453903Smckusick #define	NWS1580	77
5553903Smckusick #define	NWS1510	78
5653903Smckusick #define	NWS1410	81
5753903Smckusick #define	NWS1450	85
5853903Smckusick #define	NWS1460	86
5953903Smckusick #define	NWS891	91
6053903Smckusick #define	NWS911	111
6153903Smckusick #define	NWS921	121
6253903Smckusick #define	NWB235	235
6353903Smckusick #define	NWB235A	236
6453903Smckusick #define	NWXRES	255
6553903Smckusick 
6653903Smckusick #ifdef mips
6753903Smckusick #define	MACHID_MODEL(X)		(((X)>>18)&0x1f)
6853903Smckusick #define	MACHID_SERIAL(X)	((X)&0x3ffff)
6953903Smckusick #else /* mips */
7053903Smckusick #define	MACHID_MODEL(X)		(((X)>>16)&0xff)
7153903Smckusick #define	MACHID_SERIAL(X)	((X)&0xffff)
7253903Smckusick #endif /* mips */
7353903Smckusick 
7453903Smckusick #ifndef LOCORE
7553903Smckusick 
7653903Smckusick /*
7753903Smckusick  * MPU board id number definition.
7853903Smckusick  */
7953903Smckusick #define MPU0 0				/* not used */
8053903Smckusick #define MPU1 1				/* ICKI */
8153903Smckusick #define MPU2 2				/* 799/801/810/811/820/821 */
8253903Smckusick #define MPU3 3				/* 802/830/841/911/921 */
8353903Smckusick #define MPU4 4				/* 711 */
8453903Smckusick #define MPU5 5				/* 1830/1850/1860/1930/1960 */
8553903Smckusick #define MPU6 6				/* 712/721 */
8653903Smckusick #define MPU7 7				/* 14XX/15XX */
8753903Smckusick #define MPU8 8				/* 16XX/17XX */
8853903Smckusick #define MPU9 9				/*  */
8953903Smckusick 
9053903Smckusick struct machid {
9153903Smckusick /*00*/	u_short	m_pwb;			/* MPU board number */
9253903Smckusick /*02*/	u_short	m_model;		/* MPU dependent model code */
9353903Smckusick /*04*/	u_int	m_serial;		/* machine serial number */
9453903Smckusick /*08*/	u_int	m_reserve0;
9553903Smckusick /*0c*/	u_int	m_reserve1;
9653903Smckusick /*10*/
9753903Smckusick };
9853903Smckusick 
9953903Smckusick union omachid {
10053903Smckusick /*00*/	struct om_field {
10153903Smckusick 		u_int	fi_reserve:2,
10253903Smckusick 			fi_pwb:7,	/* MPU (printed wired) board number */
10353903Smckusick 			fi_model:5,	/* MPU dependent model code */
10453903Smckusick 			fi_serial:18;	/* machine serial number */
10553903Smckusick 	} om_fi;
10653903Smckusick /*00*/	u_int	om_data;
10753903Smckusick /*04*/
10853903Smckusick };
10953903Smckusick 
11053903Smckusick struct machine_type {
11153903Smckusick /*00*/	int	m_model_id;
11253903Smckusick /*04*/	char	*m_model_name;
11353903Smckusick /*08*/	char	*m_machine_name;
11453903Smckusick /*0c*/	char	*m_maincpu;
11553903Smckusick /*10*/	char	*m_subcpu;
11653903Smckusick /*14*/	char	*m_fpa;
11753903Smckusick /*18*/	int	m_board_id;
11853903Smckusick /*1c*/	int	m_cachecntl;
11953903Smckusick /*20*/	int	m_maxusers;		/* not used */
12053903Smckusick /*24*/	int	m_dcachesize;		/* not used */
12153903Smckusick /*28*/	int	m_icachesize;		/* not used */
12253903Smckusick /*2c*/
12353903Smckusick };
12453903Smckusick 
12553903Smckusick #if defined(news700) || defined(news800) || defined(news1700) || defined(news1800)
12653903Smckusick struct idrom {
12753903Smckusick /*00*/	unsigned char	id_model;
12853903Smckusick /*01*/	unsigned char	id_serial[2];
12953903Smckusick /*03*/	unsigned char	id_lot;
13053903Smckusick /*04*/	unsigned char	id_reserved[2];
13153903Smckusick /*06*/	unsigned char	id_chksum0[2];
13253903Smckusick /*08*/	unsigned char	id_ether[6];
13353903Smckusick /*0e*/	unsigned char	id_chksum1[2];
13453903Smckusick /*10*/
13553903Smckusick };
13653903Smckusick #endif /* news700 || news800 || news1700 || news1800 */
13753903Smckusick 
13853903Smckusick #if defined(news1200) || defined(news3400) || defined(news3800)
13953903Smckusick struct idrom {
14053903Smckusick /*00*/	unsigned char	id_id;          	/* always 0xff */
14153903Smckusick /*01*/	unsigned char	id_netid[5];    	/* network ID */
14253903Smckusick /*06*/	unsigned short	id_csum1;       	/* checksum 1 */
14353903Smckusick /*08*/	unsigned char	id_macadrs[6];  	/* MAC (ethernet) address */
14453903Smckusick /*0e*/	unsigned short	id_csum2;       	/* checksum 2 */
14553903Smckusick /*10*/	unsigned short	id_boardid;     	/* CPU board ID */
14653903Smckusick /*12*/	unsigned short	id_modelid;     	/* model ID */
14753903Smckusick /*14*/	unsigned int	id_serial;      	/* serial number */
14853903Smckusick /*18*/	unsigned short	id_year;
14953903Smckusick /*1a*/	unsigned short	id_month;
15053903Smckusick /*1c*/	unsigned char	id_zone[4];
15153903Smckusick /*20*/	char		id_board[16];
15253903Smckusick /*30*/	char		id_model[16];
15353903Smckusick /*40*/	char		id_machine[16];
15453903Smckusick /*50*/	char		id_cpu[16];
15553903Smckusick /*60*/	char		id_iop[16];
15653903Smckusick /*70*/	unsigned char	id_reserved[12];
15753903Smckusick /*7c*/	unsigned int	id_csum3;
15853903Smckusick /*80*/
15953903Smckusick };
16053903Smckusick #endif /* news1200 || news3400 || news3800 */
16153903Smckusick 
16253903Smckusick #endif /* !LOCORE */
16353903Smckusick 
16453903Smckusick #endif /* __MACHID__ */
165