Annotation of 43BSDReno/sys/tahoevba/vbaparam.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1988 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution is only permitted until one year after the first shipment
        !             6:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
        !             7:  * binary forms are permitted provided that: (1) source distributions retain
        !             8:  * this entire copyright notice and comment, and (2) distributions including
        !             9:  * binaries display the following acknowledgement:  This product includes
        !            10:  * software developed by the University of California, Berkeley and its
        !            11:  * contributors'' in the documentation or other materials provided with the
        !            12:  * distribution and in all advertising materials mentioning features or use
        !            13:  * of this software.  Neither the name of the University nor the names of
        !            14:  * its contributors may be used to endorse or promote products derived from
        !            15:  * this software without specific prior written permission.
        !            16:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            17:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            18:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            19:  *
        !            20:  *     @(#)vbaparam.h  7.3 (Berkeley) 6/28/90
        !            21:  */
        !            22: 
        !            23: /*
        !            24:  * Parameters related to the VERSAbus i/o configuration.
        !            25:  */
        !            26: 
        !            27: /*
        !            28:  * VERSAbus i/o devices use either memory mapped interfaces
        !            29:  * or mapped i/o register banks, or some of both.  Page tables
        !            30:  * are allocated at boot time by each device driver, as needed.
        !            31:  * VMEMmap is used to map a fixed size portion of the VERSAbus
        !            32:  * i/o space, while VMEMmap1 maps dynamically defined portions
        !            33:  * for devices which utilize shared i/o memory.  VBmap is used
        !            34:  * for mapping kernel intermediate buffers for DMA devices which
        !            35:  * are incapable of utilizing user virtual addresses or which
        !            36:  * require page aligned i/o buffers.  The size of the VMEMmap1
        !            37:  * VBmap tables must be large enough for the needs of all devices
        !            38:  * in the system.
        !            39:  */
        !            40: extern struct pte VMEMmap[], VMEMmap1[];
        !            41: extern caddr_t vmem1, vmemend;
        !            42: extern struct pte VBmap[];
        !            43: extern caddr_t vbbase, vbend; 
        !            44: 
        !            45: /*
        !            46:  * The following macros relate to the segmentation of the VERSAbus
        !            47:  * i/o space.
        !            48:  *
        !            49:  * The VERSAbus adapter segments the i/o space (as seen by the cpu)
        !            50:  * into three regions.  Cpu accesses to the upper 64Kb of the i/o space
        !            51:  * generate VERSAbus cycles with a 16-bit address and a non-privileged
        !            52:  * short i/o space address modifier.  Accesses to the next 1Mb - 64Kb
        !            53:  * generate 24-bit addresses and a non-privileged standard address
        !            54:  * modifier.  Accesses to the remainder of the 1Gb i/o space generate
        !            55:  * 32-bit addresses with a non-privileged extended address modifier.
        !            56:  * Beware that 32-bit addresses generated from this region always have
        !            57:  * zero in the upper 2 bits; e.g. a reference to physical address fe000000
        !            58:  * results in a VERSAbus address of 3e000000.
        !            59:  */
        !            60: #define        VBIO16BIT(a)    ((unsigned)0xfffe0000 <= ((unsigned)(a)))
        !            61: #define        VBIO24BIT(a)    ((unsigned)0xff000000 <= ((unsigned)(a)) && \
        !            62:                         ((unsigned)(a)) < (unsigned)0xfffe0000)
        !            63: #define        VBIO32BIT(a)    (((unsigned)(a)) < (unsigned)0xff000000)
        !            64: 
        !            65: /* 
        !            66:  * The following constants define the fixed size map of the
        !            67:  * VERSAbus i/o space.  The values should reflect the range
        !            68:  * of i/o addresses used by all the controllers unprepared
        !            69:  * to allocate and initialize their own page maps.
        !            70:  */
        !            71: #define VBIOBASE       0xfff00000      /* base of VERSAbus address space */
        !            72: #define VBIOEND                0xffffee45      /* last address in mapped space */
        !            73: /* number of entries in the system page table for i/o space */
        !            74: #define VBIOSIZE       btoc(VBIOEND-VBIOBASE)
        !            75: /* is device in mapped region */
        !            76: #define        VBIOMAPPED(a)   ((unsigned)VBIOBASE <= ((unsigned)(a)) && \
        !            77:                         ((unsigned)(a)) <= (unsigned)VBIOEND) 
        !            78: #define        vboff(addr)     ((int)(((caddr_t)(addr)) - VBIOBASE))

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.