No device tree source for the QEMU Risc-V virt board?
Michael Opdenacker
michael.opdenacker at bootlin.com
Fri Jan 8 10:02:12 EST 2021
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
More information about the linux-riscv
mailing list