qemu/hw/ppc
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
..
amigaone.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
e500-ccsr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e500.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
e500.h hw/ppc: Consolidate e500 initial mapping creation functions 2024-11-04 10:09:36 +10:00
e500plat.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
fw_cfg.c hw/ppc: Implement fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
Kconfig hw/char: Extract serial-mm 2024-10-03 19:33:23 +02:00
mac_newworld.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
mac_oldworld.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
meson.build ppc/pnv: Begin a more complete ADU LPC model for POWER9/10 2024-07-26 09:21:06 +10:00
mpc8544_guts.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
mpc8544ds.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
pef.c system: Move 'exec/confidential-guest-support.h' to system/ 2024-12-20 17:44:56 +01:00
pegasos2.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
pnv.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
pnv_adu.c include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
pnv_bmc.c hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API 2024-02-22 12:47:40 +01:00
pnv_chiptod.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
pnv_core.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
pnv_homer.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
pnv_i2c.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
pnv_lpc.c include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
pnv_n1_chiplet.c hw/ppc: Add N1 chiplet model 2024-02-23 23:24:42 +10:00
pnv_nest_pervasive.c ppc/pnv: Add xscom- prefix to pervasive-control region name 2024-11-27 02:49:36 +10:00
pnv_occ.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
pnv_pnor.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
pnv_psi.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
pnv_sbe.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
pnv_xscom.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
ppc.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
ppc4xx_devs.c include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
ppc4xx_sdram.c include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
ppc405.h ppc4xx_sdram: QOM'ify 2022-10-17 16:15:09 -03:00
ppc405_boards.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
ppc405_uc.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
ppc440.h ppc440: Remove ppc460ex_pcie_init legacy init function 2023-07-07 04:47:49 -03:00
ppc440_bamboo.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
ppc440_uc.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
ppc_booke.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
ppce500_spin.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
prep.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
prep_systemio.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
rs6000_mc.c include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
sam460ex.c hw/boards: Do not create unusable default if=sd drives 2025-02-16 14:25:08 +01:00
spapr.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
spapr_caps.c overall: Remove unnecessary g_strdup_printf() calls 2025-02-14 08:49:06 +03:00
spapr_cpu_core.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
spapr_drc.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
spapr_events.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_hcall.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_iommu.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_irq.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_nested.c spapr: nested: Add Power11 capability support for Nested PAPR guests in TCG L0 2024-11-04 09:14:02 +10:00
spapr_numa.c spapr: Remove support for NVIDIA V100 GPU with NVLink2 2023-09-18 07:25:28 -03:00
spapr_nvdimm.c include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST 2024-12-19 19:36:37 +01:00
spapr_ovec.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_pci.c hw/ppc/spapr_pci: Do not reject VFs created after a PF 2025-02-20 18:23:19 -05:00
spapr_pci_vfio.c hw/ppc/Kconfig: Imply VFIO_PCI 2023-12-19 19:03:38 +01:00
spapr_rng.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
spapr_rtas.c tests/qtest: rename qtest_send_prefix and roll-up into qtest_send 2025-02-10 13:47:58 +00:00
spapr_rtas_ddw.c spapr/ddw: Implement 64bit query extension 2022-07-06 10:22:37 -03:00
spapr_rtc.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_tpm_proxy.c Accel & Exec patch queue 2024-12-21 11:07:00 -05:00
spapr_vhyp_mmu.c target/ppc: Unexport some functions from mmu-book3s-v3.h 2024-07-26 09:51:34 +10:00
spapr_vio.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
spapr_vof.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
trace-events ppc/pnv: Begin a more complete ADU LPC model for POWER9/10 2024-07-26 09:21:06 +10:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
virtex_ml507.c hw/timer/xilinx_timer: Make device endianness configurable 2025-02-16 14:34:44 +01:00
vof.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00