target/mips: Allow Loongson 3A1000 to use up to 48-bit VAddr
cover target/mips: Allow Loongson 3A1000 to use up to 48-bit VAddr
Raise Loongson-3A1000 SEGBITS from 40 to 48.
Philippe Mathieu-Daudé (2):
target/mips: Document Loongson-3A CPU definitions target/mips: Allow Loongson 3A1000 to use up to 48-bit VAddr
target/mips/cpu-defs.c.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/2 target/mips: Document Loongson-3A CPU definitions
Document the cores on which each Loongson-3A CPU is based (see commit af868995e1b, "target/mips: Add Loongson-3 CPU definition").
--- target/mips/cpu-defs.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/mips/cpu-defs.c.inc +2 -2
@@ -805,7 +805,7 @@ const mips_def_t mips_defs[] = .mmu_type = MMU_TYPE_R4000, }, { - .name = "Loongson-3A1000", + .name = "Loongson-3A1000", /* Loongson-3A R1, GS464-based */ .CP0_PRid = 0x6305, /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) |
@@ -835,7 +835,7 @@ const mips_def_t mips_defs[] = .mmu_type = MMU_TYPE_R4000, }, { - .name = "Loongson-3A4000", /* GS464V-based */ + .name = "Loongson-3A4000", /* Loongson-3A R4, GS464V-based */ .CP0_PRid = 0x14C000, /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) |
Signature · 1 line
2.31.1
Re: [PATCH 1/2] target/mips: Document Loongson-3A CPU definitions
Quoted 34 lines · Philippe Mathieu-Daudé
Document the cores on which each Loongson-3A CPU is based (see commit
af868995e1b, "target/mips: Add Loongson-3 CPU definition").Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- target/mips/cpu-defs.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)target/mips/cpu-defs.c.inc +2
-3@@ -805,7 +805,7 @@ const mips_def_t mips_defs[] = .mmu_type = MMU_TYPE_R4000, }, { - .name = "Loongson-3A1000", + .name = "Loongson-3A1000", /* Loongson-3A R1, GS464-based */ .CP0_PRid = 0x6305, /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) |@@ -835,7 +835,7 @@ const mips_def_t mips_defs[] = .mmu_type = MMU_TYPE_R4000, }, { - .name = "Loongson-3A4000", /* GS464V-based */ + .name = "Loongson-3A4000", /* Loongson-3A R4, GS464V-based */ .CP0_PRid = 0x14C000, /* 64KB I-cache and d-cache. 4 way with 32 bit cache line size. */ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) | --2.31.1
PATCH 2/2 target/mips: Allow Loongson 3A1000 to use up to 48-bit VAddr
In reply to Philippe Mathieu-DaudéPer the manual '龙芯 GS264 处理器核用户手册' v1.0, chapter 1.1.5 SEGBITS: the 3A1000 (based on GS464 core) implements 48 virtual address bits in each 64-bit segment, not 40.
--- target/mips/cpu-defs.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/mips/cpu-defs.c.inc +1 -1
@@ -828,7 +828,7 @@ const mips_def_t mips_defs[] = (0x1 << FCR0_D) | (0x1 << FCR0_S), .CP1_fcr31 = 0, .CP1_fcr31_rw_bitmask = 0xFF83FFFF, - .SEGBITS = 42, + .SEGBITS = 48, .PABITS = 48, .insn_flags = CPU_MIPS64R2 | INSN_LOONGSON3A | ASE_LMMI | ASE_LEXT,
Signature · 1 line
2.31.1
Quoted 27 lines · Philippe Mathieu-Daudé
Per the manual '龙芯 GS264 处理器核用户手册' v1.0, chapter 1.1.5 SEGBITS: the 3A1000 (based on GS464 core) implements 48 virtual address bits in each 64-bit segment, not 40.
Fixes af868995e1b ("target/mips: Add Loongson-3 CPU definition")Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- target/mips/cpu-defs.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/mips/cpu-defs.c.inc +1
-2@@ -828,7 +828,7 @@ const mips_def_t mips_defs[] = (0x1 << FCR0_D) | (0x1 << FCR0_S), .CP1_fcr31 = 0, .CP1_fcr31_rw_bitmask = 0xFF83FFFF, - .SEGBITS = 42, + .SEGBITS = 48, .PABITS = 48, .insn_flags = CPU_MIPS64R2 | INSN_LOONGSON3A | ASE_LMMI | ASE_LEXT, --2.31.1
Philippe Mathieu-Daudé
AppliedQuoted 5 lines · Philippe Mathieu-Daudé
Raise Loongson-3A1000 SEGBITS from 40 to 48.
Philippe Mathieu-Daudé (2):
target/mips: Document Loongson-3A CPU definitions target/mips: Allow Loongson 3A1000 to use up to 48-bit VAddr
Thanks, applied to mips-next.