123258Smckusick /* 229178Smckusick * 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*30255Ssam * @(#)cpu.h 7.3 (Berkeley) 12/06/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 8229733Skarels /* 8329733Skarels * Generic description of an I/O "adaptor" 8429733Skarels * (any top-level I/O bus visible to software 8529733Skarels * and requiring autoconfiguration). 8629733Skarels * The remainder of the description 8729733Skarels * is pointed to by io_details. 8829733Skarels */ 8926347Skarels struct iobus { 9026979Skarels int io_type; /* io adaptor types */ 9126347Skarels caddr_t io_addr; /* phys address of IO adaptor */ 9226347Skarels int io_size; /* size of an IO space */ 9326347Skarels caddr_t io_details; /* specific to adaptor types */ 9426347Skarels }; 9526347Skarels 9626347Skarels /* 9726347Skarels * Description of a main bus that maps "nexi", ala the 780 SBI. 9826347Skarels */ 9926347Skarels struct nexusconnect { 10024174Sbloom short psb_nnexus; /* number of nexus slots */ 10124174Sbloom struct nexus *psb_nexbase; /* base of nexus space */ 10229733Skarels short psb_ubatype; /* type of "unibus adaptor" */ 10324174Sbloom short psb_nubabdp; /* number of bdp's per uba */ 10429733Skarels caddr_t *psb_umaddr; /* "unibus" memory addresses */ 1053245Swnj /* the 750 has some slots which don't promise to tell you their types */ 1063245Swnj /* if this pointer is non-zero, then you get the type from this array */ 1073245Swnj /* rather than from the (much more sensible) low byte of the config register */ 10824174Sbloom short *psb_nextype; /* botch */ 1092550Swnj }; 1102550Swnj 11129733Skarels /* 11229733Skarels * Description of a Q-bus configuration. 11329733Skarels */ 11429733Skarels struct qbus { 11529733Skarels int qb_type; /* type of "unibus adaptor" */ 11629733Skarels int qb_memsize; /* size of (used) memory, pages */ 11729733Skarels struct pte *qb_map; /* base of map registers */ 11829733Skarels caddr_t qb_maddr; /* "unibus" memory address */ 11929733Skarels caddr_t qb_iopage; /* "unibus" IO page address */ 12029733Skarels }; 12129733Skarels 1222550Swnj #ifdef KERNEL 1232550Swnj int cpu; 1243245Swnj struct percpu percpu[]; 1252550Swnj #endif 126*30255Ssam 127*30255Ssam /* 128*30255Ssam * Enable realtime clock (always enabled). 129*30255Ssam */ 130*30255Ssam #define enablertclock() 1312712Swnj #endif 132