From patchwork Thu Dec 28 18:49:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 853519 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="MA/qLYfN"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z6zZb3ZVwz9sRg for ; Fri, 29 Dec 2017 06:00:55 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 119C3C21DD9; Thu, 28 Dec 2017 18:56:53 +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_DNSWL_BLOCKED, 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 C5BD1C21E68; Thu, 28 Dec 2017 18:51:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 12C52C21E57; Thu, 28 Dec 2017 18:50:15 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 64095C21E1E for ; Thu, 28 Dec 2017 18:50:11 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id r78so45514514wme.5 for ; Thu, 28 Dec 2017 10:50:11 -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=0muyrCCcBI5tVBC18wTFDBI22BpZ7Gsc3MUDTnGTSHg=; b=MA/qLYfNaUBuf8I+ts0TDCR4mQjVdl9ek4qPjFhWT7PtY6B7BwSgtHf1Iw0HmyKIco coPM8FmVhCdUUIhggbRq1YQwkAhDZrvL4xHZFxw6K6QsExJ/Y/W/fCSQC8OkB+vWD+37 HJEFeZTrjud4RoSPFnTMviLLSq9qYCjoYyWk0= 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=0muyrCCcBI5tVBC18wTFDBI22BpZ7Gsc3MUDTnGTSHg=; b=YbSsyT1cgDVBgQ7rdb7C6uOtzfVxoKqtH+e/NtJJqNCYz4z+GDcPLkXrsXaK0BdKim /dbNmQsFySbz4vt/cFfm11KNuajTuCN5IOw35G4r7poCDvAnepy4gOxBx+LKyDM0IoW8 BmTsE0reSo8NOsQfXLOOm8JTJ1D286hfpV4CXEUoF8e/dfVzQfnlJDT4vsQzmmpbCkKi H92fr+k4YhkEqM70EHDjRy2//MelBBgt6nsYhkeAPv6/isxprzh4gSX0+y6Ddlax51p/ bEo/71OFtHeQgw6B2ZuSvGAQ0DrB5lPS094KgGtZacbNobNyJmEA0jDvhY/623669uju a8tQ== X-Gm-Message-State: AKGB3mLTqeQuvaQ9R/4EUMQfLwJMigzKS5k/yMffgK/55iyVj4xA1X0U 1GZ+ojVQkswpLzp/+ZXX6/fgnFKt/Mg= X-Google-Smtp-Source: ACJfBos/XZskzzQi/pENYJ4fZgCekazSjcXHMkeMO2T3uFvegZ2axE7jqqQfRrTmHKqtQ2WmX9LlBw== X-Received: by 10.80.216.11 with SMTP id o11mr40009104edj.235.1514487010825; Thu, 28 Dec 2017 10:50:10 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x28sm35246579edd.0.2017.12.28.10.50.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Dec 2017 10:50:10 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Thu, 28 Dec 2017 18:49:41 +0000 Message-Id: <1514486982-19059-23-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514486982-19059-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514486982-19059-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v2 22/23] 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 7b50ef5..01c0853 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)