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

Annotation of sys/arch/vax/include/vsbus.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: vsbus.h,v 1.9 2006/12/13 21:11:23 miod Exp $ */
        !             2: /*     $NetBSD: vsbus.h,v 1.13 2000/06/25 16:00:46 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:  * Generic definitions for the (virtual) vsbus. contains common info
        !            38:  * used by all VAXstations.
        !            39:  */
        !            40:
        !            41: #ifndef _VAX_VSBUS_H_
        !            42: #define _VAX_VSBUS_H_
        !            43:
        !            44: #include <machine/bus.h>
        !            45: #include <machine/sgmap.h>
        !            46:
        !            47: struct vsbus_attach_args {
        !            48:        vaddr_t va_addr;                /* virtual CSR address */
        !            49:        paddr_t va_paddr;               /* physical CSR address */
        !            50:
        !            51:        short   va_br;                  /* Interrupt level */
        !            52:        int     va_cvec;                /* Interrupt vector address */
        !            53:        u_char  va_maskno;              /* Interrupt vector in mask */
        !            54:        vaddr_t va_dmaaddr;             /* DMA area address */
        !            55:        vsize_t va_dmasize;             /* DMA area size */
        !            56:        bus_space_tag_t va_iot;
        !            57:        bus_dma_tag_t va_dmat;
        !            58: };
        !            59:
        !            60: /*
        !            61:  * Some chip addresses and constants, same on all VAXstations.
        !            62:  */
        !            63: #define VS_CFGTST      0x20020000      /* config register */
        !            64: #define VS_REGS         0x20080000      /* Misc cpu internal regs */
        !            65: #define NI_ADDR         0x20090000      /* Ethernet address */
        !            66: #define DZ_CSR          0x200a0000      /* DZ11-compatible chip csr */
        !            67: #define VS_CLOCK        0x200b0000      /* clock chip address */
        !            68: #define SCA_REGS        0x200c0000      /* disk device addresses */
        !            69: #define NI_BASE         0x200e0000      /* LANCE CSRs */
        !            70: #define NI_IOSIZE       (128 * VAX_NBPG)    /* IO address size */
        !            71:
        !            72: #define        KA49_SCSIMAP    0x27000000      /* KA49 SCSI SGMAP */
        !            73: /*
        !            74:  * Small monochrome graphics framebuffer, present on all machines.
        !            75:  */
        !            76: #define        SMADDR          0x30000000
        !            77: #define        SMSIZE          0x20000         /* Actually 256k, only 128k used */
        !            78:
        !            79: struct vsbus_softc {
        !            80:        struct  device sc_dev;
        !            81:        u_char  *sc_intmsk;     /* Mask register */
        !            82:        u_char  *sc_intclr;     /* Clear interrupt register */
        !            83:        u_char  *sc_intreq;     /* Interrupt request register */
        !            84:        u_char  sc_mask;        /* Interrupts to enable after autoconf */
        !            85:        vaddr_t sc_vsregs;      /* Where the VS_REGS are mapped */
        !            86:        vaddr_t sc_dmaaddr;     /* Mass storage virtual DMA area */
        !            87:        vsize_t sc_dmasize;     /* Size of the DMA area */
        !            88:
        !            89:        struct vax_bus_dma_tag sc_dmatag;
        !            90:        struct vax_sgmap sc_sgmap;
        !            91: };
        !            92:
        !            93: struct vsbus_dma {
        !            94:        SIMPLEQ_ENTRY(vsbus_dma) vd_q;
        !            95:        void (*vd_go)(void *);
        !            96:        void *vd_arg;
        !            97: };
        !            98:
        !            99: #ifdef _KERNEL
        !           100: void   vsbus_dma_init(struct vsbus_softc *, unsigned ptecnt);
        !           101: u_char vsbus_setmask(int);
        !           102: void   vsbus_clrintr(int);
        !           103: void   vsbus_copytoproc(struct proc *, caddr_t, caddr_t, int);
        !           104: void   vsbus_copyfromproc(struct proc *, caddr_t, caddr_t, int);
        !           105: void   vsbus_dma_start(struct vsbus_dma *);
        !           106: void   vsbus_dma_intr(void);
        !           107: #endif
        !           108: #endif /* _VAX_VSBUS_H_ */

CVSweb