Revision 129d8aa5 target-alpha/cpu.h
b/target-alpha/cpu.h | ||
---|---|---|
192 | 192 |
|
193 | 193 |
#define SWCR_MASK (SWCR_TRAP_ENABLE_MASK | SWCR_MAP_MASK | SWCR_STATUS_MASK) |
194 | 194 |
|
195 |
/* Internal processor registers */ |
|
196 |
/* XXX: TOFIX: most of those registers are implementation dependant */ |
|
197 |
enum { |
|
198 |
#if defined(CONFIG_USER_ONLY) |
|
199 |
IPR_EXC_ADDR, |
|
200 |
IPR_EXC_SUM, |
|
201 |
IPR_EXC_MASK, |
|
202 |
#else |
|
203 |
/* Ebox IPRs */ |
|
204 |
IPR_CC = 0xC0, /* 21264 */ |
|
205 |
IPR_CC_CTL = 0xC1, /* 21264 */ |
|
206 |
#define IPR_CC_CTL_ENA_SHIFT 32 |
|
207 |
#define IPR_CC_CTL_COUNTER_MASK 0xfffffff0UL |
|
208 |
IPR_VA = 0xC2, /* 21264 */ |
|
209 |
IPR_VA_CTL = 0xC4, /* 21264 */ |
|
210 |
#define IPR_VA_CTL_VA_48_SHIFT 1 |
|
211 |
#define IPR_VA_CTL_VPTB_SHIFT 30 |
|
212 |
IPR_VA_FORM = 0xC3, /* 21264 */ |
|
213 |
/* Ibox IPRs */ |
|
214 |
IPR_ITB_TAG = 0x00, /* 21264 */ |
|
215 |
IPR_ITB_PTE = 0x01, /* 21264 */ |
|
216 |
IPR_ITB_IAP = 0x02, |
|
217 |
IPR_ITB_IA = 0x03, /* 21264 */ |
|
218 |
IPR_ITB_IS = 0x04, /* 21264 */ |
|
219 |
IPR_PMPC = 0x05, |
|
220 |
IPR_EXC_ADDR = 0x06, /* 21264 */ |
|
221 |
IPR_IVA_FORM = 0x07, /* 21264 */ |
|
222 |
IPR_CM = 0x09, /* 21264 */ |
|
223 |
#define IPR_CM_SHIFT 3 |
|
224 |
#define IPR_CM_MASK (3ULL << IPR_CM_SHIFT) /* 21264 */ |
|
225 |
IPR_IER = 0x0A, /* 21264 */ |
|
226 |
#define IPR_IER_MASK 0x0000007fffffe000ULL |
|
227 |
IPR_IER_CM = 0x0B, /* 21264: = CM | IER */ |
|
228 |
IPR_SIRR = 0x0C, /* 21264 */ |
|
229 |
#define IPR_SIRR_SHIFT 14 |
|
230 |
#define IPR_SIRR_MASK 0x7fff |
|
231 |
IPR_ISUM = 0x0D, /* 21264 */ |
|
232 |
IPR_HW_INT_CLR = 0x0E, /* 21264 */ |
|
233 |
IPR_EXC_SUM = 0x0F, |
|
234 |
IPR_PAL_BASE = 0x10, |
|
235 |
IPR_I_CTL = 0x11, |
|
236 |
#define IPR_I_CTL_CHIP_ID_SHIFT 24 /* 21264 */ |
|
237 |
#define IPR_I_CTL_BIST_FAIL (1 << 23) /* 21264 */ |
|
238 |
#define IPR_I_CTL_IC_EN_SHIFT 2 /* 21264 */ |
|
239 |
#define IPR_I_CTL_SDE1_SHIFT 7 /* 21264 */ |
|
240 |
#define IPR_I_CTL_HWE_SHIFT 12 /* 21264 */ |
|
241 |
#define IPR_I_CTL_VA_48_SHIFT 15 /* 21264 */ |
|
242 |
#define IPR_I_CTL_SPE_SHIFT 3 /* 21264 */ |
|
243 |
#define IPR_I_CTL_CALL_PAL_R23_SHIFT 20 /* 21264 */ |
|
244 |
IPR_I_STAT = 0x16, /* 21264 */ |
|
245 |
IPR_IC_FLUSH = 0x13, /* 21264 */ |
|
246 |
IPR_IC_FLUSH_ASM = 0x12, /* 21264 */ |
|
247 |
IPR_CLR_MAP = 0x15, |
|
248 |
IPR_SLEEP = 0x17, |
|
249 |
IPR_PCTX = 0x40, |
|
250 |
IPR_PCTX_ASN = 0x01, /* field */ |
|
251 |
#define IPR_PCTX_ASN_SHIFT 39 |
|
252 |
IPR_PCTX_ASTER = 0x02, /* field */ |
|
253 |
#define IPR_PCTX_ASTER_SHIFT 5 |
|
254 |
IPR_PCTX_ASTRR = 0x04, /* field */ |
|
255 |
#define IPR_PCTX_ASTRR_SHIFT 9 |
|
256 |
IPR_PCTX_PPCE = 0x08, /* field */ |
|
257 |
#define IPR_PCTX_PPCE_SHIFT 1 |
|
258 |
IPR_PCTX_FPE = 0x10, /* field */ |
|
259 |
#define IPR_PCTX_FPE_SHIFT 2 |
|
260 |
IPR_PCTX_ALL = 0x5f, /* all fields */ |
|
261 |
IPR_PCTR_CTL = 0x14, /* 21264 */ |
|
262 |
/* Mbox IPRs */ |
|
263 |
IPR_DTB_TAG0 = 0x20, /* 21264 */ |
|
264 |
IPR_DTB_TAG1 = 0xA0, /* 21264 */ |
|
265 |
IPR_DTB_PTE0 = 0x21, /* 21264 */ |
|
266 |
IPR_DTB_PTE1 = 0xA1, /* 21264 */ |
|
267 |
IPR_DTB_ALTMODE = 0xA6, |
|
268 |
IPR_DTB_ALTMODE0 = 0x26, /* 21264 */ |
|
269 |
#define IPR_DTB_ALTMODE_MASK 3 |
|
270 |
IPR_DTB_IAP = 0xA2, |
|
271 |
IPR_DTB_IA = 0xA3, /* 21264 */ |
|
272 |
IPR_DTB_IS0 = 0x24, |
|
273 |
IPR_DTB_IS1 = 0xA4, |
|
274 |
IPR_DTB_ASN0 = 0x25, /* 21264 */ |
|
275 |
IPR_DTB_ASN1 = 0xA5, /* 21264 */ |
|
276 |
#define IPR_DTB_ASN_SHIFT 56 |
|
277 |
IPR_MM_STAT = 0x27, /* 21264 */ |
|
278 |
IPR_M_CTL = 0x28, /* 21264 */ |
|
279 |
#define IPR_M_CTL_SPE_SHIFT 1 |
|
280 |
#define IPR_M_CTL_SPE_MASK 7 |
|
281 |
IPR_DC_CTL = 0x29, /* 21264 */ |
|
282 |
IPR_DC_STAT = 0x2A, /* 21264 */ |
|
283 |
/* Cbox IPRs */ |
|
284 |
IPR_C_DATA = 0x2B, |
|
285 |
IPR_C_SHIFT = 0x2C, |
|
286 |
|
|
287 |
IPR_ASN, |
|
288 |
IPR_ASTEN, |
|
289 |
IPR_ASTSR, |
|
290 |
IPR_DATFX, |
|
291 |
IPR_ESP, |
|
292 |
IPR_FEN, |
|
293 |
IPR_IPIR, |
|
294 |
IPR_IPL, |
|
295 |
IPR_KSP, |
|
296 |
IPR_MCES, |
|
297 |
IPR_PERFMON, |
|
298 |
IPR_PCBB, |
|
299 |
IPR_PRBR, |
|
300 |
IPR_PTBR, |
|
301 |
IPR_SCBB, |
|
302 |
IPR_SISR, |
|
303 |
IPR_SSP, |
|
304 |
IPR_SYSPTBR, |
|
305 |
IPR_TBCHK, |
|
306 |
IPR_TBIA, |
|
307 |
IPR_TBIAP, |
|
308 |
IPR_TBIS, |
|
309 |
IPR_TBISD, |
|
310 |
IPR_TBISI, |
|
311 |
IPR_USP, |
|
312 |
IPR_VIRBND, |
|
313 |
IPR_VPTB, |
|
314 |
IPR_WHAMI, |
|
315 |
IPR_ALT_MODE, |
|
316 |
#endif |
|
317 |
IPR_LAST, |
|
318 |
}; |
|
319 |
|
|
320 | 195 |
/* MMU modes definitions */ |
321 | 196 |
|
322 | 197 |
/* Alpha has 5 MMU modes: PALcode, kernel, executive, supervisor, and user. |
... | ... | |
350 | 225 |
uint64_t ir[31]; |
351 | 226 |
float64 fir[31]; |
352 | 227 |
uint64_t pc; |
353 |
uint64_t ipr[IPR_LAST]; |
|
354 |
uint64_t ps; |
|
355 | 228 |
uint64_t unique; |
356 | 229 |
uint64_t lock_addr; |
357 | 230 |
uint64_t lock_st_addr; |
... | ... | |
366 | 239 |
uint8_t fpcr_dnod; |
367 | 240 |
uint8_t fpcr_undz; |
368 | 241 |
|
369 |
/* Used for HW_LD / HW_ST */
|
|
370 |
uint8_t saved_mode;
|
|
371 |
/* For RC and RS */
|
|
242 |
/* The Internal Processor Registers. Some of these we assume always
|
|
243 |
exist for use in user-mode. */
|
|
244 |
uint8_t ps;
|
|
372 | 245 |
uint8_t intr_flag; |
246 |
uint8_t pal_mode; |
|
247 |
|
|
248 |
/* These pass data from the exception logic in the translator and |
|
249 |
helpers to the OS entry point. This is used for both system |
|
250 |
emulation and user-mode. */ |
|
251 |
uint64_t trap_arg0; |
|
252 |
uint64_t trap_arg1; |
|
253 |
uint64_t trap_arg2; |
|
373 | 254 |
|
374 | 255 |
#if TARGET_LONG_BITS > HOST_LONG_BITS |
375 | 256 |
/* temporary fixed-point registers |
... | ... | |
381 | 262 |
/* Those resources are used only in Qemu core */ |
382 | 263 |
CPU_COMMON |
383 | 264 |
|
384 |
uint32_t hflags; |
|
385 |
|
|
386 | 265 |
int error_code; |
387 | 266 |
|
388 | 267 |
uint32_t features; |
... | ... | |
492 | 371 |
|
493 | 372 |
uint64_t cpu_alpha_load_fpcr (CPUState *env); |
494 | 373 |
void cpu_alpha_store_fpcr (CPUState *env, uint64_t val); |
495 |
int cpu_alpha_mfpr (CPUState *env, int iprn, uint64_t *valp); |
|
496 |
int cpu_alpha_mtpr (CPUState *env, int iprn, uint64_t val, uint64_t *oldvalp); |
|
497 | 374 |
|
498 | 375 |
static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, |
499 | 376 |
target_ulong *cs_base, int *flags) |
Also available in: Unified diff