Skip to content
Snippets Groups Projects
Commit 6e10e94f authored by Lukas Auer's avatar Lukas Auer Committed by Andes
Browse files

riscv: qemu: use device tree passed by prior boot stage


QEMU provides a device tree, which is passed to U-Boot using register
a1. We are now able to directly select the device tree with the
configuration CONFIG_OF_PRIOR_STAGE. Replace the hard-coded address in
qemu-riscv with it.

Signed-off-by: default avatarLukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarRick Chen <rick@andestech.com>
parent 5d8b2e77
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,6 @@
#include <virtio_types.h>
#include <virtio.h>
#define MROM_FDT_ADDR 0x1020
int board_init(void)
{
/*
......@@ -21,12 +19,3 @@ int board_init(void)
return 0;
}
void *board_fdt_blob_setup(void)
{
/*
* QEMU loads a generated DTB for us immediately
* after the reset vectors in the MROM
*/
return (void *)MROM_FDT_ADDR;
}
......@@ -3,4 +3,4 @@ CONFIG_TARGET_QEMU_VIRT=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_OF_BOARD=y
CONFIG_OF_PRIOR_STAGE=y
......@@ -4,4 +4,4 @@ CONFIG_ARCH_RV64I=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_OF_BOARD=y
CONFIG_OF_PRIOR_STAGE=y
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment