Skip to contentSkip to conversation

ppc/pnv: activate the "dumpdtb" option on the powernv machine

PATCH Applied Cédric Le Goater 3 participants 3 messages Jun 6, 2019 – Jun 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc/pnv: activate the "dumpdtb" option on the powernv machine

This is a good way to debug the DT creation for current PowerNV machines and new ones to come.

---
 hw/ppc/pnv.c | 2 ++
 1 file changed, 2 insertions(+)
hw/ppc/pnv.c +2 -0
index 046f0a83c8e5..ed6892466793 100644
@@ -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));
 }
 
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Thu, 6 Jun 2019 19:47:32 +0200 Cédric Le Goater <[email protected]> wrote:

This is a good way to debug the DT creation for current PowerNV machines and new ones to come.

---

Quoted 23 lines
 hw/ppc/pnv.c | 2 ++
 1 file changed, 2 insertions(+)
hw/ppc/pnv.c +2 -0
index 046f0a83c8e5..ed6892466793 100644
@@ -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));
 }
 
Applied
#2 lore raw
In reply to Cédric Le Goater
Quoted 4 lines · Cédric Le Goater

This is a good way to debug the DT creation for current PowerNV machines and new ones to come.

Applied, thanks.

Quoted 24 lines
---
 hw/ppc/pnv.c | 2 ++
 1 file changed, 2 insertions(+)
hw/ppc/pnv.c +2 -0
index 046f0a83c8e5..ed6892466793 100644
@@ -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));
 }
 
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson