From patchwork Sun Apr 28 23:01:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 16472 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1926B2395E for ; Sun, 28 Apr 2013 23:03:29 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id w8sf8636vbf.7 for ; Sun, 28 Apr 2013 16:02:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=bjs0nSbnrcRH2QHru1aa5z3Nj4VBI/SjMLfajBi3r0Q=; b=jeZ5QFJIV6LOU5Hj9W8L9GVdJqEH2qJau77ILJG7qXLZEMT76/hYg4qhGfnbeStyMF GSQ9BSyM0TJNI2VcEFYzxETybIEIdoJnOKkWY+2LangzhhAvK5QiB0TdF57z/jjXTZdU wle8qGMPE6zaEVmAd5eWeEFA/4TP8aQ4dvdTO/LoHzijy5MvS/wpTfM2CqXAQS9Lve2B M/k+ZEO898Uynor5ZGsyqF0dL3ObI7YrqqI5IaXjQlLNBoBFk+CcOmHWToC6Guxk7TeR FgkB+72Pg8+zzWgP429adUmVwsJEHT+x9TMUNxl3toT2ZrTxxIrZcp8h0rHOQanwq3bw GgxA== X-Received: by 10.224.10.6 with SMTP id n6mr35037769qan.4.1367190147847; Sun, 28 Apr 2013 16:02:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.97.131 with SMTP id ea3ls2621203qeb.20.gmail; Sun, 28 Apr 2013 16:02:27 -0700 (PDT) X-Received: by 10.52.75.8 with SMTP id y8mr27386112vdv.2.1367190147653; Sun, 28 Apr 2013 16:02:27 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id x12si8979215vcv.26.2013.04.28.16.02.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Apr 2013 16:02:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hx10so5148120vcb.3 for ; Sun, 28 Apr 2013 16:02:27 -0700 (PDT) X-Received: by 10.220.39.69 with SMTP id f5mr32709024vce.45.1367190147462; Sun, 28 Apr 2013 16:02:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp33783veb; Sun, 28 Apr 2013 16:02:26 -0700 (PDT) X-Received: by 10.180.79.69 with SMTP id h5mr14054205wix.14.1367190146527; Sun, 28 Apr 2013 16:02:26 -0700 (PDT) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [2a00:1450:400c:c05::22a]) by mx.google.com with ESMTPS id hv10si3443375wib.87.2013.04.28.16.02.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Apr 2013 16:02:26 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22a is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c05::22a; Received: by mail-wi0-f170.google.com with SMTP id l13so2386439wie.1 for ; Sun, 28 Apr 2013 16:02:26 -0700 (PDT) X-Received: by 10.194.81.71 with SMTP id y7mr92362174wjx.19.1367190146153; Sun, 28 Apr 2013 16:02:26 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id k5sm18711393wiy.5.2013.04.28.16.02.25 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Apr 2013 16:02:25 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, patches@linaro.org, anthony.perard@citrix.com, stefano.stabellini@eu.citrix.com, Julien Grall Subject: [RFC 06/29] xen/arm: Load dtb after dom0 kernel Date: Mon, 29 Apr 2013 00:01:49 +0100 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-Gm-Message-State: ALoCoQlpclhljgzJZrezKeFUAky4SVjo6OSSHzwmn0Q8V/IC8rEzXfIx7lbp/LpwFqFUd/8FTSyi X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On some setup, the first linux page table is at 0x40004000. Xen will load dom0 device tree at 0x4000100. In case of the device tree is big, linux will corrupt the device tree. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- xen/arch/arm/domain_build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 3f50193..ad0ab35 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -407,8 +407,9 @@ int construct_dom0(struct domain *d) /* The following loads use the domain's p2m */ p2m_load_VTTBR(d); - dtb_load(&kinfo); + kinfo.dtb_paddr = kinfo.zimage.load_addr + kinfo.zimage.len; kernel_load(&kinfo); + dtb_load(&kinfo); discard_initial_modules();