From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB94d-0001mx-Oo for qemu-devel@nongnu.org; Fri, 03 Jul 2015 18:04:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZB94Y-0002bL-PY for qemu-devel@nongnu.org; Fri, 03 Jul 2015 18:04:43 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:49670 helo=cvs.linux-mips.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB94Y-0002b9-H1 for qemu-devel@nongnu.org; Fri, 03 Jul 2015 18:04:38 -0400 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S27009312AbbGCWEguNu1L (ORCPT ); Sat, 4 Jul 2015 00:04:36 +0200 Date: Fri, 3 Jul 2015 23:04:36 +0100 (BST) Sender: "Maciej W. Rozycki" From: "Maciej W. Rozycki" In-Reply-To: <20150701133732.GA8793@aurel32.net> Message-ID: References: <3e0f5249da1e943da65e0cea0f907a1c7bc3271a.1435723168.git.serge.vakulenko@gmail.com> <20150701133732.GA8793@aurel32.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH pic32 v2 4/5] Two new processor variants: M4K and microAptivP. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Leon Alrae , Serge Vakulenko , qemu-devel@nongnu.org On Wed, 1 Jul 2015, Aurelien Jarno wrote: > > diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c > > index ddfaff8..430a547 100644 > > --- a/target-mips/translate_init.c > > +++ b/target-mips/translate_init.c > > @@ -232,6 +232,52 @@ static const mips_def_t mips_defs[] = > > .mmu_type = MMU_TYPE_FMT, > > }, > > { > > + /* Configuration for Microchip PIC32MX microcontroller. */ > > + .name = "M4K", > > + .CP0_PRid = 0x00018765, Hmm, does it make sense to set the Revision field here? We keep it at 0 for other templates, so why not 0x00018700? Also I suggest to move the template earlier on so that entries remain sorted by PRId, at least within the same vendor. So this would go between "4KEmR1" and "4KEc" (the M4K is an MTI RTL, quite an old one actually). > > + { > > + /* Configuration for Microchip PIC32MZ microcontroller. */ > > + .name = "microAptivP", > > + .CP0_PRid = 0x00019e28, Same question here, why not 0x00019e00? Also why not "microAptivUP" as documentation calls it (vs "microAptivUC")? And again, it looks to me like the entry better followed "M14Kc". > Otherwise it looks ok, though I haven't look at the PIC32 manual to > check the values. I haven't checked if the bit patterns for configuration registers are sane either. These RTLs are configurable, so (within some limits) real hardware will have different values anyway. Maciej