From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, clg@kaod.org, david@gibson.dropbear.id.au,
alistair.francis@wdc.com,
Daniel Henrique Barboza <danielhb413@gmail.com>
Subject: [PATCH for-7.2 v4 00/21] QMP/HMP: add 'dumpdtb' and 'info fdt' commands
Date: Fri, 26 Aug 2022 11:11:29 -0300 [thread overview]
Message-ID: <20220826141150.7201-1-danielhb413@gmail.com> (raw)
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
next reply other threads:[~2022-08-26 14:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 14:11 Daniel Henrique Barboza [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220826141150.7201-1-danielhb413@gmail.com \
--to=danielhb413@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.