All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Seth K <skintigh@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Simulating 3 chips on one board
Date: Thu, 29 Sep 2016 00:36:14 +0100	[thread overview]
Message-ID: <87zimrvbpt.fsf@linaro.org> (raw)
In-Reply-To: <CAErn8fSuGWJBZjxNy8SLSs5TFs4VjLM+quiiz+V7ETLk5_s7aA@mail.gmail.com>


Seth K <skintigh@gmail.com> writes:

> I need to simulate 3 chips that are on one board and that talk to each
> other through UART, SPI and GPIO. The chips verify each other's work, and I
> need to be able to observe this communication for debugging. Can something
> like this be done in QEMU?

As Peter has mentioned this isn't supported by upstream. There are a
number of out-of-tree QEMU's that have attempted to solve this problem
which you might want to look at. Typically this involves some sort of
IPC interface to share machine details. The one I'm aware of is the
Xilinx Zynq:

    http://www.wiki.xilinx.com/x--Running%20a%20Zynq%20UltraScale+%20Linux%20Kernel%20Image%20On%20Xilinx's%20ARM/PMU%20QEMU

You might want to look at how they do things for some ideas. I'm afraid
I've never run it myself so you'll have to investigate.

>
> My first thought was to create the chip then create a board/machine with 1
> chip, and run 3 instances of QEMU on the host and have them talk to each
> other via the host (/dev/uart7 for example) but that doesn't seem to be
> possible. It seems QEMU cannot output 8 UARTS (I can't get more than 1) or
> any GPIOs. Is that correct? Not sure about SPIs either.
>
> My next thought was to make 1 board with all three chips, but have some way
> to sniff the UARTs/SPIs/GPIOs between chips. Is that possible in QEMU?

I suspect the first approach is going to be the easier one to do. You
could use sockets to link multiple QEMUs together but its probably a
fair bit of work to get to that point.

Some precursor work for building a heterogeneous QEMU (with multiple CPU
types) was merged but I think the effort has stalled somewhat and needed
a lot more work doing.

--
Alex Bennée

  parent reply	other threads:[~2016-09-28 23:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 21:31 [Qemu-devel] Simulating 3 chips on one board Seth K
2016-09-28 21:59 ` Peter Maydell
2016-09-28 23:36 ` Alex Bennée [this message]
2016-10-07  0:16   ` Alistair Francis

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=87zimrvbpt.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=skintigh@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.