xref: /csrg-svn/sys/vax/include/cpu.h (revision 24173)
123258Smckusick /*
223258Smckusick  * Copyright (c) 1982 Regents of the University of California.
323258Smckusick  * All rights reserved.  The Berkeley software License Agreement
423258Smckusick  * specifies the terms and conditions for redistribution.
523258Smckusick  *
6*24173Sbloom  *	@(#)cpu.h	6.3 (Berkeley) 08/05/85
723258Smckusick  */
82550Swnj 
92712Swnj #ifndef LOCORE
102550Swnj /*
112550Swnj  * Cpu identification, from SID register.
122550Swnj  */
132550Swnj union cpusid {
142550Swnj 	int	cpusid;
152550Swnj 	struct cpuany {
162550Swnj 		u_int	:24,
172550Swnj 			cp_type:8;
182550Swnj 	} cpuany;
192550Swnj 	struct cpu780 {
202550Swnj 		u_int	cp_sno:12,		/* serial number */
212550Swnj 			cp_plant:3,		/* plant number */
222550Swnj 			cp_eco:9,		/* eco level */
232550Swnj 			cp_type:8;		/* VAX_780 */
242550Swnj 	} cpu780;
252550Swnj 	struct cpu750 {
262550Swnj 		u_int	cp_hrev:8,		/* hardware rev level */
272550Swnj 			cp_urev:8,		/* ucode rev level */
282550Swnj 			:8,
292550Swnj 			cp_type:8;		/* VAX_750 */
302550Swnj 	} cpu750;
31*24173Sbloom 	struct cpu730 {
32*24173Sbloom 		u_int	:8,			/* reserved */
33*24173Sbloom 			cp_urev:8,		/* ucode rev level */
34*24173Sbloom 			:8,			/* reserved */
35*24173Sbloom 			cp_type:8;		/* VAX_730 */
36*24173Sbloom 	} cpu730;
372550Swnj };
382712Swnj #endif
392550Swnj #define	VAX_780		1
402550Swnj #define	VAX_750		2
416943Ssam #define	VAX_730		3
422550Swnj 
433340Swnj #define	VAX_MAX		3
442550Swnj 
452712Swnj #ifndef LOCORE
462550Swnj /*
472550Swnj  * Per-cpu information for system.
482550Swnj  */
492550Swnj struct	percpu {
503245Swnj 	short	pc_cputype;		/* cpu type code */
513245Swnj 	short	pc_nnexus;		/* number of nexus slots */
523245Swnj 	struct	nexus *pc_nexbase;	/* base of nexus space */
533245Swnj /* we should be able to have just one address for the unibus memories */
543245Swnj /* and calculate successive addresses by adding to the base, but the 750 */
553245Swnj /* doesn't obey the sensible rule: uba1 has a lower address than uba0! */
563245Swnj 	caddr_t	*pc_umaddr;		/* unibus memory addresses */
573245Swnj 	short	pc_nubabdp;		/* number of bdp's per uba */
583245Swnj 	short	pc_haveubasr;		/* have uba status register */
593245Swnj /* the 750 has some slots which don't promise to tell you their types */
603245Swnj /* if this pointer is non-zero, then you get the type from this array */
613245Swnj /* rather than from the (much more sensible) low byte of the config register */
623245Swnj 	short	*pc_nextype;		/* botch */
632550Swnj };
642550Swnj 
652550Swnj #ifdef KERNEL
662550Swnj int	cpu;
673245Swnj struct	percpu percpu[];
682550Swnj #endif
692712Swnj #endif
70