Commit c9c1a064579c51d0133803895da1b7a971191f9a

Authored by ths
1 parent 2052caa7

Add support for 5Kc/5Kf/20Kc, based on a patch by Aurelien Jarno.

Note that the F64 flag isn't usable on any of those (and the R4000),
so all our 64bit FPU goodness goes out of the window until a shadow
capability flag is implemented. :-(


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2910 c046a42c-6fe2-441c-8c8c-71466251a162
hw/mips_malta.c
... ... @@ -784,7 +784,7 @@ void mips_malta_init (int ram_size, int vga_ram_size, int boot_device,
784 784 /* init CPUs */
785 785 if (cpu_model == NULL) {
786 786 #ifdef TARGET_MIPS64
787   - cpu_model = "R4000";
  787 + cpu_model = "20Kc";
788 788 #else
789 789 cpu_model = "24Kf";
790 790 #endif
... ...
target-mips/translate_init.c
... ... @@ -146,9 +146,57 @@ static mips_def_t mips_defs[] =
146 146 .SYNCI_Step = 16,
147 147 .CCRes = 2,
148 148 .Status_rw_bitmask = 0x3678FFFF,
149   - .CP1_fcr0 = (1 << FCR0_F64) | (1 << FCR0_L) | (1 << FCR0_W) |
  149 + /* XXX: The R4000 has a full 64bit FPU doesn't use the fcr0 bits. */
  150 + .CP1_fcr0 = (0x5 << FCR0_PRID) | (0x0 << FCR0_REV),
  151 + },
  152 + {
  153 + .name = "5Kc",
  154 + .CP0_PRid = 0x00018100,
  155 + .CP0_Config0 = MIPS_CONFIG0 | (0x2 << CP0C0_AT),
  156 + .CP0_Config1 = MIPS_CONFIG1 | (31 << CP0C1_MMU) |
  157 + (1 << CP0C1_IS) | (4 << CP0C1_IL) | (1 << CP0C1_IA) |
  158 + (1 << CP0C1_DS) | (4 << CP0C1_DL) | (1 << CP0C1_DA) |
  159 + (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP),
  160 + .CP0_Config2 = MIPS_CONFIG2,
  161 + .CP0_Config3 = MIPS_CONFIG3,
  162 + .SYNCI_Step = 32,
  163 + .CCRes = 2,
  164 + .Status_rw_bitmask = 0x3278FFFF,
  165 + },
  166 + {
  167 + .name = "5Kf",
  168 + .CP0_PRid = 0x00018100,
  169 + .CP0_Config0 = MIPS_CONFIG0 | (0x2 << CP0C0_AT),
  170 + .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (31 << CP0C1_MMU) |
  171 + (1 << CP0C1_IS) | (4 << CP0C1_IL) | (1 << CP0C1_IA) |
  172 + (1 << CP0C1_DS) | (4 << CP0C1_DL) | (1 << CP0C1_DA) |
  173 + (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP),
  174 + .CP0_Config2 = MIPS_CONFIG2,
  175 + .CP0_Config3 = MIPS_CONFIG3,
  176 + .SYNCI_Step = 32,
  177 + .CCRes = 2,
  178 + .Status_rw_bitmask = 0x3678FFFF,
  179 + /* XXX: The 5Kf has F64 / L / W but doesn't use the fcr0 bits. */
  180 + .CP1_fcr0 = (1 << FCR0_D) | (1 << FCR0_S) |
  181 + (0x81 << FCR0_PRID) | (0x0 << FCR0_REV),
  182 + },
  183 + {
  184 + .name = "20Kc",
  185 + .CP0_PRid = 0x00018200,
  186 + .CP0_Config0 = MIPS_CONFIG0 | (0x2 << CP0C0_AT) | (1 << CP0C0_VI),
  187 + .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (47 << CP0C1_MMU) |
  188 + (2 << CP0C1_IS) | (4 << CP0C1_IL) | (3 << CP0C1_IA) |
  189 + (2 << CP0C1_DS) | (4 << CP0C1_DL) | (3 << CP0C1_DA) |
  190 + (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP),
  191 + .CP0_Config2 = MIPS_CONFIG2,
  192 + .CP0_Config3 = MIPS_CONFIG3,
  193 + .SYNCI_Step = 32,
  194 + .CCRes = 2,
  195 + .Status_rw_bitmask = 0x36FBFFFF,
  196 + /* XXX: The 20Kc has F64 / L / W but doesn't use the fcr0 bits. */
  197 + .CP1_fcr0 = (1 << FCR0_3D) | (1 << FCR0_PS) |
150 198 (1 << FCR0_D) | (1 << FCR0_S) |
151   - (0x5 << FCR0_PRID) | (0x0 << FCR0_REV),
  199 + (0x82 << FCR0_PRID) | (0x0 << FCR0_REV),
152 200 },
153 201 #endif
154 202 };
... ...