2 * Copyright (c) 2006 The Regents of The University of Michigan
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * 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;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #include "arch/sparc/asi.hh"
40 return asi
== ASI_BLK_AIUP
||
41 asi
== ASI_BLK_AIUS
||
42 asi
== ASI_BLK_AIUP_L
||
43 asi
== ASI_BLK_AIUS_L
||
53 return asi
== ASI_AIUP
||
54 asi
== ASI_BLK_AIUP
||
56 asi
== ASI_BLK_AIUP_L
||
57 asi
== ASI_LDTX_AIUP
||
58 asi
== ASI_LDTX_AIUP_L
||
67 asi
== ASI_PST16_PL
||
68 asi
== ASI_PST32_PL
||
80 asiIsSecondary(ASI asi
)
82 return asi
== ASI_AIUS
||
83 asi
== ASI_BLK_AIUS
||
85 asi
== ASI_BLK_AIUS_L
||
86 asi
== ASI_LDTX_AIUS
||
87 asi
== ASI_LDTX_AIUS_L
||
96 asi
== ASI_PST16_SL
||
97 asi
== ASI_PST32_SL
||
101 asi
== ASI_FL16_SL
||
103 asi
== ASI_LDTX_SL
||
109 asiIsNucleus(ASI asi
)
111 return asi
== ASI_N
||
118 asiIsAsIfUser(ASI asi
)
120 return asi
== ASI_AIUP
||
122 asi
== ASI_BLK_AIUP
||
123 asi
== ASI_BLK_AIUS
||
126 asi
== ASI_BLK_AIUP_L
||
127 asi
== ASI_BLK_AIUS_L
||
128 asi
== ASI_LDTX_AIUP
||
129 asi
== ASI_LDTX_AIUS
||
130 asi
== ASI_LDTX_AIUP_L
||
131 asi
== ASI_LDTX_AIUS_L
;
137 return asi
== ASI_REAL_IO
||
138 asi
== ASI_REAL_IO_L
;
144 return asi
== ASI_REAL
||
145 asi
== ASI_REAL_IO
||
147 asi
== ASI_REAL_IO_L
||
148 asi
== ASI_LDTX_REAL
||
149 asi
== ASI_LDTX_REAL_L
;
155 return asi
== ASI_NL
||
159 asi
== ASI_REAL_IO_L
||
160 asi
== ASI_BLK_AIUP_L
||
161 asi
== ASI_BLK_AIUS_L
||
162 asi
== ASI_LDTX_AIUP_L
||
163 asi
== ASI_LDTX_AIUS_L
||
164 asi
== ASI_LDTX_REAL_L
||
165 asi
== ASI_LDTX_NL
||
170 asi
== ASI_PST8_PL
||
171 asi
== ASI_PST8_SL
||
172 asi
== ASI_PST16_PL
||
173 asi
== ASI_PST16_SL
||
174 asi
== ASI_PST32_PL
||
175 asi
== ASI_PST32_SL
||
178 asi
== ASI_FL16_PL
||
179 asi
== ASI_FL16_SL
||
180 asi
== ASI_LDTX_PL
||
181 asi
== ASI_LDTX_SL
||
190 return (asi
>= ASI_LDTX_AIUP
&&
193 (asi
>= ASI_LDTX_AIUP_L
&&
194 asi
<= ASI_LDTX_NL
&&
198 asi
== ASI_LDTX_PL
||
203 asiIsPartialStore(ASI asi
)
205 return asi
== ASI_PST8_P
||
207 asi
== ASI_PST16_P
||
208 asi
== ASI_PST16_S
||
209 asi
== ASI_PST32_P
||
210 asi
== ASI_PST32_S
||
211 asi
== ASI_PST8_PL
||
212 asi
== ASI_PST8_SL
||
213 asi
== ASI_PST16_PL
||
214 asi
== ASI_PST16_SL
||
215 asi
== ASI_PST32_PL
||
220 asiIsFloatingLoad(ASI asi
)
222 return asi
== ASI_FL8_P
||
228 asi
== ASI_FL16_PL
||
233 asiIsNoFault(ASI asi
)
235 return asi
== ASI_PNF
||
242 asiIsScratchPad(ASI asi
)
244 return asi
== ASI_SCRATCHPAD
||
245 asi
== ASI_HYP_SCRATCHPAD
;
251 return asi
== ASI_CMT_PER_STRAND
||
252 asi
== ASI_CMT_SHARED
;
258 return asi
== ASI_QUEUE
;
262 asiIsInterrupt(ASI asi
)
264 return asi
== ASI_SWVR_INTR_RECEIVE
||
265 asi
== ASI_SWVR_UDB_INTR_W
||
266 asi
== ASI_SWVR_UDB_INTR_R
;
272 return asi
== ASI_MMU
||
273 asi
== ASI_LSU_CONTROL_REG
||
274 (asi
>= ASI_DMMU_CTXT_ZERO_TSB_BASE_PS0
&&
275 asi
<= ASI_IMMU_CTXT_ZERO_CONFIG
) ||
276 (asi
>= ASI_DMMU_CTXT_NONZERO_TSB_BASE_PS0
&&
277 asi
<= ASI_IMMU_CTXT_NONZERO_CONFIG
) ||
279 asi
<= ASI_IMMU_TSB_PS1_PTR_REG
) ||
280 (asi
>= ASI_ITLB_DATA_IN_REG
&&
281 asi
<= ASI_TLB_INVALIDATE_ALL
);
300 return asi
>= 0x30 && asi
<= 0x7f;
306 return asiIsMmu(asi
) || asiIsScratchPad(asi
) ||
307 asiIsSparcError(asi
) || asiIsInterrupt(asi
)
312 asiIsSparcError(ASI asi
)
314 return asi
== ASI_SPARC_ERROR_EN_REG
||
315 asi
== ASI_SPARC_ERROR_STATUS_REG
;