Fix MIPS cache configuration, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3092 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c3d2689d88
commit
ae5d8053a1
@ -28,15 +28,11 @@
|
||||
(0x0 << CP0C0_AT) | (0x0 << CP0C0_AR) | (0x1 << CP0C0_MT) | \
|
||||
(0x2 << CP0C0_K0))
|
||||
|
||||
/* Have config2, 64 sets Icache, 16 bytes Icache line,
|
||||
2-way Icache, 64 sets Dcache, 16 bytes Dcache line, 2-way Dcache,
|
||||
no coprocessor2 attached, no MDMX support attached,
|
||||
/* Have config2, no coprocessor2 attached, no MDMX support attached,
|
||||
no performance counters, watch registers present,
|
||||
no code compression, EJTAG present, no FPU */
|
||||
#define MIPS_CONFIG1 \
|
||||
((1 << CP0C1_M) | \
|
||||
(0x0 << CP0C1_IS) | (0x3 << CP0C1_IL) | (0x1 << CP0C1_IA) | \
|
||||
(0x0 << CP0C1_DS) | (0x3 << CP0C1_DL) | (0x1 << CP0C1_DA) | \
|
||||
(0 << CP0C1_C2) | (0 << CP0C1_MD) | (0 << CP0C1_PC) | \
|
||||
(1 << CP0C1_WR) | (0 << CP0C1_CA) | (1 << CP0C1_EP) | \
|
||||
(0 << CP0C1_FP))
|
||||
@ -82,7 +78,9 @@ static mips_def_t mips_defs[] =
|
||||
.name = "4Kc",
|
||||
.CP0_PRid = 0x00018000,
|
||||
.CP0_Config0 = MIPS_CONFIG0,
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) |
|
||||
(0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
|
||||
(0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA),
|
||||
.CP0_Config2 = MIPS_CONFIG2,
|
||||
.CP0_Config3 = MIPS_CONFIG3,
|
||||
.SYNCI_Step = 32,
|
||||
@ -94,7 +92,9 @@ static mips_def_t mips_defs[] =
|
||||
.name = "4KEcR1",
|
||||
.CP0_PRid = 0x00018400,
|
||||
.CP0_Config0 = MIPS_CONFIG0,
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) |
|
||||
(0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
|
||||
(0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA),
|
||||
.CP0_Config2 = MIPS_CONFIG2,
|
||||
.CP0_Config3 = MIPS_CONFIG3,
|
||||
.SYNCI_Step = 32,
|
||||
@ -106,7 +106,9 @@ static mips_def_t mips_defs[] =
|
||||
.name = "4KEc",
|
||||
.CP0_PRid = 0x00019000,
|
||||
.CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) |
|
||||
(0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
|
||||
(0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA),
|
||||
.CP0_Config2 = MIPS_CONFIG2,
|
||||
.CP0_Config3 = MIPS_CONFIG3,
|
||||
.SYNCI_Step = 32,
|
||||
@ -118,7 +120,9 @@ static mips_def_t mips_defs[] =
|
||||
.name = "24Kc",
|
||||
.CP0_PRid = 0x00019300,
|
||||
.CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) |
|
||||
(0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
|
||||
(0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA),
|
||||
.CP0_Config2 = MIPS_CONFIG2,
|
||||
.CP0_Config3 = MIPS_CONFIG3,
|
||||
.SYNCI_Step = 32,
|
||||
@ -130,7 +134,9 @@ static mips_def_t mips_defs[] =
|
||||
.name = "24Kf",
|
||||
.CP0_PRid = 0x00019300,
|
||||
.CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (15 << CP0C1_MMU),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (15 << CP0C1_MMU) |
|
||||
(0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
|
||||
(0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA),
|
||||
.CP0_Config2 = MIPS_CONFIG2,
|
||||
.CP0_Config3 = MIPS_CONFIG3,
|
||||
.SYNCI_Step = 32,
|
||||
@ -145,7 +151,9 @@ static mips_def_t mips_defs[] =
|
||||
.name = "R4000",
|
||||
.CP0_PRid = 0x00000400,
|
||||
.CP0_Config0 = MIPS_CONFIG0 | (0x2 << CP0C0_AT),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (47 << CP0C1_MMU),
|
||||
.CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (47 << CP0C1_MMU) |
|
||||
(0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
|
||||
(0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA),
|
||||
.CP0_Config2 = MIPS_CONFIG2,
|
||||
.CP0_Config3 = MIPS_CONFIG3,
|
||||
.SYNCI_Step = 16,
|
||||
|
Loading…
Reference in New Issue
Block a user