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: 131512 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp970371ljb; Tue, 13 Mar 2018 09:52:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELu7hb0lpeBChUBv80O4vTSlcqYZKAdNDbdU+9EMopCGPi3PaMxPatEA4DXaatcS/c3skXLH X-Received: by 10.80.189.131 with SMTP id y3mr1631150edh.122.1520959970102; Tue, 13 Mar 2018 09:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520959970; cv=none; d=google.com; s=arc-20160816; b=vkWhDvPbz1igTrut5WEwJb2Q2QF89fWOG8NNB66qPNg82ZOTMSLEWIYgCMvcwcWkuP zje76RlVhfXWF+G/2WrpNAcBz9GVG9JVXRmyWwTxX9jmbX2METhsplEpIY6O+gwNfdeQ 107I4supvoGTNk/QUqngyksDGxenkwjgq/Df92uoAfm2MCZX7nX/T2cgtoW1o8Rx8QBI sBxLkj/6gIUN0LArHJXbmwRdQRx1DLWSyvlldWAw/Qwe1k5Ub/qx3IpcRnh7Rm43peM9 HG9924mkHbCZh1CA90/A1Hv+2+HUDlD4ozpBoE6ItxMlLf9q4TT5bNpBMTABCWuCECaO vxWw== 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=yvayTU/zlurokVoa5vpcttLBGBF+xmy24mHcsYnb1RExmQwoXFCVlft/VfZEo1RSYA LcmNvNp03tHgF6c0lYF8v/xQ0F5zvEg4mqSMLc09ZTL0qlDeCdwpr7F2eLUK4xjaPKIp SzWjrRu15s/Kxt83CCoNVwar3UmPfkzOZO4HyIgxDKiQx/QLPFWP/lnVSem5CnjhlMpA xfmPPK0MYB1Fq5Ck8OIGSm70xshKwsM39Brx/ouMBxgei7gR++2nPE9oaV2/AEynjvW5 IsfSiImd836bpPLyqQLVgGQZZvM7KFtUxmKEw+NOfm9u6OKYRAVVC7/kQxQvbRt2AkrZ 6WkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ho1ro5ye; 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 q28si350829edb.453.2018.03.13.09.52.49; Tue, 13 Mar 2018 09:52:50 -0700 (PDT) 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=Ho1ro5ye; 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 8B707C21E08; 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-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.