1 /* $NetBSD: iomap.h,v 1.3 1996/08/23 11:17:00 leo Exp $ */ 2 3 /* 4 * Copyright (c) 1995 Leo Weppelman. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 3. All advertising materials mentioning features or use of this software 16 * must display the following acknowledgement: 17 * This product includes software developed by Leo Weppelman. 18 * 4. The name of the author may not be used to endorse or promote products 19 * derived from this software without specific prior written permission 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 #ifndef _MACHINE_IOMAP_H 34 #define _MACHINE_IOMAP_H 35 /* 36 * Atari TT hardware: 37 * I/O Address maps 38 */ 39 #ifdef _KERNEL 40 vm_offset_t stio_addr; /* Where the st io-area is mapped */ 41 #define AD_STIO (stio_addr) /* .. see atari_init.c */ 42 43 /* 44 * PCI KVA addresses. These are determined in atari_init.c. Exept for 45 * the config-space, they should be used for a PCI-console only. Other 46 * cards should use the bus-functions to map io & mem spaces. 47 * Each card gets an config area of NBPG bytes. 48 */ 49 vm_offset_t pci_conf_addr; /* KVA base of PCI config space */ 50 vm_offset_t pci_io_addr; /* KVA base of PCI io-space */ 51 vm_offset_t pci_mem_addr; /* KVA base of PCI mem-space */ 52 #endif /* _KERNEL */ 53 54 #define PCI_CONFB_PHYS (0xA0000000L) 55 #define PCI_CONFM_PHYS (0x00080000L) 56 #define PCI_IO_PHYS (0xB0000000L) 57 #define PCI_MEM_PHYS (0x80000000L) 58 59 #define PCI_CONF_SIZE (4 * NBPG) 60 #define PCI_IO_SIZE (NBPG) 61 #define PCI_MEM_SIZE (32 * 1024) 62 63 #define AD_RAM (0x000000L) /* main memory */ 64 #define AD_CART (0xFA0000L) /* expansion cartridge */ 65 #define AD_ROM (0xFC0000L) /* system ROM */ 66 #define STIO_SIZE (0x8000L) /* Size of mapped I/O devices */ 67 68 /* 69 * Physical address of I/O area. Use only for pte initialisation! 70 */ 71 #define STIO_PHYS ((machineid & ATARI_HADES) \ 72 ? 0xffff8000L \ 73 : 0x00ff8000L) 74 75 /* 76 * I/O addresses in the STIO area: 77 */ 78 #define AD_RAMCFG (AD_STIO + 0x0000) /* ram configuration */ 79 #define AD_FAL_MON_TYPE (AD_STIO + 0x0006) /* Falcon monitor type */ 80 #define AD_VIDEO (AD_STIO + 0x0200) /* video controller */ 81 #define AD_RESERVED (AD_STIO + 0x0400) /* reserved */ 82 #define AD_DMA (AD_STIO + 0x0600) /* DMA device access */ 83 #define AD_SCSI_DMA (AD_STIO + 0x0700) /* SCSI DMA registers */ 84 #define AD_NCR5380 (AD_STIO + 0x0780) /* SCSI controller */ 85 #define AD_SOUND (AD_STIO + 0x0800) /* YM-2149 */ 86 #define AD_RTC (AD_STIO + 0x0960) /* TT realtime clock */ 87 #define AD_SCC (AD_STIO + 0x0C80) /* SCC 8530 */ 88 #define AD_SCU (AD_STIO + 0x0E00) /* System Control Unit */ 89 90 #define AD_MFP (AD_STIO + 0x7A00) /* 68901 */ 91 #define AD_MFP2 (AD_STIO + 0x7A80) /* 68901-TT */ 92 #define AD_ACIA (AD_STIO + 0x7C00) /* 2 * 6850 */ 93 #endif /* _MACHINE_IOMAP_H */ 94