From patchwork Fri Jan 19 19:43:19 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: 125217 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp443431ljf; Fri, 19 Jan 2018 11:45:38 -0800 (PST) X-Google-Smtp-Source: AH8x2264bCy10/8xdII9X76+HR3o6YCmwO5duoG9JY4oRpOovR4XDoV0Z3W6HPhc8Ws/2F5QWv/A X-Received: by 10.80.225.3 with SMTP id h3mr58283edl.194.1516391138805; Fri, 19 Jan 2018 11:45:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516391138; cv=none; d=google.com; s=arc-20160816; b=nhLaMR9Vzh1JhtvCJfShwy1FDIAffEvbU4WvIlWTDXdvbgPa3NCm+3DPK1Pz7Mui+S +KjjVPqRjwDJiFeSrR4udzl89914OWemr85KKvHOzkGuboOSUv+qaO2bKUaUk+JnXAjz XQrAqe5Vea8YBSr/WH5D/wE8Mt/tRu8DqxmjNI1V33ut02+BeX/Zk/1Epn2RlDanUs0R yZoTP4cDNzIdNx3RvbKI+fdsZrNyKG2jYPHvafV1KGSO1EKHTPSJQVufXCgzWnz8GLhg 5fc4bQLpJEKzMIDPxNkKELsCfIeFPs068F/f0VhDopeyX5jRbLMeC2/58J2/K4/MdjAP ilfw== 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=YFAPltkv1c0vPAc8vKS2w6R/vo6D18NSJEREap9Hdy3KHbadntYgjK+C0Y80KRwu/0 ABJUTMMpunOcMYSPWAwNoQ5Fof1MkWoOVzS819mS5Bw9sZU8/JTjN9j5SJ2qZ3YRNoTk ssFWTsw2+985hIAccnX2vG/Sft8X1nlWlQCG1SD87TTBFvSRHxi28VpNFueelUNwsXz8 5prn1LbfVIv9SiOyXdXYvSeli9AM9ZneLN8aqI2yjkUSZ8p2BK64Aem43dff4mX0g88F a/FHQPjGL1OHLKRaPINmZkbr6rInOaqyYbmpmofPPah4XGeh9yQrJLaadDYi6NqEDfZs M+QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Vo05nwoa; 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 36si329087edp.547.2018.01.19.11.45.38; Fri, 19 Jan 2018 11:45:38 -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=Vo05nwoa; 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 3A300C21F3D; Fri, 19 Jan 2018 19:44:17 +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 258A9C21F7F; Fri, 19 Jan 2018 19:43:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 80A3AC21F81; Fri, 19 Jan 2018 19:43:36 +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 E4427C21F38 for ; Fri, 19 Jan 2018 19:43:32 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id v123so5685188wmd.5 for ; Fri, 19 Jan 2018 11:43:32 -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=Vo05nwoa2YGvyPmqvy7knQIs0vQgqOYTrhhBiLs8ii/UyorYvUy+0WMatxgCR6V3jE l4ZAwK1UX+S/XWXutX176qSGbkcGnO1CDj+yA4tBPRU06//cMUMKGjeLWSheBNyfo+CY dTvnHn/RTJ4K6dyaVo0I9PmrQNblRHcqyl2KM= 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=jhVW7hY2aXzOkRuwv38BZlI+epbIVVtvpcdE+FRjfv9uhltleHJjByr1IjJt1AUp7F dgk0N3rGKSUR6DjctDqyHviEaBUJbTTcPnxrKwVUac6SkQnu2HHFiOk6+qsNcaRoPTk9 CfBL8iXGLb14eklLTiICd0TWzdR08W9k3zTERgnBHEuC0uUNUR6zvTjgyeZArvA9+qql /Xen1a9okNX+OT+U57NqIKJ4iIX3DlqbaalvvvyUkR5vMotx8DWhajr8gean/7PpBFkr Oct09lnx4ud2lbmCrylnegh30AzQHkAoFsfCgy1CYnxTJliovNusum19AyDMXbBtr4US JlCQ== X-Gm-Message-State: AKwxytcm99bpLWwP1nmIgZuOHYGHbdZgvtL85ak40HimVQBnrYzSEKf4 AQBi0rqregUOor6FZt1TqCJOQB5swho= X-Received: by 10.80.216.205 with SMTP id y13mr23018edj.173.1516391012197; Fri, 19 Jan 2018 11:43:32 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id p6sm5936051edh.68.2018.01.19.11.43.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Jan 2018 11:43:31 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, trini@konsulko.com Date: Fri, 19 Jan 2018 19:43:19 +0000 Message-Id: <1516391006-22483-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516391006-22483-1-git-send-email-bryan.odonoghue@linaro.org> References: <1516391006-22483-1-git-send-email-bryan.odonoghue@linaro.org> Cc: harinarayan@ti.com Subject: [U-Boot] [PATCH v2 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.