From patchwork Wed Sep 23 01:55:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 54023 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 4CCD222B1E for ; Wed, 23 Sep 2015 02:02:59 +0000 (UTC) Received: by wicmn1 with SMTP id mn1sf16773046wic.1 for ; Tue, 22 Sep 2015 19:02:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=y9qdeAK2V7KoqWsjalvuNL7/0HbzvF+oym3h+l8RRWs=; b=RifxowBHBvOWt6NW8s0amR5nMAA7KxI9PrGFT2DEH90+txj/VQQHqPBrt+SkunW+2Q jQ3URxTyRBJkIUGv1Ix6hbRbURIbr0P4VRanTw7W8U0CVJ2OFY07KfFwuz46Zm4+KVQ6 Py5EerDC0yHjm0uDhdA3w1vb2zHOzDIGoylcfcJSS9paj88TeSZdfx+j8m9SqfbDNwY1 MFWdVstQSz7oakj5XWWA3cg34fyKGNwPXdsC8BRPm2Bg1jD65NbF7c8A/vVgGfYom+2A JH7wzKiZP3lSga6pZ8fBN7nKzpY0TQIPJe2QIsbgboEeeu1Jjg/1QGKv0Yxip3rSoiEB pJtQ== X-Gm-Message-State: ALoCoQmYuZhj0MFxfIyNBrD7USeMGRpeLPh7wW01HggtbFnJvac9UOrFDL0jI5to6RaVXtr0VoJZ X-Received: by 10.152.4.136 with SMTP id k8mr4338082lak.2.1442973778550; Tue, 22 Sep 2015 19:02:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.157.135 with SMTP id g129ls94004lfe.84.gmail; Tue, 22 Sep 2015 19:02:58 -0700 (PDT) X-Received: by 10.112.146.104 with SMTP id tb8mr10776139lbb.35.1442973778189; Tue, 22 Sep 2015 19:02:58 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id z7si769320lbf.45.2015.09.22.19.02.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 19:02:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lacao8 with SMTP id ao8so10990506lac.3 for ; Tue, 22 Sep 2015 19:02:58 -0700 (PDT) X-Received: by 10.112.156.167 with SMTP id wf7mr10686679lbb.88.1442973778026; Tue, 22 Sep 2015 19:02:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp815632lbq; Tue, 22 Sep 2015 19:02:57 -0700 (PDT) X-Received: by 10.141.28.2 with SMTP id f2mr35120506qhe.59.1442973777010; Tue, 22 Sep 2015 19:02:57 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id r23si4616980qkl.19.2015.09.22.19.02.56 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 22 Sep 2015 19:02:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:44317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZOa-0002yg-Hn for patch@linaro.org; Tue, 22 Sep 2015 22:02:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZHM-0007Vi-2u for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeZHH-0000zq-28 for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:27 -0400 Received: from ozlabs.org ([103.22.144.67]:60822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZHG-0000yG-Mk; Tue, 22 Sep 2015 21:55:22 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 2DE1014030E; Wed, 23 Sep 2015 11:55:19 +1000 (AEST) From: David Gibson To: peter.maydell@linaro.org Date: Wed, 23 Sep 2015 11:55:09 +1000 Message-Id: <1442973338-17771-8-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> References: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 103.22.144.67 Cc: Andrew Jones , mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, David Gibson Subject: [Qemu-devel] [PULL 07/36] spapr: add dumpdtb support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: david@gibson.dropbear.id.au X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Andrew Jones 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 Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index ed0abd8..a69d7e4 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" @@ -831,6 +832,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);