From patchwork Tue Mar 13 16:50:28 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: 885288 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Ho1ro5ye"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4011Bx3jtGz9sDX for ; Wed, 14 Mar 2018 03:53:29 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2E6A0C21C8B; Tue, 13 Mar 2018 16:51:33 +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_H2, 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 E9AD3C21E13; Tue, 13 Mar 2018 16:50:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E6409C21E1E; Tue, 13 Mar 2018 16:50:47 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id 5D7EFC21D4A for ; Tue, 13 Mar 2018 16:50:44 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id o1so742370wro.10 for ; Tue, 13 Mar 2018 09:50:44 -0700 (PDT) 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=Ho1ro5yevrPJgjzwtHvyeXOXuTfa6H5dcoriT6wZ9695ISVGJf7KS+WLS7+RA31Ond lQqsV9hLiTb33Qt7/hK7iSSWDdJH5ZQL60H9FdBbK/mMd+58KrDHXmGZQWDEZijuIfuF D4ax9jyqHtvanRmQALChquWrzj4pk83ILaLa0= 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=oz8rLFyjK+nZMCPVW24lFRNStu2HLEdlJ+JhNQ2fMb53iMUnPbUfOwKQ+fnsjmIJWS ieixHDIqxd23TSD/BRIOCfKbAjB9tHN/T6LsRyeHYtxB6bOnidv9kuWveZLk6gbc+JYV S/bxKrSaoUOI2P6d3NbUj14shBnIC5Sor0iWTNzt7xQchMytF6QXzfgC9sRKebQkEBEZ YUqc/LJcaX/Ovmb1moI8qUI8pYIQLXZ9CleEKCOlU/4VpEOaBeEkjHsfLfdzAcKc6y0D jD4nJxPcgfgyT4+l1501CR64m0XO8zWrCBL43kDaT6gPALfkK9HrdD1tG0If4uUy9s3+ Udzg== X-Gm-Message-State: AElRT7GK3js72AoImumI6WJ4E58nsSac+UQCaXUMWnZlR8m4LKKScKXS R/wrzBBp2ciFR+Gi1JiI5v0NnX0hSFE= X-Google-Smtp-Source: AG47ELtqauszbJgzOOJKVhzfLQAuU5G6rNESz4np16s51Qr+0KQm/a0XKed7XLKdWHi7BUbQCqNfTQ== X-Received: by 10.80.186.81 with SMTP id 17mr1596481eds.107.1520959843847; Tue, 13 Mar 2018 09:50:43 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id 33sm476671edz.37.2018.03.13.09.50.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Mar 2018 09:50:43 -0700 (PDT) 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: Tue, 13 Mar 2018 16:50:28 +0000 Message-Id: <1520959836-16105-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520959836-16105-1-git-send-email-bryan.odonoghue@linaro.org> References: <1520959836-16105-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Harinarayan Bhatta Subject: [U-Boot] [PATCH v6 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.