Home | History | Annotate | Line # | Download | only in include
ctlreg.h revision 1.1.1.1
      1  1.1  eeh /*	$NetBSD: ctlreg.h,v 1.1.1.1 1998/06/20 04:58:51 eeh Exp $ */
      2  1.1  eeh 
      3  1.1  eeh /*
      4  1.1  eeh  * Copyright (c) 1996
      5  1.1  eeh  *	The President and Fellows of Harvard College. All rights reserved.
      6  1.1  eeh  * Copyright (c) 1992, 1993
      7  1.1  eeh  *	The Regents of the University of California.  All rights reserved.
      8  1.1  eeh  *
      9  1.1  eeh  * This software was developed by the Computer Systems Engineering group
     10  1.1  eeh  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
     11  1.1  eeh  * contributed to Berkeley.
     12  1.1  eeh  *
     13  1.1  eeh  * All advertising materials mentioning features or use of this software
     14  1.1  eeh  * must display the following acknowledgement:
     15  1.1  eeh  *	This product includes software developed by Harvard University.
     16  1.1  eeh  *	This product includes software developed by the University of
     17  1.1  eeh  *	California, Lawrence Berkeley Laboratory.
     18  1.1  eeh  *
     19  1.1  eeh  * Redistribution and use in source and binary forms, with or without
     20  1.1  eeh  * modification, are permitted provided that the following conditions
     21  1.1  eeh  * are met:
     22  1.1  eeh  * 1. Redistributions of source code must retain the above copyright
     23  1.1  eeh  *    notice, this list of conditions and the following disclaimer.
     24  1.1  eeh  * 2. Redistributions in binary form must reproduce the above copyright
     25  1.1  eeh  *    notice, this list of conditions and the following disclaimer in the
     26  1.1  eeh  *    documentation and/or other materials provided with the distribution.
     27  1.1  eeh  * 3. All advertising materials mentioning features or use of this software
     28  1.1  eeh  *    must display the following acknowledgement:
     29  1.1  eeh  *	This product includes software developed by the University of
     30  1.1  eeh  *	California, Berkeley and its contributors.
     31  1.1  eeh  * 4. Neither the name of the University nor the names of its contributors
     32  1.1  eeh  *    may be used to endorse or promote products derived from this software
     33  1.1  eeh  *    without specific prior written permission.
     34  1.1  eeh  *
     35  1.1  eeh  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     36  1.1  eeh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     37  1.1  eeh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     38  1.1  eeh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     39  1.1  eeh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     40  1.1  eeh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     41  1.1  eeh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     42  1.1  eeh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     43  1.1  eeh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     44  1.1  eeh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     45  1.1  eeh  * SUCH DAMAGE.
     46  1.1  eeh  *
     47  1.1  eeh  *	@(#)ctlreg.h	8.1 (Berkeley) 6/11/93
     48  1.1  eeh  */
     49  1.1  eeh 
     50  1.1  eeh /*
     51  1.1  eeh  * Sun4u support by Eduardo Horvath
     52  1.1  eeh  * Changes Copyright (c) 1996 Eduardo Horvath
     53  1.1  eeh  * All rights reserved.
     54  1.1  eeh  */
     55  1.1  eeh 
     56  1.1  eeh /*
     57  1.1  eeh  * Sun 4u control registers. (includes address space definitions
     58  1.1  eeh  * and some registers in control space).
     59  1.1  eeh  */
     60  1.1  eeh 
     61  1.1  eeh /*
     62  1.1  eeh  * The Alternate address spaces.
     63  1.1  eeh  *
     64  1.1  eeh  * 0x00-0x7f are privileged
     65  1.1  eeh  * 0x80-0xff can be used by users
     66  1.1  eeh  */
     67  1.1  eeh 
     68  1.1  eeh #define ASI_LITTLE	0x08		/* This bit should make an ASI little endian */
     69  1.1  eeh 
     70  1.1  eeh #define ASI_NUCLEUS			0x04	/* [4u] kernel address space */
     71  1.1  eeh #define ASI_NUCLEUS_LITTLE		0x0c	/* [4u] kernel address space, little endian */
     72  1.1  eeh 
     73  1.1  eeh #define ASI_AS_IF_USER_PRIMARY		0x10	/* [4u] primary user address space */
     74  1.1  eeh #define ASI_AS_IF_USER_SECONDARY	0x11	/* [4u] secondary user address space */
     75  1.1  eeh 
     76  1.1  eeh #define ASI_PHYS_CACHED			0x14	/* [4u] MMU bypass to main memory */
     77  1.1  eeh #define ASI_PHYS_NON_CACHED		0x15	/* [4u] MMU bypass to I/O location */
     78  1.1  eeh 
     79  1.1  eeh #define ASI_AS_IF_USER_PRIMARY_LITTLE	0x18	/* [4u] primary user address space, little endian  */
     80  1.1  eeh #define ASI_AS_IF_USER_SECONDARY_LITTIE	0x19	/* [4u] secondary user address space, little endian  */
     81  1.1  eeh 
     82  1.1  eeh #define ASI_PHYS_CACHED_LITTLE		0x1c	/* [4u] MMU bypass to main memory, little endian */
     83  1.1  eeh #define ASI_PHYS_NON_CACHED_LITTLE	0x1d	/* [4u] MMU bypass to I/O location, little endian */
     84  1.1  eeh 
     85  1.1  eeh #define ASI_NUCLEUS_QUAD_LDD		0x24	/* [4u] use w/LDDA to load 128-bit item */
     86  1.1  eeh #define ASI_NUCLEUS_QUAD_LDD_LITTLE	0x2c	/* [4u] use w/LDDA to load 128-bit item, little endian */
     87  1.1  eeh 
     88  1.1  eeh #define ASI_FLUSH_D_PAGE_PRIMARY	0x38	/* [4u] flush D-cache page using primary context */
     89  1.1  eeh #define ASI_FLUSH_D_PAGE_SECONDARY	0x39	/* [4u] flush D-cache page using secondary context */
     90  1.1  eeh #define ASI_FLUSH_D_CTX_PRIMARY		0x3a	/* [4u] flush D-cache context using primary context */
     91  1.1  eeh #define ASI_FLUSH_D_CTX_SECONDARY	0x3b	/* [4u] flush D-cache context using secondary context */
     92  1.1  eeh #define ASI_DCACHE_DATA			0x46	/* [4u] diagnostic access to D-cache data RAM */
     93  1.1  eeh #define ASI_DCACHE_TAG			0x47	/* [4u] diagnostic access to D-cache tag RAM */
     94  1.1  eeh 
     95  1.1  eeh #define ASI_INTR_DISPATCH_STATUS	0x48	/* [4u] interrupt dispatch status register */
     96  1.1  eeh #define ASI_INTR_RECEIVE		0x49	/* [4u] interrupt receive status register */
     97  1.1  eeh #define ASI_MID_REG			0x4a	/* [4u] hardware config and MID */
     98  1.1  eeh #define ASI_ERROR_EN_REG		0x4b	/* [4u] asynchronous error enables */
     99  1.1  eeh #define ASI_AFSR			0x4c	/* [4u] asynchronous fault status register */
    100  1.1  eeh #define ASI_AFAR			0x4d	/* [4u] asynchronous fault address register */
    101  1.1  eeh 
    102  1.1  eeh #define ASI_ICACHE_DATA			0x66	/* [4u] diagnostic access to D-cache data RAM */
    103  1.1  eeh #define ASI_ICACHE_TAG			0x67	/* [4u] diagnostic access to D-cache tag RAM */
    104  1.1  eeh #define ASI_FLUSH_I_PAGE_PRIMARY	0x68	/* [4u] flush D-cache page using primary context */
    105  1.1  eeh #define ASI_FLUSH_I_PAGE_SECONDARY	0x69	/* [4u] flush D-cache page using secondary context */
    106  1.1  eeh #define ASI_FLUSH_I_CTX_PRIMARY		0x6a	/* [4u] flush D-cache context using primary context */
    107  1.1  eeh #define ASI_FLUSH_I_CTX_SECONDARY	0x6b	/* [4u] flush D-cache context using secondary context */
    108  1.1  eeh 
    109  1.1  eeh #define ASI_BLOCK_AS_IF_USER_PRIMARY	0x70	/* [4u] primary user address space, block loads/stores */
    110  1.1  eeh #define ASI_BLOCK_AS_IF_USER_SECONDARY	0x71	/* [4u] secondary user address space, block loads/stores */
    111  1.1  eeh 
    112  1.1  eeh #define ASI_ECACHE_DIAG			0x76	/* [4u] diag access to E-cache tag and data */
    113  1.1  eeh #define ASI_DATAPATH_ERR_REG_WRITE	0x77	/* [4u] ASI is reused */
    114  1.1  eeh 
    115  1.1  eeh #define ASI_BLOCK_AS_IF_USER_PRIMARY_LITTLE	0x78	/* [4u] primary user address space, block loads/stores */
    116  1.1  eeh #define ASI_BLOCK_AS_IF_USER_SECONDARY_LITTLE	0x79	/* [4u] secondary user address space, block loads/stores */
    117  1.1  eeh 
    118  1.1  eeh #define ASI_INTERRUPT_RECEIVE_DATA	0x7f	/* [4u] interrupt receive data registers {0,1,2} */
    119  1.1  eeh #define ASI_DATAPATH_ERR_REG_READ	0x7f	/* [4u] read access to datapath error registers (ASI reused) */
    120  1.1  eeh 
    121  1.1  eeh #define ASI_PRIMARY			0x80	/* [4u] primary address space */
    122  1.1  eeh #define ASI_SECONDARY			0x81	/* [4u] secondary address space */
    123  1.1  eeh #define ASI_PRIMARY_NO_FAULT		0x82	/* [4u] primary address space, no fault */
    124  1.1  eeh #define ASI_SECONDARY_NO_FAULT		0x83	/* [4u] secondary address space, no fault */
    125  1.1  eeh 
    126  1.1  eeh #define ASI_PRIMARY_LITTLE		0x88	/* [4u] primary address space, little endian */
    127  1.1  eeh #define ASI_SECONDARY_LITTLE		0x89	/* [4u] secondary address space, little endian */
    128  1.1  eeh #define ASI_PRIMARY_NO_FAULT_LITTLE	0x8a	/* [4u] primary address space, no fault, little endian */
    129  1.1  eeh #define ASI_SECONDARY_NO_FAULT_LITTLE	0x8b	/* [4u] secondary address space, no fault, little endian */
    130  1.1  eeh 
    131  1.1  eeh #define ASI_PST8_PRIMARY		0xc0	/* [VIS] Eight 8-bit partial store, primary */
    132  1.1  eeh #define ASI_PST8_SECONDARY		0xc1	/* [VIS] Eight 8-bit partial store, secondary */
    133  1.1  eeh #define ASI_PST16_PRIMARY		0xc2	/* [VIS] Four 16-bit partial store, primary */
    134  1.1  eeh #define ASI_PST16_SECONDARY		0xc3	/* [VIS] Fout 16-bit partial store, secondary */
    135  1.1  eeh #define ASI_PST32_PRIMARY		0xc4	/* [VIS] Two 32-bit partial store, primary */
    136  1.1  eeh #define ASI_PST32_SECONDARY		0xc5	/* [VIS] Two 32-bit partial store, secondary */
    137  1.1  eeh 
    138  1.1  eeh #define ASI_PST8_PRIMARY_LITTLE		0xc8	/* [VIS] Eight 8-bit partial store, primary, little endian */
    139  1.1  eeh #define ASI_PST8_SECONDARY_LITTLE	0xc9	/* [VIS] Eight 8-bit partial store, secondary, little endian */
    140  1.1  eeh #define ASI_PST16_PRIMARY_LITTLE	0xca	/* [VIS] Four 16-bit partial store, primary, little endian */
    141  1.1  eeh #define ASI_PST16_SECONDARY_LITTLE	0xcb	/* [VIS] Fout 16-bit partial store, secondary, little endian */
    142  1.1  eeh #define ASI_PST32_PRIMARY_LITTLE	0xcc	/* [VIS] Two 32-bit partial store, primary, little endian */
    143  1.1  eeh #define ASI_PST32_SECONDARY_LITTLE	0xcd	/* [VIS] Two 32-bit partial store, secondary, little endian */
    144  1.1  eeh 
    145  1.1  eeh #define ASI_FL8_PRIMARY			0xd0	/* [VIS] One 8-bit load/store floating, primary */
    146  1.1  eeh #define ASI_FL8_SECONDARY		0xd1	/* [VIS] One 8-bit load/store floating, secondary */
    147  1.1  eeh #define ASI_FL16_PRIMARY		0xd2	/* [VIS] One 16-bit load/store floating, primary */
    148  1.1  eeh #define ASI_FL16_SECONDARY		0xd3	/* [VIS] One 16-bit load/store floating, secondary */
    149  1.1  eeh 
    150  1.1  eeh #define ASI_FL8_PRIMARY_LITTLE		0xd8	/* [VIS] One 8-bit load/store floating, primary, little endian */
    151  1.1  eeh #define ASI_FL8_SECONDARY_LITTLE	0xd9	/* [VIS] One 8-bit load/store floating, secondary, little endian */
    152  1.1  eeh #define ASI_FL16_PRIMARY_LITTLE		0xda	/* [VIS] One 16-bit load/store floating, primary, little endian */
    153  1.1  eeh #define ASI_FL16_SECONDARY_LITTLE	0xdb	/* [VIS] One 16-bit load/store floating, secondary, little endian */
    154  1.1  eeh 
    155  1.1  eeh #define ASI_BLOCK_COMMIT_PRIMARY	0xe0	/* [4u] block store with commit, primary */
    156  1.1  eeh #define ASI_BLOCK_COMMIT_SECONDARY	0xe1	/* [4u] block store with commit, secondary */
    157  1.1  eeh #define ASI_BLOCK_PRIMARY		0xf0	/* [4u] block load/store, primary */
    158  1.1  eeh #define ASI_BLOCK_SECONDARY		0xf1	/* [4u] block load/store, secondary */
    159  1.1  eeh #define ASI_BLOCK_PRIMARY_LITTLE	0xf8	/* [4u] block load/store, primary, little endian */
    160  1.1  eeh #define ASI_BLOCK_SECONDARY_LITTLE	0xf9	/* [4u] block load/store, secondary, little endian */
    161  1.1  eeh 
    162  1.1  eeh 
    163  1.1  eeh /*
    164  1.1  eeh  * These are the shorter names used by Solaris
    165  1.1  eeh  */
    166  1.1  eeh 
    167  1.1  eeh #define ASI_N		ASI_NUCLEUS
    168  1.1  eeh #define ASI_NL		ASI_NUCLEUS_LITTLE
    169  1.1  eeh #define ASI_AIUP	ASI_AS_IF_USER_PRIMARY
    170  1.1  eeh #define ASI_AIUS	ASI_AS_IF_USER_SECONDARY
    171  1.1  eeh #define ASI_AIUPL	ASI_AS_IF_USER_PRIMARY_LITTLE
    172  1.1  eeh #define ASI_AIUSL	ASI_AS_IF_USER_SECONDARY_LITTLE
    173  1.1  eeh #define ASI_P		ASI_PRIMARY
    174  1.1  eeh #define ASI_S		ASI_SECONDARY
    175  1.1  eeh #define ASI_PNF		ASI_PRIMARY_NO_FAULT
    176  1.1  eeh #define ASI_SNF		ASI_SECONDARY_NO_FAULT
    177  1.1  eeh #define ASI_PL		ASI_PRIMARY_LITTLE
    178  1.1  eeh #define ASI_SL		ASI_SECONDARY_LITTLE
    179  1.1  eeh #define ASI_PNFL	ASI_PRIMARY_NO_FAULT_LITTLE
    180  1.1  eeh #define ASI_SNFL	ASI_SECONDARY_NO_FAULT_LITTLE
    181  1.1  eeh #define ASI_BLK_AIUP	ASI_BLOCK_AS_IF_USER_PRIMARY
    182  1.1  eeh #define ASI_BLK_AIUPL	ASI_BLOCK_AS_IF_USER_PRIMARY_LITTLE
    183  1.1  eeh #define ASI_BLK_AIUS	ASI_BLOCK_AS_IF_USER_SECONDARY
    184  1.1  eeh #define ASI_BLK_AIUSL	ASI_BLOCK_AS_IF_USER_SECONDARY_LITTLE
    185  1.1  eeh #define ASI_BLK_COMMIT_P		ASI_BLOCK_COMMIT_PRIMARY
    186  1.1  eeh #define ASI_BLK_COMMIT_PRIMARY		ASI_BLOCK_COMMIT_PRIMARY
    187  1.1  eeh #define ASI_BLK_COMMIT_S		ASI_BLOCK_COMMIT_SECONDARY
    188  1.1  eeh #define ASI_BLK_COMMIT_SECONDARY	ASI_BLOCK_COMMIT_SECONDARY
    189  1.1  eeh #define ASI_BLK_P			ASI_BLOCK_PRIMARY
    190  1.1  eeh #define ASI_BLK_PL			ASI_BLOCK_PRIMARY_LITTLE
    191  1.1  eeh #define ASI_BLK_S			ASI_BLOCK_SECONDARY
    192  1.1  eeh #define ASI_BLK_SL			ASI_BLOCK_SECONDARY_LITTLE
    193  1.1  eeh 
    194  1.1  eeh /*
    195  1.1  eeh  * The following are 4u control registers
    196  1.1  eeh  */
    197  1.1  eeh 
    198  1.1  eeh /*
    199  1.1  eeh  * [4u] MMU and Cache Control Register (MCCR)
    200  1.1  eeh  * use ASI = 0x45
    201  1.1  eeh  */
    202  1.1  eeh #define ASI_MCCR	0x45
    203  1.1  eeh #define MCCR		0x00
    204  1.1  eeh 
    205  1.1  eeh /* MCCR Bits and their meanings */
    206  1.1  eeh #define MCCR_DMMU_EN	0x08
    207  1.1  eeh #define MCCR_IMMU_EN	0x04
    208  1.1  eeh #define MCCR_DCACHE_EN	0x02
    209  1.1  eeh #define MCCR_ICACHE_EN	0x01
    210  1.1  eeh 
    211  1.1  eeh 
    212  1.1  eeh /*
    213  1.1  eeh  * MMU control registers
    214  1.1  eeh  */
    215  1.1  eeh 
    216  1.1  eeh /* Choose an MMU */
    217  1.1  eeh #define ASI_DMMU		0x58
    218  1.1  eeh #define ASI_IMMU		0x50
    219  1.1  eeh 
    220  1.1  eeh /* Other assorted MMU ASIs */
    221  1.1  eeh #define ASI_IMMU_8KPTR		0x51
    222  1.1  eeh #define ASI_IMMU_64KPTR		0x52
    223  1.1  eeh #define ASI_IMMU_DATA_IN	0x54
    224  1.1  eeh #define ASI_IMMU_TLB_DATA	0x55
    225  1.1  eeh #define ASI_IMMU_TLB_TAG	0x56
    226  1.1  eeh #define ASI_DMMU_8KPTR		0x59
    227  1.1  eeh #define ASI_DMMU_64KPTR		0x5a
    228  1.1  eeh #define ASI_DMMU_DATA_IN	0x5c
    229  1.1  eeh #define ASI_DMMU_TLB_DATA	0x5d
    230  1.1  eeh #define ASI_DMMU_TLB_TAG	0x5e
    231  1.1  eeh 
    232  1.1  eeh /*
    233  1.1  eeh  * The following are the control registers
    234  1.1  eeh  * They work on both MMUs unless noted.
    235  1.1  eeh  *
    236  1.1  eeh  * Register contents are defined later on individual registers.
    237  1.1  eeh  */
    238  1.1  eeh #define TSB_TAG_TARGET		0x0
    239  1.1  eeh #define TLB_DATA_IN		0x0
    240  1.1  eeh #define CTX_PRIMARY		0x08	/* primary context -- DMMU only */
    241  1.1  eeh #define CTX_SECONDARY		0x10	/* secondary context -- DMMU only */
    242  1.1  eeh #define SFSR			0x18
    243  1.1  eeh #define SFAR			0x20	/* fault address -- DMMU only */
    244  1.1  eeh #define TSB			0x28
    245  1.1  eeh #define TLB_TAG_ACCESS		0x30
    246  1.1  eeh #define VIRTUAL_WATCHPOINT	0x38
    247  1.1  eeh #define PHYSICAL_WATCHPOINT	0x40
    248  1.1  eeh 
    249  1.1  eeh /* Tag Target bits */
    250  1.1  eeh #define TAG_TARGET_VA_MASK	0x03ffffffffffffffffLL
    251  1.1  eeh #define TAG_TARGET_VA(x)	(((x)<<22)&TAG_TARGET_VA_MASK)
    252  1.1  eeh #define TAG_TARGET_CONTEXT(x)	((x)>>48)
    253  1.1  eeh #define TAG_TARGET(c,v)		((((uint64_t)c)<<48)|(((uint64_t)v)&TAG_TARGET_VA_MASK))
    254  1.1  eeh 
    255  1.1  eeh /* SFSR bits for both D_SFSR and I_SFSR */
    256  1.1  eeh #define SFSR_ASI(x)		((x)>>16)
    257  1.1  eeh #define SFSR_FT_VA_OOR_2	0x02000 /* IMMU: jumpl or return to unsupportd VA */
    258  1.1  eeh #define SFSR_FT_VA_OOR_1	0x01000 /* fault at unsupported VA */
    259  1.1  eeh #define SFSR_FT_NFO		0x00800	/* DMMU: Access to page marked NFO */
    260  1.1  eeh #define SFSR_ILL_ASI		0x00400	/* DMMU: Illegal (unsupported) ASI */
    261  1.1  eeh #define SFSR_FT_IO_ATOMIC	0x00200	/* DMMU: Atomic access to noncacheable page */
    262  1.1  eeh #define SFSR_FT_ILL_NF		0x00100	/* DMMU: NF load or flush to page marked E (has side effects) */
    263  1.1  eeh #define SFSR_FT_PRIV		0x00080	/* Privilege violation */
    264  1.1  eeh #define SFSR_FT_E		0x00040	/* DMUU: value of E bit associated address */
    265  1.1  eeh #define SFSR_CTXT(x)		(((x)>>4)&0x3)
    266  1.1  eeh #define SFSR_CTXT_IS_PRIM(x)	(SFSR_CTXT(x)==0x00)
    267  1.1  eeh #define SFSR_CTXT_IS_SECOND(x)	(SFSR_CTXT(x)==0x01)
    268  1.1  eeh #define SFSR_CTXT_IS_NUCLEUS(x)	(SFSR_CTXT(x)==0x02)
    269  1.1  eeh #define SFSR_PRIV		0x00008	/* value of PSTATE.PRIV for faulting access */
    270  1.1  eeh #define SFSR_W			0x00004 /* DMMU: attempted write */
    271  1.1  eeh #define SFSR_OW			0x00002 /* Overwrite; prev vault was still valid */
    272  1.1  eeh #define SFSR_FV			0x00001	/* Fault is valid */
    273  1.1  eeh #define SFSR_FT	(SFSR_FT_VA_OOR_2|SFSR_FT_VA_OOR_1|SFSR_FT_NFO|SFSR_ILL_ASI|SFSR_FT_IO_ATOMIC|SFSR_FT_ILL_NF|SFSR_FT_PRIV)
    274  1.1  eeh 
    275  1.1  eeh #define SFSR_BITS "\40\16VAT\15VAD\14NFO\13ASI\12A\11NF\10PRIV\7E\6NUCLEUS\5SECONDCTX\4PRIV\3W\2OW\1FV"
    276  1.1  eeh /*
    277  1.1  eeh  * Here's the spitfire TSB control register bits.
    278  1.1  eeh  *
    279  1.1  eeh  * Each TSB entry is 16-bytes wide.  The TSB must be size aligned
    280  1.1  eeh  */
    281  1.1  eeh #define TSB_SIZE_512		0x0	/* 8kB, etc. */
    282  1.1  eeh #define TSB_SIZE_1K		0x01
    283  1.1  eeh #define TSB_SIZE_2K		0x02
    284  1.1  eeh #define TSB_SIZE_4K		0x03
    285  1.1  eeh #define	TSB_SIZE_8K		0x04
    286  1.1  eeh #define TSB_SIZE_16K		0x05
    287  1.1  eeh #define TSB_SIZE_32K		0x06
    288  1.1  eeh #define TSB_SIZE_64K		0x07
    289  1.1  eeh #define TSB_SPLIT		0x1000
    290  1.1  eeh #define TSB_BASE		0xffffffffffffe000
    291  1.1  eeh 
    292  1.1  eeh /*  TLB Tag Access bits */
    293  1.1  eeh #define TLB_TAG_ACCESS_VA	0xffffffffffffe000
    294  1.1  eeh #define TLB_TAG_ACCESS_CTX	0x0000000000001fff
    295  1.1  eeh 
    296  1.1  eeh /*
    297  1.1  eeh  * TLB demap registers.  TTEs are defined in v9pte.h
    298  1.1  eeh  *
    299  1.1  eeh  * Use the address space to select between IMMU and DMMU.
    300  1.1  eeh  * The address of the register selects which context register
    301  1.1  eeh  * to read the ASI from.
    302  1.1  eeh  *
    303  1.1  eeh  * The data stored in the register is interpreted as the VA to
    304  1.1  eeh  * use.  The DEMAP_CTX_<> registers ignore the address and demap the
    305  1.1  eeh  * entire ASI.
    306  1.1  eeh  *
    307  1.1  eeh  */
    308  1.1  eeh #define ASI_IMMU_DEMAP			0x57	/* [4u] IMMU TLB demap */
    309  1.1  eeh #define ASI_DMMU_DEMAP			0x5f	/* [4u] IMMU TLB demap */
    310  1.1  eeh 
    311  1.1  eeh #define DEMAP_PAGE_NUCLEUS		((0x02)<<4)	/* Demap page from kernel AS */
    312  1.1  eeh #define DEMAP_PAGE_PRIMARY		((0x00)<<4)	/* Demap a page from primary CTXT */
    313  1.1  eeh #define DEMAP_PAGE_SECONDARY		((0x01)<<4)	/* Demap page from secondary CTXT (DMMU only) */
    314  1.1  eeh #define DEMAP_CTX_NUCLEUS		((0x06)<<4)	/* Demap all of kernel CTXT */
    315  1.1  eeh #define DEMAP_CTX_PRIMARY		((0x04)<<4)	/* Demap all of primary CTXT */
    316  1.1  eeh #define DEMAP_CTX_SECONDARY		((0x05)<<4)	/* Demap all of secondary CTXT */
    317  1.1  eeh 
    318  1.1  eeh /*
    319  1.1  eeh  * Interrupt registers.  This really gets hairy.
    320  1.1  eeh  */
    321  1.1  eeh 
    322  1.1  eeh /* IRSR -- Interrupt Receive Status Ragister */
    323  1.1  eeh #define ASI_IRSR	0x49
    324  1.1  eeh #define IRSR		0x00
    325  1.1  eeh #define IRSR_BUSY	0x010
    326  1.1  eeh #define IRSR_MID(x)	(x&0xf)
    327  1.1  eeh 
    328  1.1  eeh /* IRDR -- Interrupt Receive Data Registers */
    329  1.1  eeh #define ASI_IRDR	0x7f
    330  1.1  eeh #define IRDR_0H		0x40
    331  1.1  eeh #define IRDR_0L		0x48	/* unimplemented */
    332  1.1  eeh #define IRDR_1H		0x50
    333  1.1  eeh #define IRDR_1L		0x58	/* unimplemented */
    334  1.1  eeh #define IRDR_2H		0x60
    335  1.1  eeh #define IRDR_2L		0x68	/* unimplemented */
    336  1.1  eeh #define IRDR_3H		0x70	/* unimplemented */
    337  1.1  eeh #define IRDR_3L		0x78	/* unimplemented */
    338  1.1  eeh 
    339  1.1  eeh /* SOFTINT ASRs */
    340  1.1  eeh #define SET_SOFTINT	%asr20	/* Sets these bits */
    341  1.1  eeh #define CLEAR_SOFTINT	%asr21	/* Clears these bits */
    342  1.1  eeh #define SOFTINT		%asr22	/* Reads the register */
    343  1.1  eeh 
    344  1.1  eeh #define	TICK_INT	0x01	/* level-14 clock tick */
    345  1.1  eeh #define SOFTINT1	(0x1<<1)
    346  1.1  eeh #define SOFTINT2	(0x1<<2)
    347  1.1  eeh #define SOFTINT3	(0x1<<3)
    348  1.1  eeh #define SOFTINT4	(0x1<<4)
    349  1.1  eeh #define SOFTINT5	(0x1<<5)
    350  1.1  eeh #define SOFTINT6	(0x1<<6)
    351  1.1  eeh #define SOFTINT7	(0x1<<7)
    352  1.1  eeh #define SOFTINT8	(0x1<<8)
    353  1.1  eeh #define SOFTINT9	(0x1<<9)
    354  1.1  eeh #define SOFTINT10	(0x1<<10)
    355  1.1  eeh #define SOFTINT11	(0x1<<11)
    356  1.1  eeh #define SOFTINT12	(0x1<<12)
    357  1.1  eeh #define SOFTINT13	(0x1<<13)
    358  1.1  eeh #define SOFTINT14	(0x1<<14)
    359  1.1  eeh #define SOFTINT15	(0x1<<15)
    360  1.1  eeh 
    361  1.1  eeh /* Interrupt Dispatch -- usually reserved for cross-calls */
    362  1.1  eeh #define ASR_IDSR	0x48 /* Interrupt dispatch status reg */
    363  1.1  eeh #define IDSR		0x00
    364  1.1  eeh #define IDSR_NACK	0x02
    365  1.1  eeh #define IDSR_BUSY	0x01
    366  1.1  eeh 
    367  1.1  eeh #define ASI_INTERRUPT_DISPATCH		0x77	/* [4u] spitfire interrupt dispatch regs */
    368  1.1  eeh #define IDCR(x)		(((x)<<14)&0x70)	/* Store anything to this address to dispatch crosscall to CPU (x) */
    369  1.1  eeh #define IDDR_0H		0x40			/* Store data to send in these regs */
    370  1.1  eeh #define IDDR_0L		0x48	/* unimplemented */
    371  1.1  eeh #define IDDR_1H		0x50
    372  1.1  eeh #define IDDR_1L		0x58	/* unimplemented */
    373  1.1  eeh #define IDDR_2H		0x60
    374  1.1  eeh #define IDDR_2L		0x68	/* unimplemented */
    375  1.1  eeh #define IDDR_3H		0x70	/* unimplemented */
    376  1.1  eeh #define IDDR_3L		0x78	/* unimplemented */
    377  1.1  eeh 
    378  1.1  eeh /*
    379  1.1  eeh  * Error registers
    380  1.1  eeh  */
    381  1.1  eeh 
    382  1.1  eeh /* Since we won't try to fix async errs, we don't care about the bits in the regs */
    383  1.1  eeh #define ASI_AFAR	0x4d	/* Asynchronous fault address register */
    384  1.1  eeh #define AFAR		0x00
    385  1.1  eeh #define ASI_AFSR	0x4c	/* Asynchronous fault status register */
    386  1.1  eeh #define AFSR		0x00
    387  1.1  eeh 
    388  1.1  eeh #define ASI_P_EER	0x4b	/* Error enable register */
    389  1.1  eeh #define P_EER		0x00
    390  1.1  eeh #define P_EER_ISAPEN	0x04	/* Enable fatal on ISAP */
    391  1.1  eeh #define P_EER_NCEEN	0x02	/* Enable trap on uncorrectable errs */
    392  1.1  eeh #define P_EER_CEEN	0x01	/* Enable trap on correctable errs */
    393  1.1  eeh 
    394  1.1  eeh #define ASI_DATAPATH_READ	0x7f /* Read the regs */
    395  1.1  eeh #define ASI_DATAPATH_WRITE	0x77 /* Write to the regs */
    396  1.1  eeh #define P_DPER_0	0x00	/* Datapath err reg 0 */
    397  1.1  eeh #define P_DPER_1	0x18	/* Datapath err reg 1 */
    398  1.1  eeh #define P_DCR_0		0x20	/* Datapath control reg 0 */
    399  1.1  eeh #define P_DCR_1		0x38	/* Datapath control reg 0 */
    400  1.1  eeh 
    401  1.1  eeh #if 0
    402  1.1  eeh /*
    403  1.1  eeh  * [4/4c] Registers in the control space (ASI_CONTROL).
    404  1.1  eeh  */
    405  1.1  eeh #define	AC_IDPROM	0x00000000	/* [4] ID PROM */
    406  1.1  eeh #define	AC_CONTEXT	0x30000000	/* [4/4c] context register (byte) */
    407  1.1  eeh #define	AC_SYSENABLE	0x40000000	/* [4/4c] system enable register (byte) */
    408  1.1  eeh #define	AC_DVMA_ENABLE	0x50000000	/* [4] enable user dvma */
    409  1.1  eeh #define	AC_BUS_ERR	0x60000000	/* [4] bus error register */
    410  1.1  eeh #define	AC_SYNC_ERR	0x60000000	/* [4c] sync (memory) error reg */
    411  1.1  eeh #define	AC_SYNC_VA	0x60000004	/* [4c] sync error virtual addr */
    412  1.1  eeh #define	AC_ASYNC_ERR	0x60000008	/* [4c] async error reg */
    413  1.1  eeh #define	AC_ASYNC_VA	0x6000000c	/* [4c] async error virtual addr */
    414  1.1  eeh #define	AC_DIAG_REG	0x70000000	/* [4] diagnostic reg */
    415  1.1  eeh #define	AC_CACHETAGS	0x80000000	/* [4/4c?] cache tag base address */
    416  1.1  eeh #define	AC_CACHEDATA	0x90000000	/* [4] cached data [sun4/400?] */
    417  1.1  eeh #define	AC_DVMA_MAP	0xd0000000	/* [4] user dvma map entries */
    418  1.1  eeh #define AC_VMEINTVEC	0xe0000000	/* [4] vme interrupt vector */
    419  1.1  eeh #define	AC_SERIAL	0xf0000000	/* [4/4c] special serial port sneakiness */
    420  1.1  eeh 	/* AC_SERIAL is not used in the kernel (it is for the PROM) */
    421  1.1  eeh 
    422  1.1  eeh /* XXX: does not belong here */
    423  1.1  eeh #define	ME_REG_IERR	0x80		/* memory err ctrl reg error intr pending bit */
    424  1.1  eeh 
    425  1.1  eeh /*
    426  1.1  eeh  * [4/4c]
    427  1.1  eeh  * Bits in sync error register.  Reading the register clears these;
    428  1.1  eeh  * otherwise they accumulate.  The error(s) occurred at the virtual
    429  1.1  eeh  * address stored in the sync error address register, and may have
    430  1.1  eeh  * been due to, e.g., what would usually be called a page fault.
    431  1.1  eeh  * Worse, the bits accumulate during instruction prefetch, so
    432  1.1  eeh  * various bits can be on that should be off.
    433  1.1  eeh  */
    434  1.1  eeh #define	SER_WRITE	0x8000		/* error occurred during write */
    435  1.1  eeh #define	SER_INVAL	0x80		/* PTE had PG_V off */
    436  1.1  eeh #define	SER_PROT	0x40		/* operation violated PTE prot */
    437  1.1  eeh #define	SER_TIMEOUT	0x20		/* bus timeout (non-existent mem) */
    438  1.1  eeh #define	SER_SBUSERR	0x10		/* S-Bus bus error */
    439  1.1  eeh #define	SER_MEMERR	0x08		/* memory ecc/parity error */
    440  1.1  eeh #define	SER_SZERR	0x02		/* [4/vme?] size error, whatever that is */
    441  1.1  eeh #define	SER_WATCHDOG	0x01		/* watchdog reset (never see this) */
    442  1.1  eeh 
    443  1.1  eeh #define	SER_BITS \
    444  1.1  eeh "\20\20WRITE\10INVAL\7PROT\6TIMEOUT\5SBUSERR\4MEMERR\2SZERR\1WATCHDOG"
    445  1.1  eeh 
    446  1.1  eeh /*
    447  1.1  eeh  * [4/4c]
    448  1.1  eeh  * Bits in async error register (errors from DVMA or Sun-4 cache
    449  1.1  eeh  * writeback).  The corresponding bit is also set in the sync error reg.
    450  1.1  eeh  *
    451  1.1  eeh  * A writeback invalid error means there is a bug in the PTE manager.
    452  1.1  eeh  *
    453  1.1  eeh  * The word is that the async error register does not work right.
    454  1.1  eeh  */
    455  1.1  eeh #define	AER_WBINVAL	0x80		/* writeback found PTE without PG_V */
    456  1.1  eeh #define	AER_TIMEOUT	0x20		/* bus timeout */
    457  1.1  eeh #define	AER_DVMAERR	0x10		/* bus error during DVMA */
    458  1.1  eeh 
    459  1.1  eeh #define	AER_BITS	"\20\10WBINVAL\6TIMEOUT\5DVMAERR"
    460  1.1  eeh 
    461  1.1  eeh /*
    462  1.1  eeh  * [4/4c] Bits in system enable register.
    463  1.1  eeh  */
    464  1.1  eeh #define	SYSEN_DVMA	0x20		/* Enable dvma */
    465  1.1  eeh #define	SYSEN_CACHE	0x10		/* Enable cache */
    466  1.1  eeh #define	SYSEN_IOCACHE	0x40		/* Enable IO cache */
    467  1.1  eeh #define	SYSEN_VIDEO	0x08		/* Enable on-board video */
    468  1.1  eeh #define	SYSEN_RESET	0x04		/* Reset the hardware */
    469  1.1  eeh #define	SYSEN_RESETVME	0x02		/* Reset the VME bus */
    470  1.1  eeh 
    471  1.1  eeh 
    472  1.1  eeh /*
    473  1.1  eeh  * [4m] Bits in ASI_CONTROL? space, sun4m only.
    474  1.1  eeh  */
    475  1.1  eeh #define MXCC_ENABLE_ADDR	0x1c00a00	/* Enable register for MXCC */
    476  1.1  eeh #define MXCC_ENABLE_BIT		0x4		/* Enable bit for MXCC */
    477  1.1  eeh 
    478  1.1  eeh /*
    479  1.1  eeh  * Bits in ASI_SRMMUFP space.
    480  1.1  eeh  *	Bits 8-11 determine the type of flush/probe.
    481  1.1  eeh  *	Address bits 12-31 hold the page frame.
    482  1.1  eeh  */
    483  1.1  eeh #define ASI_SRMMUFP_L3	(0<<8)	/* probe L3	| flush L3 PTE */
    484  1.1  eeh #define ASI_SRMMUFP_L2	(1<<8)	/* probe L2	| flush L2/L3 PTE/PTD's */
    485  1.1  eeh #define ASI_SRMMUFP_L1	(2<<8)	/* probe L1	| flush L1/L2/L3 PTE/PTD's*/
    486  1.1  eeh #define ASI_SRMMUFP_L0	(3<<8)	/* probe L0	| flush L0/L1/L2/L3 PTE/PTD's */
    487  1.1  eeh #define ASI_SRMMUFP_LN	(4<<8)	/* probe all	| flush all levels */
    488  1.1  eeh 
    489  1.1  eeh /*
    490  1.1  eeh  * [4m] Registers and bits in the SPARC Reference MMU (ASI_SRMMU).
    491  1.1  eeh  */
    492  1.1  eeh #define SRMMU_PCR	0x00000000	/* Processor control register */
    493  1.1  eeh #define SRMMU_CXTPTR	0x00000100	/* Context table pointer register */
    494  1.1  eeh #define SRMMU_CXR	0x00000200	/* Context register */
    495  1.1  eeh #define SRMMU_SFSTAT	0x00000300	/* Synchronous fault status reg */
    496  1.1  eeh #define SRMMU_SFADDR	0x00000400	/* Synchronous fault address reg */
    497  1.1  eeh #define SRMMU_AFSTAT	0x00000500	/* Asynchronous fault status reg (HS) */
    498  1.1  eeh #define SRMMU_AFADDR	0x00000600	/* Asynchronous fault address reg (HS)*/
    499  1.1  eeh #define SRMMU_TLBCTRL	0x00001000	/* TLB replacement control reg */
    500  1.1  eeh 
    501  1.1  eeh /* [4m] Bits in SRMMU control register */
    502  1.1  eeh #define SRMMU_PCR_ME	0x00000001	/* MMU Enable */
    503  1.1  eeh #define SRMMU_PCR_NF	0x00000002	/* Fault inhibit bit */
    504  1.1  eeh #define SRMMU_PCR_PSO	0x00000080	/* Partial Store Ordering enable */
    505  1.1  eeh #define SRMMU_PCR_CE	0x00000100	/* HS: Cache enable bit (HyperSPARC) */
    506  1.1  eeh #define SRMMU_PCR_DCE	0x00000100	/* SS: Data cache enable bit */
    507  1.1  eeh #define SRMMU_PCR_ICE	0x00000200	/* SS: SuperSPARC instr. cache enable */
    508  1.1  eeh #define SRMMU_PCR_CM	0x00000400	/* HS: Cache mode: 1 == write-back */
    509  1.1  eeh #define SRMMU_PCR_SB	0x00000400	/* SS: Store buffer enable bit */
    510  1.1  eeh #define	SRMMU_PCR_MR	0x00000800	/* HS: Memory reflection: 1 == on */
    511  1.1  eeh #define SRMMU_PCR_MB	0x00000800	/* SS: MBus mode: 0=MXCC, 1=no MXCC */
    512  1.1  eeh #define SRMMU_PCR_CS	0x00001000	/* HS: cache size: 1==256k, 0==128k */
    513  1.1  eeh #define SRMMU_PCR_PE	0x00001000	/* SS: Enable memory parity checking */
    514  1.1  eeh #define SRMMU_PCR_C	0x00002000	/* HS: enable cache when MMU off */
    515  1.1  eeh #define SRMMU_PCR_SSBM	0x00002000	/* SS: 1 iff booting */
    516  1.1  eeh #define SRMMU_PCR_HSBM	0x00004000	/* HS: 1 iff booting */
    517  1.1  eeh #define SRMMU_PCR_SSSE	0x00004000	/* SS: Coherent bus snoop enable */
    518  1.1  eeh #define SRMMU_PCR_AC	0x00008000	/* SS: 1=cache non-MMU accesses */
    519  1.1  eeh #define	SRMMU_PCR_TC	0x00010000	/* SS: 1=cache table walks */
    520  1.1  eeh #define SRMMU_PCR_MID	0x00078000	/* HS: MBus module ID MID<3:0> */
    521  1.1  eeh #define SRMMU_PCR_WBE	0x00080000	/* HS: Write buffer enable */
    522  1.1  eeh #define SRMMU_PCR_HSSE	0x00100000	/* HS: Coherent bus snoop enable */
    523  1.1  eeh #define SRMMU_PCR_CWR	0x00200000	/* HS: Cache wrap enable */
    524  1.1  eeh #define SRMMU_PCR_VER	0x0f000000	/* Version of MMU implementation */
    525  1.1  eeh #define SRMMU_PCR_IMPL	0xf0000000	/* Implementation number of MMU */
    526  1.1  eeh 
    527  1.1  eeh #ifdef notyet
    528  1.1  eeh #define SRMMU_PCR_INITIAL (SRMMU_PCR_ME | SRMMU_PCR_TC)
    529  1.1  eeh #endif
    530  1.1  eeh 
    531  1.1  eeh /* [4m] Bits in the Synchronous Fault Status Register */
    532  1.1  eeh #define SFSR_EM		0x00020000	/* Error mode watchdog reset occurred */
    533  1.1  eeh #define SFSR_CS		0x00010000	/* Control Space error */
    534  1.1  eeh #define SFSR_PERR	0x00006000	/* Parity error code */
    535  1.1  eeh #define SFSR_SB		0x00008000	/* SS: Store Buffer Error */
    536  1.1  eeh #define SFSR_P		0x00004000	/* SS: Parity error */
    537  1.1  eeh #define SFSR_UC		0x00001000	/* Uncorrectable error */
    538  1.1  eeh #define SFSR_TO		0x00000800	/* S-Bus timeout */
    539  1.1  eeh #define SFSR_BE		0x00000400	/* S-Bus bus error */
    540  1.1  eeh #define SFSR_LVL	0x00000300	/* Pagetable level causing the fault */
    541  1.1  eeh #define SFSR_AT		0x000000e0	/* Access type */
    542  1.1  eeh #define SFSR_FT		0x0000001c	/* Fault type */
    543  1.1  eeh #define SFSR_FAV	0x00000002	/* Fault Address is valid */
    544  1.1  eeh #define SFSR_OW		0x00000001	/* Overwritten with new fault */
    545  1.1  eeh 
    546  1.1  eeh #define	SFSR_BITS \
    547  1.1  eeh "\20\21CSERR\17PARITY\16SYSERR\15UNCORR\14TIMEOUT\13BUSERR\2FAV\1OW"
    548  1.1  eeh 
    549  1.1  eeh /* [4m] Synchronous Fault Types */
    550  1.1  eeh #define SFSR_FT_NONE		(0 << 2) 	/* no fault */
    551  1.1  eeh #define SFSR_FT_INVADDR		(1 << 2)	/* invalid address fault */
    552  1.1  eeh #define SFSR_FT_PROTERR		(2 << 2)	/* protection fault */
    553  1.1  eeh #define SFSR_FT_PRIVERR		(3 << 2)	/* privelege violation */
    554  1.1  eeh #define SFSR_FT_TRANSERR	(4 << 2)	/* translation fault */
    555  1.1  eeh #define SFSR_FT_BUSERR		(5 << 2)	/* access bus error */
    556  1.1  eeh #define SFSR_FT_INTERR		(6 << 2)	/* internal error */
    557  1.1  eeh #define SFSR_FT_RESERVED	(7 << 2)	/* reserved */
    558  1.1  eeh 
    559  1.1  eeh /* [4m] Synchronous Fault Access Types */
    560  1.1  eeh #define SFSR_AT_LDUDATA		(0 << 5)     	/* Load user data */
    561  1.1  eeh #define SFSR_AT_LDSDATA		(1 << 5)	/* Load supervisor data */
    562  1.1  eeh #define SFSR_AT_LDUTEXT		(2 << 5)	/* Load user text */
    563  1.1  eeh #define SFSR_AT_LDSTEXT		(3 << 5)	/* Load supervisor text */
    564  1.1  eeh #define SFSR_AT_STUDATA		(4 << 5)	/* Store user data */
    565  1.1  eeh #define SFSR_AT_STSDATA		(5 << 5) 	/* Store supervisor data */
    566  1.1  eeh #define SFSR_AT_STUTEXT		(6 << 5)	/* Store user text */
    567  1.1  eeh #define SFSR_AT_STSTEXT		(7 << 5)	/* Store supervisor text */
    568  1.1  eeh #define SFSR_AT_SUPERVISOR	(1 << 5)	/* Set iff supervisor */
    569  1.1  eeh #define SFSR_AT_TEXT		(2 << 5)	/* Set iff text */
    570  1.1  eeh #define SFSR_AT_STORE		(4 << 5)	/* Set iff store */
    571  1.1  eeh 
    572  1.1  eeh /* [4m] Synchronous Fault PT Levels */
    573  1.1  eeh #define SFSR_LVL_0		(0 << 8)	/* Context table entry */
    574  1.1  eeh #define SFSR_LVL_1		(1 << 8)	/* Region table entry */
    575  1.1  eeh #define SFSR_LVL_2		(2 << 8)	/* Segment table entry */
    576  1.1  eeh #define SFSR_LVL_3		(3 << 8)	/* Page table entry */
    577  1.1  eeh 
    578  1.1  eeh /* [4m] Asynchronous Fault Status Register bits */
    579  1.1  eeh #define AFSR_AFO	0x00000001	/* Async. fault occurred */
    580  1.1  eeh #define AFSR_AFA	0x000000f0	/* Bits <35:32> of faulting phys addr */
    581  1.1  eeh #define AFSR_AFA_RSHIFT	4		/* Shift to get AFA to bit 0 */
    582  1.1  eeh #define AFSR_AFA_LSHIFT	28		/* Shift to get AFA to bit 32 */
    583  1.1  eeh #define AFSR_BE		0x00000400	/* Bus error */
    584  1.1  eeh #define AFSR_TO		0x00000800	/* Bus timeout */
    585  1.1  eeh #define AFSR_UC		0x00001000	/* Uncorrectable error */
    586  1.1  eeh #define AFSR_SE		0x00002000	/* System error */
    587  1.1  eeh 
    588  1.1  eeh #define	AFSR_BITS	"\20\16SYSERR\15UNCORR\14TIMEOUT\13BUSERR\1AFO"
    589  1.1  eeh 
    590  1.1  eeh /* [4m] TLB Replacement Control Register bits */
    591  1.1  eeh #define TLBC_DISABLE	0x00000020	/* Disable replacement counter */
    592  1.1  eeh #define TLBC_RCNTMASK	0x0000001f	/* Replacement counter (0-31) */
    593  1.1  eeh #endif
    594