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