xref: /csrg-svn/sys/vax/include/cpu.h (revision 24174)
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*24174Sbloom  *	@(#)cpu.h	6.4 (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;
19*24174Sbloom 	struct cpu8600 {
20*24174Sbloom 		u_int	cp_sno:12,		/* serial number */
21*24174Sbloom 			cp_plant:4,		/* plant number */
22*24174Sbloom 			cp_eco:8,		/* eco level */
23*24174Sbloom 			cp_type:8;		/* VAX_8600 */
24*24174Sbloom 	} cpu8600;
252550Swnj 	struct cpu780 {
262550Swnj 		u_int	cp_sno:12,		/* serial number */
272550Swnj 			cp_plant:3,		/* plant number */
282550Swnj 			cp_eco:9,		/* eco level */
292550Swnj 			cp_type:8;		/* VAX_780 */
302550Swnj 	} cpu780;
312550Swnj 	struct cpu750 {
322550Swnj 		u_int	cp_hrev:8,		/* hardware rev level */
332550Swnj 			cp_urev:8,		/* ucode rev level */
342550Swnj 			:8,
352550Swnj 			cp_type:8;		/* VAX_750 */
362550Swnj 	} cpu750;
3724173Sbloom 	struct cpu730 {
3824173Sbloom 		u_int	:8,			/* reserved */
3924173Sbloom 			cp_urev:8,		/* ucode rev level */
4024173Sbloom 			:8,			/* reserved */
4124173Sbloom 			cp_type:8;		/* VAX_730 */
4224173Sbloom 	} cpu730;
432550Swnj };
442712Swnj #endif
452550Swnj #define	VAX_780		1
462550Swnj #define	VAX_750		2
476943Ssam #define	VAX_730		3
48*24174Sbloom #define VAX_8600	4
492550Swnj 
50*24174Sbloom #define	VAX_MAX		4
512550Swnj 
522712Swnj #ifndef LOCORE
532550Swnj /*
542550Swnj  * Per-cpu information for system.
552550Swnj  */
562550Swnj struct	percpu {
573245Swnj 	short	pc_cputype;		/* cpu type code */
58*24174Sbloom 	short	pc_nioa;		/* number of IO adaptors/SBI's */
59*24174Sbloom 	caddr_t	*pc_ioaaddr;		/* phys addresses of IO adaptors */
60*24174Sbloom 	int	pc_ioasize;		/* size of a IO adaptor */
61*24174Sbloom 	short	*pc_ioatype;		/* io adaptor types if no cfg reg */
62*24174Sbloom };
63*24174Sbloom 
64*24174Sbloom struct persbi {
65*24174Sbloom 	short	psb_nnexus;		/* number of nexus slots */
66*24174Sbloom 	struct	nexus *psb_nexbase;	/* base of nexus space */
673245Swnj /* we should be able to have just one address for the unibus memories */
683245Swnj /* and calculate successive addresses by adding to the base, but the 750 */
693245Swnj /* doesn't obey the sensible rule: uba1 has a lower address than uba0! */
70*24174Sbloom 	caddr_t	*psb_umaddr;		/* unibus memory addresses */
71*24174Sbloom 	short	psb_nubabdp;		/* number of bdp's per uba */
72*24174Sbloom 	short	psb_haveubasr;		/* have uba status register */
733245Swnj /* the 750 has some slots which don't promise to tell you their types */
743245Swnj /* if this pointer is non-zero, then you get the type from this array */
753245Swnj /* rather than from the (much more sensible) low byte of the config register */
76*24174Sbloom 	short	*psb_nextype;		/* botch */
772550Swnj };
782550Swnj 
792550Swnj #ifdef KERNEL
802550Swnj int	cpu;
813245Swnj struct	percpu percpu[];
82*24174Sbloom #if VAX730
83*24174Sbloom struct persbi xxx730;
842550Swnj #endif
85*24174Sbloom #if VAX750
86*24174Sbloom struct persbi cmi750;
872712Swnj #endif
88*24174Sbloom #if VAX780
89*24174Sbloom struct persbi sbi780;
90*24174Sbloom #endif
91*24174Sbloom #if VAX8600
92*24174Sbloom struct persbi sbi8600[];
93*24174Sbloom #endif
94*24174Sbloom #endif
95*24174Sbloom #endif
96