Revision 7a387fff target-mips/mips-defs.h

b/target-mips/mips-defs.h
29 29
 * Define a major version 1, minor version 0.
30 30
 */
31 31
#define MIPS_FCR0 ((0 << 16) | (1 << 8) | (1 << 4) | 0)
32
/* Have config1, uses TLB */
33
#define MIPS_CONFIG0_1                                          \
34
((1 << CP0C0_M) | (0 << CP0C0_K23) | (0 << CP0C0_KU) |          \
35
 (1 << CP0C0_MT) | (2 << CP0C0_K0))
32
  /* Have config1, is MIPS32R1, uses TLB, no virtual icache,
33
     uncached coherency */
34
#define MIPS_CONFIG0_1                                            \
35
  ((1 << CP0C0_M) | (0x0 << CP0C0_K23) | (0x0 << CP0C0_KU) |      \
36
   (0x0 << CP0C0_AT) | (0x0 << CP0C0_AR) | (0x1 << CP0C0_MT) |    \
37
   (0x2 << CP0C0_K0))
36 38
#ifdef TARGET_WORDS_BIGENDIAN
37 39
#define MIPS_CONFIG0 (MIPS_CONFIG0_1 | (1 << CP0C0_BE))
38 40
#else
39 41
#define MIPS_CONFIG0 MIPS_CONFIG0_1
40 42
#endif
41
/* 16 TLBs, 64 sets Icache, 16 bytes Icache line, 2-way Icache,
42
 * 64 sets Dcache, 16 bytes Dcache line, 2-way Dcache,
43
 * no performance counters, watch registers present, no code compression,
44
 * EJTAG present, FPU enable bit depending on MIPS_USES_FPU
45
 */
46
#define MIPS_CONFIG1                                            \
47
((15 << CP0C1_MMU) |                                            \
48
 (0x000 << CP0C1_IS) | (0x3 << CP0C1_IL) | (0x01 << CP0C1_IA) | \
49
 (0x000 << CP0C1_DS) | (0x3 << CP0C1_DL) | (0x01 << CP0C1_DA) | \
50
 (0 << CP0C1_PC) | (1 << CP0C1_WR) | (0 << CP0C1_CA) |          \
51
 (1 << CP0C1_EP) | (MIPS_USES_FPU << CP0C1_FP))
43
/* Have config2, 16 TLB entries, 64 sets Icache, 16 bytes Icache line,
44
   2-way Icache, 64 sets Dcache, 16 bytes Dcache line, 2-way Dcache,
45
   no coprocessor2 attached, no MDMX support attached,
46
   no performance counters, watch registers present,
47
   no code compression, EJTAG present, FPU enable bit depending on
48
   MIPS_USES_FPU */
49
#define MIPS_CONFIG1_1                                            \
50
((1 << CP0C1_M) | ((MIPS_TLB_NB - 1) << CP0C1_MMU) |              \
51
 (0x0 << CP0C1_IS) | (0x3 << CP0C1_IL) | (0x1 << CP0C1_IA) |      \
52
 (0x0 << CP0C1_DS) | (0x3 << CP0C1_DL) | (0x1 << CP0C1_DA) |      \
53
 (0 << CP0C1_C2) | (0 << CP0C1_MD) | (0 << CP0C1_PC) |            \
54
 (1 << CP0C1_WR) | (0 << CP0C1_CA) | (1 << CP0C1_EP))
55
#ifdef MIPS_USES_FPU
56
#define MIPS_CONFIG1  (MIPS_CONFIG1_1 | (1 << CP0C1_FP))
57
#else
58
#define MIPS_CONFIG1  (MIPS_CONFIG1_1 | (0 << CP0C1_FP))
59
#endif
60
/* Have config3, no tertiary/secondary caches implemented */
61
#define MIPS_CONFIG2                                              \
62
((1 << CP0C2_M))
63
/* No config4, no DSP ASE, no large physaddr,
64
   no external interrupt controller, no vectored interupts,
65
   no 1kb pages, no MT ASE, no SmartMIPS ASE, no trace logic */
66
#define MIPS_CONFIG3                                              \
67
((0 << CP0C3_M) | (0 << CP0C3_DSPP) | (0 << CP0C3_LPA) |          \
68
 (0 << CP0C3_VEIC) | (0 << CP0C3_VInt) | (0 << CP0C3_SP) |        \
69
 (0 << CP0C3_MT) | (0 << CP0C3_SM) | (0 << CP0C3_TL))
52 70
#elif (MIPS_CPU == MIPS_R4Kp)
53 71
/* 32 bits target */
54 72
#define TARGET_LONG_BITS 32
......
60 78
#define MIPS_USES_R4K_FPM
61 79
#else
62 80
#error "MIPS CPU not defined"
63
/* Remainder for other flags */
81
/* Reminder for other flags */
64 82
//#define TARGET_MIPS64
65 83
//#define MIPS_USES_FPU
66 84
#endif

Also available in: Unified diff