2 * Copyright (c) 2006 Kip Macy
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * from: BSDI: asi.h,v 1.3 1997/08/08 14:31:42 torek
29 #ifndef _MACHINE_ASI_H_
30 #define _MACHINE_ASI_H_
33 * UltraSPARC Architecture 2005 ASIs
35 #define ASI_N 0x04 /* ASI_NUCLEUS */
37 #define ASI_NL 0x0c /* ASI_NUCLEUS_LITTLE */
39 #define ASI_AIUP 0x10 /* ASI_AS_IF_USER_PRIMARY */
40 #define ASI_AIUS 0x11 /* ASI_AS_IF_USER_SECONDARY */
43 #define ASI_REAL_IO 0x15
44 #define ASI_BLK_AIUP 0x16 /* ASI_BLOCK_AS_IF_USER_PRIMARY */
45 #define ASI_BLK_AIUS 0x17 /* ASI_BLOCK_AS_IF_USER_SECONDARY */
46 #define ASI_AIUPL 0x18 /* ASI_AS_IF_USER_PRIMARY_LITTLE */
47 #define ASI_AIUSL 0x19 /* ASI_AS_IF_USER_SECONDARY_LITTLE */
49 #define ASI_REAL_L 0x1C /* ASI_REAL_LITTLE */
50 #define ASI_REAL_IO_L 0x1D /* ASI_REAL_IO_LITTLE */
51 #define ASI_BLK_AIUPL 0x1E /* ASI_BLOCK_AS_IF_USER_PRIMARY_LITTLE */
52 #define ASI_BLK_AIUSL 0x1F /* ASI_BLOCK_AS_IF_USER_SECONDARY_LITTLE */
53 #define ASI_SCRATCHPAD 0x20
54 #define ASI_MMU_CONTEXTID 0x21
55 #define ASI_LDTD_AIUP 0x22 /* ASI_LOAD_TWIN_DW_AS_IF_USER_PRIMARY */
56 #define ASI_LDSTBI_AIUP 0x22
57 #define ASI_LDTD_AIUS 0x23 /* ASI_LOAD_TWIN_DW_AS_IF_USER_SECONDARY */
58 #define ASI_LDSTBI_AIUS 0x23
59 #define ASI_QUEUE 0x25
60 #define ASI_LDTD_REAL 0x26 /* ASI_LOAD_TWIN_DW_REAL */
61 #define ASI_STBI_REAL 0x26
62 #define ASI_LDTD_N 0x27 /* ASI_LOAD_TWIN_DW_NUCLEUS */
63 #define ASI_LDSTBI_N 0x27
65 #define ASI_LDTD_AIUPL 0x2A /* ASI_LD_TWIN_DW_AS_IF_USER_PRIMARY_LITTLE */
66 #define ASI_LDTD_AIUSL 0x2B /* ASI_LD_TWIN_DW_AS_IF_USER_SECONDARY_LITTLE */
68 #define ASI_LDTD_REAL_L 0x2E /* ASI_LOAD_TWIN_DW_REAL_LITTLE */
69 #define ASI_LDTD_NL 0x2F /* ASI_LOAD_TWIN_DW_NUCLEUS_LITTLE */
73 #define ASI_P 0x80 /* ASI_PRIMARY */
74 #define ASI_S 0x81 /* ASI_SECONDARY */
75 #define ASI_PNF 0x82 /* ASI_PRIMARY_NO_FAULT */
76 #define ASI_SNF 0x83 /* ASI_SECONDARY_NO_FAULT */
78 #define ASI_PL 0x88 /* ASI_PRIMARY_LITTLE */
79 #define ASI_SL 0x89 /* ASI_SECONDARY_LITTLE */
80 #define ASI_PNFL 0x8a /* ASI_PRIMARY_NO_FAULT_LITTLE */
81 #define ASI_SNFL 0x8b /* ASI_SECONDARY_NO_FAULT_LITTLE */
83 #define ASI_PST8_P 0xc0
84 #define ASI_PST8_S 0xc1
85 #define ASI_PST16_P 0xc2
86 #define ASI_PST16_S 0xc3
87 #define ASI_PST32_P 0xc4
88 #define ASI_PST32_S 0xc5
91 #define ASI_PST8_PL 0xc8
92 #define ASI_PST8_SL 0xc9
93 #define ASI_PST16_PL 0xca
94 #define ASI_PST16_SL 0xcb
95 #define ASI_PST32_PL 0xcc
96 #define ASI_PST32_SL 0xcd
98 #define ASI_FL8_P 0xd0
99 #define ASI_FL8_S 0xd1
100 #define ASI_FL16_P 0xd2
101 #define ASI_FL16_S 0xd3
103 #define ASI_FL8_PL 0xd8
104 #define ASI_FL8_SL 0xd9
105 #define ASI_FL16_PL 0xda
106 #define ASI_FL16_SL 0xdb
108 #define ASI_LDTD_P 0xe2 /* ASI_LOAD_TWIN_DW_PRIMARY */
109 #define ASI_LDSTBI_P 0xe2
111 #define ASI_LDTD_S 0xe3 /* ASI_LOAD_TWIN_DW_SECONDARY */
113 #define ASI_LDTD_PL 0xea /* ASI_LOAD_TWIN_DW_PRIMARY_LITTLE */
114 #define ASI_LDTD_SL 0xeb /* ASI_LOAD_TWIN_DW_SECONDARY_LITTLE */
116 #define ASI_BLK_P 0xf0 /* ASI_BLOCK_PRIMARY */
117 #define ASI_BLK_S 0xf1 /* ASI_BLOCK_SECONDARY */
119 #define ASI_BLK_PL 0xf8 /* ASI_BLOCK_PRIMARY_LITTLE */
120 #define ASI_BLK_SL 0xf9 /* ASI_BLOCK_SECONDARY_LITTLE */
124 #define ASI_SCRATCHPAD_0_REG 0x00
125 #define ASI_SCRATCHPAD_1_REG 0x08
126 #define ASI_SCRATCHPAD_2_REG 0x10
127 #define ASI_SCRATCHPAD_3_REG 0x18
128 #define ASI_SCRATCHPAD_6_REG 0x30
129 #define ASI_SCRATCHPAD_7_REG 0x38
132 #define SCRATCH_REG_MMFSA ASI_SCRATCHPAD_0_REG
133 #define SCRATCH_REG_PCPU ASI_SCRATCHPAD_1_REG
134 #define SCRATCH_REG_HASH_KERNEL ASI_SCRATCHPAD_2_REG
135 #define SCRATCH_REG_TSB_KERNEL ASI_SCRATCHPAD_3_REG
136 #define SCRATCH_REG_HASH_USER ASI_SCRATCHPAD_6_REG
137 #define SCRATCH_REG_TSB_USER ASI_SCRATCHPAD_7_REG
139 #define MMU_CID_P 0x08
140 #define MMU_CID_S 0x10
142 #define CPU_MONDO_QUEUE_HEAD 0x3c0
143 #define CPU_MONDO_QUEUE_TAIL 0x3c8
144 #define DEV_MONDO_QUEUE_HEAD 0x3d0
145 #define DEV_MONDO_QUEUE_TAIL 0x3d8
146 #define RESUMABLE_ERROR_QUEUE_HEAD 0x3e0
147 #define RESUMABLE_ERROR_QUEUE_TAIL 0x3e8
148 #define NONRESUMABLE_ERROR_QUEUE_HEAD 0x3f0
149 #define NONRESUMABLE_ERROR_QUEUE_TAIL 0x3f8
151 #define Q(queue_head) (queue_head >> 4)
155 * sparc64 compat for the loader
157 #define AA_IMMU_TAR 0x30
158 #define AA_DMMU_TAR 0x30
160 #define ASI_UPA_CONFIG_REG 0x4a /* US-I, II */
161 #define ASI_IMMU 0x50
162 #define ASI_ITLB_DATA_IN_REG 0x54
163 #define ASI_ITLB_DATA_ACCESS_REG 0x55
164 #define ASI_ITLB_TAG_READ_REG 0x56
165 #define ASI_IMMU_DEMAP 0x57
166 #define ASI_DMMU 0x58
167 #define ASI_DTLB_DATA_IN_REG 0x5c
168 #define ASI_DTLB_DATA_ACCESS_REG 0x5d
169 #define ASI_DTLB_TAG_READ_REG 0x5e
171 #endif /* !_MACHINE_ASI_H_ */