1 /*- 2 * Copyright (c) 1982, 1986, 1988 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)cpudata.c 7.7 (Berkeley) 05/09/91 8 */ 9 10 #include "../include/pte.h" 11 12 #include "sys/param.h" 13 14 #include "../include/cpu.h" 15 #include "nexus.h" 16 #include "ioa.h" 17 #include "../bi/bireg.h" 18 #include "../uba/ubareg.h" 19 20 /* 21 * Initialization of per-cpu data structures. 22 */ 23 24 /* 25 * These are the (fixed) physical addresses of the 26 * unibus memory for each of the possible unibus adapters. 27 * Note that on some machines the unibus memory addresses 28 * are actually indexed by the unibus adapter type code. 29 */ 30 #if VAX8600 31 caddr_t umaddr8600a[4] = { 32 (caddr_t) UMEMA8600(0), (caddr_t) UMEMA8600(1), 33 (caddr_t) UMEMA8600(2), (caddr_t) UMEMA8600(3), 34 }; 35 caddr_t umaddr8600b[4] = { 36 (caddr_t) UMEMB8600(0), (caddr_t) UMEMB8600(1), 37 (caddr_t) UMEMB8600(2), (caddr_t) UMEMB8600(3), 38 }; 39 #endif 40 #if VAX780 41 caddr_t umaddr780[4] = { 42 (caddr_t) UMEM780(0), (caddr_t) UMEM780(1), 43 (caddr_t) UMEM780(2), (caddr_t) UMEM780(3) 44 }; 45 #endif 46 #if VAX750 47 caddr_t umaddr750[2] = { 48 (caddr_t) UMEM750(0), (caddr_t) UMEM750(1), 49 }; 50 #endif 51 #if VAX730 52 caddr_t umaddr730[1] = { 53 (caddr_t) UMEM730 54 }; 55 #endif 56 57 /* 58 * Information to patch around the stupidity of configuration 59 * registers not returning types on some of the processors. 60 */ 61 #if VAX750 62 short nexty750[NNEX750] = { 63 NEX_MEM16, NEX_MEM16, NEX_MEM16, NEX_MEM16, 64 NEX_MBA, NEX_MBA, NEX_MBA, NEX_MBA, 65 NEX_UBA0, NEX_UBA1, NEX_ANY, NEX_ANY, 66 NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY 67 }; 68 #endif 69 #if VAX730 70 short nexty730[NNEX730] = { 71 NEX_MEM16, NEX_ANY, NEX_ANY, NEX_ANY, 72 NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY, 73 }; 74 #endif 75 76 #if VAX8800 77 /* I think this is how the thing is shaped: */ 78 struct bibus bi8800[] = { 79 { BI_BASE(0) }, 80 { BI_BASE(1) }, 81 }; 82 struct iobus io8800 = { 83 { IO_BIA, somewhere, somesize, (caddr_t)&bi8800[0] }, 84 { IO_BIA, somewhere, somesize, (caddr_t)&bi8800[1] }, 85 }; 86 /* but you will have to make it work yourself (sorry) */ 87 #endif 88 89 #if VAX8600 90 struct nexusconnect sbi8600[] = { 91 { NNEX8600, NEXA8600, DW780, NBDP8600, umaddr8600a, 0 }, 92 { NNEX8600, NEXB8600, DW780, NBDP8600, umaddr8600b, 0 }, 93 }; 94 struct iobus io8600[] = { 95 { IO_ABUS, IOA8600(0), IOAMAPSIZ, (caddr_t)&sbi8600[0] }, 96 { IO_ABUS, IOA8600(1), IOAMAPSIZ, (caddr_t)&sbi8600[1] }, 97 }; 98 #endif 99 100 #if VAX8200 101 /* BEWARE, this is all limited to one BI for now */ 102 struct bibus bi8200[] = { 103 { BI_BASE(0) }, 104 }; 105 struct iobus io8200[] = { 106 { IO_BI, 0, 0, (caddr_t)&bi8200[0] }, 107 }; 108 #endif 109 110 #if VAX780 111 struct nexusconnect sbi780 = { 112 NNEX780, NEX780, DW780, NBDP780, umaddr780, 0, 113 }; 114 struct iobus io780[] = { IO_SBI780, 0, 0, (caddr_t)&sbi780 }; 115 #endif 116 117 #if VAX750 118 struct nexusconnect cmi750 = { 119 NNEX750, NEX750, DW750, NBDP750, umaddr750, nexty750, 120 }; 121 struct iobus io750[] = { IO_CMI750, 0, 0, (caddr_t)&cmi750 }; 122 #endif 123 124 #if VAX730 125 struct nexusconnect xxx730 = { 126 NNEX730, NEX730, DW730, NBDP730, umaddr730, nexty730, 127 }; 128 struct iobus io730[] = { IO_XXX730, 0, 0, (caddr_t)&xxx730 }; 129 #endif 130 #if VAX630 || VAX650 131 struct qbus qbus630 = { 132 QBA, QBAPAGES, QBAMAP630, (caddr_t)QMEM630, (caddr_t)QIOPAGE630 133 }; 134 struct iobus io630[] = { IO_QBUS, 0, 0, (caddr_t)&qbus630 }; 135 #endif 136 137 /* 138 * Clock info 139 */ 140 #if VAX8600 || VAX780 || VAX750 || VAX730 141 int vaxstd_clkstartrt(), vaxstd_clkread(), vaxstd_clkwrite(); 142 struct clockops vaxstd_clockops = { 143 vaxstd_clkstartrt, vaxstd_clkread, vaxstd_clkwrite 144 }; 145 #endif 146 147 #if VAX8200 148 int vaxstd_clkstartrt(), ka820_clkread(), ka820_clkwrite(); 149 struct clockops ka820_clockops = { 150 vaxstd_clkstartrt, ka820_clkread, ka820_clkwrite 151 }; 152 #endif 153 154 #if VAX630 155 int ka630_clkstartrt(), ka630_clkread(), ka630_clkwrite(); 156 struct clockops ka630_clockops = { 157 ka630_clkstartrt, ka630_clkread, ka630_clkwrite 158 }; 159 #endif 160 161 #if VAX650 162 int ka650_clkstartrt(), vaxstd_clkread(), vaxstd_clkwrite(); 163 struct clockops ka650_clockops = { 164 ka650_clkstartrt, vaxstd_clkread, vaxstd_clkwrite 165 }; 166 #endif 167 168 /* 169 * CPU dependent routines. 170 */ 171 #if VAX8600 172 int ka860_memenable(), ka860_memerr(), ka860_mchk(); 173 struct cpuops ka860_ops = { 174 &vaxstd_clockops, ka860_memenable, ka860_memerr, ka860_mchk, NULL 175 }; 176 #endif 177 178 #if VAX8200 179 int ka820_memenable(), ka820_memerr(), ka820_mchk(), ka820_init(); 180 struct cpuops ka820_ops = { 181 &ka820_clockops, ka820_memenable, ka820_memerr, ka820_mchk, ka820_init 182 }; 183 #endif 184 185 #if VAX780 186 int ka780_memenable(), ka780_memerr(), ka780_mchk(); 187 struct cpuops ka780_ops = { 188 &vaxstd_clockops, ka780_memenable, ka780_memerr, ka780_mchk, NULL 189 }; 190 #endif 191 192 #if VAX750 193 int ka750_memenable(), ka750_memerr(), ka750_mchk(); 194 struct cpuops ka750_ops = { 195 &vaxstd_clockops, ka750_memenable, ka750_memerr, ka750_mchk, NULL 196 }; 197 #endif 198 199 #if VAX730 200 int ka730_memenable(), ka730_memerr(), ka730_mchk(); 201 struct cpuops ka730_ops = { 202 &vaxstd_clockops, ka730_memenable, ka730_memerr, ka730_mchk, NULL 203 }; 204 #endif 205 206 #if VAX630 207 int ka630_memnop(), ka630_mchk(), ka630_init(); 208 struct cpuops ka630_ops = { 209 &ka630_clockops, ka630_memnop, ka630_memnop, ka630_mchk, ka630_init 210 }; 211 #endif 212 213 #if VAX650 214 int ka650_memnop(), ka650_memerr(), ka650_mchk(), ka650_init(); 215 struct cpuops ka650_ops = { 216 &ka650_clockops, ka650_memnop, ka650_memerr, ka650_mchk, ka650_init 217 }; 218 #endif 219 220 struct percpu percpu[] = { 221 #if VAX8600 222 { VAX_8600, 6, 2, io8600, &ka860_ops }, 223 #endif 224 #if VAX8200 225 { VAX_8200, 2, 1, io8200, &ka820_ops }, 226 #endif 227 #if VAX780 228 { VAX_780, 2, 1, io780, &ka780_ops }, 229 #endif 230 #if VAX750 231 { VAX_750, 1, 1, io750, &ka750_ops }, 232 #endif 233 #if VAX730 234 { VAX_730, 1, 1, io730, &ka730_ops }, 235 #endif 236 #if VAX630 237 { VAX_630, 2, 1, io630, &ka630_ops }, 238 #endif 239 #if VAX650 240 { VAX_650, 4, 1, io630, &ka650_ops }, 241 #endif 242 0, 243 }; 244