Message ID | 1516741853-12458-3-git-send-email-bryan.odonoghue@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp2008139ljf; Tue, 23 Jan 2018 13:12:46 -0800 (PST) X-Google-Smtp-Source: AH8x227xa4/CbRmL0wD5ox22A9RFPsJRsc9MPlBTs5Vp7yslCsyBlpNYAoQkBahPsDMkKM608mxT X-Received: by 10.80.194.194 with SMTP id u2mr20977811edf.84.1516741966047; Tue, 23 Jan 2018 13:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516741966; cv=none; d=google.com; s=arc-20160816; b=h2kykMlzuxNwAdrOSEdJ/bWgw9jJus2raZIi4E86l575xIeEoyz2ZYyglPLt1Bsckg BInABRxd3ixuaUz8jPqRTI8MuS98MwWUuChJpRnlGmrbGyrvG4NtZEAq68pgeHB0qlbS u6Bv8NDDD/n8svQtDnEK+71kSiKg87wo6fiGZVTwOFsusDRfX70J8MQ6xfJN6fIchHB0 BfREc98VBjS1UoGTdv0uFG/TZoDwx4nzeS98yGEVazbbskhRhvcyxSojFay9B8xJh2WV jQ4QnLSR+Swk3QFQcmNASQXhHCHvhTZYCYpDzQJQUzjDR4IolElzRZHE2Qy7aPq/piXe FYDA== 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=3eLRq2mg8jJsQy01ZJ8r7VH6I1+dG63V9TtZ+upiCf8=; b=h8LOzhqaZ0pUu8uebyGss3sh0X0Ih+ssr+0UTowq8AMRkl64L6RaLdrfZiEqGBdhCR MWs00fbzn1Ttqu6zO22Pi9ySSy5uHWVFQMG25XGemHoVR4a2xwmPCer7aEw6dPl4/rPm 7yGa7AV+UhiwIUQSuMhWle4gHPNN+iySPSLaax1V1js9hBYDcCcEIJjjbRLnDPUeATQO MjYFgu6c4uRB9MM+zDxTd3agF1JcUWaTN42mJ0WyK+PF6moQ1qrCm7JvwQ8j4/D3xVpu xpvDzl2kutzQp2NW4bZT9HGiuZlQ9O+YhsXTZzJqsqqeBUaHZFBYBaxt9j2l9ENm4s5k Ru+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=crU6Y6pw; 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: <u-boot-bounces@lists.denx.de> Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id g3si6833834eda.26.2018.01.23.13.12.45; Tue, 23 Jan 2018 13:12:46 -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=crU6Y6pw; 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 AA506C22103; Tue, 23 Jan 2018 21:11:38 +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 AA94DC21F0A; Tue, 23 Jan 2018 21:11:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2160DC22174; Tue, 23 Jan 2018 21:11:03 +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 74D45C21EE5 for <u-boot@lists.denx.de>; Tue, 23 Jan 2018 21:10:58 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id 141so4558409wme.3 for <u-boot@lists.denx.de>; Tue, 23 Jan 2018 13:10:58 -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=B/Zqa5lgzBct4kH+K5aIDEn8JAK0hEBymM3BNPNEuAc=; b=crU6Y6pwH88EzoXyPivU6HsdAYgp2a+flelUItddcByzSiG0boh16jSwpO1kHymw9x 8L2x4FA117vGdacuM1GhNqUZTVQIKbn3jOxxoF7jyW282SK4AwlFej8Yml3Yhhs7Jlh/ WraVJKotJlRCrObWxc38ODZIL43Hl11E+sPTc= 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=B/Zqa5lgzBct4kH+K5aIDEn8JAK0hEBymM3BNPNEuAc=; b=LnPmjjS1mWnDx9a7jATxuBVFhK158kjhM0ZDfQ+a2PC5VQFrvF11nBABEZc4hhozYs 21nlxZ7XmmdKxVkgsUDj34YKA5HGA9C9mDqgbm/YH2qMfzXFF9mZzdNC9/DH2K5Fxtth aZBCiWFhkpbWKBINq7Cyk55khplBLvAtoLWGC0D6z/0ScQZSOGGVbOyJ4V1o8sJEeGRb zqFHWssG/QpX0lwu4nyrkrsfdvUW3vD5Go603DNGdIMzJXBvlVooc+ZxcDgLCZV1LTFa 01MB4OTgF9olKewYyNw6Y1vzyj/smGrhGuaz9IrgSesrK8iisxhA5k/tky/wXpvp7BoF tLyw== X-Gm-Message-State: AKwxyte/YyoiTctuSl4OFosO/xr58beL5GibS+9cg10/D8NZG+wJjZvl C9vYx5u0uOtv8SfbqygJt4U/+GAPL/8= X-Received: by 10.80.163.136 with SMTP id s8mr20369686edb.162.1516741857908; Tue, 23 Jan 2018 13:10:57 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id x25sm13860657eda.8.2018.01.23.13.10.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 13:10:57 -0800 (PST) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: u-boot@lists.denx.de, trini@konsulko.com Date: Tue, 23 Jan 2018 21:10:53 +0000 Message-Id: <1516741853-12458-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516741853-12458-1-git-send-email-bryan.odonoghue@linaro.org> References: <1516741853-12458-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Vanessa Maegima <vanessa.maegima@nxp.com>, fabio.estevam@nxp.com, Marco Franchi <marco.franchi@nxp.com> Subject: [U-Boot] [PATCH 2/2] warp7 : run sec_init for CAAM RNG X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
Fix CAAM for TrustZone enable for warp7
|
expand
|
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 337e76b..219ab6f 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -16,6 +16,7 @@ #include <asm/io.h> #include <common.h> #include <fsl_esdhc.h> +#include <fsl_sec.h> #include <i2c.h> #include <mmc.h> #include <asm/arch/crm_regs.h> @@ -225,6 +226,10 @@ int board_init(void) setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); #endif + #ifdef CONFIG_FSL_CAAM + sec_init(); + #endif + return 0; } @@ -366,5 +371,4 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) return 0; } - #endif /* ifdef CONFIG_USB_GADGET */
This patch adds a sec_init call into board_init. Doing so in conjunction with the patch "drivers/crypto/fsl: assign job-rings to non-TrustZone" enables use of the CAAM in Linux when OPTEE/TrustZone is active. u-boot will initialise the RNG and assign ownership of the job-ring registers to a non-TrustZone context. Linux then simply has to detect or be told to skip RNG initialisation. This change is safe both for the OPTEE/TrustZone boot path and the regular non-OPTEE/TrustZone boot path. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Marco Franchi <marco.franchi@nxp.com> Cc: Vanessa Maegima <vanessa.maegima@nxp.com> Cc: Stefano Babic <sbabic@denx.de> --- board/warp7/warp7.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)