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: 122862 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3807036qgn; Thu, 28 Dec 2017 11:01:54 -0800 (PST) X-Google-Smtp-Source: ACJfBotTqmNsDzPfXxnZoCqtPNkG4+DhFv66vZtY0FGjICJQDCIW0UqVDhwMGvF6+RXaulRu1uv5 X-Received: by 10.80.137.244 with SMTP id h49mr42126348edh.303.1514487714712; Thu, 28 Dec 2017 11:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514487714; cv=none; d=google.com; s=arc-20160816; b=mLlSLV3XKLFLBD0oJKv25k1RyTHUOCKxMQhWYtF/lfic5F1U5fnuIjwsz6kv8jUjno a1fcNE3YFe0dDO1RHWVkoBji/PvD2wh25e29YA9GVWIO8l+n9v/iVtJSU8oQgy2Y5ITR G6SlaUvMEeJNwLbzBTnZ3cqum1XN+26AAR/gvUMve/T2NRvWp//WvUWK/cqgOyxEIoPr AlsQGftFBj9Jlo6idYWI2HcBsY6/h81tbBxSh4CQq3tPW6F83wMXsNk1niOEtcHw2UlN YYCB1kY3bmmhMrUrj2Kvck5sh1dnCCoIL/XmbcuOvCPeJi2zNLN2pbuApk1qgnTDdkpO Riaw== 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=7w9Pfb1U0xbltAtwOiQS2kxcG9VGX0TpIpMQpx/U2YY=; b=gtul7tbfYg8nJlnP8hAZ1tQh4DM/1Lna1KzYSa+ykG1NzT1E5mCje8zwVt+PVaMneF FjDGjgl73XO5T0QEbcMSq6t8GQ+yNcVHnSEKDXUApLHJhF5fizPWMAK6ReihsiefC9d/ 6iGcDhKWqqCdCDvuEv0oSo7fF/DjskSHUbs2lZbcjLz/GlQCbNRhcxKKZCvxxJ0l569u PF6lhXiNvd3ajTnXodzgVULcxlr78OCqSHPbGmKVT33uphVXVuP5rZ3PQQa+pV9x/wy6 /JTMsmTThejOR6xApqqhxQweoybE+r1tfqOwCRYXptCKpI1Br4BEJxceR5p1bypoP55M P0sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MA/qLYfN; 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 y2si4211177edc.393.2017.12.28.11.01.54; Thu, 28 Dec 2017 11:01:54 -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=MA/qLYfN; 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 54233C21DDB; Thu, 28 Dec 2017 18:56:52 +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-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)