qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-7.2 v4 00/21] QMP/HMP: add 'dumpdtb' and 'info fdt' commands
@ 2022-08-26 14:11 Daniel Henrique Barboza
  2022-08-26 14:11 ` [PATCH for-7.2 v4 01/21] hw/arm: do not free machine->fdt in arm_load_dtb() Daniel Henrique Barboza
                   ` (20 more replies)
  0 siblings, 21 replies; 33+ messages in thread
From: Daniel Henrique Barboza @ 2022-08-26 14:11 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-ppc, clg, david, alistair.francis, Daniel Henrique Barboza

Hi,

In this new version we have changes based on review comments from v3.

I've also added a new patch (21) that adds an extra parameter called
'textformat' to the dumpdtb QMP command. Using this parameter will
write the FDT in text format, using DTS compatible formatting like
the 'info fdt' command is already using. This will allow users to
see the FDT contents in a text file without the need of decoding the
blob using 'dtc':

    (qemu) dumpdtb -t fdt.txt
    
    $ file fdt.txt
    fdt.txt: ASCII text, with very long lines (4746)
    
    $ grep -A 3 'persistent-memory' fdt.txt
        ibm,persistent-memory {
            device_type = "ibm,persistent-memory";
            #size-cells = <0x0>;
            #address-cells = <0x1>;
        };


Changes from v3:
- patch 10:
  - clarified in the commit message that, in the current code base, the
    spapr internal FDT won't always match what the guest is using 
- patch 14:
  - changed 'filename' to type F
  - use 'hmp_handle_error' instead of 'error_report_err'
- patch 15:
  - added a semi-colon at the end of each closing bracket
- patch 16:
  - added an extra space after each individual string in the string
    array
- patch 20:
  - fixed commit msg with the actual output of 'info fdt'
- patch 21 (NEW):
  - added a '-t' parameter to 'dumpdtb' to create a FDT file in plain
    text format, using the same formatting we already implemented with
    'info fdt'
- v3 link:
  https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg02419.html 

Daniel Henrique Barboza (21):
  hw/arm: do not free machine->fdt in arm_load_dtb()
  hw/microblaze: set machine->fdt in microblaze_load_dtb()
  hw/nios2: set machine->fdt in nios2_load_dtb()
  hw/ppc: set machine->fdt in ppce500_load_device_tree()
  hw/ppc: set machine->fdt in bamboo_load_device_tree()
  hw/ppc: set machine->fdt in sam460ex_load_device_tree()
  hw/ppc: set machine->fdt in xilinx_load_device_tree()
  hw/ppc: set machine->fdt in pegasos2_machine_reset()
  hw/ppc: set machine->fdt in pnv_reset()
  hw/ppc: set machine->fdt in spapr machine
  hw/riscv: set machine->fdt in sifive_u_machine_init()
  hw/riscv: set machine->fdt in spike_board_init()
  hw/xtensa: set machine->fdt in xtfpga_init()
  qmp/hmp, device_tree.c: introduce dumpdtb
  qmp/hmp, device_tree.c: introduce 'info fdt' command
  device_tree.c: support string array prop in fdt_format_node()
  device_tree.c: support remaining FDT prop types
  device_node.c: enable 'info fdt' to print subnodes
  device_tree.c: add fdt_format_property() helper
  hmp, device_tree.c: add 'info fdt <property>' support
  qmp/hmp, device_tree.c: add textformat dumpdtb option

 hmp-commands-info.hx         |  14 +++
 hmp-commands.hx              |  14 +++
 hw/arm/boot.c                |   6 +-
 hw/microblaze/boot.c         |  11 +-
 hw/microblaze/meson.build    |   2 +-
 hw/nios2/boot.c              |  11 +-
 hw/nios2/meson.build         |   2 +-
 hw/ppc/e500.c                |  13 +-
 hw/ppc/pegasos2.c            |   7 ++
 hw/ppc/pnv.c                 |   8 +-
 hw/ppc/ppc440_bamboo.c       |  11 +-
 hw/ppc/sam460ex.c            |   8 +-
 hw/ppc/spapr.c               |   6 +
 hw/ppc/spapr_hcall.c         |   8 ++
 hw/ppc/virtex_ml507.c        |  11 +-
 hw/riscv/sifive_u.c          |   6 +
 hw/riscv/spike.c             |   9 ++
 hw/xtensa/meson.build        |   2 +-
 hw/xtensa/xtfpga.c           |   9 +-
 include/monitor/hmp.h        |   2 +
 include/sysemu/device_tree.h |   8 ++
 monitor/hmp-cmds.c           |  29 +++++
 monitor/qmp-cmds.c           |  29 +++++
 qapi/machine.json            |  38 ++++++
 softmmu/device_tree.c        | 238 +++++++++++++++++++++++++++++++++++
 25 files changed, 490 insertions(+), 12 deletions(-)

-- 
2.37.2



^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2022-09-01  5:37 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-26 14:11 [PATCH for-7.2 v4 00/21] QMP/HMP: add 'dumpdtb' and 'info fdt' commands Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 01/21] hw/arm: do not free machine->fdt in arm_load_dtb() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 02/21] hw/microblaze: set machine->fdt in microblaze_load_dtb() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 03/21] hw/nios2: set machine->fdt in nios2_load_dtb() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 04/21] hw/ppc: set machine->fdt in ppce500_load_device_tree() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 05/21] hw/ppc: set machine->fdt in bamboo_load_device_tree() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 06/21] hw/ppc: set machine->fdt in sam460ex_load_device_tree() Daniel Henrique Barboza
2022-08-26 18:56   ` BALATON Zoltan
2022-08-26 20:34     ` Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 07/21] hw/ppc: set machine->fdt in xilinx_load_device_tree() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 08/21] hw/ppc: set machine->fdt in pegasos2_machine_reset() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 09/21] hw/ppc: set machine->fdt in pnv_reset() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 10/21] hw/ppc: set machine->fdt in spapr machine Daniel Henrique Barboza
2022-08-29  3:29   ` David Gibson
2022-08-26 14:11 ` [PATCH for-7.2 v4 11/21] hw/riscv: set machine->fdt in sifive_u_machine_init() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 12/21] hw/riscv: set machine->fdt in spike_board_init() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 13/21] hw/xtensa: set machine->fdt in xtfpga_init() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 14/21] qmp/hmp, device_tree.c: introduce dumpdtb Daniel Henrique Barboza
2022-08-30 10:40   ` Markus Armbruster
2022-08-26 14:11 ` [PATCH for-7.2 v4 15/21] qmp/hmp, device_tree.c: introduce 'info fdt' command Daniel Henrique Barboza
2022-08-29  3:34   ` David Gibson
2022-08-29 22:00     ` Daniel Henrique Barboza
2022-08-30  1:50       ` David Gibson
2022-08-30  9:59         ` Daniel Henrique Barboza
2022-08-30 10:43         ` Markus Armbruster
2022-09-01  2:10           ` David Gibson
2022-08-30 10:41   ` Markus Armbruster
2022-08-26 14:11 ` [PATCH for-7.2 v4 16/21] device_tree.c: support string array prop in fdt_format_node() Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 17/21] device_tree.c: support remaining FDT prop types Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 18/21] device_node.c: enable 'info fdt' to print subnodes Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 19/21] device_tree.c: add fdt_format_property() helper Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 20/21] hmp, device_tree.c: add 'info fdt <property>' support Daniel Henrique Barboza
2022-08-26 14:11 ` [PATCH for-7.2 v4 21/21] qmp/hmp, device_tree.c: add textformat dumpdtb option Daniel Henrique Barboza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).