From patchwork Tue Jan 23 20:41:53 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: 125591 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1995716ljf; Tue, 23 Jan 2018 12:47:57 -0800 (PST) X-Google-Smtp-Source: AH8x2240Q5yBb+sJkxC2eEljcDH1YvjuzWi2tyG+dzSUOmxKB8gGowa+MBi5Y4Cect19MUPfzUK/ X-Received: by 10.80.183.170 with SMTP id h39mr20980197ede.124.1516740477650; Tue, 23 Jan 2018 12:47:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516740477; cv=none; d=google.com; s=arc-20160816; b=aJ7GVC9c5MsHBGdprxFZkjnfHj73AoWm+2AWIOfUbtFWZSGKraEli2SWOeSDVPTtPj JBll/EmeeWW3NwX60JMj45+ClBiQT0Sspz8E5ENOtbwxPY6cGfFT1kxs55XUx39qSDUt pju57ifw4AtKp7nQenSnc5ijhBw76/eoO4AAjeu5XbMqYF5Y2JTfiLH+dDIie2Bt4WOS Z0vTYQz3v4oakXDxLR4CgIAjyI5wGtQezZ0h2j6yhKUzNUxdennOkAD/uCpfSSwbmXPn uqL81v2w9BAqgu07BqtHFDa+BKfZOcX5vmha0uTHSa1owOgR4ir+QzCyoQd9d3DTRuds fvkg== 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=cvvB+lycwb5nber/e5Gw1LfRjIk4mJApi6IWnJNqGH8=; b=f4hOyfX7fQZiP/j5dyTS7Zh1OWW14kNSiqs6z5T/2PSYXx3XletVFSBDtIAs0yrdnj 4xhqmYZjk5rDGFYkB5gDS77mHizYUyBwWxKMHWeC46f6h/NdPtpgb1t8FK1Xl3PopTqX Q73T7BOkrUAaQ10zgky5q/u718UWHNRVRTzKRpN644XUATUHkHbgrAwP4B7Ww021CHPM h6eKngRqgHuCeTZh+LoOZEmcApgGTBhvatJyUA8qvMVzLluzTwCluQCUgzdAhFoGpJxE y4jmnu5VWKVUGi8Zi3NbLLEBhWqocwX4UUfl7VTYyRQeUFl3SdTjHR4oL2efkE0ZmEar neKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=N9p+B2h9; 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 i64si7024929edc.410.2018.01.23.12.47.57; Tue, 23 Jan 2018 12:47:57 -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=N9p+B2h9; 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 2983DC22155; Tue, 23 Jan 2018 20:47:03 +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 AD31AC22176; Tue, 23 Jan 2018 20:42:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C4BE9C22167; Tue, 23 Jan 2018 20:42: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 ED8A2C21EE5 for ; Tue, 23 Jan 2018 20:42:04 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id j21so15083458wmh.1 for ; Tue, 23 Jan 2018 12:42: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=YNK1Wntmes7j8la0QK0jKrehDGZdNJdBUpWJaSzYxl0=; b=N9p+B2h9LvbFv5YQ9dBEtV9q7A/1zOg0q0rBSk1Q5JpjYDEUudZs8mkXcvzPfvpVJN rAQooGtDsSngQaXaKrvXlyqpHx/uQzk7gTp9um+tvqCh7mBPIvSeUMt9+VB0t9kI/jsl 3A5YXWXdkrnxkUfYn+ETPOdmho81tedC7RfgQ= 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=YNK1Wntmes7j8la0QK0jKrehDGZdNJdBUpWJaSzYxl0=; b=kT50GtgcEzLF7VaLykv+KwKT7yAWhXUOO426V84P/SXF8+pA9ZbCZ80XbTSL6Mt0Ov gz8XuschGjE6/mS8lJ+gzjd5D8U0S2qTl4noToTK89rOEPxoEzrukSeXklQyZNFOqlyb DLDcMrYv/iLo0YkSisd412bAx1CCzplrQIoMXwC/aaba6UxsGJ3EAP7PJW0jEdpcLVfM R/QDIbj4Myx3EtFBqfKn/TjQR18SIr2V0n2Xo/6ANM5y5kSPeX59a48Goo2blpC7yDG6 Xkw2lT6/8ln9Kk2xHSb2vJ0fB193pyGI5VPpjDajxEVK9gmb3TltchEiAESuxXnWElk7 lXMQ== X-Gm-Message-State: AKwxyteGZITTuHtLO9usjvAuyWptHoCgYVXARuEtVvJFqoVoJmL29t8k mDV3hEO2jv7nCBEnfTNcXBlqjiEM5m0= X-Received: by 10.80.155.90 with SMTP id a26mr20954367edj.290.1516740124396; Tue, 23 Jan 2018 12:42:04 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id k12sm12400896edl.86.2018.01.23.12.42.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 12:42:03 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, trini@konsulko.com Date: Tue, 23 Jan 2018 20:41:53 +0000 Message-Id: <1516740120-948-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516740120-948-1-git-send-email-bryan.odonoghue@linaro.org> References: <1516740120-948-1-git-send-email-bryan.odonoghue@linaro.org> Cc: harinarayan@ti.com Subject: [U-Boot] [PATCH v3 2/9] optee: Add CONFIG_OPTEE_TZDRAM_SIZE 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" OPTEE is currently linked to a specific area of memory called the TrustZone DRAM. This patch adds a CONFIG entry for the default size of TrustZone DRAM that a board-port can over-ride. The region that U-Boot sets aside for the OPTEE run-time should be verified before attempting to hand off to the OPTEE run-time. Each board-port should carefully ensure that the TZDRAM size specified in the OPTEE build and the TZDRAM size specified in U-Boot match-up. Further patches will use TZDRAM size with other defines and variables to carry out a degree of automated verification in U-Boot prior to trying to boot an OPTEE image. Signed-off-by: Bryan O'Donoghue Cc: Harinarayan Bhatta Cc: Andrew F. Davis Cc: Tom Rini Cc: Kever Yang Cc: Philipp Tomsich Cc: Peng Fan Tested-by: Peng Fan --- lib/optee/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/optee/Kconfig b/lib/optee/Kconfig index 2e406fe..41c0ab7 100644 --- a/lib/optee/Kconfig +++ b/lib/optee/Kconfig @@ -6,3 +6,11 @@ config OPTEE enable an OPTEE specific bootm command that will perform additional OPTEE specific checks before booting an OPTEE image created with mkimage. + +config OPTEE_TZDRAM_SIZE + hex "Amount of Trust-Zone RAM for the OPTEE image" + depends on OPTEE + default 0x3000000 + help + The size of pre-allocated Trust Zone DRAM to allocate for the OPTEE + runtime.