title: How does qemu-riscv pass the Device Tree Blob to the guest kernel?
body: <p>How does the default bios (OpenSBI) in <code>qemu-system-riscv</code> pass the Device Tree Blob to a guest?</p>
  <p>I can see from the <a href="https://qemu-project.gitlab.io/qemu/system/arm/virt.html" rel="nofollow noreferrer">documentation</a> for <code>qemu-system-arm</code> 'virt' platform that QEMU passes the address of the Device Tree Blob (dtb) to guests in r0 when using the Linux Boot Protocol, or at a hard-coded address for bare-metal guest kernels.
  The source code in <code>hw/riscv/virt.c</code> within the QEMU repo shows that a Device Tree Blob is generated for the RISC-V 'virt' platform (Via the <code>create_fdt</code> function), however none of the documentation I can find describes how this is passed to the guest. Any help is appreciated.</p>