From patchwork Fri May 10 02:17:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 16818 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A554238F7 for ; Fri, 10 May 2013 02:19:28 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id c10sf4354920qcz.10 for ; Thu, 09 May 2013 19:19:04 -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=G8QgW0KSsipgzFfxLN76ElrzaYTkpk4nYlGpRYRA0aA=; b=dPnb4huznRJ4HJETd2oFhxE/frsZ12SJzTtT78lutOz4tO3bm0BONL8uiCyCSbrCr1 BVei4MNFjZfOUQUlGufSR7AzU6ckB0l40B200XYA1/+Ru4M3IrJQHQDMPS05S3U554uQ jRjlt37zKlzUTTpInCi28BeEMLCz700X/YHT26rnG3BFK2vJqCgpbTtemuNEMvnKBpBi jt7XSuJuABAy06S5ZnZYU0gnZImqdsiqKLZjN5r0W6MHcAmnpzCDdmP1yCHjKf0wHaus miUTFNS80UpMPNzzZeKOHviCkLWjpSQw/MAQCx2QwsY1AGrBYC1OErb54v5Uf4ClaRtZ gmZw== X-Received: by 10.236.190.134 with SMTP id e6mr7121068yhn.40.1368152343956; Thu, 09 May 2013 19:19:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.98 with SMTP id t2ls1793061qen.30.gmail; Thu, 09 May 2013 19:19:03 -0700 (PDT) X-Received: by 10.52.25.101 with SMTP id b5mr8127124vdg.115.1368152343759; Thu, 09 May 2013 19:19:03 -0700 (PDT) Received: from mail-vb0-x234.google.com (mail-vb0-x234.google.com [2607:f8b0:400c:c02::234]) by mx.google.com with ESMTPS id ha8si315240vdb.152.2013.05.09.19.19.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:03 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::234 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::234; Received: by mail-vb0-f52.google.com with SMTP id p13so3129590vbe.11 for ; Thu, 09 May 2013 19:19:03 -0700 (PDT) X-Received: by 10.52.66.101 with SMTP id e5mr8321502vdt.57.1368152343281; Thu, 09 May 2013 19:19:03 -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.220.217.15 with SMTP id hk15csp36200vcb; Thu, 9 May 2013 19:19:02 -0700 (PDT) X-Received: by 10.180.76.230 with SMTP id n6mr684209wiw.28.1368152342114; Thu, 09 May 2013 19:19:02 -0700 (PDT) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [2a00:1450:400c:c05::22e]) by mx.google.com with ESMTPS id cz7si154273wjc.199.2013.05.09.19.19.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:02 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22e is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c05::22e; Received: by mail-wi0-f174.google.com with SMTP id m6so152997wiv.13 for ; Thu, 09 May 2013 19:19:01 -0700 (PDT) X-Received: by 10.194.61.45 with SMTP id m13mr21492217wjr.20.1368152341640; Thu, 09 May 2013 19:19:01 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id dj7sm597075wib.6.2013.05.09.19.19.00 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:01 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: Stefano.Stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH V3 06/41] xen/arm: Load dtb after dom0 kernel Date: Fri, 10 May 2013 03:17:52 +0100 Message-Id: <1368152307-598-7-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368152307-598-1-git-send-email-julien.grall@linaro.org> References: <1368152307-598-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQkrBgC9K7Yc/hXbqOgKEiZrT8ixCfjXUMj8+2t578iVNcuxqPUtX4fPK9ApX2/Fx1zWwLKY X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::234 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 8748272..6581492 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();