ppc/pnv: activate the "dumpdtb" option on the powernv machine
authorCédric Le Goater <clg@kaod.org>
Thu, 6 Jun 2019 17:47:32 +0000 (19:47 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 12 Jun 2019 00:41:50 +0000 (10:41 +1000)
This is a good way to debug the DT creation for current PowerNV
machines and new ones to come.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190606174732.13051-1-clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/pnv.c

index 046f0a83c8e507300db60e2a7ffd8186ecf97392..ed689246679332ae036ff836db22e8e38fa75223 100644 (file)
@@ -23,6 +23,7 @@
 #include "sysemu/sysemu.h"
 #include "sysemu/numa.h"
 #include "sysemu/cpus.h"
+#include "sysemu/device_tree.h"
 #include "hw/hw.h"
 #include "target/ppc/cpu.h"
 #include "qemu/log.h"
@@ -554,6 +555,7 @@ static void pnv_reset(void)
     /* Pack resulting tree */
     _FDT((fdt_pack(fdt)));
 
+    qemu_fdt_dumpdtb(fdt, fdt_totalsize(fdt));
     cpu_physical_memory_write(PNV_FDT_ADDR, fdt, fdt_totalsize(fdt));
 }