123258Smckusick /* 2*29178Smckusick * Copyright (c) 1982, 1986 Regents of the University of California. 323258Smckusick * All rights reserved. The Berkeley software License Agreement 423258Smckusick * specifies the terms and conditions for redistribution. 523258Smckusick * 6*29178Smckusick * @(#)cpu.h 7.1 (Berkeley) 06/05/86 723258Smckusick */ 82550Swnj 92712Swnj #ifndef LOCORE 102550Swnj /* 112550Swnj * Cpu identification, from SID register. 122550Swnj */ 132550Swnj union cpusid { 142550Swnj int cpusid; 152550Swnj struct cpuany { 162550Swnj u_int :24, 172550Swnj cp_type:8; 182550Swnj } cpuany; 1924174Sbloom struct cpu8600 { 2024174Sbloom u_int cp_sno:12, /* serial number */ 2124174Sbloom cp_plant:4, /* plant number */ 2224174Sbloom cp_eco:8, /* eco level */ 2324174Sbloom cp_type:8; /* VAX_8600 */ 2424174Sbloom } cpu8600; 252550Swnj struct cpu780 { 262550Swnj u_int cp_sno:12, /* serial number */ 272550Swnj cp_plant:3, /* plant number */ 282550Swnj cp_eco:9, /* eco level */ 292550Swnj cp_type:8; /* VAX_780 */ 302550Swnj } cpu780; 312550Swnj struct cpu750 { 322550Swnj u_int cp_hrev:8, /* hardware rev level */ 332550Swnj cp_urev:8, /* ucode rev level */ 342550Swnj :8, 352550Swnj cp_type:8; /* VAX_750 */ 362550Swnj } cpu750; 3724173Sbloom struct cpu730 { 3824173Sbloom u_int :8, /* reserved */ 3924173Sbloom cp_urev:8, /* ucode rev level */ 4024173Sbloom :8, /* reserved */ 4124173Sbloom cp_type:8; /* VAX_730 */ 4224173Sbloom } cpu730; 4327250Skridle struct cpu630 { 4427250Skridle u_int :24, /* reserved */ 4527250Skridle cp_type:8; /* VAX_630 */ 4627250Skridle } cpu630; 472550Swnj }; 482712Swnj #endif 4926347Skarels /* 5026347Skarels * Vax CPU types. 5126347Skarels * Similar types are grouped with their earliest example. 5226347Skarels */ 532550Swnj #define VAX_780 1 542550Swnj #define VAX_750 2 556943Ssam #define VAX_730 3 5624174Sbloom #define VAX_8600 4 5727250Skridle #define VAX_630 8 582550Swnj 5927250Skridle #define VAX_MAX 8 602550Swnj 6126347Skarels /* 6226347Skarels * Main IO backplane types. 6326347Skarels * This gives us a handle on how to do autoconfiguration. 6426347Skarels */ 6526347Skarels #define IO_SBI780 1 6626347Skarels #define IO_CMI750 2 6726347Skarels #define IO_XXX730 3 6826347Skarels #define IO_ABUS 4 6927250Skridle #define IO_QBUS 5 7026347Skarels 712712Swnj #ifndef LOCORE 722550Swnj /* 732550Swnj * Per-cpu information for system. 742550Swnj */ 752550Swnj struct percpu { 763245Swnj short pc_cputype; /* cpu type code */ 7724887Skarels short pc_cpuspeed; /* relative speed of cpu */ 7826347Skarels short pc_nioa; /* number of IO adaptors/nexus blocks */ 7926347Skarels struct iobus *pc_io; /* descriptions of IO adaptors */ 8024174Sbloom }; 8124174Sbloom 8226347Skarels struct iobus { 8326979Skarels int io_type; /* io adaptor types */ 8426347Skarels caddr_t io_addr; /* phys address of IO adaptor */ 8526347Skarels int io_size; /* size of an IO space */ 8626347Skarels caddr_t io_details; /* specific to adaptor types */ 8726347Skarels }; 8826347Skarels 8926347Skarels /* 9026347Skarels * Description of a main bus that maps "nexi", ala the 780 SBI. 9126347Skarels */ 9226347Skarels struct nexusconnect { 9324174Sbloom short psb_nnexus; /* number of nexus slots */ 9424174Sbloom struct nexus *psb_nexbase; /* base of nexus space */ 953245Swnj /* we should be able to have just one address for the unibus memories */ 963245Swnj /* and calculate successive addresses by adding to the base, but the 750 */ 973245Swnj /* doesn't obey the sensible rule: uba1 has a lower address than uba0! */ 9824174Sbloom caddr_t *psb_umaddr; /* unibus memory addresses */ 9924174Sbloom short psb_nubabdp; /* number of bdp's per uba */ 10024174Sbloom short psb_haveubasr; /* have uba status register */ 1013245Swnj /* the 750 has some slots which don't promise to tell you their types */ 1023245Swnj /* if this pointer is non-zero, then you get the type from this array */ 1033245Swnj /* rather than from the (much more sensible) low byte of the config register */ 10424174Sbloom short *psb_nextype; /* botch */ 1052550Swnj }; 1062550Swnj 1072550Swnj #ifdef KERNEL 1082550Swnj int cpu; 1093245Swnj struct percpu percpu[]; 1102550Swnj #endif 1112712Swnj #endif 112