[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/4] hw/ppc: Set machine->fdt in e500 machines
From: |
Bernhard Beschow |
Subject: |
[PATCH 1/4] hw/ppc: Set machine->fdt in e500 machines |
Date: |
Wed, 25 Jan 2023 14:00:21 +0100 |
This enables support for the 'dumpdtb' QMP/HMP command for all
e500 machines.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/ppc/e500.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 9fa1f8e6cf..7239993acc 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -659,9 +659,14 @@ done:
if (!dry_run) {
qemu_fdt_dumpdtb(fdt, fdt_size);
cpu_physical_memory_write(addr, fdt, fdt_size);
+
+ /* Set machine->fdt for 'dumpdtb' QMP/HMP command */
+ g_free(machine->fdt);
+ machine->fdt = fdt;
+ } else {
+ g_free(fdt);
}
ret = fdt_size;
- g_free(fdt);
out:
g_free(pci_map);
--
2.39.1
- [PATCH 0/4] E500 cleanups and enhancements, Bernhard Beschow, 2023/01/25
- [PATCH 3/4] hw/ppc/e500.c: Avoid hardcoding parent device in create_devtree_etsec(), Bernhard Beschow, 2023/01/25
- [PATCH 4/4] hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_addr_space, Bernhard Beschow, 2023/01/25
- [PATCH 1/4] hw/ppc: Set machine->fdt in e500 machines,
Bernhard Beschow <=
- [PATCH 2/4] hw/ppc/e500{, plat}: Drop redundant checks for presence of platform bus, Bernhard Beschow, 2023/01/25
- Re: [PATCH 0/4] E500 cleanups and enhancements, Daniel Henrique Barboza, 2023/01/28