Message ID | 1398514631-23956-2-git-send-email-marc.zyngier@arm.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCPZR5X4TYBBBQOI52NAKGQEPDX6OHQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 36567202E6 for <linaro@patches.linaro.org>; Sat, 26 Apr 2014 12:19:14 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wn1sf28635666obc.9 for <linaro@patches.linaro.org>; Sat, 26 Apr 2014 05:19:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=pdDgVO/k4SBMB2l9q5BDnjUR895JvV276p+YVHRtt1k=; b=B9Vsj/rCF9N3r2FsKSblXnhT8iyS4XgwYGznJtL4j9aBpvnUOnThfF4z4uS43dXunO MR04/lDs2boQoJl+xuHLZeCT9wpqQv+UmwXTGxadxgaEZJgwJ2Xx45Wy/YBWFhhrC+HE riyYrKD1YtUkePQuvWcIGw8cOt4GUnc/Oawrs9fY9PFnOtW29Uqk5KuJaQoxpcKL34N2 QHuMjYGDH6ItsIDJCobIG3gUcqtQpdEknTNu8vKUenf4wXQ9QryJ5TEsBZ0SUZME2ill K8+g2Wp2vjsof991C9xYLUWgCKMd/x739E2E42pq8NyRTOiTwuwtol3zd6WGlKF5Kund qIjQ== X-Gm-Message-State: ALoCoQkV4dlaj3Emz2mdyWJv/lQnKyo94Jwd4MvGzSe+kJTQ+1qAUEuxWiBEgPaytEnazEOw+duV X-Received: by 10.182.227.131 with SMTP id sa3mr7453508obc.38.1398514753352; Sat, 26 Apr 2014 05:19:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.182 with SMTP id 51ls1772701qgv.38.gmail; Sat, 26 Apr 2014 05:19:13 -0700 (PDT) X-Received: by 10.52.15.132 with SMTP id x4mr290164vdc.31.1398514753241; Sat, 26 Apr 2014 05:19:13 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id fn10si2395658vdc.117.2014.04.26.05.19.13 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Apr 2014 05:19:13 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id sa20so5943928veb.36 for <patchwork-forward@linaro.org>; Sat, 26 Apr 2014 05:19:13 -0700 (PDT) X-Received: by 10.52.191.100 with SMTP id gx4mr10252927vdc.4.1398514753173; Sat, 26 Apr 2014 05:19:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp164834vcb; Sat, 26 Apr 2014 05:19:12 -0700 (PDT) X-Received: by 10.14.99.68 with SMTP id w44mr714831eef.82.1398514752380; Sat, 26 Apr 2014 05:19:12 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id q5si16543771eem.21.2014.04.26.05.19.11 for <multiple recipients>; Sat, 26 Apr 2014 05:19:12 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 39C5EA74ED; Sat, 26 Apr 2014 14:18:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t-3-P7EzZbfz; Sat, 26 Apr 2014 14:18:41 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A896DA746A; Sat, 26 Apr 2014 14:17:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98CBF4BF5C for <u-boot@lists.denx.de>; Sat, 26 Apr 2014 14:17:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dbnAjD4wwq9x for <u-boot@lists.denx.de>; Sat, 26 Apr 2014 14:17:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from inca-roads.misterjones.org (inca-roads.misterjones.org [213.251.177.50]) by theia.denx.de (Postfix) with ESMTPS id 01C9C4BFC2 for <u-boot@lists.denx.de>; Sat, 26 Apr 2014 14:17:19 +0200 (CEST) Received: from [2.125.202.75] (helo=why.wild-wind.fr.eu.org) by cheepnis.misterjones.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from <marc.zyngier@arm.com>) id 1We1Xj-0003DF-2l; Sat, 26 Apr 2014 14:17:19 +0200 From: Marc Zyngier <marc.zyngier@arm.com> To: u-boot@lists.denx.de Date: Sat, 26 Apr 2014 13:17:02 +0100 Message-Id: <1398514631-23956-2-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1398514631-23956-1-git-send-email-marc.zyngier@arm.com> References: <1398514631-23956-1-git-send-email-marc.zyngier@arm.com> X-SA-Exim-Connect-IP: 2.125.202.75 X-SA-Exim-Rcpt-To: u-boot@lists.denx.de, albert.u.boot@aribaud.net X-SA-Exim-Mail-From: marc.zyngier@arm.com X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Subject: [U-Boot] [PATCH v4 01/10] ARM: HYP/non-sec: move switch to non-sec to the last boot phase X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.denx.de/mailman/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: marc.zyngier@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 47ee070..10634a4 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -242,7 +242,6 @@ static void boot_prep_linux(bootm_headers_t *images) printf("FDT and ATAGS support not compiled in - hanging\n"); hang(); } - do_nonsec_virt_switch(); } /* Subcommand: GO */ @@ -287,8 +286,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) else r2 = gd->bd->bi_boot_params; - if (!fake) + if (!fake) { + do_nonsec_virt_switch(); kernel_entry(0, machid, r2); + } #endif }
Having the switch to non-secure in the "prep" phase is causing all kind of troubles, as that stage can be called multiple times. Instead, move the switch to non-secure to the last possible phase, when there is no turning back anymore. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- arch/arm/lib/bootm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)