From patchwork Mon Jan 8 17:36:32 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: 123771 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3012441qgn; Mon, 8 Jan 2018 09:43:37 -0800 (PST) X-Google-Smtp-Source: ACJfBosMUGkooDMsJLU8P2SW/FfuwFECcgMxoF3dsZ9aEtml3iITqthLiH0rsStghpqKuFmab8ij X-Received: by 10.80.184.161 with SMTP id l30mr17337239ede.294.1515433417888; Mon, 08 Jan 2018 09:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515433417; cv=none; d=google.com; s=arc-20160816; b=Y9sZfeGajrjeeID+5huNESNQPoBoFY6ZfCNaLZe0E8+U0n/jaHM3WQbFuaEyr+atiC Af9X9531xCy2YA67VAi6QY0HmIfxA0JcBvNC0eR2vlBH7c24LbDSz8lukgSVKSue1I+q dzQUVZTiRKL2l1Dy51cjEDws+/nqgtRDzWXLruKZGNcXmNdwGvDvI3LQJYaJo1RcM2U+ grfbXcyQw6Anq/SVMk5cyD4Fj6xSU5OsqbB5/q1u3mmcBMbmfcXVwGBOimnH8M8kewLW R1Tbly5bHwMH1R/jEciy6LtkHzawBIgcWQ5YuxU2zX0AHM/It5mbz+J2EW7Kaoi3twIb nyLg== 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=rdCW4iaGjwAadrs97TWdl05GWDF5RHsXhRJtD6Vt4Ns=; b=NijKlWBDgiUgYnmLQojRlhEt9chbhCat9JM+XF+0qViqgMK0tu/IB/e/SoypWVEJXn jCBhR2UQWuvyu4EeKxtCsw+jt92wl0PXYOc3pZGC6M9IX7f/sxfunfwpzdDGt5gX+BrK rFkcXr92GtJHl6pufWNQp5ZNIwSetBOFQQzKokxMLl/Bzb0zHpZ0nXSICaNilbQFesk/ wWLGWc9WbUAEQ7MnxTZB6u99zym4IRK2jG9QgQEixtJws0+IrZJea77wOhwd1AMTGIte NzVfoA4dm/egDvRLU5s6wBjYlYDOsmWeEVJMFLfvtKRC0rU40SgDhSpu4vFhMQS88Cw0 UQ9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fRuYki2P; 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 i47si2867147ede.137.2018.01.08.09.43.37; Mon, 08 Jan 2018 09:43:37 -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=fRuYki2P; 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 7B83DC21FBA; Mon, 8 Jan 2018 17:41:24 +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 413B9C21F77; Mon, 8 Jan 2018 17:37:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E2077C21FAA; Mon, 8 Jan 2018 17:37:08 +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 29C97C21FBB for ; Mon, 8 Jan 2018 17:37:04 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id r78so15702167wme.5 for ; Mon, 08 Jan 2018 09:37:04 -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=3KJQ1cxQQFrK7N3Layy0yFtQqztfXHTo400v35Khoss=; b=fRuYki2PPujr+gnrTczu8ty8tSGZiGJDMPm7RivP0luHfm32zgb/o8/dOt+8sMC7Eq XiXq7Ubi+/r4YdkuwOiO6nhOUpMxfH+Mkhql9+JKwGUZnWSiQrQK8auG1stTRfaFulf3 bp5JeeTeGGFA9BSkTJuygst3Gpx19uQyne8ME= 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=3KJQ1cxQQFrK7N3Layy0yFtQqztfXHTo400v35Khoss=; b=E7Mr3dI+zu04SOQwLEuZn3soUD+3EpDL5GaDJLRX2NQbzFJSI+Z9hJXrjOmztRndkl GNDMqcVc6eVvCLHZHJB6iQLlMLderuT1qa69uS/p6bekb3AgNZIWbOknV24gXcLvZrpp XF8FB/QzcCie1uvLo1173EmrjorIWBUmr8EsT0jSacy9CLh4qpetCnEW5PaTPLtqFjtd nHnnFNwzdVe0rtK2zr2U1m82A6G20NLueBPIvLA/TGXMEEHuaP3QN2C00FvbZjCk7LOK Nl44ndI9YB/8v/KMdapgdyQ7kwS0NeLGqQM7vA7/zHjQlykF1y1SNQhrIYyoQy47NLxv whsg== X-Gm-Message-State: AKGB3mLJ0kARUerizuhAbNe+YKOP2NkJUnUwtu6I79ZBuSGB9WfdlNEo 30t1yMbNhr74HfrOAp0PrK66vPOaVKE= X-Received: by 10.80.186.3 with SMTP id g3mr17254030edc.25.1515433023549; Mon, 08 Jan 2018 09:37:03 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id a38sm7160033edf.3.2018.01.08.09.37.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jan 2018 09:37:02 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Mon, 8 Jan 2018 17:36:32 +0000 Message-Id: <1515433001-13857-16-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515433001-13857-1-git-send-email-bryan.odonoghue@linaro.org> References: <1515433001-13857-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v5 15/24] arm: imx: hab: Implement hab_rvt_check_target 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_target() for BootROM code using the older BootROM address layout - in my test case the i.MX7. Code based on new BootROM callbacks will just have HAB_SUCCESS as a result code. Adding support for the new BootROM callbacks is a TODO. 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 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index 364bd6b..2a18ea2 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -70,6 +70,24 @@ ((hab_rvt_exit_t *)HAB_RVT_EXIT) \ ) +static inline enum hab_status hab_rvt_check_target_new(enum hab_target target, + const void *start, + size_t bytes) +{ + return HAB_SUCCESS; +} + +#define hab_rvt_check_target_p \ +( \ + (is_mx6dqp()) ? \ + ((hab_rvt_check_target_t *)hab_rvt_check_target_new) : \ + (is_mx6dq() && (soc_rev() >= CHIP_REV_1_5)) ? \ + ((hab_rvt_check_target_t *)hab_rvt_check_target_new) : \ + (is_mx6sdl() && (soc_rev() >= CHIP_REV_1_2)) ? \ + ((hab_rvt_check_target_t *)hab_rvt_check_target_new) : \ + ((hab_rvt_check_target_t *)HAB_RVT_CHECK_TARGET) \ +) + #define ALIGN_SIZE 0x1000 #define MX6DQ_PU_IROM_MMU_EN_VAR 0x009024a8 #define MX6DLS_PU_IROM_MMU_EN_VAR 0x00901dd0