📄 ubareg.h
字号:
/* * @(#)ubareg.h 4.2 (ULTRIX) 8/3/90 *//************************************************************************ * * * Copyright (c) 1984,86,87,88 by * * Digital Equipment Corporation, Maynard, MA * * All rights reserved. * * * * This software is furnished under a license and may be used and * * copied only in accordance with the terms of such license and * * with the inclusion of the above copyright notice. This * * software or any other copies thereof may not be provided or * * otherwise made available to any other person. No title to and * * ownership of the software is hereby transferred. * * * * This software is derived from software received from the * * University of California, Berkeley, and from Bell * * Laboratories. Use, duplication, or disclosure is subject to * * restrictions under license agreements with University of * * California and with AT&T. * * * * The information in this software is subject to change without * * notice and should not be construed as a commitment by Digital * * Equipment Corporation. * * * * Digital assumes no responsibility for the use or reliability * * of its software on equipment which is not supplied by Digital. * * * ************************************************************************//* ------------------------------------------------------------------------ * Modification History: /sys/vaxuba/ubareg.h * * 03-Aug-90 rafiey (Ali Rafieymehr) * Added a define for VAX9000. * * 8-May-89 Giles Atkinson * Extend definition of nb4_regs to include console version. * * 05-Nov-88 Robin Lewis * Changed the defines used to get map register information on * the Q22-Bus. The format of the "cookie" was changed to allow * more map registers to be allocated on one call. * * 28-Jun-88 Fred Canter * Modified nb_regs structure to add PVAX system SCSI bus ID. * This allows the SCSI drive to read the system's (initiator) * ID from NVR. * * 08-Jun-88 darrell for Ali * Added VAX60 (Firefox) support. * * 07-Jun-88 Fred Canter * Back out last change (hardware changed their mind). * * 06-Jun-88 Fred Canter * Use different address for SCSI/SCSI controller. * * 19-May-88 Fred Canter * Modifications for SCSI driver and extended I/O mode * operation of CVAXstarPVAX. * * 15-Feb-88 Fred Canter * Added support for VAX420 (CVAXstar/PVAX) CPU. * Mostly I/O space register structutes and definitions. * * 12-11-87 Robin L. and Larry C. * Added portclass support to the system. * * 3-Aug-87 -- rafiey (Ali Rafieymehr) * Added structure for the VAXstation 2000 system scratch RAM. * * 20-Apr-87 -- afd * Moved structures for Mayfair local register space to ka650.h * * 06-Mar-87 -- afd * Defined 5 structures for Mayfair/CVAX local register space; * also defined constants for their addresses and sizes. * * 07-Jan-87 -- rafiey (Ali Rafieymehr) * Corrected the value for the VAXstar color display option * (VS_CID_COLOR). * * 13-Dec-86 -- fred (Fred Canter) and rafiey (Ali Rafieymehr) * Change sh and sg maps (address and size). * 30-Aug-86 -- fred (Fred Canter) * General cleanup of comments. * * 5-Aug-86 -- fred (Fred Canter) * Updated VAXstar I/O space register definitions. * * 2-Jul-86 -- fred (Fred Canter) * Defines for TEAMmate 8 line SLU register mapping. * * 18-Jun-86 -- fred (Fred Canter) * Changes for VAXstar kernel support. * * 13-Jun-86 -- jaw fix to uba reset and drivers. * * 14-Apr-86 -- jaw * remove MAXNUBA referances.....use NUBA only! * * 18-Mar-86 -- jaw add routines to cpu switch for nexus/unibus addreses * also got rid of some globals like nexnum. * ka8800 cleanup. * * 04-feb-86 -- jaw get rid of biic.h. * * 22-Oct-85 -- tresvik * fixed typo to for VAX8600 conditional * * 10-sep-85 -- jaw * increased number of UBA's on 8200 from 4 to 10. * * 31-Jul-85 -- tresvik * Fixed sizing problem for maximum uba's on VAX8600. Increased * MAXNUBA and NUBA8600 to 8 to allow proper indexing. * * 19-Jun-85 -- jaw * VAX8200 name change. * * 18-Jun-85 -- JAW * fixed up purge macro so machine specific compiles work. * * 01-May-85 -tresvik * Fix conditionals on UBA register defs so that /sys/stand could build * a 750 only version of autoconf.c * * 13-Mar-85 -jaw * Changes for support of the VAX8200 were merged in. * * 27-Feb-85 -tresvik * Changes for support of the VAX8600 were merged in. * * 3 Nov 84 -- rjl * MicroVAX-II support * The microVAX support stuff should probably be in seperate qbus files * but at this time is so close that it hardly seems to make much sense. * * 29 Dec 83 --jmcg * MicroVAX I support. * * 28 Dec 83 --jmcg * Derived from 4.2BSD, labeled: * ubareg.h 6.2 83/09/29 * * ------------------------------------------------------------------------ */#include "../io/bi/buareg.h"/* * VAX UNIBUS adapter registers */#ifndef LOCORE/* * UBA hardware registers */struct uba_regs{ int uba_cnfgr; /* configuration register */ int uba_cr; /* control register */ int uba_sr; /* status register */ int uba_dcr; /* diagnostic control register */ int uba_fmer; /* failed map entry register */ int uba_fubar; /* failed UNIBUS address register */ int pad1[2]; int uba_brsvr[4]; int uba_brrvr[4]; /* receive vector registers */ int uba_dpr[16]; /* buffered data path register */ int pad2[480]; struct pte uba_map[496]; /* unibus map register */ int pad3[16]; /* no maps for device address space */};/* * MicroVAX-II local registers */struct qb_regs{ u_short qb_bdr; /* boot and diag register */ u_short qb_pad1; u_long qb_mser; /* memory system error register */ u_long qb_caer; /* cpu error address */ u_long qb_daer; /* dma error address */ u_long qb_pad2[7676]; union { struct { int qb_pad[512]; struct pte qb_map[8192];/* q-bus map registers */ } qba; struct uba_regs uba; } qb_uba; u_long qb_pad3[40960]; u_short qb_toysecs; /* seconds */ u_short qb_toysecs_alarm; /* not used */ u_short qb_toymins; /* minutes */ u_short qb_toymins_alarm; /* not used */ u_short qb_toyhours; /* hours */ u_short qb_toyhours_alarm; /* not used */ u_short qb_toyday_week; /* not used */ u_short qb_toyday; /* day of month */ u_short qb_toymonth; /* month */ u_short qb_toyyear; /* year */ u_short qb_toycsra; /* csr */ u_short qb_toycsrb; /* csr */ u_short qb_toycsrc; /* csr */ u_short qb_toycsrd; /* csr */ u_short qb_cpmbx; /* console program mailbox */ u_short qb_toyram[49]; /* toy ram */};/* * VAXstar/CVAXstar local registers & I/O space including SLU controller. * The VAXstar is a busless machine. * The name nb_regs represents "no bus", i.e., * uba_regs, qb_regs, nb_regs. * * Mapping is split into three segments: * nb_regs hltcod -> toyram * nb1_regs disk cntlr -> video option board ROM * nb2_regs Monochrome video RAM * A fourth segment will be needed for the color option. * The fifth segment is used for the MicroVAX 2000 serial * line expander (8 line SLU). Defined in shreg.h, not here. */struct nb_regs{ u_long nb_hltcod; /* VAXstar halt code register */ u_long nb_mser; /* memory system error register */ /* (not used on CVAXSTAR) */ u_long nb_mear; /* memory error address register */ /* (not used on CVAXSTAR) */ u_char nb_int_msk; /* interrupt mask register */ u_char nb_vdc_org; /* monochrome display origin */ u_char nb_vdc_sel; /* video interrupt select register */ u_char nb_int_reqclr; /* intr req (r/o), intr clr (w/o) */ u_short nb_diagdisp; /* diagnostic display (w/o) */ /* (CVAXSTAR only) */ u_short nb_pad60; u_long nb_par_ctl; /* parity control */ /* (CVAXSTAR only) */ u_long nb_pad61; u_short nb_pad62; u_short nb_diagtime; /* diagnostic timer */ /* (CVAXSTAR only) */ u_long nb_pad1[4088]; u_long nb_cacr; /* 2nd-level cache control */ /* (CVAXSTAR only) */ u_long nb_pad63[12287]; u_char nb_narom[128]; /* network address rom ?????? */ u_long nb_pad2[16352]; u_short nb_sercsr; /* serial line controller CSR */ u_short nb_pad3; u_short nb_serrbuf_lpr; /* SLU read bufffer/line parameter */ u_short nb_pad4; union { u_char c[2]; u_short w; } nb_sertcr; u_short nb_pad5; union { u_char c[2]; u_short w; } nb_sermsr_tdr; u_short nb_pad6; u_long nb_pad7[16380]; u_short nb_toysecs; /* seconds */ u_short nb_pad8; u_short nb_toysecs_alarm; /* not used */ u_short nb_pad9; u_short nb_toymins; /* minutes */ u_short nb_pad10; u_short nb_toymins_alarm; /* not used */ u_short nb_pad11; u_short nb_toyhours; /* hours */ u_short nb_pad12; u_short nb_toyhours_alarm; /* not used */ u_short nb_pad13; u_short nb_toyday_week; /* not used */ u_short nb_pad14; u_short nb_toyday; /* day of month */ u_short nb_pad15; u_short nb_toymonth; /* month */ u_short nb_pad16; u_short nb_toyyear; /* year */ u_short nb_pad17; u_short nb_toycsra; /* csr */ u_short nb_pad18; u_short nb_toycsrb; /* csr */ u_short nb_pad19; u_short nb_toycsrc; /* csr */ u_short nb_pad20; u_short nb_toycsrd; /* csr */ u_short nb_pad21; /* NON-VOLATILE RAM */ u_long nb_cpmbx; /* Console program mailbox */ u_long nb_cpflg; /* Console program flags */ u_long nb_lk201_id; /* LK201 keyboard variation */ u_long nb_console_id; /* Console device type */ u_long nb_scr[4]; /* Scratch RAM physical address */ u_long nb_temp[12]; /* Used by System Firmware */ u_long nb_bat_chk[4]; /* Battery check data */ u_long nb_boot_dev[4]; /* Default boot device */ u_long nb_boot_flg[4]; /* Default boot flags */ u_long nb_scr_length; /* # of pages of scratch RAM */ u_long nb_cpu_scsi_id; /* System's SCSI bus 0 & 1 IDs */ u_long nb_reserved[16]; /* reserved */ u_long nb_pad22[16320];};/* * TODO: for CVAXSTAR * Size of 2nd Level Cache: for cache flush operation */#define CVS_CACHE_SIZE (8*1024) /* 8K longword (32K byte) cache */struct nb6_regs { u_long nb_cvscache[CVS_CACHE_SIZE];};/* TODO: ext mode - temp */struct nb7_regs { u_char nb_eddb[128*1024];};/* * VAXstar NVR bit definitions for * only those fields which are used. * Each byte of NVR occupies bits 2 thru 9 of a longword. *//* * Console program flags, * actual bit positions (not shifted by the code). */#define VS_CPF_CRT 0x8 /* Console is CRT (not hardcopy) */#define VS_CPF_VIDEO 0x80 /* video display (not a terminal) *//* * Console type ID value, * after shifted right two bits by the code. */#define VS_CID_UNKNOWN 0x0 /* Console type is unknown */#define VS_CID_DIAG3 0x1 /* Diagnostic console (SLU line 3) */#define VS_CID_TERM0 0x2 /* Attached terminal (SLU line 0) */#define VS_CID_BITMAP 0xb0 /* Base monochrome bitmapped display */#define VS_CID_COLOR 0xd0 /* Optional dragon color display */struct nb1_regs { u_char nb_dkc_reg; /* Disk - register data access */ u_char nb_pad23[3]; u_char nb_dkc_cmd_stat; /* Disk - cntlr command & interupt status */ u_char nb_pad24[3]; u_long nb_pad25[30]; /* SCSI controller chip registers */ u_char nb_scs_out_data; /* (wo) Output data register */#define nb_scs_cur_data nb_scs_out_data /* (ro) Current data register */ u_char nb_pad26[3]; u_char nb_scs_ini_cmd; /* (r/w) Initiator command register */ u_char nb_pad27[3]; u_char nb_scs_mode; /* (r/w) Mode register */ u_char nb_pad28[3]; u_char nb_scs_tar_cmd; /* (r/w) Target command register */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -