1 /* 2 * Copyright (c) 1982, 1986 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.2 (Berkeley) 08/09/86 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 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; 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; 43 struct cpu630 { 44 u_int :24, /* reserved */ 45 cp_type:8; /* VAX_630 */ 46 } cpu630; 47 }; 48 #endif 49 /* 50 * Vax CPU types. 51 * Similar types are grouped with their earliest example. 52 */ 53 #define VAX_780 1 54 #define VAX_750 2 55 #define VAX_730 3 56 #define VAX_8600 4 57 #define VAX_630 8 58 59 #define VAX_MAX 8 60 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 69 #define IO_QBUS 5 70 71 #ifndef LOCORE 72 /* 73 * Per-cpu information for system. 74 */ 75 struct percpu { 76 short pc_cputype; /* cpu type code */ 77 short pc_cpuspeed; /* relative speed of cpu */ 78 short pc_nioa; /* number of IO adaptors/nexus blocks */ 79 struct iobus *pc_io; /* descriptions of IO adaptors */ 80 }; 81 82 /* 83 * Generic description of an I/O "adaptor" 84 * (any top-level I/O bus visible to software 85 * and requiring autoconfiguration). 86 * The remainder of the description 87 * is pointed to by io_details. 88 */ 89 struct iobus { 90 int io_type; /* io adaptor types */ 91 caddr_t io_addr; /* phys address of IO adaptor */ 92 int io_size; /* size of an IO space */ 93 caddr_t io_details; /* specific to adaptor types */ 94 }; 95 96 /* 97 * Description of a main bus that maps "nexi", ala the 780 SBI. 98 */ 99 struct nexusconnect { 100 short psb_nnexus; /* number of nexus slots */ 101 struct nexus *psb_nexbase; /* base of nexus space */ 102 short psb_ubatype; /* type of "unibus adaptor" */ 103 short psb_nubabdp; /* number of bdp's per uba */ 104 caddr_t *psb_umaddr; /* "unibus" memory addresses */ 105 /* the 750 has some slots which don't promise to tell you their types */ 106 /* if this pointer is non-zero, then you get the type from this array */ 107 /* rather than from the (much more sensible) low byte of the config register */ 108 short *psb_nextype; /* botch */ 109 }; 110 111 /* 112 * Description of a Q-bus configuration. 113 */ 114 struct qbus { 115 int qb_type; /* type of "unibus adaptor" */ 116 int qb_memsize; /* size of (used) memory, pages */ 117 struct pte *qb_map; /* base of map registers */ 118 caddr_t qb_maddr; /* "unibus" memory address */ 119 caddr_t qb_iopage; /* "unibus" IO page address */ 120 }; 121 122 #ifdef KERNEL 123 int cpu; 124 struct percpu percpu[]; 125 #endif 126 #endif 127