qemu/hw/riscv
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
..
boot.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
Kconfig hw/riscv: Add Microblaze V generic board 2024-12-20 11:22:47 +10:00
meson.build hw/riscv: Add Microblaze V generic board 2024-12-20 11:22:47 +10:00
microblaze-v-generic.c hw/char/xilinx_uartlite: Make device endianness configurable 2025-02-16 14:34:51 +01:00
microchip_pfsoc.c hw/boards: Rename no_sdcard -> auto_create_sdcard 2025-02-16 14:25:08 +01:00
numa.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
opentitan.c hw/riscv/opentitan: Include missing 'exec/address-spaces.h' header 2025-02-16 14:25:08 +01:00
riscv-iommu-bits.h hw/riscv/riscv-iommu: parametrize CAP.IGS 2024-12-20 11:19:16 +10:00
riscv-iommu-pci.c RISC-V PR for 10.0 2024-12-21 08:13:16 -05:00
riscv-iommu-sys.c hw/riscv/riscv-iommu-sys.c: fix duplicated 'table_size' 2024-12-28 14:42:53 +03:00
riscv-iommu.c hw/riscv/riscv-iommu.c: Introduce a translation tag for the page table cache 2025-01-19 09:44:35 +10:00
riscv-iommu.h hw/riscv/riscv-iommu: implement reset protocol 2024-12-20 11:22:46 +10:00
riscv_hart.c tests/qtest: rename qtest_send_prefix and roll-up into qtest_send 2025-02-10 13:47:58 +00:00
shakti_c.c hw/riscv: Remove all invalid uses of auto_create_sdcard=true 2025-02-16 14:25:08 +01:00
sifive_e.c hw/riscv: Remove all invalid uses of auto_create_sdcard=true 2025-02-16 14:25:08 +01:00
sifive_u.c hw/boards: Rename no_sdcard -> auto_create_sdcard 2025-02-16 14:25:08 +01:00
spike.c hw/riscv: Remove all invalid uses of auto_create_sdcard=true 2025-02-16 14:25:08 +01:00
trace-events hw/riscv/riscv-iommu: implement reset protocol 2024-12-20 11:22:46 +10:00
trace.h hw/riscv: add RISC-V IOMMU base emulation 2024-10-31 13:51:24 +10:00
virt-acpi-build.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
virt.c hw/riscv: Remove all invalid uses of auto_create_sdcard=true 2025-02-16 14:25:08 +01:00