From patchwork Fri Jan 12 14:52:17 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: 124353 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2151737qgn; Fri, 12 Jan 2018 06:54:11 -0800 (PST) X-Google-Smtp-Source: ACJfBouhzSTTNyHmCWuopj2220x0GWmDFbdZ+Tic5QrHzJN+WKs2xZV7L5D+kF8UUH0MV7esG1OL X-Received: by 10.80.177.67 with SMTP id l3mr12803446edd.267.1515768851708; Fri, 12 Jan 2018 06:54:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515768851; cv=none; d=google.com; s=arc-20160816; b=T1U6Lt1stoUFjB3W0DKgaaDVZxT016eLCH3js9/+9VZuOSHegVYmOGYpWkmdywJaMh Fd4iyLGQtWmYCSpNsCkP0q8A0brrxloUDG9fZMac9RP93ZKJ6+WDp5uHOeb0R+CwlLP/ lb2bceuYcpNT26Bvs0hF62AI8SFP6tttnc9xG9DXtuqU0IO4SZlNrtHvhQWtQSplcP9a g4AswldAM4TX6DfnKOLGpIfvdW/JtDMHKI9nCM4kcOw5Gan8vWthOmtudcPJ+fweilEK ojPSp7NbsX7anmMyV58A744ku5h/AzX4mHd8bTpVYXg0CqCwl3qMfGqcmwhJbqQFH2/B Tn/A== 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=EYS9dQMe8wY/LRurCyiqZl8w9ESn3JCStSOfPrcWcNc=; b=bRytZMVkLVJqDB2PwSHqfmEzSr52VHIGKIRJsmR6HtwcWgV0KRQkL4ZwqsoPJPhJxx bp4Qw97PZDfqfpjay17NOT64Gd3CjkMLNu4a3chaMTE3JfdmfFH/dvxZXoEY6LEKDHS6 MALmiV/Oo4vQK6R8G6jTqQOPHcCGHADY4MBPy8K4vOnvBSHEMsOat2XHO2HOQuMwskO7 /U0tBCelcYZHOZ+3HwNvCMfv1ETenO0fzYdrdxw/V+odVY1LoNfKz9fEk3c01+fIWAvn ecVkc64MK7rlc/035UALGgv8NNy8YG7ul5kevNUfpVnQAUqQz98obdcLuGJnsLo0zKRb Ir2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YiQ3R0RG; 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 t34si615997edm.171.2018.01.12.06.54.11; Fri, 12 Jan 2018 06:54:11 -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=YiQ3R0RG; 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 2E5D4C22252; Fri, 12 Jan 2018 14:53:57 +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_NONE, 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 C9A6CC2222F; Fri, 12 Jan 2018 14:52:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 661E6C22235; Fri, 12 Jan 2018 14:52:32 +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 CCC92C221F7 for ; Fri, 12 Jan 2018 14:52:28 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id x4so2726237wmc.0 for ; Fri, 12 Jan 2018 06:52:28 -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=aYXdTCzKXseYVtYT78tukm7Z4v5wv7U0jYUlqgBVXhA=; b=YiQ3R0RG4ARoo8XF7EBR3Q9NzPfSBpwdbds6ZQGW3OItuM2FKeBJNUMe4mGyqMF6LS vhYZgbpRpWSl903a66jUWYYxej+qL/EuVfONg9+eretUelrxOx6owGjbYg/TZckbrQyS C6eH8DuvdDSXtZw/wL4lg+nUV0GFfuSeR8h/M= 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=aYXdTCzKXseYVtYT78tukm7Z4v5wv7U0jYUlqgBVXhA=; b=aaoJyHG0+C7XoQdtT8U10qGzuL46U16RPmA1/z7JhtIrYinw9b67YaC0/hsbDfWZfe ElYxfhRw1arXBJM/XrRRtmu/hTFx7QlOsgSVspBSQkT8XPnKo4SS+hstZezQE57J5mLC 5KGwV9j7FJrRi4+0I8gHBYeoyjgJ/S5dKaFNQj2XO9GhOu6q/CIT6c0qVabfTqMvJHWK YcNHnBJPJmIxklitMmWMpDIemx0N0/oB8Q19Fwy2QdlmUFvtTwZpVD05h3tsZ33nLqkt z66M2ahsfEHiVAVYwDtX5zM4sDjgOV0n1T9HI1ptFLzU9w6Flc0TZWNpGOTfBp+Rqh2B NHrA== X-Gm-Message-State: AKwxytdhlZAb6H4ISSqUm7wRUFqZ190xIplLgGyegYffx58Kog1Ruitf 6CZoXBOzvXk0tv/rR9wohUAXtujsNNo= X-Received: by 10.80.246.133 with SMTP id d5mr16866686edn.93.1515768748313; Fri, 12 Jan 2018 06:52:28 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d20sm1318629ede.16.2018.01.12.06.52.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 06:52:27 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Fri, 12 Jan 2018 14:52:17 +0000 Message-Id: <1515768744-25246-3-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515768744-25246-1-git-send-email-bryan.odonoghue@linaro.org> References: <1515768744-25246-1-git-send-email-bryan.odonoghue@linaro.org> Cc: trini@konsulko.com, harinarayan@ti.com Subject: [U-Boot] [PATCH 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 and 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 --- 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.