From patchwork Tue Jan 2 16:44:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 123182 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9185593qgn; Tue, 2 Jan 2018 09:02:19 -0800 (PST) X-Google-Smtp-Source: ACJfBot51tKeoZ4Y3XTzXfxLJ+9jyTUgpz+7v7dZuROmioGu4i0imBgjCVWgHRPmErJwtCzLuxnd X-Received: by 10.80.194.194 with SMTP id u2mr62177486edf.260.1514912539128; Tue, 02 Jan 2018 09:02:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514912539; cv=none; d=google.com; s=arc-20160816; b=DOVdfLUMpRiCOXt3f9ma1qlUeGRTpYHYJca9GpCSvKN0QL/vZ+96A7f+dfK0Xic9g4 bNx0In1xX+rJ3N5vp6qBuM/EQk2KRLx5ahyxOOHfq1EAJQIsZkbwiEn1m+J6IyZE/6Wf /mWiKwrz7goSxGJY9XZ8FyHUy1WYctOHkiszFEN2b9yTlViEcvx/8168KP187u5uYUG0 T1Yk/PDGu5KDucyoPTuoCYPFIGY6S7tU1jm3qaeyHk0aESJeeaAVx983dpLbFAf/wNgS bj1svXFSCZHrVlA0WAVnGId34IN3StZbVQlmNG0NrODfbUCKnrt7CF6cMvKsRipqfPdi lUdw== 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 :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=5aAhBf9TQl8mzvVoKIHOndg3Rfe271NtQ7Tokz3atAY=; b=0kkwicdhVoAfxGfS5ipw7n4c41pchjWUH4AJ0SKGaPOmqH5SVxf/94apwlQcmxienm HLF0Gim4hQ3wCl4kH91jalIGXkizYlm5bzaeRMdQwneIYF+KdsQFsXGRhG9MIaYdFzPe ikQENa8IQ3vVrFoMdCLIyfsqka6Om3I8MqqayO3g0JSWJdka8PuIHb67VwxsU5BryA8o GlyFGok/Q4nOsq1H1+jBWK5wphPxbQ2q8oymbq1eNBzHQhD+7PkrR0q8kAerzBvVaVxB qN9EOGSld2B77EL81mEQkuYNfnZvXVGmhMUx48f/9qaVk7UOTmcpPMG/I91P4dvua/5r E3xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=a6VxdYN6; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id c2si6943758edb.172.2018.01.02.09.02.18; Tue, 02 Jan 2018 09:02:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=a6VxdYN6; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id ABABFC21DC8; Tue, 2 Jan 2018 16:50:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 17B1CC21DC5; Tue, 2 Jan 2018 16:46:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D7919C21DC5; Tue, 2 Jan 2018 16:44:58 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id 2C83CC21E09 for ; Tue, 2 Jan 2018 16:44:55 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id 64so61741998wme.3 for ; Tue, 02 Jan 2018 08:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bIDBs87SIUyzKGvj+1kHHmbQp6H0l/o+wbf/3o2tIOo=; b=a6VxdYN643KlrbQJjKapjmgk+7Bn+JN8T+mdbDoEDRUWIMmG23fy8pYLrA77N223/2 aDaIb7CPzFtmTtOylQrdY6caMgC4b/OgY88MtkWlbA90ywJUJ+b5EP+u2krpj/vPpoEH BO3queiXGM3OJNlzHuDpKsbssl4eZ7mFJWOU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bIDBs87SIUyzKGvj+1kHHmbQp6H0l/o+wbf/3o2tIOo=; b=iDSXPJBzrsRHiohUe5YPY+JSu/3jKZqaSFStp5Pi1l5hJQfO994uMxueQo6hszkgxd ed2S9cVTCor+b9N+OIMb4+4vpauUAPqY5qqLySyWPNhIL/P8U4Je49O3ZJtouQHdkhC1 sLVvieYmfQfD+KSwb8EL2pU1OdSPjLb/FhsxmBKODZzNBeGdNOzBV2Q+5K9rqKJHJzPi sGJQznjNLwSraffA+tHaen12ncidSi2hppWSnWzCHuiH0dAJQmy9rfPiOLqIi8IraPCU cI4/zUUtj8YLGDj4wRcif4bqo69jBFRj7Pepq8/TogauvcbIsa2VxttX/YfsjF+uY2b8 HWrA== X-Gm-Message-State: AKGB3mLzUoMBSfa/nZk4VsC+eeMBkEh3hF0nJ8tSpKlu0zh9930Gun+k n3RShWtqJdqmm+BPrRIJ4cgZ1mcNofY= X-Received: by 10.80.209.193 with SMTP id i1mr61836532edg.107.1514911494568; Tue, 02 Jan 2018 08:44:54 -0800 (PST) Received: from localhost.localdomain (D4CCACC7.cm-2.dynamic.ziggo.nl. [212.204.172.199]) by smtp.gmail.com with ESMTPSA id z5sm29850584edh.76.2018.01.02.08.44.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 08:44:53 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Tue, 2 Jan 2018 16:44:10 +0000 Message-Id: <1514911451-4520-25-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514911451-4520-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514911451-4520-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v4 24/25] arm: imx: hab: Implement hab_rvt_failsafe X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch implements the basic callback hooks for hab_rvt_check_failsafe for BootROM code using the older BootROM address layout - in my test case the i.MX7. Code based on new BootROM callbacks will just do nothing and there's definitely a TODO to implement that extra functionality on the alternative BootROM API. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Cc: Breno Matheus Lima --- arch/arm/mach-imx/hab.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index 99834c5..17dac16 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -70,6 +70,21 @@ ((hab_rvt_exit_t *)HAB_RVT_EXIT) \ ) +static inline void hab_rvt_failsafe_new(void) +{ +} + +#define hab_rvt_failsafe_p \ +( \ + (is_mx6dqp()) ? \ + ((hab_rvt_failsafe_t *)hab_rvt_failsafe_new) : \ + (is_mx6dq() && (soc_rev() >= CHIP_REV_1_5)) ? \ + ((hab_rvt_failsafe_t *)hab_rvt_failsafe_new) : \ + (is_mx6sdl() && (soc_rev() >= CHIP_REV_1_2)) ? \ + ((hab_rvt_failsafe_t *)hab_rvt_failsafe_new) : \ + ((hab_rvt_failsafe_t *)HAB_RVT_FAILSAFE) \ +) + static inline enum hab_status hab_rvt_check_target_new(enum hab_target target, const void *start, size_t bytes)