From: Michael Opdenacker <michael.opdenacker@bootlin.com>
To: Atish Patra <atishp@atishpatra.org>
Cc: linux-riscv <linux-riscv@lists.infradead.org>
Subject: Re: No device tree source for the QEMU Risc-V virt board?
Date: Fri, 8 Jan 2021 16:02:12 +0100 [thread overview]
Message-ID: <ece65eb8-5bb8-5eba-690a-45b84ea2604a@bootlin.com> (raw)
In-Reply-To: <CAOnJCU+QsxmMakcMJTLc7pQSHbEV3tbQq6sRaacNwda-zqxv6A@mail.gmail.com>
Hi Atish,
On 12/23/20 11:59 PM, Atish Patra wrote:
> You shouldn't have to do that. The DTB is copied a few times during the boot.
> In RISC-V, every boot loader stage passes the memory address of DTB in a1.
> Thus, Qemu loader will pass the DTB address in a1 to OpenSBI and
> OpenSBI passes that to U-Boot via a1.
> Before that, OpenSBI may copy the DTB depending on the firmware type
> (fw_jump or fw_dynamic).
> U-Boot relocates the DT the $fdtcontroladdr. You can verify the
> correct fdt by doing the following at U-Boot prompt.
>
> <AT U-Boot prompt>
> #fdt addr $fdtcontroladdr
> #fdt print
Good to know, many thanks. I didn't expect this. Indeed, I can dump the
DT from U-Boot using the above command.
>
> Depending on how you have configured U-Boot, it may again need to be
> copied to fdt_addr_r if that's the address
> you are using while using booti/bootm command so that Linux kernel
> gets the correct DTB address in a1.
Yes, I confirm that I manage to boot the kernel using $ftdcontroladdr.
I'll share the whole process again during my upcoming FOSDEM presentation.
Many thanks again. You helped a lot!
Cheers,
Michael.
--
Michael Opdenacker, CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2021-01-08 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 20:22 No device tree source for the QEMU Risc-V virt board? Michael Opdenacker
2020-12-23 22:59 ` Atish Patra
2021-01-08 15:02 ` Michael Opdenacker [this message]
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=ece65eb8-5bb8-5eba-690a-45b84ea2604a@bootlin.com \
--to=michael.opdenacker@bootlin.com \
--cc=atishp@atishpatra.org \
--cc=linux-riscv@lists.infradead.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