Received: from eggs.gnu.org ([2001:4830:134:3::10]:43771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2nx-0007yz-Tq for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:35:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC2nw-0007Zh-N2 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:35:13 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:47400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2nw-0007Yg-FZ for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:35:12 -0400 Date: Mon, 6 Jul 2015 11:35:10 +0200 From: Aurelien Jarno Message-ID: <20150706093510.GB931@aurel32.net> References: <1436163304-6167-1-git-send-email-serge.vakulenko@gmail.com> <1436163304-6167-5-git-send-email-serge.vakulenko@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436163304-6167-5-git-send-email-serge.vakulenko@gmail.com> Subject: Re: [Qemu-devel] [PATCH pic32 v3 04/16] pic32: add two MIPS processor variants: M4K and microAptivUP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Vakulenko Cc: Leon Alrae , qemu-devel@nongnu.org On 2015-07-05 23:14, Serge Vakulenko wrote: > Needed for pic32mx (M4K) and pic32mz (microAptivUP) simulation. > > Signed-off-by: Serge Vakulenko > --- > target-mips/translate_init.c | 46 ++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c > index ddfaff8..8786321 100644 > --- a/target-mips/translate_init.c > +++ b/target-mips/translate_init.c > @@ -190,6 +190,26 @@ static const mips_def_t mips_defs[] = > .mmu_type = MMU_TYPE_FMT, > }, > { > + /* Configuration for Microchip PIC32MX microcontroller. */ > + .name = "M4K", > + .CP0_PRid = 0x00018700, > + .CP0_Config0 = MIPS_CONFIG0 | (2 << CP0C0_K23) | (2 << CP0C0_KU) | > + (1 << CP0C0_BM) | (1 << CP0C0_AR) | > + (MMU_TYPE_FMT << CP0C0_MT), > + .CP0_Config1 = (1U << CP0C1_M) | (1 << CP0C1_CA) | (1 << CP0C1_EP), > + .CP0_Config2 = MIPS_CONFIG2, > + .CP0_Config3 = (1 << CP0C3_VEIC) | (1 << CP0C3_VInt), > + .CP0_LLAddr_rw_bitmask = 0, > + .CP0_LLAddr_shift = 4, > + .SYNCI_Step = 32, > + .CCRes = 2, > + .CP0_Status_rw_bitmask = 0x1258FF17, > + .SEGBITS = 32, > + .PABITS = 32, > + .insn_flags = CPU_MIPS32R2 | ASE_MIPS16, > + .mmu_type = MMU_TYPE_FMT, > + }, > + { > .name = "4KEc", > .CP0_PRid = 0x00019000, > .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | > @@ -389,6 +409,32 @@ static const mips_def_t mips_defs[] = > .mmu_type = MMU_TYPE_R4000, > }, > { > + /* Configuration for Microchip PIC32MZ microcontroller. */ > + .name = "microAptivUP", > + .CP0_PRid = 0x00019e00, > + .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | > + (MMU_TYPE_R4000 << CP0C0_MT), > + .CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) | (1 << CP0C1_PC), > + .CP0_Config2 = MIPS_CONFIG2, > + .CP0_Config3 = (1 << CP0C3_M) | (1 << CP0C3_IPLW) | (1 << CP0C3_MCU) | > + (2 << CP0C3_ISA) | (1 << CP0C3_ULRI) | (1 << CP0C3_RXI) | > + (1 << CP0C3_DSP2P) | (1 << CP0C3_DSPP) | (1 << CP0C3_VEIC) | > + (1 << CP0C3_VInt), > + .CP0_Config4 = (1 << CP0C4_M), > + .CP0_Config5 = (1 << CP0C5_NFExists), > + .CP0_Config6 = 0, > + .CP0_Config7 = 0, > + .CP0_LLAddr_rw_bitmask = 0, > + .CP0_LLAddr_shift = 4, > + .SYNCI_Step = 32, > + .CCRes = 2, > + .CP0_Status_rw_bitmask = 0x1278FF17, > + .SEGBITS = 32, > + .PABITS = 32, > + .insn_flags = CPU_MIPS32R2 | ASE_MICROMIPS | ASE_DSP | ASE_DSPR2, > + .mmu_type = MMU_TYPE_R4000, > + }, > + { > /* A generic CPU providing MIPS32 Release 5 features. > FIXME: Eventually this should be replaced by a real CPU model. */ > .name = "mips32r5-generic", Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net