From patchwork Fri Mar 9 16:55:23 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: 131166 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1214213lja; Fri, 9 Mar 2018 08:58:03 -0800 (PST) X-Google-Smtp-Source: AG47ELvr2Rtx4iJDtCcWR/vQEV9wno2HORMaK0e6BEBIMBeoz1s/zdTO+QgamKMqFTRjt8cy19MB X-Received: by 10.80.213.154 with SMTP id v26mr33645049edi.58.1520614683860; Fri, 09 Mar 2018 08:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520614683; cv=none; d=google.com; s=arc-20160816; b=zBWywA+oGV7h+rji8cDIg+8F9ID/iW89N74xSMdkUOZF3QH7KneUzEcvUMPm7dfIrJ ZmRHnbyPcHYCiwaEekJkwR5PWW1iEQTdsoTdTuCoBzhp9BQdLpJQjtC/nnz4sE9YO22u yodH44pekDtAUx9ukIKw2+9FuE9WOWGppGG137hPZddhbHrAURZQvB46SlgCVLQOJsDu SeoyToY+OQtEg/zy/Sfx6GiZMs6eirNpzkkOi2NajewWlWos6OjxXllwnYE0IkH62eSS xSXQUeQymA7KR+kpACSsBUP7Tn1NmCNPnnWonWp9IXGZ+ZenTYATTOz3nVngozAW9wFJ 90gQ== 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=NMZw/nVgzMZoamGRwQRGTLIgjF12LHZZnYW9bURDopurzJgxWkUbjLm0wEwerWujEG DsNBd4J5XkoAeQxngDiujjeahpEU3yO8/Y51TikOzEEp53g3oH2N4GPvPfDOzDX2vYXn PIH1pEUOeP5bNiJkNKSQ/xEclU8/If4Pfn0cTElIDwzAEKH24AIclILkbF7ACk9ddWWd r5fHhgFePSjeqyqv3CVQkEwnUE7AaOojCqbu1clq2zqhw2o54HwxpoPDRKi82/BYHqSL haQjwMWXZyHkPzeyb+XQtRjUfThpWRSW03e0qWbyEc/PiGzuDks7eD0Sl3EVAYV92P2t tDfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZOQa1MpO; 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 b21si375778edb.350.2018.03.09.08.58.03; Fri, 09 Mar 2018 08:58:03 -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=ZOQa1MpO; 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 3912EC21DB3; Fri, 9 Mar 2018 16:56:25 +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 98E77C21E0D; Fri, 9 Mar 2018 16:55:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 18A8EC21DED; Fri, 9 Mar 2018 16:55:38 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id 44C4DC21D4A for ; Fri, 9 Mar 2018 16:55:36 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id x7so5073359wmc.0 for ; Fri, 09 Mar 2018 08:55:36 -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=ZOQa1MpOZ9tvAYOioc/mB5w23TwZGurOaEZYk+Y6YPg/4/U/3L46iPD6L/oJSfQi75 XAfaRk8dIn58OEtjIClAp4GdCBN90/MmvLXrQgVCSS4idwMEqxbC1JcXEkZ/0Umq/keF 6/gUn4wqp0+jUa4x6knF9o9dNUl+bq/tRlnNc= 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=qbTT2g7eRGIGTQsZYvFMU7a1ZPp9Iulxa7bevt8/9plQzR4ytf6GtEQmQKLLBx9oMd vsWnbJ7bNvTNaHg3jNQP/rwh91ljCAhl4LW6ZRxdhfPtY+Pa4LFjk+hJ9O7O8u0iwWMw 6/y9stg85qd0RYW/QPbxvM+q6/EwxFBg8xX8e0xi6q2p3WQyVynlUcfHwx90mEurUpIz IRN4/Bd+h80R8WQmqg9mH0EckMvK9+Bjrp6+PEOUK+Psjgzt+tmfGrod2T8i9uKi852q RqS7ls5w82CFphWwOTfuHHvKtPpz6YiFZMbBDeoN+MzmzLPzpUBW0hy7I8vvSxDDs9iv Rh9Q== X-Gm-Message-State: APf1xPCeA7YehDdF/Ot6YUruni0SumpigC0QozutFavbRfbu+H4cL4S9 g911msHzIXGMkE/wX0auFQkWpJvS6No= X-Received: by 10.80.222.131 with SMTP id c3mr38403715edl.220.1520614535758; Fri, 09 Mar 2018 08:55:35 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id e40sm960335ede.15.2018.03.09.08.55.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Mar 2018 08:55:35 -0800 (PST) From: Bryan O'Donoghue To: U-Boot@lists.denx.de, trini@konsulko.com, afd@ti.com, kever.yang@rock-chips.com, philipp.tomsich@theobroma-systems.com, peng.fan@nxp.com Date: Fri, 9 Mar 2018 16:55:23 +0000 Message-Id: <1520614531-2164-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520614531-2164-1-git-send-email-bryan.odonoghue@linaro.org> References: <1520614531-2164-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Harinarayan Bhatta Subject: [U-Boot] [PATCH v5 02/10] 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.