qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] [GSoC?] Board autoconfiguration based on DTB info
Date: Mon, 22 Jan 2018 17:59:00 +0000	[thread overview]
Message-ID: <CAFEAcA9_a9wAdgmW_Ttc53hG8S2cJPu3Jw4noKtOAjzAJa9kUw@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.20.13.1801222034370.13989@monopod.intra.ispras.ru>

On 22 January 2018 at 17:52, Alexander Monakov <amonakov@ispras.ru> wrote:
> Is it feasible to consume a DTB file in Qemu itself to make the board match the
> DeviceTree hardware description? For example on Arm there are quite a few .dts
> files in Linux tree for various boards; having a "generic" Arm board in Qemu that
> could [to what degree?] emulate any of those sounds attractive in theory.

This is an idea that people have suggested before, and it's certainly
an attractive theory, but unfortunately it doesn't work. The dtb files
contain enough information about the hardware to allow an OS (and in
particular Linux) to boot, but they don't include enough information
in all cases to allow QEMU to create the hardware in the correct way.

(There are some specialized situations where you can do it, for
instance if you're an SoC manufacturer and you're creating both
hardware and DTB and QEMU model yourself you can ensure that they're
all consistent and generated from the same original information and
the DTB has all the info QEMU needs in it; but we can't do it upstream
in the general case.)

Also, the main reason we don't have support for a wider range of Arm
boards is that all the devices are different -- it's no good being
able to read a dtb file that says there is a "mediatek,mt6797-uart" at
a particular address if we don't actually have a model of that UART.
Once you have all the device models, wiring up the SoC and board
level code in QEMU isn't really all that difficult (though we could
probably manage to make it a bit less boiler-platy).

thanks
-- PMM

  reply	other threads:[~2018-01-22 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 17:52 [Qemu-devel] [GSoC?] Board autoconfiguration based on DTB info Alexander Monakov
2018-01-22 17:59 ` Peter Maydell [this message]
2018-01-25 11:05   ` Stefan Hajnoczi

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=CAFEAcA9_a9wAdgmW_Ttc53hG8S2cJPu3Jw4noKtOAjzAJa9kUw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=amonakov@ispras.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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 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).