From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZFIw-0003Mw-4O for qemu-devel@nongnu.org; Sun, 15 Oct 2006 19:22:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZFIv-0003Kj-8K for qemu-devel@nongnu.org; Sun, 15 Oct 2006 19:22:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZFIv-0003KL-5U for qemu-devel@nongnu.org; Sun, 15 Oct 2006 19:22:01 -0400 Received: from [65.74.133.4] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GZFRu-0008Bs-Eo for qemu-devel@nongnu.org; Sun, 15 Oct 2006 19:31:18 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Question about target port Date: Mon, 16 Oct 2006 00:15:11 +0100 References: <56d259a00610100407p2529dbasd5ae43ade7901c66@mail.gmail.com> In-Reply-To: <56d259a00610100407p2529dbasd5ae43ade7901c66@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610160015.14213.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Martin Guy On Tuesday 10 October 2006 12:07, Martin Guy wrote: > > How can I change target CPU to Atmel's AVR and don't care about host. > > i.e:host CPU is X86(PC),target CPU is Atmel's AVR. > > Hi > Atmel AVR is a different processor from the ones that QEMU emulates. > You would need to implement an entire new emulation inside QEMU; that > is a LOT of work in C programming. It is also an 8-bit processor, > while all the ones that qemu currently emulates are 32-bit, so you may > need to restructure the code as well to support 8-bit. I got the impression the AVR was a fairly straightforward CPU. I wouldn't expect the 8-bitness to be a particular problem. x86 has lots of crufty 16 and 8-bit corners :-) It might not be amazingly efficient, but real AVR silicon is really slow anyway. IIRC AVR has separate code and data address spaces. However as these are both <32-bit you can probably fake this by implementing them as offsets within a single 32-bit address space. That said, porting qemu to a new cpu is a fair amount of work, especially if you're not familiar with qemu internals. I recommend looking back in the list archives to CVS for where the mips and SH ports were added. That will give you some indication of the magnitude of the changes required. Paul