lint
[unix-history] / usr / src / sys / vax / include / cpu.h
CommitLineData
da7c5cc6
KM
1/*
2 * Copyright (c) 1982 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 *
3327052b 6 * @(#)cpu.h 6.5 (Berkeley) %G%
da7c5cc6 7 */
f5a2f2dd 8
adae96fc 9#ifndef LOCORE
f5a2f2dd
BJ
10/*
11 * Cpu identification, from SID register.
12 */
13union cpusid {
14 int cpusid;
15 struct cpuany {
16 u_int :24,
17 cp_type:8;
18 } cpuany;
6692a5c8
JB
19 struct cpu8600 {
20 u_int cp_sno:12, /* serial number */
21 cp_plant:4, /* plant number */
22 cp_eco:8, /* eco level */
23 cp_type:8; /* VAX_8600 */
24 } cpu8600;
f5a2f2dd
BJ
25 struct cpu780 {
26 u_int cp_sno:12, /* serial number */
27 cp_plant:3, /* plant number */
28 cp_eco:9, /* eco level */
29 cp_type:8; /* VAX_780 */
30 } cpu780;
31 struct cpu750 {
32 u_int cp_hrev:8, /* hardware rev level */
33 cp_urev:8, /* ucode rev level */
34 :8,
35 cp_type:8; /* VAX_750 */
36 } cpu750;
ed63b43a
JB
37 struct cpu730 {
38 u_int :8, /* reserved */
39 cp_urev:8, /* ucode rev level */
40 :8, /* reserved */
41 cp_type:8; /* VAX_730 */
42 } cpu730;
f5a2f2dd 43};
adae96fc 44#endif
f5a2f2dd
BJ
45#define VAX_780 1
46#define VAX_750 2
10f66600 47#define VAX_730 3
6692a5c8 48#define VAX_8600 4
f5a2f2dd 49
6692a5c8 50#define VAX_MAX 4
f5a2f2dd 51
adae96fc 52#ifndef LOCORE
f5a2f2dd
BJ
53/*
54 * Per-cpu information for system.
55 */
56struct percpu {
f201ad4d 57 short pc_cputype; /* cpu type code */
3327052b 58 short pc_cpuspeed; /* relative speed of cpu */
6692a5c8
JB
59 short pc_nioa; /* number of IO adaptors/SBI's */
60 caddr_t *pc_ioaaddr; /* phys addresses of IO adaptors */
3327052b 61 int pc_ioasize; /* size of an IO adaptor */
6692a5c8
JB
62 short *pc_ioatype; /* io adaptor types if no cfg reg */
63};
64
65struct persbi {
66 short psb_nnexus; /* number of nexus slots */
67 struct nexus *psb_nexbase; /* base of nexus space */
f201ad4d
BJ
68/* we should be able to have just one address for the unibus memories */
69/* and calculate successive addresses by adding to the base, but the 750 */
70/* doesn't obey the sensible rule: uba1 has a lower address than uba0! */
6692a5c8
JB
71 caddr_t *psb_umaddr; /* unibus memory addresses */
72 short psb_nubabdp; /* number of bdp's per uba */
73 short psb_haveubasr; /* have uba status register */
f201ad4d
BJ
74/* the 750 has some slots which don't promise to tell you their types */
75/* if this pointer is non-zero, then you get the type from this array */
76/* rather than from the (much more sensible) low byte of the config register */
6692a5c8 77 short *psb_nextype; /* botch */
f5a2f2dd
BJ
78};
79
80#ifdef KERNEL
81int cpu;
f201ad4d 82struct percpu percpu[];
6692a5c8
JB
83#if VAX730
84struct persbi xxx730;
85#endif
86#if VAX750
87struct persbi cmi750;
88#endif
89#if VAX780
90struct persbi sbi780;
91#endif
92#if VAX8600
93struct persbi sbi8600[];
94#endif
f5a2f2dd 95#endif
adae96fc 96#endif