From patchwork Mon Sep 21 01:06:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 53956 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 74F5622B16 for ; Mon, 21 Sep 2015 01:15:29 +0000 (UTC) Received: by lagj9 with SMTP id j9sf37566776lag.0 for ; Sun, 20 Sep 2015 18:15:28 -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=vfQyseIUJn96BCg8yxQ4ebM7DOBAuBTpBfABUJmyBMQ=; b=M1m7l5i7V/cYvCJSOzsgjDzEag55D7nZpbbtqrrxqvtBF3x4yi1SxTqKBCyPm4B0Rj D2j1R9xioOtB7jpeIzxjZduUbQQ1/Z7UnB3n5wUX2fC4QzimkNwRxsAhMsbuLlNGu44Y qN+TwsH+gltudLXtZJOU2cIWXdbyT3uJPaBbrVImp35ktYxHZnUpcJrNzOCOJKtsiTvS /Ggt0htyfJHmG1NjJ1GOdE6WuKgag29KTHYt35bCsHi1qQQ29/sTsnZrddq5JbXQ7BYn pOWdC2r21F65KVB967XW5YEFDPACMT+wEDzjeP3v7Q28h+V7ABKTO2ND+KWBippVrxRW 0jXw== X-Gm-Message-State: ALoCoQnhn7r2dZC+1Y0VTOAxc3+02zHCCI39nECKubx97QnXRe6KtJhNKrKa7NRcirW5QHsu44KW X-Received: by 10.112.125.104 with SMTP id mp8mr2765533lbb.20.1442798127909; Sun, 20 Sep 2015 18:15:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.232 with SMTP id 8ls383177lap.103.gmail; Sun, 20 Sep 2015 18:15:27 -0700 (PDT) X-Received: by 10.152.27.70 with SMTP id r6mr6412611lag.67.1442798127768; Sun, 20 Sep 2015 18:15:27 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id y9si14407900lbr.34.2015.09.20.18.15.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2015 18:15:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbcao8 with SMTP id ao8so43919069lbc.3 for ; Sun, 20 Sep 2015 18:15:27 -0700 (PDT) X-Received: by 10.25.207.82 with SMTP id f79mr1099548lfg.73.1442798127591; Sun, 20 Sep 2015 18:15:27 -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 w3csp1467652lbq; Sun, 20 Sep 2015 18:15:26 -0700 (PDT) X-Received: by 10.140.151.140 with SMTP id 134mr20608750qhx.49.1442798126769; Sun, 20 Sep 2015 18:15:26 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id m34si19573469qgd.65.2015.09.20.18.15.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 20 Sep 2015 18:15:26 -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]:54617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdphW-0001vk-BH for patch@linaro.org; Sun, 20 Sep 2015 21:15:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdpYh-0002rU-2K for qemu-devel@nongnu.org; Sun, 20 Sep 2015 21:06:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdpYf-00051H-Dr for qemu-devel@nongnu.org; Sun, 20 Sep 2015 21:06:18 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:51861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdpYe-0004yT-Ui; Sun, 20 Sep 2015 21:06:17 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 7120314090B; Mon, 21 Sep 2015 11:06:08 +1000 (AEST) From: David Gibson To: peter.maydell@linaro.org Date: Mon, 21 Sep 2015 11:06:02 +1000 Message-Id: <1442797588-26793-8-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1442797588-26793-1-git-send-email-david@gibson.dropbear.id.au> References: <1442797588-26793-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2401:3900:2:1::2 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/33] 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.217.177 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 f91058c..e0f7b54 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);