From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHAyl-00026D-3K for qemu-devel@nongnu.org; Mon, 20 Jul 2015 09:19:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHAyf-0003FR-WE for qemu-devel@nongnu.org; Mon, 20 Jul 2015 09:19:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHAyf-0003Da-Qz for qemu-devel@nongnu.org; Mon, 20 Jul 2015 09:19:29 -0400 From: Andrew Jones Date: Mon, 20 Jul 2015 15:19:24 +0200 Message-Id: <1437398364-2066-1-git-send-email-drjones@redhat.com> Subject: [Qemu-devel] [PATCH] spapr: add dumpdtb support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dgibson@redhat.com, thuth@redhat.com, agraf@suse.de dumpdtb (-machine dumpdtb=) allows one to inspect the generated device tree of machine types that generate device trees. This is useful for a) seeing what's there b) debugging/testing device tree generator patches. It can be used as follows $QEMU_CMDLINE -machine dumpdtb=dtb dtc -I dtb -O dts dtb Signed-off-by: Andrew Jones --- hw/ppc/spapr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a6f19473cf278..c1cbf3387ae0c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -30,6 +30,7 @@ #include "hw/fw-path-provider.h" #include "elf.h" #include "net/net.h" +#include "sysemu/device_tree.h" #include "sysemu/block-backend.h" #include "sysemu/cpus.h" #include "sysemu/kvm.h" @@ -822,6 +823,7 @@ static void spapr_finalize_fdt(sPAPRMachineState *spapr, exit(1); } + qemu_fdt_dumpdtb(fdt, fdt_totalsize(fdt)); cpu_physical_memory_write(fdt_addr, fdt, fdt_totalsize(fdt)); g_free(bootlist); -- 2.4.3