qemu/hw/mips
Peter Maydell 8fd2518ef2 hw: Centralize handling of -machine dumpdtb option
Currently we handle the 'dumpdtb' machine sub-option ad-hoc in every
board model that has an FDT.  It's up to the board code to make sure
it calls qemu_fdt_dumpdtb() in the right place.

This means we're inconsistent and often just ignore the user's
command line argument:
 * if the board doesn't have an FDT at all
 * if the board supports FDT, but there happens not to be one
   present (usually because of a missing -fdt option)

This isn't very helpful because it gives the user no clue why their
option was ignored.

However, in order to support the QMP/HMP dumpdtb commands we require
now that every FDT machine stores a pointer to the FDT in
MachineState::fdt.  This means we can handle -machine dumpdtb
centrally by calling the qmp_dumpdtb() function, unifying its
handling with the QMP/HMP commands.  All the board code calls to
qemu_fdt_dumpdtb() can then be removed.

For this commit we retain the existing behaviour that if there
is no FDT we silently ignore the -machine dumpdtb option.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2025-02-24 15:03:42 +00:00
..
bootloader.c hw/mips/bootloader: Implement nanoMIPS JALRc opcode generator 2023-01-13 09:32:32 +01:00
boston.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
cps.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
fuloong2e.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
fw_cfg.c hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
fw_cfg.h hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
jazz.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
Kconfig hw/char: Extract serial-mm 2024-10-03 19:33:23 +02:00
loongson3_bootp.c hw/mips/loongson3_virt: Propagate processor_id to init_loongson_params() 2025-01-31 19:36:43 +01:00
loongson3_bootp.h hw/mips/loongson3_virt: Propagate processor_id to init_loongson_params() 2025-01-31 19:36:43 +01:00
loongson3_virt.c hw/mips: Mark Loonson3 Virt machine devices as little-endian 2025-02-16 14:41:46 +01:00
malta.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
meson.build hw/mips/loongson3_bootp: Move to common_ss[] 2025-01-31 19:36:43 +01:00
mips_int.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
mipssim.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
trace-events hw/mips/gt64xxx_pci: Move it to hw/pci-host/ 2023-01-13 09:32:32 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00