1 1.45 thorpej /* $NetBSD: rpb.h,v 1.45 2024/03/31 19:11:21 thorpej Exp $ */ 2 1.1 cgd 3 1.1 cgd /* 4 1.10 cgd * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. 5 1.1 cgd * All rights reserved. 6 1.1 cgd * 7 1.1 cgd * Author: Keith Bostic, Chris G. Demetriou 8 1.42 matt * 9 1.1 cgd * Permission to use, copy, modify and distribute this software and 10 1.1 cgd * its documentation is hereby granted, provided that both the copyright 11 1.1 cgd * notice and this permission notice appear in all copies of the 12 1.1 cgd * software, derivative works or modified versions, and any portions 13 1.1 cgd * thereof, and that both notices appear in supporting documentation. 14 1.42 matt * 15 1.42 matt * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 16 1.42 matt * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 17 1.1 cgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 18 1.42 matt * 19 1.1 cgd * Carnegie Mellon requests users of this software to return to 20 1.1 cgd * 21 1.1 cgd * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU 22 1.1 cgd * School of Computer Science 23 1.1 cgd * Carnegie Mellon University 24 1.1 cgd * Pittsburgh PA 15213-3890 25 1.1 cgd * 26 1.1 cgd * any improvements or extensions that they make and grant Carnegie the 27 1.1 cgd * rights to redistribute these changes. 28 1.1 cgd */ 29 1.1 cgd 30 1.1 cgd /* 31 1.2 cgd * From DEC 3000 300/400/500/600/700/800/900 System Programmer's Manual, 32 1.2 cgd * EK-D3SYS-PM.B01. 33 1.1 cgd */ 34 1.1 cgd 35 1.1 cgd /* 36 1.1 cgd * HWRPB (Hardware Restart Parameter Block). 37 1.1 cgd */ 38 1.1 cgd #define HWRPB_ADDR 0x10000000 /* virtual address, at boot */ 39 1.1 cgd 40 1.1 cgd #ifndef ASSEMBLER 41 1.1 cgd struct rpb { 42 1.42 matt uint64_t rpb_phys; /* 0: HWRPB phys. address. */ 43 1.1 cgd char rpb_magic[8]; /* 8: "HWRPB" (in ASCII) */ 44 1.42 matt uint64_t rpb_version; /* 10 */ 45 1.42 matt uint64_t rpb_size; /* 18: HWRPB size in bytes */ 46 1.42 matt uint64_t rpb_primary_cpu_id; /* 20 */ 47 1.42 matt uint64_t rpb_page_size; /* 28: (8192) */ 48 1.42 matt uint32_t rpb_phys_addr_size; /* 30: physical address size */ 49 1.42 matt uint32_t rpb_extended_va_size; /* 34: extended VA size (4L) */ 50 1.42 matt uint64_t rpb_max_asn; /* 38: (16) */ 51 1.1 cgd char rpb_ssn[16]; /* 40: only first 10 valid */ 52 1.1 cgd 53 1.2 cgd #define ST_ADU 1 /* Alpha Demo. Unit (?) */ 54 1.29 drochner #define ST_DEC_4000 2 /* "Cobra" */ 55 1.29 drochner #define ST_DEC_7000 3 /* "Ruby" */ 56 1.2 cgd #define ST_DEC_3000_500 4 /* "Flamingo" family (TC) */ 57 1.2 cgd #define ST_DEC_2000_300 6 /* "Jensen" (EISA/ISA) */ 58 1.2 cgd #define ST_DEC_3000_300 7 /* "Pelican" (TC) */ 59 1.15 ross #define ST_AVALON_A12 8 /* XXX Avalon Multicomputer */ 60 1.29 drochner #define ST_DEC_2100_A500 9 /* "Sable" */ 61 1.29 drochner #define ST_DEC_APXVME_64 10 /* "AXPvme" (VME) */ 62 1.8 cgd #define ST_DEC_AXPPCI_33 11 /* "NoName" (PCI/ISA) */ 63 1.20 mjacob #define ST_DEC_21000 12 /* "TurboLaser" (PCI/EISA) */ 64 1.2 cgd #define ST_DEC_2100_A50 13 /* "Avanti" (PCI/ISA) */ 65 1.29 drochner #define ST_DEC_MUSTANG 14 /* "Mustang" */ 66 1.6 cgd #define ST_DEC_KN20AA 15 /* kn20aa (PCI/EISA) */ 67 1.25 ross #define ST_DEC_1000 17 /* "Mikasa" (PCI/EISA) */ 68 1.8 cgd #define ST_EB66 19 /* EB66 (PCI/ISA?) */ 69 1.8 cgd #define ST_EB64P 20 /* EB64+ (PCI/ISA?) */ 70 1.29 drochner #define ST_ALPHABOOK1 21 /* Alphabook1 */ 71 1.20 mjacob #define ST_DEC_4100 22 /* "Rawhide" (PCI/EISA) */ 72 1.29 drochner #define ST_DEC_EV45_PBP 23 /* "Lego" K2 Passive SBC */ 73 1.29 drochner #define ST_DEC_2100A_A500 24 /* "Lynx" */ 74 1.43 thorpej #define ST_DEC_XL 25 /* Alpha XL */ 75 1.8 cgd #define ST_EB164 26 /* EB164 (PCI/ISA) */ 76 1.24 ross #define ST_DEC_1000A 27 /* "Noritake" (PCI/EISA)*/ 77 1.29 drochner #define ST_DEC_ALPHAVME_224 28 /* "Cortex" */ 78 1.21 thorpej #define ST_DEC_550 30 /* "Miata" (PCI/ISA) */ 79 1.43 thorpej #define ST_DEC_XXM 31 /* XXM */ 80 1.29 drochner #define ST_DEC_EV56_PBP 32 /* "Takara" */ 81 1.29 drochner #define ST_DEC_ALPHAVME_320 33 /* "Yukon" (VME) */ 82 1.32 ross #define ST_DEC_6600 34 /* EV6-Tsunami based systems */ 83 1.34 thorpej #define ST_DEC_WILDFIRE 35 /* "Wildfire" */ 84 1.34 thorpej #define ST_DEC_CUSCO 36 /* "CUSCO" */ 85 1.34 thorpej #define ST_DEC_EIGER 37 /* "Eiger" */ 86 1.39 thorpej #define ST_DEC_TITAN 38 /* "Titan" */ 87 1.43 thorpej #define ST_DEC_MARVEL 39 /* "Marvel" */ 88 1.43 thorpej 89 1.43 thorpej /* DTI systypes */ 90 1.43 thorpej #define ST_DTI_RUFFIAN 101 /* EV56-Pyxis + ARC? */ 91 1.34 thorpej 92 1.34 thorpej /* Alpha Processor, Inc. systypes */ 93 1.34 thorpej #define ST_API_NAUTILUS 201 /* EV6-AMD 751 UP1000 */ 94 1.2 cgd 95 1.42 matt uint64_t rpb_type; /* 50: */ 96 1.1 cgd 97 1.2 cgd #define SV_MPCAP 0x00000001 /* multiprocessor capable */ 98 1.2 cgd 99 1.2 cgd #define SV_CONSOLE 0x0000001e /* console hardware mask */ 100 1.2 cgd #define SV_CONSOLE_DETACHED 0x00000002 101 1.2 cgd #define SV_CONSOLE_EMBEDDED 0x00000004 102 1.2 cgd 103 1.2 cgd #define SV_POWERFAIL 0x000000e0 /* powerfail mask */ 104 1.2 cgd #define SV_PF_UNITED 0x00000020 105 1.2 cgd #define SV_PF_SEPARATE 0x00000040 106 1.2 cgd #define SV_PF_BBACKUP 0x00000060 107 1.2 cgd #define SV_PF_ACTION 0x00000100 /* powerfail restart */ 108 1.2 cgd 109 1.2 cgd #define SV_GRAPHICS 0x00000200 /* graphic engine present */ 110 1.2 cgd 111 1.2 cgd #define SV_ST_MASK 0x0000fc00 /* system type mask */ 112 1.2 cgd #define SV_ST_RESERVED 0x00000000 /* RESERVED */ 113 1.2 cgd 114 1.5 cgd /* 115 1.5 cgd * System types for the DEC 3000/500 (Flamingo) Family 116 1.5 cgd */ 117 1.2 cgd #define SV_ST_SANDPIPER 0x00000400 /* Sandpiper; 3000/400 */ 118 1.2 cgd #define SV_ST_FLAMINGO 0x00000800 /* Flamingo; 3000/500 */ 119 1.2 cgd #define SV_ST_HOTPINK 0x00000c00 /* "Hot Pink"; 3000/500X */ 120 1.2 cgd #define SV_ST_FLAMINGOPLUS 0x00001000 /* Flamingo+; 3000/800 */ 121 1.2 cgd #define SV_ST_ULTRA 0x00001400 /* "Ultra", aka Flamingo+ */ 122 1.2 cgd #define SV_ST_SANDPLUS 0x00001800 /* Sandpiper+; 3000/600 */ 123 1.2 cgd #define SV_ST_SANDPIPER45 0x00001c00 /* Sandpiper45; 3000/700 */ 124 1.2 cgd #define SV_ST_FLAMINGO45 0x00002000 /* Flamingo45; 3000/900 */ 125 1.2 cgd 126 1.5 cgd /* 127 1.5 cgd * System types for ??? 128 1.5 cgd */ 129 1.2 cgd #define SV_ST_SABLE 0x00000400 /* Sable (???) */ 130 1.2 cgd 131 1.5 cgd /* 132 1.5 cgd * System types for the DEC 3000/300 (Pelican) Family 133 1.5 cgd */ 134 1.2 cgd #define SV_ST_PELICAN 0x00000000 /* Pelican; 3000/300 */ 135 1.3 cgd #define SV_ST_PELICA 0x00000400 /* Pelica; 3000/300L */ 136 1.3 cgd #define SV_ST_PELICANPLUS 0x00000800 /* Pelican+; 3000/300X */ 137 1.3 cgd #define SV_ST_PELICAPLUS 0x00000c00 /* Pelica+; 3000/300LX */ 138 1.1 cgd 139 1.5 cgd /* 140 1.5 cgd * System types for the AlphaStation Family 141 1.5 cgd */ 142 1.5 cgd #define SV_ST_AVANTI 0x00000000 /* Avanti; 400 4/233 */ 143 1.5 cgd #define SV_ST_MUSTANG2_4_166 0x00000800 /* Mustang II; 200 4/166 */ 144 1.5 cgd #define SV_ST_MUSTANG2_4_233 0x00001000 /* Mustang II; 200 4/233 */ 145 1.5 cgd #define SV_ST_AVANTI_XXX 0x00001400 /* also Avanti; 400 4/233 */ 146 1.13 mjacob #define SV_ST_AVANTI_4_266 0x00002000 147 1.5 cgd #define SV_ST_MUSTANG2_4_100 0x00002400 /* Mustang II; 200 4/100 */ 148 1.13 mjacob #define SV_ST_AVANTI_4_233 0x0000a800 /* AlphaStation 255/233 */ 149 1.22 thorpej 150 1.22 thorpej #define SV_ST_KN20AA 0x00000400 /* AlphaStation 500/600 */ 151 1.22 thorpej 152 1.22 thorpej /* 153 1.22 thorpej * System types for the AXPvme Family 154 1.22 thorpej */ 155 1.22 thorpej #define SV_ST_AXPVME_64 0x00000000 /* 21068, 64MHz */ 156 1.22 thorpej #define SV_ST_AXPVME_160 0x00000400 /* 21066, 160MHz */ 157 1.22 thorpej #define SV_ST_AXPVME_100 0x00000c00 /* 21066A, 99MHz */ 158 1.22 thorpej #define SV_ST_AXPVME_230 0x00001000 /* 21066A, 231MHz */ 159 1.22 thorpej #define SV_ST_AXPVME_66 0x00001400 /* 21066A, 66MHz */ 160 1.22 thorpej #define SV_ST_AXPVME_166 0x00001800 /* 21066A, 165MHz */ 161 1.22 thorpej #define SV_ST_AXPVME_264 0x00001c00 /* 21066A, 264MHz */ 162 1.22 thorpej 163 1.22 thorpej /* 164 1.22 thorpej * System types for the EB164 Family 165 1.22 thorpej */ 166 1.22 thorpej #define SV_ST_EB164_266 0x00000400 /* EB164, 266MHz */ 167 1.22 thorpej #define SV_ST_EB164_300 0x00000800 /* EB164, 300MHz */ 168 1.22 thorpej #define SV_ST_ALPHAPC164_366 0x00000c00 /* AlphaPC164, 366MHz */ 169 1.22 thorpej #define SV_ST_ALPHAPC164_400 0x00001000 /* AlphaPC164, 400MHz */ 170 1.22 thorpej #define SV_ST_ALPHAPC164_433 0x00001400 /* AlphaPC164, 433MHz */ 171 1.22 thorpej #define SV_ST_ALPHAPC164_466 0x00001800 /* AlphaPC164, 466MHz */ 172 1.22 thorpej #define SV_ST_ALPHAPC164_500 0x00001c00 /* AlphaPC164, 500MHz */ 173 1.22 thorpej #define SV_ST_ALPHAPC164LX_400 0x00002000 /* AlphaPC164LX, 400MHz */ 174 1.22 thorpej #define SV_ST_ALPHAPC164LX_466 0x00002400 /* AlphaPC164LX, 466MHz */ 175 1.22 thorpej #define SV_ST_ALPHAPC164LX_533 0x00002800 /* AlphaPC164LX, 533MHz */ 176 1.22 thorpej #define SV_ST_ALPHAPC164LX_600 0x00002c00 /* AlphaPC164LX, 600MHz */ 177 1.22 thorpej #define SV_ST_ALPHAPC164SX_400 0x00003000 /* AlphaPC164SX, 400MHz */ 178 1.22 thorpej #define SV_ST_ALPHAPC164SX_466 0x00003400 /* AlphaPC164SX, 433MHz */ 179 1.22 thorpej #define SV_ST_ALPHAPC164SX_533 0x00003800 /* AlphaPC164SX, 533MHz */ 180 1.22 thorpej #define SV_ST_ALPHAPC164SX_600 0x00003c00 /* AlphaPC164SX, 600MHz */ 181 1.23 thorpej 182 1.23 thorpej /* 183 1.23 thorpej * System types for the Digital Personal Workstation (Miata) Family 184 1.23 thorpej * XXX These are not very complete! 185 1.23 thorpej */ 186 1.23 thorpej #define SV_ST_MIATA_1_5 0x00004c00 /* Miata 1.5 */ 187 1.5 cgd 188 1.45 thorpej /* 189 1.45 thorpej * System types for the Tsunami family. 190 1.45 thorpej * XXX These are not very complete! 191 1.45 thorpej */ 192 1.45 thorpej #define SV_ST_DP264 0x00000400 /* AlphaPC DP264 */ 193 1.45 thorpej #define SV_ST_WARHOL 0x00000800 194 1.45 thorpej #define SV_ST_WINDJAMMER 0x00000c00 195 1.45 thorpej #define SV_ST_MONET 0x00001000 196 1.45 thorpej #define SV_ST_CLIPPER 0x00001400 /* AlphaServer ES40 */ 197 1.45 thorpej #define SV_ST_GOLDRUSH 0x00001800 /* AlphaServer DS20 */ 198 1.45 thorpej #define SV_ST_WEBBRICK 0x00001c00 /* AlphaServer DS10 */ 199 1.45 thorpej #define SV_ST_CATAMARAN 0x00002000 200 1.45 thorpej #define SV_ST_BRISBANE 0x00002400 201 1.45 thorpej #define SV_ST_MALBOURNE 0x00002800 202 1.45 thorpej #define SV_ST_FLYINGCLIPPER 0x00002c00 203 1.45 thorpej #define SV_ST_SHARK 0x00003000 /* AlphaServer DS20L */ 204 1.45 thorpej 205 1.42 matt uint64_t rpb_variation; /* 58 */ 206 1.1 cgd 207 1.1 cgd char rpb_revision[8]; /* 60; only first 4 valid */ 208 1.42 matt uint64_t rpb_intr_freq; /* 68; scaled by 4096 */ 209 1.42 matt uint64_t rpb_cc_freq; /* 70: cycle cntr frequency */ 210 1.44 thorpej u_long rpb_vptb; /* 78: virtual page tbl base */ 211 1.42 matt uint64_t rpb_reserved_arch; /* 80: */ 212 1.26 thorpej u_long rpb_tbhint_off; /* 88: */ 213 1.42 matt uint64_t rpb_pcs_cnt; /* 90: */ 214 1.42 matt uint64_t rpb_pcs_size; /* 98; pcs size in bytes */ 215 1.42 matt u_long rpb_pcs_off; /* A0: offset to pcs info */ 216 1.42 matt uint64_t rpb_ctb_cnt; /* A8: console terminal */ 217 1.42 matt uint64_t rpb_ctb_size; /* B0: ctb size in bytes */ 218 1.26 thorpej u_long rpb_ctb_off; /* B8: offset to ctb */ 219 1.26 thorpej u_long rpb_crb_off; /* C0: offset to crb */ 220 1.26 thorpej u_long rpb_memdat_off; /* C8: memory data offset */ 221 1.26 thorpej u_long rpb_condat_off; /* D0: config data offset */ 222 1.26 thorpej u_long rpb_fru_off; /* D8: FRU table offset */ 223 1.42 matt uint64_t rpb_save_term; /* E0: terminal save */ 224 1.42 matt uint64_t rpb_save_term_val; /* E8: */ 225 1.42 matt uint64_t rpb_rest_term; /* F0: terminal restore */ 226 1.42 matt uint64_t rpb_rest_term_val; /* F8: */ 227 1.42 matt uint64_t rpb_restart; /* 100: restart */ 228 1.42 matt uint64_t rpb_restart_val; /* 108: */ 229 1.42 matt uint64_t rpb_reserve_os; /* 110: */ 230 1.42 matt uint64_t rpb_reserve_hw; /* 118: */ 231 1.42 matt uint64_t rpb_checksum; /* 120: HWRPB checksum */ 232 1.42 matt uint64_t rpb_rxrdy; /* 128: receive ready */ 233 1.42 matt uint64_t rpb_txrdy; /* 130: transmit ready */ 234 1.26 thorpej u_long rpb_dsrdb_off; /* 138: HWRPB + DSRDB offset */ 235 1.42 matt uint64_t rpb_tbhint[8]; /* 149: TB hint block */ 236 1.1 cgd }; 237 1.1 cgd 238 1.24 ross #define LOCATE_PCS(h,cpunumber) ((struct pcs *) \ 239 1.24 ross ((char *)(h) + (h)->rpb_pcs_off + ((cpunumber) * (h)->rpb_pcs_size))) 240 1.24 ross 241 1.1 cgd /* 242 1.1 cgd * PCS: Per-CPU information. 243 1.1 cgd */ 244 1.1 cgd struct pcs { 245 1.42 matt uint8_t pcs_hwpcb[128]; /* 0: PAL dependent */ 246 1.1 cgd 247 1.1 cgd #define PCS_BIP 0x000001 /* boot in progress */ 248 1.5 cgd #define PCS_RC 0x000002 /* restart possible */ 249 1.1 cgd #define PCS_PA 0x000004 /* processor available */ 250 1.1 cgd #define PCS_PP 0x000008 /* processor present */ 251 1.1 cgd #define PCS_OH 0x000010 /* user halted */ 252 1.1 cgd #define PCS_CV 0x000020 /* context valid */ 253 1.1 cgd #define PCS_PV 0x000040 /* PALcode valid */ 254 1.1 cgd #define PCS_PMV 0x000080 /* PALcode memory valid */ 255 1.1 cgd #define PCS_PL 0x000100 /* PALcode loaded */ 256 1.1 cgd 257 1.1 cgd #define PCS_HALT_REQ 0xff0000 /* halt request mask */ 258 1.1 cgd #define PCS_HALT_DEFAULT 0x000000 259 1.1 cgd #define PCS_HALT_SAVE_EXIT 0x010000 260 1.1 cgd #define PCS_HALT_COLD_BOOT 0x020000 261 1.1 cgd #define PCS_HALT_WARM_BOOT 0x030000 262 1.1 cgd #define PCS_HALT_STAY_HALTED 0x040000 263 1.1 cgd #define PCS_mbz 0xffffffffff000000 /* 24:63 -- must be zero */ 264 1.42 matt uint64_t pcs_flags; /* 80: */ 265 1.1 cgd 266 1.42 matt uint64_t pcs_pal_memsize; /* 88: PAL memory size */ 267 1.42 matt uint64_t pcs_pal_scrsize; /* 90: PAL scratch size */ 268 1.26 thorpej u_long pcs_pal_memaddr; /* 98: PAL memory addr */ 269 1.26 thorpej u_long pcs_pal_scraddr; /* A0: PAL scratch addr */ 270 1.1 cgd struct { 271 1.42 matt uint64_t 272 1.15 ross minorrev : 8, /* alphabetic char 'a' - 'z' */ 273 1.15 ross majorrev : 8, /* alphabetic char 'a' - 'z' */ 274 1.1 cgd #define PAL_TYPE_STANDARD 0 275 1.2 cgd #define PAL_TYPE_VMS 1 276 1.2 cgd #define PAL_TYPE_OSF1 2 277 1.15 ross pal_type : 8, /* PALcode type: 278 1.1 cgd * 0 == standard 279 1.2 cgd * 1 == OpenVMS 280 1.2 cgd * 2 == OSF/1 281 1.2 cgd * 3-127 DIGITAL reserv. 282 1.1 cgd * 128-255 non-DIGITAL reserv. 283 1.1 cgd */ 284 1.15 ross sbz1 : 8, 285 1.15 ross compatibility : 16, /* Compatibility revision */ 286 1.15 ross proc_cnt : 16; /* Processor count */ 287 1.1 cgd } pcs_pal_rev; /* A8: */ 288 1.41 simonb #define pcs_minorrev pcs_pal_rev.minorrev 289 1.41 simonb #define pcs_majorrev pcs_pal_rev.majorrev 290 1.41 simonb #define pcs_pal_type pcs_pal_rev.pal_type 291 1.41 simonb #define pcs_compatibility pcs_pal_rev.compatibility 292 1.41 simonb #define pcs_proc_cnt pcs_pal_rev.proc_cnt 293 1.1 cgd 294 1.42 matt uint64_t pcs_proc_type; /* B0: processor type */ 295 1.2 cgd 296 1.2 cgd #define PCS_PROC_EV3 1 /* EV3 */ 297 1.2 cgd #define PCS_PROC_EV4 2 /* EV4: 21064 */ 298 1.11 cgd #define PCS_PROC_SIMULATION 3 /* Simulation */ 299 1.2 cgd #define PCS_PROC_LCA4 4 /* LCA4: 2106[68] */ 300 1.5 cgd #define PCS_PROC_EV5 5 /* EV5: 21164 */ 301 1.11 cgd #define PCS_PROC_EV45 6 /* EV45: 21064A */ 302 1.11 cgd #define PCS_PROC_EV56 7 /* EV56: 21164A */ 303 1.11 cgd #define PCS_PROC_EV6 8 /* EV6: 21264 */ 304 1.35 thorpej #define PCS_PROC_PCA56 9 /* PCA56: 21164PC */ 305 1.35 thorpej #define PCS_PROC_PCA57 10 /* PCA57: 21164?? */ 306 1.35 thorpej #define PCS_PROC_EV67 11 /* EV67: 21246A */ 307 1.41 simonb #define PCS_PROC_EV68CB 12 /* EV68CB: 21264C */ 308 1.41 simonb #define PCS_PROC_EV68AL 13 /* EV68AL: 21264B */ 309 1.41 simonb #define PCS_PROC_EV68CX 14 /* EV68CX: 21264D */ 310 1.43 thorpej #define PCS_PROC_EV7 15 /* EV7: 21364 */ 311 1.43 thorpej #define PCS_PROC_EV79 16 /* EV79: 21364?? */ 312 1.43 thorpej #define PCS_PROC_EV69 17 /* EV69: 21264/EV69A */ 313 1.2 cgd 314 1.24 ross #define PCS_CPU_MAJORTYPE(p) ((p)->pcs_proc_type & 0xffffffff) 315 1.24 ross #define PCS_CPU_MINORTYPE(p) ((p)->pcs_proc_type >> 32) 316 1.11 cgd 317 1.11 cgd /* Minor number interpretation is processor specific. See cpu.c. */ 318 1.2 cgd 319 1.42 matt uint64_t pcs_proc_var; /* B8: processor variation. */ 320 1.2 cgd 321 1.2 cgd #define PCS_VAR_VAXFP 0x0000000000000001 /* VAX FP support */ 322 1.2 cgd #define PCS_VAR_IEEEFP 0x0000000000000002 /* IEEE FP support */ 323 1.7 cgd #define PCS_VAR_PE 0x0000000000000004 /* Primary Eligible */ 324 1.5 cgd #define PCS_VAR_RESERVED 0xfffffffffffffff8 /* Reserved */ 325 1.1 cgd 326 1.1 cgd char pcs_proc_revision[8]; /* C0: only first 4 valid */ 327 1.1 cgd char pcs_proc_sn[16]; /* C8: only first 10 valid */ 328 1.26 thorpej u_long pcs_machcheck; /* D8: mach chk phys addr. */ 329 1.42 matt uint64_t pcs_machcheck_len; /* E0: length in bytes */ 330 1.26 thorpej u_long pcs_halt_pcbb; /* E8: phys addr of halt PCB */ 331 1.26 thorpej u_long pcs_halt_pc; /* F0: halt PC */ 332 1.42 matt uint64_t pcs_halt_ps; /* F8: halt PS */ 333 1.42 matt uint64_t pcs_halt_r25; /* 100: halt argument list */ 334 1.42 matt uint64_t pcs_halt_r26; /* 108: halt return addr list */ 335 1.42 matt uint64_t pcs_halt_r27; /* 110: halt procedure value */ 336 1.1 cgd 337 1.1 cgd #define PCS_HALT_RESERVED 0 338 1.1 cgd #define PCS_HALT_POWERUP 1 339 1.1 cgd #define PCS_HALT_CONSOLE_HALT 2 340 1.1 cgd #define PCS_HALT_CONSOLE_CRASH 3 341 1.1 cgd #define PCS_HALT_KERNEL_MODE 4 342 1.1 cgd #define PCS_HALT_KERNEL_STACK_INVALID 5 343 1.1 cgd #define PCS_HALT_DOUBLE_ERROR_ABORT 6 344 1.1 cgd #define PCS_HALT_SCBB 7 345 1.1 cgd #define PCS_HALT_PTBR 8 /* 9-FF: reserved */ 346 1.42 matt uint64_t pcs_halt_reason; /* 118: */ 347 1.1 cgd 348 1.42 matt uint64_t pcs_reserved_soft; /* 120: preserved software */ 349 1.27 thorpej 350 1.27 thorpej struct { /* 128: inter-console buffers */ 351 1.27 thorpej u_int iccb_rxlen; 352 1.27 thorpej u_int iccb_txlen; 353 1.27 thorpej char iccb_rxbuf[80]; 354 1.27 thorpej char iccb_txbuf[80]; 355 1.27 thorpej } pcs_iccb; 356 1.1 cgd 357 1.1 cgd #define PALvar_reserved 0 358 1.1 cgd #define PALvar_OpenVMS 1 359 1.1 cgd #define PALvar_OSF1 2 360 1.42 matt uint64_t pcs_palrevisions[16]; /* 1D0: PALcode revisions */ 361 1.1 cgd 362 1.42 matt uint64_t pcs_reserved_arch[6]; /* 250: reserved arch */ 363 1.1 cgd }; 364 1.1 cgd 365 1.1 cgd /* 366 1.1 cgd * CTB: Console Terminal Block 367 1.1 cgd */ 368 1.1 cgd struct ctb { 369 1.42 matt uint64_t ctb_type; /* 0: CTB type */ 370 1.42 matt uint64_t ctb_unit; /* 8: */ 371 1.42 matt uint64_t ctb_reserved; /* 16: */ 372 1.42 matt uint64_t ctb_len; /* 24: bytes of info */ 373 1.42 matt uint64_t ctb_ipl; /* 32: console ipl level */ 374 1.26 thorpej u_long ctb_tintr_vec; /* 40: transmit vec (0x800) */ 375 1.26 thorpej u_long ctb_rintr_vec; /* 48: receive vec (0x800) */ 376 1.1 cgd 377 1.37 thorpej #define CTB_NONE 0x00 /* no console present */ 378 1.37 thorpej #define CTB_SERVICE 0x01 /* service processor */ 379 1.37 thorpej #define CTB_PRINTERPORT 0x02 /* printer port on the SCC */ 380 1.37 thorpej #define CTB_GRAPHICS 0x03 /* graphics device */ 381 1.37 thorpej #define CTB_TYPE4 0x04 /* type 4 CTB */ 382 1.37 thorpej #define CTB_NETWORK 0xC0 /* network device */ 383 1.42 matt uint64_t ctb_term_type; /* 56: terminal type */ 384 1.1 cgd 385 1.42 matt uint64_t ctb_keybd_type; /* 64: keyboard nationality */ 386 1.26 thorpej u_long ctb_keybd_trans; /* 72: trans. table addr */ 387 1.26 thorpej u_long ctb_keybd_map; /* 80: map table addr */ 388 1.42 matt uint64_t ctb_keybd_state; /* 88: keyboard flags */ 389 1.42 matt uint64_t ctb_keybd_last; /* 96: last key entered */ 390 1.26 thorpej u_long ctb_font_us; /* 104: US font table addr */ 391 1.26 thorpej u_long ctb_font_mcs; /* 112: MCS font table addr */ 392 1.42 matt uint64_t ctb_font_width; /* 120: font width, height */ 393 1.42 matt uint64_t ctb_font_height; /* 128: in pixels */ 394 1.42 matt uint64_t ctb_mon_width; /* 136: monitor width, height */ 395 1.42 matt uint64_t ctb_mon_height; /* 144: in pixels */ 396 1.42 matt uint64_t ctb_dpi; /* 152: monitor dots per inch */ 397 1.42 matt uint64_t ctb_planes; /* 160: # of planes */ 398 1.42 matt uint64_t ctb_cur_width; /* 168: cursor width, height */ 399 1.42 matt uint64_t ctb_cur_height; /* 176: in pixels */ 400 1.42 matt uint64_t ctb_head_cnt; /* 184: # of heads */ 401 1.42 matt uint64_t ctb_opwindow; /* 192: opwindow on screen */ 402 1.26 thorpej u_long ctb_head_offset; /* 200: offset to head info */ 403 1.26 thorpej u_long ctb_putchar; /* 208: output char to TURBO */ 404 1.42 matt uint64_t ctb_io_state; /* 216: I/O flags */ 405 1.42 matt uint64_t ctb_listen_state; /* 224: listener flags */ 406 1.26 thorpej u_long ctb_xaddr; /* 232: extended info addr */ 407 1.42 matt uint64_t ctb_turboslot; /* 248: TURBOchannel slot # */ 408 1.42 matt uint64_t ctb_server_off; /* 256: offset to server info */ 409 1.42 matt uint64_t ctb_line_off; /* 264: line parameter offset */ 410 1.42 matt uint8_t ctb_csd; /* 272: console specific data */ 411 1.1 cgd }; 412 1.37 thorpej 413 1.37 thorpej struct ctb_tt { 414 1.42 matt uint64_t ctb_type; /* 0: CTB type */ 415 1.42 matt uint64_t ctb_unit; /* 8: console unit */ 416 1.42 matt uint64_t ctb_reserved; /* 16: reserved */ 417 1.42 matt uint64_t ctb_length; /* 24: length */ 418 1.42 matt uint64_t ctb_csr; /* 32: address */ 419 1.42 matt uint64_t ctb_tivec; /* 40: Tx intr vector */ 420 1.42 matt uint64_t ctb_rivec; /* 48: Rx intr vector */ 421 1.42 matt uint64_t ctb_baud; /* 56: baud rate */ 422 1.42 matt uint64_t ctb_put_sts; /* 64: PUTS status */ 423 1.42 matt uint64_t ctb_get_sts; /* 72: GETS status */ 424 1.42 matt uint64_t ctb_reserved0; /* 80: reserved */ 425 1.37 thorpej }; 426 1.30 thorpej 427 1.30 thorpej /* 428 1.30 thorpej * Format of the Console Terminal Block Type 4 `turboslot' field: 429 1.30 thorpej * 430 1.30 thorpej * 63 40 39 32 31 24 23 16 15 8 7 0 431 1.30 thorpej * | reserved | channel | hose | bus type | bus | slot| 432 1.30 thorpej */ 433 1.30 thorpej #define CTB_TURBOSLOT_CHANNEL(x) (((x) >> 32) & 0xff) 434 1.30 thorpej #define CTB_TURBOSLOT_HOSE(x) (((x) >> 24) & 0xff) 435 1.30 thorpej #define CTB_TURBOSLOT_TYPE(x) (((x) >> 16) & 0xff) 436 1.30 thorpej #define CTB_TURBOSLOT_BUS(x) (((x) >> 8) & 0xff) 437 1.30 thorpej #define CTB_TURBOSLOT_SLOT(x) ((x) & 0xff) 438 1.30 thorpej 439 1.31 thorpej #define CTB_TURBOSLOT_TYPE_TC 0 /* TURBOchannel */ 440 1.31 thorpej #define CTB_TURBOSLOT_TYPE_ISA 1 /* ISA */ 441 1.31 thorpej #define CTB_TURBOSLOT_TYPE_EISA 2 /* EISA */ 442 1.31 thorpej #define CTB_TURBOSLOT_TYPE_PCI 3 /* PCI */ 443 1.1 cgd 444 1.42 matt /* 445 1.1 cgd * CRD: Console Routine Descriptor 446 1.1 cgd */ 447 1.1 cgd struct crd { 448 1.9 cgd int64_t descriptor; 449 1.42 matt uint64_t entry_va; 450 1.1 cgd }; 451 1.1 cgd 452 1.1 cgd /* 453 1.1 cgd * CRB: Console Routine Block 454 1.1 cgd */ 455 1.1 cgd struct crb { 456 1.1 cgd struct crd *crb_v_dispatch; /* 0: virtual dispatch addr */ 457 1.26 thorpej u_long crb_p_dispatch; /* 8: phys dispatch addr */ 458 1.1 cgd struct crd *crb_v_fixup; /* 10: virtual fixup addr */ 459 1.26 thorpej u_long crb_p_fixup; /* 18: phys fixup addr */ 460 1.42 matt uint64_t crb_map_cnt; /* 20: phys/virt map entries */ 461 1.42 matt uint64_t crb_page_cnt; /* 28: pages to be mapped */ 462 1.1 cgd }; 463 1.1 cgd 464 1.1 cgd /* 465 1.1 cgd * MDDT: Memory Data Descriptor Table 466 1.1 cgd */ 467 1.1 cgd struct mddt { 468 1.1 cgd int64_t mddt_cksum; /* 0: 7-N checksum */ 469 1.26 thorpej u_long mddt_physaddr; /* 8: bank config addr 470 1.1 cgd * IMPLEMENTATION SPECIFIC 471 1.1 cgd */ 472 1.42 matt uint64_t mddt_cluster_cnt; /* 10: memory cluster count */ 473 1.14 thorpej struct mddt_cluster { 474 1.26 thorpej u_long mddt_pfn; /* 0: starting PFN */ 475 1.42 matt uint64_t mddt_pg_cnt; /* 8: 8KB page count */ 476 1.42 matt uint64_t mddt_pg_test; /* 10: tested page count */ 477 1.26 thorpej u_long mddt_v_bitaddr; /* 18: bitmap virt addr */ 478 1.26 thorpej u_long mddt_p_bitaddr; /* 20: bitmap phys addr */ 479 1.1 cgd int64_t mddt_bit_cksum; /* 28: bitmap checksum */ 480 1.1 cgd 481 1.14 thorpej #define MDDT_NONVOLATILE 0x10 /* cluster is non-volatile */ 482 1.1 cgd #define MDDT_PALCODE 0x01 /* console and PAL only */ 483 1.1 cgd #define MDDT_SYSTEM 0x00 /* system software only */ 484 1.14 thorpej #define MDDT_mbz 0xfffffffffffffffc /* 2:63 -- must be zero */ 485 1.1 cgd int64_t mddt_usage; /* 30: bitmap permissions */ 486 1.1 cgd } mddt_clusters[1]; /* variable length array */ 487 1.1 cgd }; 488 1.17 thorpej 489 1.17 thorpej /* 490 1.17 thorpej * DSR: Dynamic System Recognition. We're interested in the sysname 491 1.17 thorpej * offset. The data pointed to by sysname is: 492 1.17 thorpej * 493 1.17 thorpej * [8 bytes: length of system name][N bytes: system name string] 494 1.17 thorpej * 495 1.17 thorpej * The system name string is NUL-terminated. 496 1.17 thorpej */ 497 1.17 thorpej struct dsrdb { 498 1.17 thorpej int64_t dsr_smm; /* 0: SMM number */ 499 1.42 matt uint64_t dsr_lurt_off; /* 8: LURT table offset */ 500 1.42 matt uint64_t dsr_sysname_off; /* 16: offset to sysname */ 501 1.17 thorpej }; 502 1.17 thorpej 503 1.17 thorpej /* 504 1.17 thorpej * The DSR appeared in version 5 of the HWRPB. 505 1.17 thorpej */ 506 1.17 thorpej #define HWRPB_DSRDB_MINVERS 5 507 1.18 ross 508 1.18 ross #ifdef _KERNEL 509 1.33 simonb extern int cputype; 510 1.28 ross extern struct rpb *hwrpb; 511 1.18 ross #endif 512 1.17 thorpej 513 1.1 cgd #endif /* ASSEMBLER */ 514