qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Martin Guy <martinwguy@gmail.com>
Subject: Re: [Qemu-devel] Question about target port
Date: Mon, 16 Oct 2006 00:15:11 +0100	[thread overview]
Message-ID: <200610160015.14213.paul@codesourcery.com> (raw)
In-Reply-To: <56d259a00610100407p2529dbasd5ae43ade7901c66@mail.gmail.com>

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

  reply	other threads:[~2006-10-15 23:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05  7:22 [Qemu-devel] Question about target port 郭智偉
2006-10-10 11:07 ` Martin Guy
2006-10-15 23:15   ` Paul Brook [this message]
2006-10-16  0:07   ` M. Warner Losh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200610160015.14213.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=martinwguy@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).