Home | History | Annotate | Line # | Download | only in pci
      1  1.8     matt /* $NetBSD: apecsreg.h,v 1.8 2012/02/06 02:14:14 matt Exp $ */
      2  1.1      cgd 
      3  1.1      cgd /*
      4  1.2      cgd  * Copyright (c) 1995 Carnegie-Mellon University.
      5  1.1      cgd  * All rights reserved.
      6  1.1      cgd  *
      7  1.1      cgd  * Author: Chris G. Demetriou
      8  1.8     matt  *
      9  1.1      cgd  * Permission to use, copy, modify and distribute this software and
     10  1.1      cgd  * its documentation is hereby granted, provided that both the copyright
     11  1.1      cgd  * notice and this permission notice appear in all copies of the
     12  1.1      cgd  * software, derivative works or modified versions, and any portions
     13  1.1      cgd  * thereof, and that both notices appear in supporting documentation.
     14  1.8     matt  *
     15  1.8     matt  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  1.8     matt  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  1.1      cgd  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  1.8     matt  *
     19  1.1      cgd  * Carnegie Mellon requests users of this software to return to
     20  1.1      cgd  *
     21  1.1      cgd  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  1.1      cgd  *  School of Computer Science
     23  1.1      cgd  *  Carnegie Mellon University
     24  1.1      cgd  *  Pittsburgh PA 15213-3890
     25  1.1      cgd  *
     26  1.1      cgd  * any improvements or extensions that they make and grant Carnegie the
     27  1.1      cgd  * rights to redistribute these changes.
     28  1.1      cgd  */
     29  1.1      cgd 
     30  1.1      cgd /*
     31  1.1      cgd  * APECS Chipset registers and constants.
     32  1.1      cgd  *
     33  1.1      cgd  * Taken from ``DECchip 21071 and DECchip 21072 Core Logic Chipsets Data
     34  1.1      cgd  * Sheet'' (DEC order number EC-QAEMA-TE), pages 4-1 - 4-27, 10-21 - 10-38.
     35  1.1      cgd  */
     36  1.1      cgd 
     37  1.6      cgd #define	REGVAL(r)	(*(volatile int32_t *)ALPHA_PHYS_TO_K0SEG(r))
     38  1.3      cgd 
     39  1.1      cgd /*
     40  1.1      cgd  * Base addresses
     41  1.1      cgd  */
     42  1.1      cgd #define	COMANCHE_BASE	 0x180000000L			/* 21071-CA Regs */
     43  1.1      cgd #define	EPIC_BASE	 0x1a0000000L			/* 21071-DA Regs */
     44  1.1      cgd #define	APECS_PCI_IACK	 0x1b0000000L			/* PCI Int. Ack. */
     45  1.1      cgd #define	APECS_PCI_SIO	 0x1c0000000L			/* PCI Sp. I/O Space */
     46  1.1      cgd #define	APECS_PCI_CONF	 0x1e0000000L			/* PCI Conf. Space */
     47  1.1      cgd #define	APECS_PCI_SPARSE 0x200000000L			/* PCI Sparse Space */
     48  1.1      cgd #define	APECS_PCI_DENSE	 0x300000000L			/* PCI Dense Space */
     49  1.1      cgd 
     50  1.1      cgd 
     51  1.1      cgd /*
     52  1.1      cgd  * 21071-CA Registers
     53  1.1      cgd  */
     54  1.1      cgd 
     55  1.1      cgd /*
     56  1.1      cgd  * 21071-CA General Registers
     57  1.1      cgd  */
     58  1.1      cgd #define	COMANCHE_GCR	(COMANCHE_BASE + 0x0000)	/* General Control */
     59  1.1      cgd #define		COMANCHE_GCR_RSVD	0xc009
     60  1.1      cgd #define		COMANCHE_GCR_SYSARB	0x0006
     61  1.1      cgd #define		COMANCHE_GCR_WIDEMEM	0x0010
     62  1.1      cgd #define		COMANCHE_GCR_BC_EN	0x0020
     63  1.1      cgd #define		COMANCHE_GCR_BC_NOALLOC	0x0040
     64  1.1      cgd #define		COMANCHE_GCR_BC_LONGWR	0x0080
     65  1.1      cgd #define		COMANCHE_GCR_BC_IGNTAG	0x0100
     66  1.1      cgd #define		COMANCHE_GCR_BC_FRCTAG	0x0200
     67  1.1      cgd #define		COMANCHE_GCR_BC_FRCD	0x0400
     68  1.1      cgd #define		COMANCHE_GCR_BC_FRCV	0x0800
     69  1.1      cgd #define		COMANCHE_GCR_BC_FRCP	0x1000
     70  1.1      cgd #define		COMANCHE_GCR_BC_BADAP	0x2000
     71  1.1      cgd 
     72  1.1      cgd #define	COMANCHE_RSVD	(COMANCHE_BASE + 0x0020)	/* Reserved */
     73  1.1      cgd 
     74  1.1      cgd #define	COMANCHE_ED	(COMANCHE_BASE + 0x0040)	/* Err & Diag Status */
     75  1.1      cgd #define		COMANCHE_ED_LOSTERR	0x0001
     76  1.1      cgd #define		COMANCHE_ED_BC_TAPERR	0x0002
     77  1.1      cgd #define		COMANCHE_ED_BC_TCPERR	0x0004
     78  1.1      cgd #define		COMANCHE_ED_NXMERR	0x0008
     79  1.1      cgd #define		COMANCHE_ED_DMACAUSE	0x0010
     80  1.1      cgd #define		COMANCHE_ED_VICCAUSE	0x0020
     81  1.1      cgd #define		COMANCHE_ED_CREQCAUSE	0x01c0
     82  1.1      cgd #define		COMANCHE_ED_RSVD	0x1e00
     83  1.1      cgd #define		COMANCHE_ED_PASS2	0x2000
     84  1.1      cgd #define		COMANCHE_ED_IDXLLOCK	0x4000
     85  1.1      cgd #define		COMANCHE_ED_WRPEND	0x8000
     86  1.1      cgd 
     87  1.1      cgd #define	COMANCHE_TAGENB	(COMANCHE_BASE + 0x0060)	/* Tag Enable */
     88  1.1      cgd #define		COMANCHE_TAGENB_RSVD	0x0001
     89  1.1      cgd 
     90  1.1      cgd #define		COMANCHE_TAGENB_C_4G	0x0000
     91  1.1      cgd #define		COMANCHE_TAGENB_C_2G	0x8000
     92  1.1      cgd #define		COMANCHE_TAGENB_C_1G	0xc000
     93  1.1      cgd #define		COMANCHE_TAGENB_C_512M	0xe000
     94  1.1      cgd #define		COMANCHE_TAGENB_C_256M	0xf000
     95  1.1      cgd #define		COMANCHE_TAGENB_C_128M	0xf800
     96  1.1      cgd #define		COMANCHE_TAGENB_C_64M	0xfc00
     97  1.1      cgd #define		COMANCHE_TAGENB_C_32M	0xfe00
     98  1.1      cgd #define		COMANCHE_TAGENB_C_16M	0xff00
     99  1.1      cgd #define		COMANCHE_TAGENB_C_8M	0xff80
    100  1.1      cgd #define		COMANCHE_TAGENB_C_4M	0xffc0
    101  1.1      cgd #define		COMANCHE_TAGENB_C_2M	0xffe0
    102  1.1      cgd #define		COMANCHE_TAGENB_C_1M	0xfff0
    103  1.1      cgd #define		COMANCHE_TAGENB_C_512K	0xfff8
    104  1.1      cgd #define		COMANCHE_TAGENB_C_256K	0xfffc
    105  1.1      cgd #define		COMANCHE_TAGENB_C_128K	0xfffe
    106  1.1      cgd 
    107  1.1      cgd #define		COMANCHE_TAGENB_M_4G	0xffff
    108  1.1      cgd #define		COMANCHE_TAGENB_M_2G	0x7fff
    109  1.1      cgd #define		COMANCHE_TAGENB_M_1G	0x3fff
    110  1.1      cgd #define		COMANCHE_TAGENB_M_512M	0x1fff
    111  1.1      cgd #define		COMANCHE_TAGENB_M_256M	0x0fff
    112  1.1      cgd #define		COMANCHE_TAGENB_M_128M	0x07ff
    113  1.1      cgd #define		COMANCHE_TAGENB_M_64M	0x03ff
    114  1.1      cgd #define		COMANCHE_TAGENB_M_32M	0x01ff
    115  1.1      cgd #define		COMANCHE_TAGENB_M_16M	0x00ff
    116  1.1      cgd #define		COMANCHE_TAGENB_M_8M	0x007f
    117  1.1      cgd #define		COMANCHE_TAGENB_M_4M	0x003f
    118  1.1      cgd #define		COMANCHE_TAGENB_M_2M	0x001f
    119  1.1      cgd #define		COMANCHE_TAGENB_M_1M	0x000e
    120  1.1      cgd #define		COMANCHE_TAGENB_M_512K	0x0006
    121  1.1      cgd #define		COMANCHE_TAGENB_M_256K	0x0002
    122  1.1      cgd #define		COMANCHE_TAGENB_M_128K	0x0000
    123  1.1      cgd 
    124  1.1      cgd #define	COMANCHE_ERR_LO	(COMANCHE_BASE + 0x0080)	/* Error Low Address */
    125  1.1      cgd 
    126  1.1      cgd #define	COMANCHE_ERR_HI	(COMANCHE_BASE + 0x00a0)	/* Error High Address */
    127  1.1      cgd #define		COMANCHE_ERR_HI_RSVD	0xe000
    128  1.1      cgd 
    129  1.1      cgd #define	COMANCHE_LCK_LO	(COMANCHE_BASE + 0x00c0)	/* LDx_L Low Address */
    130  1.1      cgd 
    131  1.1      cgd #define	COMANCHE_LCK_HI	(COMANCHE_BASE + 0x00e0)	/* LDx_L High Address */
    132  1.1      cgd #define		COMANCHE_LOCK_HI_RSVD	0xe000
    133  1.1      cgd 
    134  1.1      cgd /*
    135  1.1      cgd  * 21071-CA Memory Registers
    136  1.1      cgd  */
    137  1.1      cgd #define	COMANCHE_GTIM	(COMANCHE_BASE + 0x0200)	 /* Global Timing */
    138  1.1      cgd #define		COMANCHE_LOCK_HI_RSVD	0xe000
    139  1.1      cgd 
    140  1.1      cgd #define	COMANCHE_RTIM	(COMANCHE_BASE + 0x0220)	 /* Refresh Timing */
    141  1.1      cgd 
    142  1.1      cgd #define	COMANCHE_VFP	(COMANCHE_BASE + 0x0240)	 /* Video Frame Ptr. */
    143  1.1      cgd #define		COMANCHE_VFP_COL	0x001f
    144  1.1      cgd #define		COMANCHE_VFP_ROW	0x3fe0
    145  1.1      cgd #define		COMANCHE_VFP_SUBBANK	0x4000
    146  1.1      cgd #define		COMANCHE_VFP_RSVD	0x8000
    147  1.1      cgd 
    148  1.1      cgd #define	COMANCHE_PD_LO	(COMANCHE_BASE + 0x0260)	/* Pres Detect Low */
    149  1.1      cgd 
    150  1.1      cgd #define	COMANCHE_PD_HI	(COMANCHE_BASE + 0x0280)	/* Pres Detect High */
    151  1.1      cgd 
    152  1.1      cgd /*
    153  1.1      cgd  * 21071-CA Memory banks' Base Address Register format
    154  1.1      cgd  */
    155  1.1      cgd #define	COMANCHE_B0_BAR	(COMANCHE_BASE + 0x0800)	/* Bank 0 BA */
    156  1.1      cgd #define	COMANCHE_B1_BAR	(COMANCHE_BASE + 0x0820)	/* Bank 1 BA */
    157  1.1      cgd #define	COMANCHE_B2_BAR	(COMANCHE_BASE + 0x0840)	/* Bank 2 BA */
    158  1.1      cgd #define	COMANCHE_B3_BAR	(COMANCHE_BASE + 0x0860)	/* Bank 3 BA */
    159  1.1      cgd #define	COMANCHE_B4_BAR	(COMANCHE_BASE + 0x0880)	/* Bank 4 BA */
    160  1.1      cgd #define	COMANCHE_B5_BAR	(COMANCHE_BASE + 0x08a0)	/* Bank 5 BA */
    161  1.1      cgd #define	COMANCHE_B6_BAR	(COMANCHE_BASE + 0x08c0)	/* Bank 6 BA */
    162  1.1      cgd #define	COMANCHE_B7_BAR	(COMANCHE_BASE + 0x08e0)	/* Bank 7 BA */
    163  1.1      cgd #define	COMANCHE_B8_BAR	(COMANCHE_BASE + 0x0900)	/* Bank 8 BA */
    164  1.1      cgd #define		COMANCHE_BAR_RSVD	0x001f
    165  1.1      cgd 
    166  1.1      cgd /*
    167  1.1      cgd  * 21071-CA Memory banks' Configuration Register format
    168  1.1      cgd  */
    169  1.1      cgd #define	COMANCHE_B0_CR	(COMANCHE_BASE + 0x0a00)	/* Bank 0 Config */
    170  1.1      cgd #define	COMANCHE_B1_CR	(COMANCHE_BASE + 0x0a20)	/* Bank 1 Config */
    171  1.1      cgd #define	COMANCHE_B2_CR	(COMANCHE_BASE + 0x0a40)	/* Bank 2 Config */
    172  1.1      cgd #define	COMANCHE_B3_CR	(COMANCHE_BASE + 0x0a60)	/* Bank 3 Config */
    173  1.1      cgd #define	COMANCHE_B4_CR	(COMANCHE_BASE + 0x0a80)	/* Bank 4 Config */
    174  1.1      cgd #define	COMANCHE_B5_CR	(COMANCHE_BASE + 0x0aa0)	/* Bank 5 Config */
    175  1.1      cgd #define	COMANCHE_B6_CR	(COMANCHE_BASE + 0x0ac0)	/* Bank 6 Config */
    176  1.1      cgd #define	COMANCHE_B7_CR	(COMANCHE_BASE + 0x0ae0)	/* Bank 7 Config */
    177  1.1      cgd #define	COMANCHE_B8_CR	(COMANCHE_BASE + 0x0b00)	/* Bank 8 Config */
    178  1.1      cgd #define		COMANCHE_CR_VALID	0x0001
    179  1.1      cgd #define		COMANCHE_CR_SIZE	0x001e
    180  1.1      cgd #define		COMANCHE_CR_SUBENA	0x0020
    181  1.1      cgd #define		COMANCHE_CR_COLSEL	0x01c0
    182  1.1      cgd #define		COMANCHE_CR_S0_RSVD	0xfe00
    183  1.1      cgd #define		COMANCHE_CR_S8_CHECK	0x0200
    184  1.1      cgd #define		COMANCHE_CR_S8_RSVD	0xfc00
    185  1.1      cgd 
    186  1.1      cgd /*
    187  1.1      cgd  * 21071-CA Memory banks' Timing Register A format
    188  1.1      cgd  */
    189  1.1      cgd #define	COMANCHE_B0_TRA	(COMANCHE_BASE + 0x0c00)	/* Bank 0 Timing A */
    190  1.1      cgd #define	COMANCHE_B1_TRA	(COMANCHE_BASE + 0x0c20)	/* Bank 1 Timing A */
    191  1.1      cgd #define	COMANCHE_B2_TRA	(COMANCHE_BASE + 0x0c40)	/* Bank 2 Timing A */
    192  1.1      cgd #define	COMANCHE_B3_TRA	(COMANCHE_BASE + 0x0c60)	/* Bank 3 Timing A */
    193  1.1      cgd #define	COMANCHE_B4_TRA	(COMANCHE_BASE + 0x0c80)	/* Bank 4 Timing A */
    194  1.1      cgd #define	COMANCHE_B5_TRA	(COMANCHE_BASE + 0x0ca0)	/* Bank 5 Timing A */
    195  1.1      cgd #define	COMANCHE_B6_TRA	(COMANCHE_BASE + 0x0cc0)	/* Bank 6 Timing A */
    196  1.1      cgd #define	COMANCHE_B7_TRA	(COMANCHE_BASE + 0x0ce0)	/* Bank 7 Timing A */
    197  1.1      cgd #define	COMANCHE_B8_TRA	(COMANCHE_BASE + 0x0d00)	/* Bank 8 Timing A */
    198  1.1      cgd #define		COMANCHE_TRA_ROWSETUP	0x0003
    199  1.1      cgd #define		COMANCHE_TRA_ROWHOLD	0x000c
    200  1.1      cgd #define		COMANCHE_TRA_COLSETUP	0x0070
    201  1.1      cgd #define		COMANCHE_TRA_COLHOLD	0x0180
    202  1.1      cgd #define		COMANCHE_TRA_RDLYROW	0x0e00
    203  1.1      cgd #define		COMANCHE_TRA_RDLYCOL	0x7000
    204  1.1      cgd #define		COMANCHE_TRA_RSVD	0x8000
    205  1.1      cgd 
    206  1.1      cgd /*
    207  1.1      cgd  * 21071-CA Memory banks' Timing Register B format
    208  1.1      cgd  */
    209  1.1      cgd #define	COMANCHE_B0_TRB	(COMANCHE_BASE + 0x0e00)	/* Bank 0 Timing B */
    210  1.1      cgd #define	COMANCHE_B1_TRB	(COMANCHE_BASE + 0x0e20)	/* Bank 1 Timing B */
    211  1.1      cgd #define	COMANCHE_B2_TRB	(COMANCHE_BASE + 0x0e40)	/* Bank 2 Timing B */
    212  1.1      cgd #define	COMANCHE_B3_TRB	(COMANCHE_BASE + 0x0e60)	/* Bank 3 Timing B */
    213  1.1      cgd #define	COMANCHE_B4_TRB	(COMANCHE_BASE + 0x0e80)	/* Bank 4 Timing B */
    214  1.1      cgd #define	COMANCHE_B5_TRB	(COMANCHE_BASE + 0x0ea0)	/* Bank 5 Timing B */
    215  1.1      cgd #define	COMANCHE_B6_TRB	(COMANCHE_BASE + 0x0ec0)	/* Bank 6 Timing B */
    216  1.1      cgd #define	COMANCHE_B7_TRB	(COMANCHE_BASE + 0x0ee0)	/* Bank 7 Timing B */
    217  1.1      cgd #define	COMANCHE_B8_TRB	(COMANCHE_BASE + 0x0f00)	/* Bank 8 Timing B */
    218  1.1      cgd #define		COMANCHE_TRB_RTCAS	0x0007
    219  1.1      cgd #define		COMANCHE_TRB_WTCAS	0x0038
    220  1.1      cgd #define		COMANCHE_TRB_TCP	0x00c0
    221  1.1      cgd #define		COMANCHE_TRB_WHOLD0ROW	0x0700
    222  1.1      cgd #define		COMANCHE_TRB_WHOLD0COL	0x3800
    223  1.1      cgd #define		COMANCHE_TRB_RSVD	0xc000
    224  1.1      cgd 
    225  1.1      cgd 
    226  1.1      cgd /*
    227  1.1      cgd  * 21071-DA Registers
    228  1.1      cgd  */
    229  1.1      cgd #define	EPIC_DCSR	(EPIC_BASE + 0x0000)		/* Diagnostic CSR */
    230  1.1      cgd #define		EPIC_DCSR_TENB		0x00000001
    231  1.1      cgd #define		EPIC_DCSR_RSVD		0x7fc00082
    232  1.1      cgd #define		EPIC_DCSR_PENB		0x00000004
    233  1.1      cgd #define		EPIC_DCSR_DCEI		0x00000008
    234  1.1      cgd #define		EPIC_DCSR_DPEC		0x00000010
    235  1.1      cgd #define		EPIC_DCSR_IORT		0x00000020
    236  1.1      cgd #define		EPIC_DCSR_LOST		0x00000040
    237  1.1      cgd #define		EPIC_DCSR_DDPE		0x00000100
    238  1.1      cgd #define		EPIC_DCSR_IOPE		0x00000200
    239  1.1      cgd #define		EPIC_DCSR_TABT		0x00000400
    240  1.1      cgd #define		EPIC_DCSR_NDEV		0x00000800
    241  1.1      cgd #define		EPIC_DCSR_CMRD		0x00001000
    242  1.1      cgd #define		EPIC_DCSR_UMRD		0x00002000
    243  1.1      cgd #define		EPIC_DCSR_IPTL		0x00004000
    244  1.1      cgd #define		EPIC_DCSR_MERR		0x00008000
    245  1.1      cgd #define		EPIC_DCSR_DBYP		0x00030000
    246  1.1      cgd #define		EPIC_DCSR_PCMD		0x003c0000
    247  1.1      cgd #define		EPIC_DCSR_PASS2		0x80000000
    248  1.1      cgd 
    249  1.1      cgd #define	EPIC_PEAR	(EPIC_BASE + 0x0020)		/* PCI Err Addr. */
    250  1.1      cgd 
    251  1.1      cgd #define	EPIC_SEAR	(EPIC_BASE + 0x0040)		/* sysBus Err Addr. */
    252  1.1      cgd #define		EPIC_SEAR_RSVD		0x0000000f
    253  1.1      cgd #define		EPIC_SEAR_SYS_ERR	0xfffffff0
    254  1.1      cgd 
    255  1.1      cgd #define	EPIC_DUMMY_1	(EPIC_BASE + 0x0060)		/* Dummy 1 */
    256  1.1      cgd #define	EPIC_DUMMY_2	(EPIC_BASE + 0x0080)		/* Dummy 2 */
    257  1.1      cgd #define	EPIC_DUMMY_3	(EPIC_BASE + 0x00a0)		/* Dummy 3 */
    258  1.1      cgd 
    259  1.1      cgd #define	EPIC_TBASE_1	(EPIC_BASE + 0x00c0)		/* Trans. Base 1 */
    260  1.1      cgd #define	EPIC_TBASE_2	(EPIC_BASE + 0x00e0)		/* Trans. Base 2 */
    261  1.1      cgd #define		EPIC_TBASE_RSVD		0x000001ff
    262  1.1      cgd #define		EPIC_TBASE_T_BASE	0xfffffe00
    263  1.7  thorpej #define		EPIC_TBASE_SHIFT	1
    264  1.1      cgd 
    265  1.1      cgd #define	EPIC_PCI_BASE_1	(EPIC_BASE + 0x0100)		/* PCI Base 1 */
    266  1.1      cgd #define	EPIC_PCI_BASE_2	(EPIC_BASE + 0x0120)		/* PCI Base 2 */
    267  1.1      cgd #define		EPIC_PCI_BASE_RSVD	0x0003ffff
    268  1.1      cgd #define		EPIC_PCI_BASE_SGEN	0x00040000
    269  1.1      cgd #define		EPIC_PCI_BASE_WENB	0x00080000
    270  1.1      cgd #define		EPIC_PCI_BASE_PCI_BASE	0xfff00000
    271  1.1      cgd 
    272  1.1      cgd #define	EPIC_PCI_MASK_1	(EPIC_BASE + 0x0140)		/* PCI Mask 1 */
    273  1.7  thorpej #define	EPIC_PCI_MASK_2	(EPIC_BASE + 0x0160)		/* PCI Mask 2 */
    274  1.1      cgd #define		EPIC_PCI_MASK_RSVD	0x000fffff
    275  1.1      cgd #define		EPIC_PCI_MASK_PCI_MASK	0xfff00000
    276  1.7  thorpej #define		EPIC_PCI_MASK_1M	0x00000000
    277  1.7  thorpej #define		EPIC_PCI_MASK_2M	0x00100000
    278  1.7  thorpej #define		EPIC_PCI_MASK_4M	0x00300000
    279  1.7  thorpej #define		EPIC_PCI_MASK_8M	0x00700000
    280  1.7  thorpej #define		EPIC_PCI_MASK_16M	0x00f00000
    281  1.7  thorpej #define		EPIC_PCI_MASK_32M	0x01f00000
    282  1.7  thorpej #define		EPIC_PCI_MASK_64M	0x03f00000
    283  1.7  thorpej #define		EPIC_PCI_MASK_128M	0x07f00000
    284  1.7  thorpej #define		EPIC_PCI_MASK_256M	0x0ff00000
    285  1.7  thorpej #define		EPIC_PCI_MASK_512M	0x1ff00000
    286  1.7  thorpej #define		EPIC_PCI_MASK_1G	0x3ff00000
    287  1.7  thorpej #define		EPIC_PCI_MASK_2G	0x7ff00000
    288  1.7  thorpej #define		EPIC_PCI_MASK_4G	0xfff00000
    289  1.1      cgd 
    290  1.1      cgd #define	EPIC_HAXR0	(EPIC_BASE + 0x0180)		/* Host Addr Extn 0 */
    291  1.1      cgd 
    292  1.1      cgd #define	EPIC_HAXR1	(EPIC_BASE + 0x01a0)		/* Host Addr Extn 1 */
    293  1.1      cgd #define		EPIC_HAXR1_RSVD		0x07ffffff
    294  1.1      cgd #define		EPIC_HAXR1_EADDR	0xf8000000
    295  1.1      cgd 
    296  1.1      cgd #define	EPIC_HAXR2	(EPIC_BASE + 0x01c0)		/* Host Addr Extn 2 */
    297  1.3      cgd #define		EPIC_HAXR2_CONF_TYPE	0x00000003
    298  1.3      cgd #define		EPIC_HAXR2_CONF_TYPO0	0x00000000
    299  1.3      cgd #define		EPIC_HAXR2_CONF_TYPE1	0x00000001
    300  1.1      cgd #define		EPIC_HAXR2_RSVD		0x00fffffc
    301  1.1      cgd #define		EPIC_HAXR2_EADDR	0xff000000
    302  1.1      cgd 
    303  1.1      cgd #define	EPIC_PMLT	(EPIC_BASE + 0x01e0)		/* PCI Mstr Lat Tmr */
    304  1.1      cgd #define		EPIC_PMLT_PMLC		0x000000ff
    305  1.1      cgd #define		EPIC_PMLT_RSVD		0xffffff00
    306  1.1      cgd 
    307  1.1      cgd #define	EPIC_TLB_TAG_0	(EPIC_BASE + 0x0200)		/* TLB Tag 0 */
    308  1.1      cgd #define	EPIC_TLB_TAG_1	(EPIC_BASE + 0x0220)		/* TLB Tag 1 */
    309  1.1      cgd #define	EPIC_TLB_TAG_2	(EPIC_BASE + 0x0240)		/* TLB Tag 2 */
    310  1.1      cgd #define	EPIC_TLB_TAG_3	(EPIC_BASE + 0x0260)		/* TLB Tag 3 */
    311  1.1      cgd #define	EPIC_TLB_TAG_4	(EPIC_BASE + 0x0280)		/* TLB Tag 4 */
    312  1.1      cgd #define	EPIC_TLB_TAG_5	(EPIC_BASE + 0x02a0)		/* TLB Tag 5 */
    313  1.1      cgd #define	EPIC_TLB_TAG_6	(EPIC_BASE + 0x02c0)		/* TLB Tag 6 */
    314  1.1      cgd #define	EPIC_TLB_TAG_7	(EPIC_BASE + 0x02e0)		/* TLB Tag 7 */
    315  1.1      cgd #define		EPIC_TLB_TAG_RSVD	0x00000fff
    316  1.1      cgd #define		EPIC_TLB_TAG_EVAL	0x00001000
    317  1.1      cgd #define		EPIC_TLB_TAG_PCI_PAGE	0xffffe000
    318  1.1      cgd 
    319  1.1      cgd #define	EPIC_TLB_DATA_0	(EPIC_BASE + 0x0300)		/* TLB Data 0 */
    320  1.1      cgd #define	EPIC_TLB_DATA_1	(EPIC_BASE + 0x0320)		/* TLB Data 1 */
    321  1.1      cgd #define	EPIC_TLB_DATA_2	(EPIC_BASE + 0x0340)		/* TLB Data 2 */
    322  1.1      cgd #define	EPIC_TLB_DATA_3	(EPIC_BASE + 0x0360)		/* TLB Data 3 */
    323  1.1      cgd #define	EPIC_TLB_DATA_4	(EPIC_BASE + 0x0380)		/* TLB Data 4 */
    324  1.1      cgd #define	EPIC_TLB_DATA_5	(EPIC_BASE + 0x03a0)		/* TLB Data 5 */
    325  1.1      cgd #define	EPIC_TLB_DATA_6	(EPIC_BASE + 0x03c0)		/* TLB Data 6 */
    326  1.1      cgd #define	EPIC_TLB_DATA_7	(EPIC_BASE + 0x03e0)		/* TLB Data 7 */
    327  1.1      cgd #define		EPIC_TLB_DATA_RSVD	0xffe00001
    328  1.1      cgd #define		EPIC_TLB_DATA_CPU_PAGE	0x001ffffe
    329  1.1      cgd 
    330  1.1      cgd #define	EPIC_TBIA	(EPIC_BASE + 0x0400)		/* TLB Invl All */
    331  1.1      cgd 
    332  1.1      cgd /*
    333  1.1      cgd  * EPIC Scatter-Gather Map Entries
    334  1.1      cgd  */
    335  1.1      cgd 
    336  1.1      cgd struct sgmapent {
    337  1.8     matt 	uint64_t val;
    338  1.1      cgd };
    339  1.1      cgd #define	SGMAPENT_EVAL	0x0000000000000001L
    340  1.1      cgd #define	SGMAPENT_PFN	0x00000000001ffffeL
    341  1.1      cgd #define	SGMAPENT_RSVD	0xffffffffffe00000L
    342  1.1      cgd 
    343  1.1      cgd #define	SGMAP_MAKEENTRY(pfn)	(SGMAPENT_EVAL | ((pfn) << 1))
    344