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: 854634 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="a6VxdYN6"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zB0ZW2Blbz9sBZ for ; Wed, 3 Jan 2018 03:56:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 045B2C21DA5; Tue, 2 Jan 2018 16:50:58 +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-Google-Smtp-Source: ACJfBovQpDgf7v95SXYEd0+WHgb3yQ/UEZGR6fjt5b+aFskPWdVLYYoerOmkZNcQeI5nEUzEJvTxyg== 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)