From 3c25f487bc0672bf13473f4a7235c3ef592c954c Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 6 Feb 2025 15:12:10 +0000 Subject: hw/openrisc: Support monitor dumpdtb command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The openrisc machines don't set MachineState::fdt to point to their DTB blob. This means that although the command line '-machine dumpdtb=file.dtb' option works, the equivalent QMP and HMP monitor commands do not, but instead produce the error "This machine doesn't have a FDT". Set MachineState::fdt in openrisc_load_fdt(), when we write it to guest memory. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20250206151214.2947842-3-peter.maydell@linaro.org --- hw/openrisc/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/openrisc/virt.c') diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c index 7b60bf8..9afe407 100644 --- a/hw/openrisc/virt.c +++ b/hw/openrisc/virt.c @@ -540,7 +540,7 @@ static void openrisc_virt_init(MachineState *machine) machine->initrd_filename, load_addr, machine->ram_size); } - boot_info.fdt_addr = openrisc_load_fdt(state->fdt, load_addr, + boot_info.fdt_addr = openrisc_load_fdt(machine, state->fdt, load_addr, machine->ram_size); } } -- cgit v1.1