From patchwork Thu Aug 15 23:36:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 11096607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E52813B1 for ; Thu, 15 Aug 2019 23:37:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 816A828671 for ; Thu, 15 Aug 2019 23:37:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75BE128987; Thu, 15 Aug 2019 23:37:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0FEB428671 for ; Thu, 15 Aug 2019 23:37:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hyPIA-0004Z3-PR; Thu, 15 Aug 2019 23:36:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hyPI9-0004XA-27 for xen-devel@lists.xenproject.org; Thu, 15 Aug 2019 23:36:25 +0000 X-Inumbo-ID: 7e6f1f7e-bfb5-11e9-b90c-bc764e2007e4 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7e6f1f7e-bfb5-11e9-b90c-bc764e2007e4; Thu, 15 Aug 2019 23:36:24 +0000 (UTC) Received: from sstabellini-ThinkPad-T480s.xilinx.com (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE76E21721; Thu, 15 Aug 2019 23:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565912184; bh=dY1+4C6ioFzT1qk7+UYhtydOtn73tdyVnlbfaPw3Sq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vV60XGEn6G9C6V20HcSz+yP15ka73BAb4oOUe9S6GXIiOAFAho5Z8FeatHehJJ0+v 5sEoBfcmjeN4YX6gLXd1odfS0YyL0n7FX9Kgy1Qfm+HFsF1VcuvYE/6U26HLa5zMmp l8WWoCaTiLqogDCOkPhyQrJlFIDhqSlKSyyFDQws= From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Thu, 15 Aug 2019 16:36:15 -0700 Message-Id: <20190815233618.31630-5-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [Xen-devel] [PATCH v6 5/8] xen/arm: early_print_info print reserved_mem X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , julien.grall@arm.com, sstabellini@kernel.org, Volodymyr_Babchuk@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Improve early_print_info to also print the banks saved in bootinfo.reserved_mem. Print them right after RESVD, increasing the same index. Since we are at it, also switch the existing RESVD print to use unsigned int. Signed-off-by: Stefano Stabellini Reviewed-by: Volodymyr Babchuk Acked-by: Julien Grall --- Changes in v6: - add acked-by and reviewed-by - fix indentation Changes in v5: - switch to unsigned Changes in v4: - new patch --- xen/arch/arm/bootfdt.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index a70a739bb0..a02c6a1065 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -348,9 +348,10 @@ static int __init early_scan_node(const void *fdt, static void __init early_print_info(void) { struct meminfo *mi = &bootinfo.mem; + struct meminfo *mem_resv = &bootinfo.reserved_mem; struct bootmodules *mods = &bootinfo.modules; struct bootcmdlines *cmds = &bootinfo.cmdlines; - int i, nr_rsvd; + unsigned int i, j, nr_rsvd; for ( i = 0; i < mi->nr_banks; i++ ) printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n", @@ -372,7 +373,13 @@ static void __init early_print_info(void) continue; /* fdt_get_mem_rsv returns length */ e += s; - printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", i, s, e); + printk(" RESVD[%u]: %"PRIpaddr" - %"PRIpaddr"\n", i, s, e); + } + for ( j = 0; j < mem_resv->nr_banks; j++, i++ ) + { + printk(" RESVD[%u]: %"PRIpaddr" - %"PRIpaddr"\n", i, + mem_resv->bank[j].start, + mem_resv->bank[j].start + mem_resv->bank[j].size - 1); } printk("\n"); for ( i = 0 ; i < cmds->nr_mods; i++ )