From patchwork Sat Nov 10 21:18:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 996013 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rere.qmqm.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uIf+wWOK"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="qElOymKE"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="U4sctqTx"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42sqdQ1JSSz9s7h for ; Sun, 11 Nov 2018 08:18:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:MIME-Version:Subject:From:References :In-Reply-To:Message-Id:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n+BwMTwMGaLlbzydGa6kPllq9mZmLwBYnmGxHbuqzpI=; b=uIf+wWOKNI0tqi hmdEc4ejTUu5MIUkN6pWTtXd8XSWCwHIMmgWnnpQo4lpXFqnwIh9c9LfIV0l8hawjj7OLsvXICh0W o6VkkI+t9nJ2q5bWRQShz9YlIBTVCNjxETJJBVTIx+ifMU+eUTgH6jYR6aGXtc03rzgp+g9oEnF77 XjN9PJkzL+bdb5GZbPfRPkWyNC1T1FxxCrsIeqA9Hd2j1Zkjml4LPXa85y/KUBFVcrcIXGoBF5+wj CYbQTuoS436h3PD4DHAMlVlgasNmHgansXHNUecYQpXC6ZEDC3qfZ0CYPnuPADHiLAkygZ4z/m/fK FrhQYJyaM/aieskHlMkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLaeS-0000nT-Dq; Sat, 10 Nov 2018 21:18:44 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLae8-0000Jt-Bw for linux-arm-kernel@bombadil.infradead.org; Sat, 10 Nov 2018 21:18:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Cc:To:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:From:References:In-Reply-To:Message-Id:Date :Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=H737vrmIgP6tmoMRj4Ur7/jm5PDfGW/Gz8mb3BNHMvk=; b=qElOymKETC4zJmR3aYLK1IQncX aW+Bzl7lDmD5L67D1+RjDR0drSlIlGlYioooi5QXjBBG4VOPeHEqwRGOPEGmKk8XxEnC0n4oS+YH1 lbdjpYgvFcKS5fwSiwZa+wiU0MTo7zvI5ll6Amki4zGNqgZlMcmttEhYmhTQl38Di6qXUW72pOKdC MVcn9L3/Gd3YF5bPchr5Okht0SloB/n1Rz79IbbcWZswbv9RGrKluGvysZxus9ZiFWIwmVwuEyvTm /VYr00+8DaxV9ndBZ4seU7fIS/Fk3B33nqQ//sPbPUy2O91LBk3KVbCYYcolhldNoYzrYBatDGdq8 akWThjDg==; Received: from rere.qmqm.pl ([91.227.64.183]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLae4-00008P-PP for linux-arm-kernel@lists.infradead.org; Sat, 10 Nov 2018 21:18:22 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42sqbV04przSL; Sat, 10 Nov 2018 22:17:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541884630; bh=DL6I1MfuXEZqznzYms6TSoripGrakVcX11od+kvwaUI=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=U4sctqTx8wrvVQNC95VFFTeGJ2M/SSJS6DLmzYcjQqRpoga6uoCxxRH7SsE2UgL5j DgyydkRpwMX8Y7UFsaO1ZqdA0eLb+9COjdtIuuOhBecKQSQj1PWkFpK3cFVFmBVtOI 5gLTzxnIZ7Bpp1F0xBL0f5rIwmRer/C7m2Hm3/JXqR9OgcbNUAhBWjyfz4qS4+glXL OS4RWq4RRFmtCI4TFib/a+6dXxev6YDg3R3TAzxXAeQPiCSxybLZcQXyewYNTNTmGK sqM/RUj/+X7OkYA/MNh0iuu7fLvWEKx4FrSfcq3qwUl7UXog1ZCtMngXCd3khsJ6tV XQaqLNDVW33kw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Sat, 10 Nov 2018 22:18:09 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 1/2] ARM: tegra: enable cache via TF MIME-Version: 1.0 To: linux-tegra@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181110_161821_171467_D33FE0C7 X-CRM114-Status: GOOD ( 17.24 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Osipenko , Thierry Reding , Russell King , linux-arm-kernel@lists.infradead.org, Jonathan Hunter Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Cache enable needs to go via firmware call with TF running. This version is based on code proposed by Dmitry Osipenko that uses run-time TF-presence instead of hardcoded in Kconfig. Signed-off-by: Michał Mirosław --- arch/arm/firmware/trusted_foundations.c | 6 ++++-- arch/arm/include/asm/trusted_foundations.h | 6 ++++-- arch/arm/mach-tegra/reset-handler.S | 20 +++++++++++++++++++- arch/arm/mach-tegra/reset.c | 5 ++++- arch/arm/mach-tegra/reset.h | 5 +++-- arch/arm/mach-tegra/tegra.c | 6 ++++-- 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/arch/arm/firmware/trusted_foundations.c b/arch/arm/firmware/trusted_foundations.c index e59f44fcda35..148d890da0b6 100644 --- a/arch/arm/firmware/trusted_foundations.c +++ b/arch/arm/firmware/trusted_foundations.c @@ -141,7 +141,7 @@ void register_trusted_foundations(struct trusted_foundations_platform_data *pd) register_firmware_ops(&trusted_foundations_ops); } -void of_register_trusted_foundations(void) +int of_register_trusted_foundations(void) { struct device_node *node; struct trusted_foundations_platform_data pdata; @@ -149,7 +149,7 @@ void of_register_trusted_foundations(void) node = of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations"); if (!node) - return; + return -ENOENT; err = of_property_read_u32(node, "tlm,version-major", &pdata.version_major); @@ -161,4 +161,6 @@ void of_register_trusted_foundations(void) panic("Trusted Foundation: missing version-minor property\n"); register_trusted_foundations(&pdata); + + return 0; } diff --git a/arch/arm/include/asm/trusted_foundations.h b/arch/arm/include/asm/trusted_foundations.h index 00748350cf72..80104a4e8476 100644 --- a/arch/arm/include/asm/trusted_foundations.h +++ b/arch/arm/include/asm/trusted_foundations.h @@ -40,7 +40,7 @@ struct trusted_foundations_platform_data { #if IS_ENABLED(CONFIG_TRUSTED_FOUNDATIONS) void register_trusted_foundations(struct trusted_foundations_platform_data *pd); -void of_register_trusted_foundations(void); +int of_register_trusted_foundations(void); #else /* CONFIG_TRUSTED_FOUNDATIONS */ @@ -59,7 +59,7 @@ static inline void register_trusted_foundations( cpu_idle_poll_ctrl(true); } -static inline void of_register_trusted_foundations(void) +static inline int of_register_trusted_foundations(void) { /* * If we find the target should enable TF but does not support it, @@ -67,6 +67,8 @@ static inline void of_register_trusted_foundations(void) */ if (of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations")) register_trusted_foundations(NULL); + + return -ENOENT; } #endif /* CONFIG_TRUSTED_FOUNDATIONS */ diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S index 805f306fa6f7..fe4c568aeace 100644 --- a/arch/arm/mach-tegra/reset-handler.S +++ b/arch/arm/mach-tegra/reset-handler.S @@ -78,8 +78,26 @@ ENTRY(tegra_resume) orr r1, r1, #1 str r1, [r0] #endif - #ifdef CONFIG_CACHE_L2X0 +#ifdef CONFIG_TRUSTED_FOUNDATIONS + adr r3, __tegra_cpu_reset_handler_data + ldr r0, [r3, #RESET_DATA(TF_PRESENT)] + cmp r0, #0 + beq ca9_scu_l2_resume + + push {r8} /* TF call might corrupt r4-r12 */ + + mov r0, #3 // local wake + mov r3, #0 + mov r4, #0 + dsb + .arch_extension sec + smc #0 + + pop {r8} + b end_ca9_scu_l2_resume +ca9_scu_l2_resume: +#endif /* L2 cache resume & re-enable */ bl l2c310_early_resume #endif diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c index dc558892753c..1c3cb62255fe 100644 --- a/arch/arm/mach-tegra/reset.c +++ b/arch/arm/mach-tegra/reset.c @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -87,7 +88,7 @@ static void __init tegra_cpu_reset_handler_enable(void) } } -void __init tegra_cpu_reset_handler_init(void) +void __init tegra_cpu_reset_handler_init(bool tf_present) { #ifdef CONFIG_SMP @@ -104,5 +105,7 @@ void __init tegra_cpu_reset_handler_init(void) __pa_symbol((void *)tegra_resume); #endif + __tegra_cpu_reset_handler_data[TEGRA_RESET_TF_PRESENT] = tf_present; + tegra_cpu_reset_handler_enable(); } diff --git a/arch/arm/mach-tegra/reset.h b/arch/arm/mach-tegra/reset.h index 9c479c7925b8..5e42dd1e9841 100644 --- a/arch/arm/mach-tegra/reset.h +++ b/arch/arm/mach-tegra/reset.h @@ -25,7 +25,8 @@ #define TEGRA_RESET_STARTUP_SECONDARY 3 #define TEGRA_RESET_STARTUP_LP2 4 #define TEGRA_RESET_STARTUP_LP1 5 -#define TEGRA_RESET_DATA_SIZE 6 +#define TEGRA_RESET_TF_PRESENT 6 +#define TEGRA_RESET_DATA_SIZE 7 #ifndef __ASSEMBLY__ @@ -60,7 +61,7 @@ void __tegra_cpu_reset_handler_end(void); (__tegra_cpu_reset_handler_end - \ __tegra_cpu_reset_handler_start) -void __init tegra_cpu_reset_handler_init(void); +void __init tegra_cpu_reset_handler_init(bool tf_present); #endif #endif diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index f9587be48235..0281de82387e 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -72,8 +72,10 @@ u32 tegra_uart_config[3] = { static void __init tegra_init_early(void) { - of_register_trusted_foundations(); - tegra_cpu_reset_handler_init(); + bool tf_present; + + tf_present = of_register_trusted_foundations() == 0; + tegra_cpu_reset_handler_init(tf_present); } static void __init tegra_dt_init_irq(void) From patchwork Sat Nov 10 21:18:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 996012 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rere.qmqm.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="exD4fBfP"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="nOYVEiXg"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="T4UtBfbH"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42sqdD72npz9s7h for ; Sun, 11 Nov 2018 08:18:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:MIME-Version:Subject:From:References :In-Reply-To:Message-Id:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mUAewLklGJjIucD8cdlbSMGv003F9wX7x7dKKe5yJBc=; b=exD4fBfPBNsrAF PX2JlsYfwocXZw6eUwBj1CfXLCvFAw0UPw4hpSwAjXAbGv36ORqVZOVllUGM9Ui3gedkn0jUyrjN4 krTidduzK5IlKwXxDktwlqQFQhLMHmgMU0RwXEfIp3kNhOPgQ6C3yOO7azOzVT+VCrEqLJkfUt2ch MoALukJpg9muJ3zEJQ77l4EA04uvYlwqwiBiaRdC1NUMVZ+M/iUwW1/t+AY5kWYQXo2PpBjMJff5v HLtiTTW5yADgaZflQ0dT/Q3HziyYOMdkif5dzY6HkHyF9DzXKZlmk2/4BUxrEDJTDWKnh7ocwvlb9 6HbBbfj/HlLiOaI1Uf1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLaeI-0000SN-FK; Sat, 10 Nov 2018 21:18:34 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLae8-0000Jr-15 for linux-arm-kernel@bombadil.infradead.org; Sat, 10 Nov 2018 21:18:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Cc:To:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:From:References:In-Reply-To:Message-Id:Date :Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZmTmYTSJewsjzwoAeO4OWgSrdo8UblePtMWLPSwyRjY=; b=nOYVEiXgmcYh2s9zgKE1vzH61f Ny8N7US6yKTYuq4iepphq+SWJyTm9hyf91OybxReV0PROTP5j6HZ0WgZEweA84GNje+Lso1yEPgl9 zwrQ47T1S+w89J9aDUQAvQaoOXA5AI925T0wutG2M5k3IzrptZW/o8Caoli/x1Tb61lC7QgBFqpiT 1MmyQgMxU/zVPhRPiCrt6gvVqMDqiNEkTXH07ZfXelQz+Y3/cSICprxeXZcYM2voIn0fveFLR6LFh 8r/I1TJmV/UYjhb+o0BarJg89FiFf1VC2bpP9jaF05gfC1DUkPAFk+F5nv4teyEbBjDXNFZW7ea2s TuJR4Jqg==; Received: from rere.qmqm.pl ([91.227.64.183]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLae4-00008Q-PR for linux-arm-kernel@lists.infradead.org; Sat, 10 Nov 2018 21:18:22 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 42sqbV2TFgzSP; Sat, 10 Nov 2018 22:17:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1541884630; bh=a2zvD6fDwiGmTs7yAJQTzM//ZEEPCAiduE0XRDrFnec=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=T4UtBfbH08BEDjXTDzGoFv3V8//CdmuMVCLvJS86z32DMNtWnKjVabjAZYKpZ/XfN e4WEG86RmCZRhqC3wOTIGD103W6aUylwUsOfcm75JDHO8uX6hnv8lg4C3szdn09XXC ITCFduwLVMKIir0NJPdXmZIaFa8XKp79CpnIMFu2Z0NSqK6jMbrknF3FFJv5z5ZZk6 klXvxGy6Mq15r8lFcrCNvEzgNj408Fql780CxstKDTkZZX/7uHFYF+8yFPetRFtWej 8WmsLCiCD+DlQ2XfybaGYQ57ERyvhCL1cXqtlXQ48hsZ7UPHxzDD4VBCJm3DR3IKFG kFA6GfdeAtXLQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at mail Date: Sat, 10 Nov 2018 22:18:09 +0100 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 2/2] ARM: tegra: avoid touching Secure registers in reset handler MIME-Version: 1.0 To: linux-tegra@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181110_161821_040539_D77C57DB X-CRM114-Status: UNSURE ( 8.53 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Osipenko , Thierry Reding , Russell King , linux-arm-kernel@lists.infradead.org, Jonathan Hunter Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org This allows secondary CPUs to boot with Trusted Foundations firmware. Signed-off-by: Michał Mirosław --- arch/arm/mach-tegra/reset-handler.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S index fe4c568aeace..56300ec9f1a0 100644 --- a/arch/arm/mach-tegra/reset-handler.S +++ b/arch/arm/mach-tegra/reset-handler.S @@ -139,6 +139,13 @@ ENTRY(__tegra_cpu_reset_handler) cpsid aif, 0x13 @ SVC mode, interrupts disabled tegra_get_soc_id TEGRA_APB_MISC_BASE, r6 + +#ifdef CONFIG_TRUSTED_FOUNDATIONS + adr r3, __tegra_cpu_reset_handler_data + ldr r0, [r3, #RESET_DATA(TF_PRESENT)] + cmp r0, #0 + bne after_errata +#endif /* CONFIG_TRUSTED_FOUNDATIONS */ #ifdef CONFIG_ARCH_TEGRA_2x_SOC t20_check: cmp r6, #TEGRA20