From patchwork Sat Dec 30 01:08:58 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: 122987 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5325543qgn; Fri, 29 Dec 2017 17:26:23 -0800 (PST) X-Google-Smtp-Source: ACJfBovMkLi0KjqpjoIvLX8lvNKp0pVduIjXXGszcPHo4GpVPkvt+0B+WjMAnglmWZwGJ1eQ1qtB X-Received: by 10.80.186.18 with SMTP id g18mr47652666edc.206.1514597183288; Fri, 29 Dec 2017 17:26:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514597183; cv=none; d=google.com; s=arc-20160816; b=vniPV462ja2No2xffYM6NjL4olezI06MNyLv2VHNn3o93C+UMesGw9/I5KslKure18 ruyvHM7v65447DvRM46LlCSVTuWZmc5Sat/tSA5xRo4UgVGKNfVhmm40Co38UfQ5sxmW RrXRU76zRBDpvDMcRJLqgGVDDVcluBqz+7ykqqKxj4tZjPWF1C6gkqImPYDMI+lglYeA Am/cT4m4wPwjOqLPEY7P4iu+4DdkIOhXMthr8ZvIJqpDgKTw/U3OpASBw77dBbmoQpBQ 8aT2iLzy49FTEiTxhsdrTxTcj/+BirRCChe3P01UjjnMB8its0qBP2heFFV7VLHVxVW0 ffhg== 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=H6ga+5CwTPab/65/Vz2+zUTrUKayAVSZWaS5IH+5bMY=; b=lmm8C/AJw9YdU+FxNeLIK6g2bXpR+UmyCKJkJNGtKGtoLBsJjfLSv6mfg+h76AZnpN 6XNM6964kTYPtjYInPodipxilJbU3myFuooD3MFFcAuT/xHKeHMxJe31LPGp08eaJeR7 acOMOi7YJ0JPiPsFFSQAXVCIpcbfREjjVW9hQVDJsAZaVoTQenR1/kAqieC+JQYKpmAy +h8BXr+N15z3RhW8f/k4Bv2YsO5j76f/uyhv8FN55yfjSj4L1GFH4uSV38WN7OypjUCC Tigwit3tBV70L6RwYvFGUX0DquagNZi1kMubg0CVVYoc1mEKNzwo7KPmApVJ0U3eBzVs LQ9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=F6XcvDso; 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 p34si6103651edb.413.2017.12.29.17.26.23; Fri, 29 Dec 2017 17:26:23 -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=F6XcvDso; 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 CB85CC21C34; Sat, 30 Dec 2017 01:19:23 +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 40E42C21DDA; Sat, 30 Dec 2017 01:14:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D55A5C21DE7; Sat, 30 Dec 2017 01:09:42 +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 E0FDDC21E10 for ; Sat, 30 Dec 2017 01:09:37 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id t8so50411693wmc.3 for ; Fri, 29 Dec 2017 17:09:37 -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=0OzNtKKW8eA9QTNCUSmAY08tn5EebGtHydctN68CMdM=; b=F6XcvDsodq6fQm10E4Dyw6X0VceEvFZntG1OdlV76iFelFBTXBAKLIhyJiHf+TZ2oy 3lyyRU/ZAfV/cNBizNilNH3rnoRXZk5cdF4C4CaH+jvhqxPb/sak+tulhvnnYvy0boxC IfXIi1qGxHXYSzfqbiZyyxNpbUw5X9wObzUoc= 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=0OzNtKKW8eA9QTNCUSmAY08tn5EebGtHydctN68CMdM=; b=ZLO4pEoLdQtElsM1eQFwgMHQ97LrLBt6nAQ5Q2Ha65FDHqirEsKkc7EncLA2IA6mSi dpjx3FuN4yv1f/c5Hu/xBguMlPRNZ/xZmY28eE/S5mTgPsM1X+op+TamlUeVdb0Xp11f PrUGvnv8r2fLxicf5GKCQcNHUYmjIbUB6WCQkjt2DFA6t5+6zNx7eAeS30H8UhbOhbeJ PiPzQ8iKKBVHKetQTAfRf+s+POegsHoh++RN4y1v5xiqGoy1QdVt3lYggF9GymQzKauo B4q0VmDJjOwJ4eU2HpIReZSLtKnUqXj2ElKaeVTWBaE+r6LU8WcryVe+jkH74JgMa2TQ BjcQ== X-Gm-Message-State: AKGB3mKQxOc6u8PBwJVHgasic6rHsYC8X6Uo8xu5RLp2HsMGlfqwPVN1 2hziuzIMDAFU94L17GzYtIcKAo5W5sU= X-Received: by 10.80.168.162 with SMTP id k31mr48705062edc.253.1514596177346; Fri, 29 Dec 2017 17:09:37 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id f9sm26484148edm.83.2017.12.29.17.09.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 17:09:36 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Sat, 30 Dec 2017 01:08:58 +0000 Message-Id: <1514596142-22050-30-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514596142-22050-1-git-send-email-bryan.odonoghue@linaro.org> References: <1514596142-22050-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v3 23/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 1f3253e..8d04917 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)