From patchwork Wed Oct 16 11:12:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 176455 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7213162ill; Wed, 16 Oct 2019 04:14:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzf95z8WDZIU2WCSTav1HRWpgzrBVtF2x7w20JYA0s76B3ytmP7l0NlQWKwx/7Td6QwxXjf X-Received: by 2002:a5d:9446:: with SMTP id x6mr5612348ior.8.1571224483977; Wed, 16 Oct 2019 04:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571224483; cv=none; d=google.com; s=arc-20160816; b=j08NZGMdoj5iEfLQWCUHhoLaneefyRg8SNCzqg7VS5HFHJ3YRz4lZ+pRZQ56U5Wqau sA8pYpb68SgVdpzZZ++DMr0SUJo5l+ib4Qqv1udka0PAno6YXkOOoWa4bQgoeSEBjWQL WrNmd9wZbnEk2Qi5uaoPLw8XQ/OrpDjGJIgVwwmHmwPVm8YGJlgnC/B+DnNMqeDQS4K6 RVNC9B/ifnh/mpivBmSKT+1RxT9TBs6+mcNfWovGn6QfqI2Er7jB49WKANmBpIhBuymW HkbelH1pcwWFRzwst403JCHTiqagSuzdMwQWinzHK0zCLnFwJo9XZh8qVP4LTX75AOmZ exig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:message-id:date:to:from; bh=UOgOI81HcVnxbEl/uTrz+mOtUCD/HL0ZO1e2lunUUQM=; b=r4vKJD1V0rn3OAShPLWaa+y39OWb07j29TgNwynNtOefEnF8AXfg7WUWr2szy2hMHl WxrAwELNxHAObfQSaEm290CJdPqUT6qqNYK3r7uy9vUQ2Y/nRZwe49EkD1CjbRicV0wc ches+szoIaoKMFDEigNUVVfpNLIbJK7e9Ml22vIxWGGFI//OYuusWUDNCYNniTZBwVMg LzgmqNNPZwiMpD6yFl50vkjpPjDxaAR3kkK6uv4NU0iULUFDBKbsJo/j1Y0JNa114lC2 J6QIlSJlDRXI5MyZvI+FieajCxd6vyUFNowl+d9zakRW7wqvujwLnBq+mS9RIFqyZGfZ tIdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id l6si37323227iob.154.2019.10.16.04.14.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 04:14:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iKhEj-0004WE-7E; Wed, 16 Oct 2019 11:13:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iKhEi-0004Vh-GA for xen-devel@lists.xenproject.org; Wed, 16 Oct 2019 11:13:00 +0000 X-Inumbo-ID: e7f3be20-f005-11e9-beca-bc764e2007e4 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id e7f3be20-f005-11e9-beca-bc764e2007e4; Wed, 16 Oct 2019 11:12:56 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D5EC1570; Wed, 16 Oct 2019 04:12:56 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7CCB43F6C4; Wed, 16 Oct 2019 04:12:55 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 16 Oct 2019 12:12:51 +0100 Message-Id: <20191016111251.29214-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH for-4.13] xen/arm: setup: Calculate correctly the size of Xen 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: jgross@suse.com, Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Julien Grall MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The current size of Xen is computed using _end - _start + 1. However, _end is pointing one past the end of Xen, so the size of Xen is off-by-one. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 705a917abf..51d32106b7 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -819,7 +819,7 @@ void __init start_xen(unsigned long boot_phys_offset, /* Register Xen's load address as a boot module. */ xen_bootmodule = add_boot_module(BOOTMOD_XEN, (paddr_t)(uintptr_t)(_start + boot_phys_offset), - (paddr_t)(uintptr_t)(_end - _start + 1), false); + (paddr_t)(uintptr_t)(_end - _start), false); BUG_ON(!xen_bootmodule); fdt_size = boot_fdt_info(device_tree_flattened, fdt_paddr);