Commit | Line | Data |
---|---|---|
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 | * | |
90dc7048 | 6 | * @(#)cpu.h 6.8 (Berkeley) %G% |
da7c5cc6 | 7 | */ |
f5a2f2dd | 8 | |
adae96fc | 9 | #ifndef LOCORE |
f5a2f2dd BJ |
10 | /* |
11 | * Cpu identification, from SID register. | |
12 | */ | |
13 | union 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; | |
90dc7048 BK |
43 | struct cpu630 { |
44 | u_int :24, /* reserved */ | |
45 | cp_type:8; /* VAX_630 */ | |
46 | } cpu630; | |
f5a2f2dd | 47 | }; |
adae96fc | 48 | #endif |
0fe372b3 MK |
49 | /* |
50 | * Vax CPU types. | |
51 | * Similar types are grouped with their earliest example. | |
52 | */ | |
f5a2f2dd BJ |
53 | #define VAX_780 1 |
54 | #define VAX_750 2 | |
10f66600 | 55 | #define VAX_730 3 |
6692a5c8 | 56 | #define VAX_8600 4 |
90dc7048 | 57 | #define VAX_630 8 |
f5a2f2dd | 58 | |
90dc7048 | 59 | #define VAX_MAX 8 |
f5a2f2dd | 60 | |
0fe372b3 MK |
61 | /* |
62 | * Main IO backplane types. | |
63 | * This gives us a handle on how to do autoconfiguration. | |
64 | */ | |
65 | #define IO_SBI780 1 | |
66 | #define IO_CMI750 2 | |
67 | #define IO_XXX730 3 | |
68 | #define IO_ABUS 4 | |
90dc7048 | 69 | #define IO_QBUS 5 |
0fe372b3 | 70 | |
adae96fc | 71 | #ifndef LOCORE |
f5a2f2dd BJ |
72 | /* |
73 | * Per-cpu information for system. | |
74 | */ | |
75 | struct percpu { | |
f201ad4d | 76 | short pc_cputype; /* cpu type code */ |
3327052b | 77 | short pc_cpuspeed; /* relative speed of cpu */ |
0fe372b3 MK |
78 | short pc_nioa; /* number of IO adaptors/nexus blocks */ |
79 | struct iobus *pc_io; /* descriptions of IO adaptors */ | |
80 | }; | |
81 | ||
82 | struct iobus { | |
121c4a08 | 83 | int io_type; /* io adaptor types */ |
0fe372b3 MK |
84 | caddr_t io_addr; /* phys address of IO adaptor */ |
85 | int io_size; /* size of an IO space */ | |
0fe372b3 | 86 | caddr_t io_details; /* specific to adaptor types */ |
6692a5c8 JB |
87 | }; |
88 | ||
0fe372b3 MK |
89 | /* |
90 | * Description of a main bus that maps "nexi", ala the 780 SBI. | |
91 | */ | |
92 | struct nexusconnect { | |
6692a5c8 JB |
93 | short psb_nnexus; /* number of nexus slots */ |
94 | struct nexus *psb_nexbase; /* base of nexus space */ | |
f201ad4d BJ |
95 | /* we should be able to have just one address for the unibus memories */ |
96 | /* and calculate successive addresses by adding to the base, but the 750 */ | |
97 | /* doesn't obey the sensible rule: uba1 has a lower address than uba0! */ | |
6692a5c8 JB |
98 | caddr_t *psb_umaddr; /* unibus memory addresses */ |
99 | short psb_nubabdp; /* number of bdp's per uba */ | |
100 | short psb_haveubasr; /* have uba status register */ | |
f201ad4d BJ |
101 | /* the 750 has some slots which don't promise to tell you their types */ |
102 | /* if this pointer is non-zero, then you get the type from this array */ | |
103 | /* rather than from the (much more sensible) low byte of the config register */ | |
6692a5c8 | 104 | short *psb_nextype; /* botch */ |
f5a2f2dd BJ |
105 | }; |
106 | ||
107 | #ifdef KERNEL | |
108 | int cpu; | |
f201ad4d | 109 | struct percpu percpu[]; |
f5a2f2dd | 110 | #endif |
adae96fc | 111 | #endif |