Typo "device" in subject.
On 10/2/22 07:30, Stafford Horne wrote:
Using the device tree means that qemu can now directly tell
the kernel what hardware is configured rather than use having
to maintain and update a separate device tree file.
This patch adds device tree support for the OpenRISC simulator.
A device tree is built up based on the state of the configure
openrisc simulator.
This is then dumpt to memory and the load address is passed to the
"dumped"?
kernel in register r3.
Signed-off-by: Stafford Horne <sho...@gmail.com>
---
hw/openrisc/openrisc_sim.c | 158 ++++++++++++++++++++++++++++++++++++-
1 file changed, 154 insertions(+), 4 deletions(-)
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 5a0cc4d27e..d7c26af82c 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -29,14 +29,20 @@
#include "net/net.h"
#include "hw/loader.h"
#include "hw/qdev-properties.h"
+#include "exec/address-spaces.h"
+#include "sysemu/device_tree.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "hw/core/split-irq.h"
+#include <libfdt.h>
Watch out, you now need to add TARGET_NEED_FDT=y
to configs/targets/or1k-softmmu.mak.