On Thu, 6 Feb 2025 at 15:12, Peter Maydell <peter.mayd...@linaro.org> wrote:
>
> We originally implemented '-machine dumpdtb' in a fairly ad-hoc way:
> every machine using FDT is supposed to call qemu_fdt_dumpdtb() once
> it has finished creating and modifying the DTB; if the user passed in
> the machine option then qemu_fdt_dumpdtb() will write the FDT to a
> file and then exit QEMU.
>
> Somewhat later we implemented the QMP and HMP dumpdtb commands; for
> these to work we had to make all the FDT-using machines set
> MachineState::fdt to point to the FDT blob.
>
> This means we can clean up the handling of the -machine option, so we
> can implement it in one place in machine.c.  The benefit of this is:
>  * boards only need to do one thing, not two
>  * we can have better error messages for the "user asked us to
>    dump the DTB but this board doesn't have one" case

> Peter Maydell (6):
>   monitor/hmp-cmds.c: Clean up hmp_dumpdtb printf
>   hw/openrisc: Support monitor dumpdtb command
>   hw/mips/boston: Check for error return from boston_fdt_filter()
>   hw/mips/boston: Support dumpdtb monitor commands
>   hw: Centralize handling of -machine dumpdtb option
>   hw/core/machine.c: Make -machine dumpdtb=file.dtb with no DTB an error

Since these have all been reviewed, I'm going to take them
via target-arm.next, unless anybody wants to propose taking
them via a different route.

thanks
-- PMM

Reply via email to