xref: /csrg-svn/sys/vax/include/cpu.h (revision 3245)
1*3245Swnj /*	cpu.h	4.4	81/03/13	*/
22550Swnj 
32712Swnj #ifndef LOCORE
42550Swnj /*
52550Swnj  * Cpu identification, from SID register.
62550Swnj  */
72550Swnj union cpusid {
82550Swnj 	int	cpusid;
92550Swnj 	struct cpuany {
102550Swnj 		u_int	:24,
112550Swnj 			cp_type:8;
122550Swnj 	} cpuany;
132550Swnj 	struct cpu780 {
142550Swnj 		u_int	cp_sno:12,		/* serial number */
152550Swnj 			cp_plant:3,		/* plant number */
162550Swnj 			cp_eco:9,		/* eco level */
172550Swnj 			cp_type:8;		/* VAX_780 */
182550Swnj 	} cpu780;
192550Swnj 	struct cpu750 {
202550Swnj 		u_int	cp_hrev:8,		/* hardware rev level */
212550Swnj 			cp_urev:8,		/* ucode rev level */
222550Swnj 			:8,
232550Swnj 			cp_type:8;		/* VAX_750 */
242550Swnj 	} cpu750;
252550Swnj };
262712Swnj #endif
272550Swnj #define	VAX_780		1
282550Swnj #define	VAX_750		2
292550Swnj 
302550Swnj #define	VAX_MAX		2
312550Swnj 
322712Swnj #ifndef LOCORE
332550Swnj /*
342550Swnj  * Per-cpu information for system.
352550Swnj  */
362550Swnj struct	percpu {
37*3245Swnj 	short	pc_cputype;		/* cpu type code */
38*3245Swnj 	short	pc_nnexus;		/* number of nexus slots */
39*3245Swnj 	struct	nexus *pc_nexbase;	/* base of nexus space */
40*3245Swnj /* we should be able to have just one address for the unibus memories */
41*3245Swnj /* and calculate successive addresses by adding to the base, but the 750 */
42*3245Swnj /* doesn't obey the sensible rule: uba1 has a lower address than uba0! */
43*3245Swnj 	caddr_t	*pc_umaddr;		/* unibus memory addresses */
44*3245Swnj 	short	pc_nubabdp;		/* number of bdp's per uba */
45*3245Swnj 	short	pc_haveubasr;		/* have uba status register */
46*3245Swnj /* the 750 has some slots which don't promise to tell you their types */
47*3245Swnj /* if this pointer is non-zero, then you get the type from this array */
48*3245Swnj /* rather than from the (much more sensible) low byte of the config register */
49*3245Swnj 	short	*pc_nextype;		/* botch */
502550Swnj };
512550Swnj 
522550Swnj #ifdef KERNEL
532550Swnj int	cpu;
54*3245Swnj struct	percpu percpu[];
552550Swnj #endif
562712Swnj #endif
57