[BACK]Return to ka410.h CVS log [TXT][DIR] Up to [local] / sys / arch / vax / include

Annotation of sys/arch/vax/include/ka410.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: ka410.h,v 1.5 2006/07/25 21:11:08 miod Exp $ */
                      2: /*     $NetBSD: ka410.h,v 1.2 1997/02/19 10:06:05 ragge Exp $ */
                      3: /*
                      4:  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
                      5:  * All rights reserved.
                      6:  *
                      7:  * This code is derived from software contributed to Ludd by Bertram Barth.
                      8:  *
                      9:  * Redistribution and use in source and binary forms, with or without
                     10:  * modification, are permitted provided that the following conditions
                     11:  * are met:
                     12:  * 1. Redistributions of source code must retain the above copyright
                     13:  *    notice, this list of conditions and the following disclaimer.
                     14:  * 2. Redistributions in binary form must reproduce the above copyright
                     15:  *    notice, this list of conditions and the following disclaimer in the
                     16:  *    documentation and/or other materials provided with the distribution.
                     17:  * 3. All advertising materials mentioning features or use of this software
                     18:  *    must display the following acknowledgement:
                     19:  *      This product includes software developed at Ludd, University of
                     20:  *      Lule}, Sweden and its contributors.
                     21:  * 4. The name of the author may not be used to endorse or promote products
                     22:  *    derived from this software without specific prior written permission
                     23:  *
                     24:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     25:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     26:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     27:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     28:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     29:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     30:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     31:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     32:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     33:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     34:  */
                     35:
                     36: /*
                     37:  * Definition for  I/O addresses of
                     38:  *
                     39:  *     MicroVAX 2000   (TeamMate)
                     40:  *     VAXstation 2000 (VAXstar)
                     41:  */
                     42:
                     43: #define KA410_SIDEX    0x20040004      /* SID extension register */
                     44:
                     45: #define KA410_CFGTST   0x20020000      /* Configuration and Test register */
                     46: #define KA410_IORESET  0x20020000      /* I/O Reset register */
                     47:
                     48: #define KA410_ROM_BASE 0x20040000      /* System module ROM */
                     49: #define KA410_ROM_END  0x2007FFFF
                     50: #define KA410_ROM_SIZE    0x40000
                     51:
                     52: #define KA410_IVN_BASE 0x20040020      /* Interrupt Vector Numbers */
                     53: #define KA410_IVN_END  0x2004003F
                     54: #define KA410_IVN_SIZE       0x20
                     55:
                     56: #define KA410_HLTCOD   0x20080000      /* Halt Code Register */
                     57: #define KA410_MSER     0x20080004      /* Memory System Error register */
                     58: #define KA410_MEAR     0x20080008      /* Memory Error Address register */
                     59: #define KA410_INTMSK   0x2008000C      /* Interrupt Mask register */
                     60: #define KA410_VDCORG   0x2008000D      /* Video Controller Origin Register */
                     61: #define KA410_VDCSEL   0x2008000E      /* Video Controller Select Register */
                     62: #define KA410_INTREQ   0x2008000F      /* Interrupt Request register */
                     63: #define KA410_INTCLR   0x2008000F      /* Interrupt Request clear register */
                     64:
                     65: /*
                     66:  * Other fixed addresses which should be mapped
                     67:  */
                     68: #define KA410_CPU_BASE ((struct ka410_cpu *)0x20080000)
                     69: #define KA410_CPU_END  0x200800FF
                     70: #define KA410_CPU_SIZE      0x100
                     71: #define KA410_NWA_BASE 0x20090000      /* Network Address ROM */
                     72: #define KA410_NWA_END  0x2009007F
                     73: #define KA410_NWA_SIZE       0x80
                     74: #define KA410_SER_BASE 0x200A0000      /* Serial line controller */
                     75: #define KA410_SER_END  0x200A000F
                     76: #define KA410_SER_SIZE        0x10
                     77: #define KA410_WAT_BASE ((struct ka410_clock *)0x200B0000)/* TOY clock */
                     78: #define KA410_WAT_END  0x200B00FF
                     79: #define KA410_WAT_SIZE      0x100
                     80: #define KA410_DKC_BASE 0x200C0000      /* Disk Controller Ports */
                     81: #define KA410_DKC_END  0x200C0007
                     82: #define KA410_DKC_SIZE       0x08
                     83: #define KA410_SCS_BASE 0x200C0080      /* Tape (SCSI) Controller Chip */
                     84: #define KA410_SCS_END  0x200C009F
                     85: #define KA410_SCS_SIZE       0x20
                     86: #define KA410_DMA_BASE 0x200D0000      /* Disk Data buffer RAM */
                     87: #define KA410_DMA_END  0x200D3FFF
                     88: #define KA410_DMA_SIZE     0x4000
                     89: #define KA410_LAN_BASE 0x200E0000      /* LANCE chip registers */
                     90: #define KA410_LAN_END  0x200E0007
                     91: #define KA410_LAN_SIZE       0x08
                     92: #define KA410_CUR_BASE 0x200F0000      /* Monochrome video cursor chip */
                     93: #define KA410_CUR_END  0x200F003F
                     94: #define KA410_CUR_SIZE       0x40
                     95:
                     96: #define KA410_SCS_DADR 0x200C00A0      /* Tape(SCSI) DMA address register */
                     97: #define KA410_SCS_DCNT 0x200C00C0      /* Tape(SCSI) DMA byte count reg. */
                     98: #define KA410_SCS_DDIR 0x200C00C4      /* Tape(SCSI) DMA transfer direction */
                     99:
                    100: /*
                    101:  * Definitions for the Configuration and Test Register
                    102:  */
                    103: #define KA410_CFG_MULTU                0x80    /* MicroVAX or VAXstation */
                    104: #define KA410_CFG_NETOPT       0x40    /* Network option present */
                    105: #define KA410_CFG_L3CON                0x20    /* Console on line #3 of dc */
                    106: #define KA410_CFG_CURTEST      0x10    /* Cursor Test (monochrom) */
                    107: #define KA410_CFG_VIDOPT       0x08    /* Video option present */
                    108: #define KA410_CFG_MEMSZ                0x07    /* Memory option type/size */
                    109:
                    110: #define KA410_CFG_0MB          0x00    /* No additional Memory board */
                    111: #define KA410_CFG_1MB          0x01
                    112: #define KA410_CFG_2MB          0x02
                    113: #define KA410_CFG_4MB          0x03
                    114: #define KA410_CFG_6MB          0x04
                    115: #define KA410_CFG_8MB          0x05
                    116: #define KA410_CFG_12MB         0x06
                    117: #define KA410_CFG_14MB         0x07
                    118:
                    119:
                    120: /*
                    121:  * interrupt request-, clear-, and mask register
                    122:  */
                    123: extern volatile unsigned char *ka410_intreq;
                    124: extern volatile unsigned char *ka410_intclr;
                    125: extern volatile unsigned char *ka410_intmsk;
                    126:
                    127: #define INTR_SR        (1<<7)  /* Serial line receiver or silo full */
                    128: #define INTR_ST        (1<<6)  /* Serial line transmitter done */
                    129: #define INTR_NP        (1<<5)  /* Network controller primary */
                    130: #define INTR_NS        (1<<4)  /* Network controller secondary */
                    131: #define INTR_VF        (1<<3)  /* Video end of frame */
                    132: #define INTR_VS        (1<<2)  /* Video secondary */
                    133: #define INTR_SC        (1<<1)  /* SCSI controller */
                    134: #define INTR_DC        (1<<0)  /* Disk controller */
                    135:
                    136: /*
                    137:  * Clock-Chip data in NVRAM
                    138:  */
                    139: #define KA410_CPMBX    0x200B0038      /* Console Mailbox (1 byte) */
                    140: #define KA410_CPFLG    0x200B003C      /* Console Program Flags (1 byte) */
                    141: #define KA410_LK201_ID 0x200B0040      /* Keyboard Variation (1 byte) */
                    142: #define KA410_CONS_ID  0x200B0044      /* Console Device Type (1 byte) */
                    143: #define KA410_SCR      0x200B0048      /* Console Scratch RAM */
                    144: #define KA410_TEMP     0x200B0058      /* Used by System Firmware */
                    145: #define KA410_BAT_CHK  0x200B0088      /* Battery Check Data */
                    146: #define KA410_BOOTDEV  0x200B0098      /* Default Boot Device (4 bytes) */
                    147: #define KA410_BOOTFLG  0x200B00A8      /* Default Boot Flags (4 bytes) */
                    148: #define KA410_SCRLEN   0x200B00B8      /* Number of pages of SCR (1 byte) */
                    149: #define KA410_SCSIPORT 0x200B00BC      /* Tape Controller Port Data */
                    150: #define KA410_RESERVED 0x200B00C0      /* Reserved (16 bytes) */
                    151:
                    152:
                    153: struct ka410_cpu {
                    154:        u_long  ka410_hltcod;
                    155:        u_long  ka410_mser;
                    156:        u_long  ka410_cear;
                    157:        u_long  ka410_intmsk;
                    158: };
                    159:
                    160: /*
                    161:  * KA410 uses bits 2-9 of longwords to store single bytes in NVRAM,
                    162:  * thus we declare the clock as an struct of bit-fields, so that the
                    163:  * generic clock-routines work for KA410...
                    164:  */
                    165: struct ka410_clock {
                    166:        u_long  :2;     u_long  sec     :8;     u_long  :22;
                    167:        u_long  :2;     u_long  secalrm :8;     u_long  :22;
                    168:        u_long  :2;     u_long  min     :8;     u_long  :22;
                    169:        u_long  :2;     u_long  minalrm :8;     u_long  :22;
                    170:        u_long  :2;     u_long  hr      :8;     u_long  :22;
                    171:        u_long  :2;     u_long  hralrm  :8;     u_long  :22;
                    172:        u_long  :2;     u_long  dayofwk :8;     u_long  :22;
                    173:        u_long  :2;     u_long  day     :8;     u_long  :22;
                    174:        u_long  :2;     u_long  mon     :8;     u_long  :22;
                    175:        u_long  :2;     u_long  yr      :8;     u_long  :22;
                    176:        u_long  :2;     u_long  csr0    :8;     u_long  :22;
                    177:        u_long  :2;     u_long  csr1    :8;     u_long  :22;
                    178:        u_long  :2;     u_long  csr2    :8;     u_long  :22;
                    179:        u_long  :2;     u_long  csr3    :8;     u_long  :22;
                    180:        u_long  :2;     u_long  cpmbx   :8;     u_long  :22;
                    181: };

CVSweb