From patchwork Mon Aug 12 22:28:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 11091285 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 A0D56112C for ; Tue, 13 Aug 2019 06:50:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9162027FE4 for ; Tue, 13 Aug 2019 06:50:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8234428587; Tue, 13 Aug 2019 06:50:15 +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 2FA0327FE4 for ; Tue, 13 Aug 2019 06:50:15 +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 1hxQcd-0000aL-Hn; Tue, 13 Aug 2019 06:49:31 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxQcc-0000a2-Gq for xen-devel@lists.xenproject.org; Tue, 13 Aug 2019 06:49:30 +0000 X-Inumbo-ID: 8d5f054c-bd50-11e9-8922-d7f94c606f10 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8d5f054c-bd50-11e9-8922-d7f94c606f10; Mon, 12 Aug 2019 22:28:48 +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 5678420842; Mon, 12 Aug 2019 22:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565648927; bh=VI05y6ex9i5gksN6QIZvzvo6HHzPFLUgx4BeTPqM1KA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F4Ao5wzxvPhCnR3oHHjNySCQ/Yx8DwbmgelcHv7oaMCjJHcJxUJc/HmIxZDLJ0A+Q +wnZGK0lsOXzO27xDE7doqxwfEJDR3K5m/sH10jrlStKlAK0PIIsH4KEuTLACtb2J/ m8P4uCGCDPnLW7Q45fqWfxTjoiikjiwOw9QrX5FQ= From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Mon, 12 Aug 2019 15:28:41 -0700 Message-Id: <20190812222844.9636-4-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Subject: [Xen-devel] [PATCH v5 4/7] 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 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 0b0e22a3d0..32153e6207 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -337,9 +337,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", @@ -361,9 +362,15 @@ static void __init early_print_info(void) continue; /* fdt_get_mem_rsv returns length */ e += s; - printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", + 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++ ) printk("CMDLINE[%"PRIpaddr"]:%s %s\n", cmds->cmdline[i].start,