|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1982, 1986, 1988 Regents of the University of California. ! 3: * All rights reserved. The Berkeley software License Agreement ! 4: * specifies the terms and conditions for redistribution. ! 5: * ! 6: * @(#)cpu.h 7.6 (Berkeley) 8/27/88 ! 7: */ ! 8: ! 9: #ifndef LOCORE ! 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; ! 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; ! 25: struct cpu8200 { ! 26: u_int cp_urev:8, /* ucode rev */ ! 27: cp_secp:1, /* secondary patch? */ ! 28: cp_patch:10, /* patch number */ ! 29: cp_hrev:4, /* hardware rev */ ! 30: cp_5:1, /* true iff KA825 */ ! 31: cp_type:8; /* VAX_8200 */ ! 32: } cpu8200; ! 33: struct cpu780 { ! 34: u_int cp_sno:12, /* serial number */ ! 35: cp_plant:3, /* plant number */ ! 36: cp_eco:8, /* eco level */ ! 37: cp_5:1, /* true iff 785 */ ! 38: cp_type:8; /* VAX_780 */ ! 39: } cpu780; ! 40: struct cpu750 { ! 41: u_int cp_hrev:8, /* hardware rev level */ ! 42: cp_urev:8, /* ucode rev level */ ! 43: :8, ! 44: cp_type:8; /* VAX_750 */ ! 45: } cpu750; ! 46: struct cpu730 { ! 47: u_int :8, /* reserved */ ! 48: cp_urev:8, /* ucode rev level */ ! 49: :8, /* reserved */ ! 50: cp_type:8; /* VAX_730 */ ! 51: } cpu730; ! 52: struct cpu630 { ! 53: u_int cp_hrev:8, /* hardware rev level */ ! 54: cp_urev:8, /* ucode rev level */ ! 55: :8, ! 56: cp_type:8; /* VAX_630 */ ! 57: } cpu630; ! 58: struct cpu650 { ! 59: u_int cp_urev:8, /* ucode rev level */ ! 60: :16, /* reserved */ ! 61: cp_type:8; /* VAX_650 */ ! 62: } cpu650; ! 63: }; ! 64: #endif ! 65: /* ! 66: * Vax CPU types. ! 67: * Similar types are grouped with their earliest example. ! 68: */ ! 69: #define VAX_780 1 ! 70: #define VAX_750 2 ! 71: #define VAX_730 3 ! 72: #define VAX_8600 4 ! 73: #define VAX_8200 5 ! 74: #define VAX_8800 6 ! 75: #define VAX_8500 6 /* same as 8800, 8700 */ ! 76: #define VAX_610 7 /* uVAX I */ ! 77: #define VAX_630 8 /* uVAX II */ ! 78: #define VAX_650 10 /* uVAX 3000 */ ! 79: ! 80: #define VAX_MAX 10 ! 81: ! 82: /* ! 83: * Main IO backplane types. ! 84: * This gives us a handle on how to do autoconfiguration. ! 85: */ ! 86: #define IO_SBI780 1 ! 87: #define IO_CMI750 2 ! 88: #define IO_XXX730 3 ! 89: #define IO_ABUS 4 ! 90: #define IO_QBUS 5 ! 91: #define IO_BI 6 ! 92: #define IO_NMI 7 ! 93: ! 94: #ifndef LOCORE ! 95: /* ! 96: * CPU-dependent operations. ! 97: */ ! 98: struct clockops { ! 99: int (*clkstartrt)(); /* start real time clock */ ! 100: int (*clkread)(); /* set system time from clock */ ! 101: int (*clkwrite)(); /* reset clock from system time */ ! 102: }; ! 103: ! 104: struct cpuops { ! 105: struct clockops *cpu_clock; /* clock operations */ ! 106: int (*cpu_memenable)(); /* memory error (CRD intr) enable */ ! 107: int (*cpu_memerr)(); /* memory error handler */ ! 108: int (*cpu_mchk)(); /* machine check handler */ ! 109: int (*cpu_init)(); /* special initialisation, if any */ ! 110: }; ! 111: ! 112: /* return values from cpu_mchk */ ! 113: #define MCHK_PANIC -1 ! 114: #define MCHK_RECOVERED 0 ! 115: ! 116: /* ! 117: * Per-cpu information for system. ! 118: */ ! 119: struct percpu { ! 120: short pc_cputype; /* cpu type code */ ! 121: short pc_cpuspeed; /* relative speed of cpu */ ! 122: short pc_nioa; /* number of IO adaptors/nexus blocks */ ! 123: struct iobus *pc_io; /* descriptions of IO adaptors */ ! 124: struct cpuops *pc_ops; /* per-cpu operations */ ! 125: }; ! 126: ! 127: /* ! 128: * Generic description of an I/O "adaptor" ! 129: * (any top-level I/O bus visible to software ! 130: * and requiring autoconfiguration). ! 131: * The remainder of the description ! 132: * is pointed to by io_details. ! 133: */ ! 134: struct iobus { ! 135: int io_type; /* io adaptor types */ ! 136: caddr_t io_addr; /* phys address of IO adaptor */ ! 137: int io_size; /* size of an IO space */ ! 138: caddr_t io_details; /* specific to adaptor types */ ! 139: }; ! 140: ! 141: /* ! 142: * Description of a main bus that maps "nexi", ala the 780 SBI. ! 143: */ ! 144: struct nexusconnect { ! 145: short psb_nnexus; /* number of nexus slots */ ! 146: struct nexus *psb_nexbase; /* base of nexus space */ ! 147: short psb_ubatype; /* type of "unibus adaptor" */ ! 148: short psb_nubabdp; /* number of bdp's per uba */ ! 149: caddr_t *psb_umaddr; /* unibus memory addresses */ ! 150: /* the 750 has some slots which don't promise to tell you their types */ ! 151: /* if this pointer is non-zero, then you get the type from this array */ ! 152: /* rather than from the (much more sensible) low byte of the config register */ ! 153: short *psb_nextype; /* botch */ ! 154: }; ! 155: ! 156: /* ! 157: * Description of a BI bus configuration. ! 158: */ ! 159: struct bibus { ! 160: struct bi_node *pbi_base; /* base of node space */ ! 161: /* that cannot possibly be all! */ ! 162: }; ! 163: ! 164: /* ! 165: * Description of a Q-bus configuration. ! 166: */ ! 167: struct qbus { ! 168: int qb_type; /* type of "unibus adaptor" */ ! 169: int qb_memsize; /* size of (used) memory, pages */ ! 170: struct pte *qb_map; /* base of map registers */ ! 171: caddr_t qb_maddr; /* "unibus" memory address */ ! 172: caddr_t qb_iopage; /* "unibus" IO page address */ ! 173: }; ! 174: ! 175: #ifdef KERNEL ! 176: int cpu; ! 177: #if VAX8800 || VAX8200 ! 178: int mastercpu; /* if multiple cpus, this identifies master */ ! 179: #endif ! 180: struct percpu percpu[]; ! 181: struct cpuops *cpuops; ! 182: #endif ! 183: ! 184: /* ! 185: * Enable realtime clock (always enabled). ! 186: */ ! 187: #define enablertclock() ! 188: #endif /* LOCORE */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.