qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Simon Glass <sjg@chromium.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 16:45:53 +0100	[thread overview]
Message-ID: <CAFEAcA8FsPcBELEZxiRMuFbKtmKTFgDHABePQ33hdxYRq0C0ig@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ1AO8575LYbwmuouNR5=dgNam6EFDC1_bai=8xAHdw7-Q@mail.gmail.com>

On Mon, 27 Sept 2021 at 16:18, Simon Glass <sjg@chromium.org> wrote:
> On Mon, 27 Sept 2021 at 02:48, Peter Maydell <peter.maydell@linaro.org> wrote:
> > 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

It's up to u-boot to decide what it wants to touch and
what it does not. QEMU tells u-boot what all the available
devices are; I don't think we should have extra stuff saying
"and if you are u-boot, do something odd".

> 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

I think u-boot should be storing this kind of thing somewhere
else (e.g. as part of the binary blob that is u-boot itself,
or stored in flash or RAM as a separate blob).

> 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

If any of this is actual information about the hardware then you
should sort out getting the bindings documented officially
(which I think is still in the Linux tree), and then QEMU can
provide them.

> 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.

My take is that this is u-boot doing weird custom things with
the DTB that aren't "describe the hardware". You should be able
to boot u-boot by putting those custom DTB extra things in a
separate blob and having u-boot combine that with the
actual DTB when it starts.

-- PMM


  reply	other threads:[~2021-09-27 15:48 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
2021-09-27 15:45         ` Peter Maydell [this message]
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=CAFEAcA8FsPcBELEZxiRMuFbKtmKTFgDHABePQ33hdxYRq0C0ig@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sjg@chromium.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).