qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] hw/openrisc/openrisc_sim; Add support for loading a deci


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/4] hw/openrisc/openrisc_sim; Add support for loading a decice tree
Date: Thu, 10 Feb 2022 12:10:54 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1

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 <shorne@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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]