qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spapr: add dumpdtb support
@ 2015-07-20 13:19 Andrew Jones
  2015-07-20 13:47 ` Alexander Graf
  2015-07-21  5:05 ` David Gibson
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Jones @ 2015-07-20 13:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgibson, thuth, agraf

dumpdtb (-machine dumpdtb=<file>) 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 <drjones@redhat.com>
---
 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

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

* Re: [Qemu-devel] [PATCH] spapr: add dumpdtb support
  2015-07-20 13:19 [Qemu-devel] [PATCH] spapr: add dumpdtb support Andrew Jones
@ 2015-07-20 13:47 ` Alexander Graf
  2015-07-21  5:05 ` David Gibson
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2015-07-20 13:47 UTC (permalink / raw)
  To: Andrew Jones, qemu-devel; +Cc: dgibson, thuth

On 07/20/15 15:19, Andrew Jones wrote:
> dumpdtb (-machine dumpdtb=<file>) 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 <drjones@redhat.com>

Glad to see that it's useful for others too :).

Reviewed-by: Alexander Graf <agraf@suse.de>


Alex

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

* Re: [Qemu-devel] [PATCH] spapr: add dumpdtb support
  2015-07-20 13:19 [Qemu-devel] [PATCH] spapr: add dumpdtb support Andrew Jones
  2015-07-20 13:47 ` Alexander Graf
@ 2015-07-21  5:05 ` David Gibson
  1 sibling, 0 replies; 3+ messages in thread
From: David Gibson @ 2015-07-21  5:05 UTC (permalink / raw)
  To: Andrew Jones; +Cc: dgibson, thuth, qemu-devel, agraf

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

On Mon, Jul 20, 2015 at 03:19:24PM +0200, Andrew Jones wrote:
> dumpdtb (-machine dumpdtb=<file>) 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 <drjones@redhat.com>

Merged into spapr-next, thanks.

-- 
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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-07-21  5:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-20 13:19 [Qemu-devel] [PATCH] spapr: add dumpdtb support Andrew Jones
2015-07-20 13:47 ` Alexander Graf
2015-07-21  5:05 ` David Gibson

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).