All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [PATCH] hw/arm/virt: Allow additions to the generated device tree
Date: Mon, 27 Sep 2021 09:17:51 -0600	[thread overview]
Message-ID: <CAPnjgZ1AO8575LYbwmuouNR5=dgNam6EFDC1_bai=8xAHdw7-Q@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9n+2JDFv8BezeEMA4e2Zhr0ENAvzLjBS6YXRoW9P-JXQ@mail.gmail.com>

Hi Peter,

On Mon, 27 Sept 2021 at 02:48, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sun, 26 Sept 2021 at 19:55, Simon Glass <sjg@chromium.org> wrote:
> > In the case of U-Boot at least, it uses the devicetree for
> > configuration (it is a boot loader, so there is no user space to
> > provide configuration). So the current setup is not sufficient to boot
> > it correctly in all cases. On the other hand, the 'virt' feature is
> > very useful for testing U-Boot, so it would be great to be able to
> > support this.
>
> So what is missing in the QEMU-provided DTB that it needs?

Quite a lot. Here are some examples:

U-Boot has limited pre-relocation memory so tries to avoid
binding/probing devices that are not used before relocation:

https://u-boot.readthedocs.io/en/latest/develop/driver-model/design.html#pre-relocation-support

There is a configuration node (which is likely to change form in
future releases, but will still be there)

https://github.com/u-boot/u-boot/blob/master/doc/device-tree-bindings/config.txt

Then there are various features which put things in U-Boot's control
dtb, such as verified boot, which adds public keys during signing:

https://github.com/u-boot/u-boot/blob/master/doc/uImage.FIT/signature.txt#L135

More generally, the U-Boot tree has hundreds of files which add
properties for each board, since we try to keep the U-Boot-specific
things out of the Linux tree:

$ find . -name *u-boot.dtsi |wc -l
398

Quite a bit of this is to do with SPL and so far it seems that QEMU
mostly runs U-Boot proper only, although I see that SPL is starting to
creep in too in the U-Boot CI.

So at present QEMU is not able to support U-Boot fully. It would be
great to add this as we use QEMU heavily in CI testing, e.g. see the
second column here:

https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/9260

Regards,
Simon


  reply	other threads:[~2021-09-27 15:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 18:34 [PATCH] hw/arm/virt: Allow additions to the generated device tree Simon Glass
2021-09-26 18:46 ` Peter Maydell
2021-09-26 18:55   ` Simon Glass
2021-09-27  8:48     ` Peter Maydell
2021-09-27 15:17       ` Simon Glass [this message]
2021-09-27 15:45         ` Peter Maydell
2021-09-27 16:04           ` Simon Glass
2021-09-27 16:49             ` Peter Maydell
2021-09-27 20:12               ` Simon Glass
2021-09-28  9:20                 ` Peter Maydell
2021-09-29  3:01                   ` Simon Glass
2021-09-29  9:09                     ` Peter Maydell
2021-09-29 15:09                       ` Simon Glass
2021-09-29 19:44                         ` Andrew Jones
2021-11-03 11:39           ` Alex Bennée
2021-11-03 13:17             ` François Ozog
2021-11-05 15:50               ` François Ozog
2023-02-07 18:39                 ` Simon Glass

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='CAPnjgZ1AO8575LYbwmuouNR5=dgNam6EFDC1_bai=8xAHdw7-Q@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --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 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.