From patchwork Tue Jan 2 16:44:02 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: 123175 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9180712qgn; Tue, 2 Jan 2018 08:57:51 -0800 (PST) X-Google-Smtp-Source: ACJfBotbo8NjsY7Wptj0teYVmAfBu/E1b7Kp8gJhfmx4ab8nQMoO9O0VnDfjGNbS4VWn7TH0DhWz X-Received: by 10.80.181.130 with SMTP id a2mr61849492ede.263.1514912270811; Tue, 02 Jan 2018 08:57:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514912270; cv=none; d=google.com; s=arc-20160816; b=l59lMJD04a5JuqxXMkkBkCjkDTml/NNmwCA8gR43dc6yIrG89RvCxDM/HurITod0kn cNtwwZZaUpttRR73s+HmT0yKPzEusiC4OQwQR0KxTDB2SgC4Yrxf2z1SsWe3Yx54J402 IYrUX/O5SmV+gLXdbXPiyRwGgo3bdGU861QgpBSe9lYAdmVSguECNsgQCZ3AC/MPCTm0 MfHmkSayVJ2VB7JGp8BncFSPKjAC+2XtifnqyGrehOX1beBIV2TAcSZUMLAuSqyPk3uS oHEaNe4b5V6X0kNxbr+U7CcGF5xxUAI3miFRSbYCyEdG1FmPgpR3sQWeYBAXsNFgFK/z Dxbg== 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=mzuxfnTJjNtsJCHiP9xNDxxxKVy+wTtJHVVYWBFjUVY=; b=iFTbOCB9VhLuNL7/6rl2OXeRLxaVfJrpjHVxbppNpZXbttqnkq7DpJsh2s0KOi+JCZ LyH5cz5H5vfoX0i6mW+1DhLwoV9HznYC+RZo89TuNuQ8X/1EemaRg66hAhmbfpxP4D81 QXgejeHQYWNA51zd0W5jgO1GaRiCaDaVo1YCMYUTi4ehYxLkSqr+Yb4z7u2aA7y8E5dV g3sIxV+hnbGsZFI+eSh9IJ2/XURdza8oi5B4Nihfr3piNMJfO4gq7x4ZK4YtWwW5aKXC jd7o9cGa5+dRm+GNkuJQCE9B9oWQCv9LZAVctPZTtqvQrFzbQsG4MBpQ62GvWL41UVN5 tSRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VI/W5+76; 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 g61si1631527ede.22.2018.01.02.08.57.50; Tue, 02 Jan 2018 08:57:50 -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=VI/W5+76; 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 5C398C21DCE; Tue, 2 Jan 2018 16:49:08 +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 82677C21E50; Tue, 2 Jan 2018 16:45:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 22A5AC21E31; Tue, 2 Jan 2018 16:44:48 +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 CA665C21DA5 for ; Tue, 2 Jan 2018 16:44:44 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id y82so16941009wmg.1 for ; Tue, 02 Jan 2018 08:44:44 -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=bRa4wGLzLk7I8vWO5pXf2rFEnTfCcGvQeNd+XkL9i1s=; b=VI/W5+76x2m2X6+8yzEAKeWmwlEhaG/tYQssVJLNzwIoi4CvcGZY8Q7pfG9bDkxyfp 3l5rbuApuNQ6QE1UVgiJHm92NZDjJUjWN8IaJAg+dB1c5FM3mJVuewznzl/i4cxwzTcw Q6Xi7EsujM1j3QE7PlRJYnhxHMbI8aIaqXE2U= 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=bRa4wGLzLk7I8vWO5pXf2rFEnTfCcGvQeNd+XkL9i1s=; b=roRf04Vug5lr7UuDq7s15r5ai2GcgyoOecCHOgAfEwB6S2O4FGV7ZgE/4JIsxjW45s wXamwSFqZYeT0Eu53oXhOfQZLt5hGCF+5gWNDEzVYYrHFQAafSOOiGSGVtZHMon1Vk3c ZC13WdqVFNebJmlIkm9UULO7VHJrzdayvk2zO6s/Om/+CSJimvPMK81lzRc2wDzTnsqG z3DSIRiWCN5UBahb/JMiPcGneJAGp1fYXNLbDttmwxY6dPGUvSVyXNAjoIn22pzjTvf0 4ArSJaici/eqn6DLWAhnpk/7T46QgPqp7zwESJ13qbJ1aCbr1vetHVJo2vNfjJptZpi8 nJ8g== X-Gm-Message-State: AKGB3mKJ/7LdFqOpQ9LxAZNkt9hTg+kgkORrN/3Kzf9afm+1ppklkl91 TPzRAYQ54zySmcOCL/7b8OKPm3gTwEI= X-Received: by 10.80.145.98 with SMTP id f31mr61295514eda.168.1514911484184; Tue, 02 Jan 2018 08:44:44 -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.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 08:44:43 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Tue, 2 Jan 2018 16:44:02 +0000 Message-Id: <1514911451-4520-17-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 16/25] 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 7c3a621..858f2a7 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