[BACK]Return to vsbus.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / vax / include

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

1.14.16.3! yamt        1: /*     $NetBSD: vsbus.h,v 1.14.16.2 2008/02/04 09:22:42 yamt Exp $ */
1.1       ragge       2: /*
                      3:  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
                      4:  * All rights reserved.
                      5:  *
                      6:  * This code is derived from software contributed to Ludd by Bertram Barth.
                      7:  *
                      8:  * Redistribution and use in source and binary forms, with or without
                      9:  * modification, are permitted provided that the following conditions
                     10:  * are met:
                     11:  * 1. Redistributions of source code must retain the above copyright
                     12:  *    notice, this list of conditions and the following disclaimer.
                     13:  * 2. Redistributions in binary form must reproduce the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer in the
                     15:  *    documentation and/or other materials provided with the distribution.
                     16:  * 3. All advertising materials mentioning features or use of this software
                     17:  *    must display the following acknowledgement:
                     18:  *      This product includes software developed at Ludd, University of
                     19:  *      Lule}, Sweden and its contributors.
                     20:  * 4. The name of the author may not be used to endorse or promote products
                     21:  *    derived from this software without specific prior written permission
                     22:  *
                     23:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     24:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     25:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     26:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     27:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     28:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     29:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     30:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     31:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     32:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     33:  */
                     34:
                     35: /*
                     36:  * Generic definitions for the (virtual) vsbus. contains common info
                     37:  * used by all VAXstations.
                     38:  */
                     39:
1.8       ragge      40: #ifndef _VAX_VSBUS_H_
                     41: #define _VAX_VSBUS_H_
                     42:
                     43: #include <machine/bus.h>
1.11      matt       44: #include <machine/sgmap.h>
1.8       ragge      45:
1.2       ragge      46: struct vsbus_attach_args {
1.7       ragge      47:        vaddr_t va_addr;                /* virtual CSR address */
                     48:        paddr_t va_paddr;               /* physical CSR address */
                     49:        short   va_br;                  /* Interrupt level */
                     50:        short   va_cvec;                /* Interrupt vector address */
                     51:        u_char  va_maskno;              /* Interrupt vector in mask */
1.13      ragge      52:        vaddr_t va_dmaaddr;             /* DMA area address */
                     53:        vsize_t va_dmasize;             /* DMA area size */
1.14.16.2  yamt       54:        bus_space_tag_t va_memt;
1.8       ragge      55:        bus_dma_tag_t va_dmat;
1.2       ragge      56: };
                     57:
                     58: /*
                     59:  * Some chip addresses and constants, same on all VAXstations.
                     60:  */
1.7       ragge      61: #define VS_CFGTST      0x20020000      /* config register */
1.14      wiz        62: #define VS_REGS         0x20080000      /* Misc CPU internal regs */
1.2       ragge      63: #define NI_ADDR         0x20090000      /* Ethernet address */
                     64: #define DZ_CSR          0x200a0000      /* DZ11-compatible chip csr */
                     65: #define VS_CLOCK        0x200b0000      /* clock chip address */
1.6       ragge      66: #define SCA_REGS        0x200c0000      /* disk device addresses */
1.2       ragge      67: #define NI_BASE         0x200e0000      /* LANCE CSRs */
1.5       ragge      68: #define NI_IOSIZE       (128 * VAX_NBPG)    /* IO address size */
1.2       ragge      69:
1.12      matt       70: #define        KA49_SCSIMAP    0x27000000      /* KA49 SCSI SGMAP */
1.2       ragge      71: /*
1.3       ragge      72:  * Small monochrome graphics framebuffer, present on all machines.
                     73:  */
                     74: #define        SMADDR          0x30000000
                     75: #define        SMSIZE          0x20000         /* Actually 256k, only 128k used */
                     76:
1.11      matt       77: struct vsbus_softc {
1.14.16.3! yamt       78:        device_t sc_dev;
1.11      matt       79:        u_char  *sc_intmsk;     /* Mask register */
                     80:        u_char  *sc_intclr;     /* Clear interrupt register */
                     81:        u_char  *sc_intreq;     /* Interrupt request register */
                     82:        u_char  sc_mask;        /* Interrupts to enable after autoconf */
1.12      matt       83:        vaddr_t sc_vsregs;      /* Where the VS_REGS are mapped */
1.13      ragge      84:        vaddr_t sc_dmaaddr;     /* Mass storage virtual DMA area */
                     85:        vsize_t sc_dmasize;     /* Size of the DMA area */
                     86:
1.14.16.3! yamt       87:        bus_space_tag_t sc_iot;
1.11      matt       88:        struct vax_bus_dma_tag sc_dmatag;
                     89:        struct vax_sgmap sc_sgmap;
                     90: };
                     91:
1.13      ragge      92: struct vsbus_dma {
                     93:        SIMPLEQ_ENTRY(vsbus_dma) vd_q;
                     94:        void (*vd_go)(void *);
                     95:        void *vd_arg;
                     96: };
                     97:
1.10      matt       98: #ifdef _KERNEL
1.13      ragge      99: void   vsbus_dma_init(struct vsbus_softc *, unsigned ptecnt);
                    100: u_char vsbus_setmask(int);
                    101: void   vsbus_clrintr(int);
1.14.16.1  yamt      102: void   vsbus_copytoproc(struct proc *, void *, void *, int);
                    103: void   vsbus_copyfromproc(struct proc *, void *, void *, int);
1.13      ragge     104: void   vsbus_dma_start(struct vsbus_dma *);
                    105: void   vsbus_dma_intr(void);
1.10      matt      106: #endif
1.8       ragge     107: #endif /* _VAX_VSBUS_H_ */

CVSweb <webmaster@jp.NetBSD.org>