diff options
author | Daniel Henrique Barboza | 2022-09-26 19:38:40 +0200 |
---|---|---|
committer | Daniel Henrique Barboza | 2022-10-17 21:15:10 +0200 |
commit | bf353ad55590f227d8b96b35e4c8bd6ab1a3d8de (patch) | |
tree | df1671b0e7c17fb0ca63c809f3aad072eb88e7e1 /monitor/misc.c | |
parent | hw/ppc/spapr_pci.c: Use device_cold_reset() rather than device_legacy_reset() (diff) | |
download | qemu-bf353ad55590f227d8b96b35e4c8bd6ab1a3d8de.tar.gz qemu-bf353ad55590f227d8b96b35e4c8bd6ab1a3d8de.tar.xz qemu-bf353ad55590f227d8b96b35e4c8bd6ab1a3d8de.zip |
qmp/hmp, device_tree.c: introduce dumpdtb
To save the FDT blob we have the '-machine dumpdtb=<file>' property.
With this property set, the machine saves the FDT in <file> and exit.
The created file can then be converted to plain text dts format using
'dtc'.
There's nothing particularly sophisticated into saving the FDT that
can't be done with the machine at any state, as long as the machine has
a valid FDT to be saved.
The 'dumpdtb' command receives a 'filename' parameter and, if the FDT is
available via current_machine->fdt, save it in dtb format to 'filename'.
In short, this is a '-machine dumpdtb' that can be fired on demand via
QMP/HMP.
This command will always be executed in-band (i.e. holding BQL),
avoiding potential race conditions with machines that might change the
FDT during runtime (e.g. PowerPC 'pseries' machine).
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Alistair Francis <alistair.francis@wdc.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220926173855.1159396-2-danielhb413@gmail.com>
Diffstat (limited to 'monitor/misc.c')
-rw-r--r-- | monitor/misc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/monitor/misc.c b/monitor/misc.c index 6436a8786b..205487e2b9 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -49,6 +49,7 @@ #include "sysemu/blockdev.h" #include "sysemu/sysemu.h" #include "sysemu/tpm.h" +#include "sysemu/device_tree.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qerror.h" #include "qapi/qmp/qstring.h" |