summaryrefslogtreecommitdiff
path: root/board/emulation/qemu-riscv/qemu-riscv.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/emulation/qemu-riscv/qemu-riscv.c')
-rw-r--r--board/emulation/qemu-riscv/qemu-riscv.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
new file mode 100644
index 0000000000..041e716c9b
--- /dev/null
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+#include <common.h>
+#include <fdtdec.h>
+
+#define MROM_FDT_ADDR 0x1020
+
+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;
+}