From patchwork Fri Mar 30 14:18:33 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: 132621 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp3106094ljb; Fri, 30 Mar 2018 07:28:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/f0CO77RV294pckMa6x7paDEy8sX6y1KriwSBb1Y/pnrMUZy8A5lmr1fN2P9TaLx233WCi X-Received: by 10.80.165.227 with SMTP id b32mr3064226edc.116.1522420082790; Fri, 30 Mar 2018 07:28:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522420082; cv=none; d=google.com; s=arc-20160816; b=1IP96YGdp5jvYqSe8rESmdkKkjARwxqHiNbLwPT7ONcMXhTKO8r2fJiYl9UQntB3jw 6+mHXtrTmr+qy8BZQue4l0PzGRSTW0khiAKy8pGubtEx0tzIuSs0jn/iQr2EuE9WFErw pq7DMPD+wuRLO4La1/tKraIKTpnbbJ1hz2HetRYSgaNVKr3v1Z0/KaVRU4LsvYR89a4k +oOn0uaHzBIih6arVuHd6iNsa508vGopjwjcv8aKf89FFuSt1LXM4cD/Db/UllA8RdF7 tx2XYKQieGy3s3znR5Vxc/HNa0GPl1aJof0ASD5gIKiPeLrnu/GynXudEd9xz1ChmUAF WaMA== 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=rBkpxiGD8KPp6kxNYRZxaaUl6cGgyfdl5DfMU+fQSYM=; b=rS6H3U7mp+ey64SPwUm5XjP0j1djqXDTBdYvYRGeB36NQr5a7gJlBYWq4zis9+wC0B MNfQZQCkTMwKxO3ybiLx5OByPrgL4AkTrcLSOZzJRCNnaT74fz5YXALSiYPvsblxip9T uZzrV2l+kWwerfUXWUuDMS5PB1jb98bjS0slwNMRrEfuYMx/Wh8LbvGtbnWakkBl5CvT 6lE4ewgqhhwHtMhLV+d3pjnokLkvOYwwIs+mnsCEJl8Ypac+aIlEPKZ7pd6Vr0UyEVDx uZ2zj91t4QYFfdmA0BREmDrqOZE66LLtjNrhErGzkM9lQSxzPQqAacMneqUSOG3CVcRw TYog== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DtCcjyP9; 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 x4si1199756edd.359.2018.03.30.07.28.02; Fri, 30 Mar 2018 07:28:02 -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=DtCcjyP9; 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 54557C22246; Fri, 30 Mar 2018 14:21:11 +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 4E9A8C22239; Fri, 30 Mar 2018 14:19:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6C772C22255; Fri, 30 Mar 2018 14:18:58 +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 8A558C22228 for ; Fri, 30 Mar 2018 14:18:54 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id l9so15919723wmh.2 for ; Fri, 30 Mar 2018 07:18:54 -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=ZyVbqfzifusuZrywaBiF1R7LagXEDVoA5r4yyEJ3MCo=; b=DtCcjyP9qSpbCJwY5gobvBoq8/lmolYzAoNUNShD/o/mT7vws5n2nmiC37NbGopY1V hc6Dv1vGQMpG97i00QUbZNOdDQ0EMJQ5rYfQ2GXdIjjQ4nujTMQNoQYdIPntvvu1KjWe Ff/GvsCwoXYVpC5BS10Q7t8c9XYNFkkjfxoJ4= 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=ZyVbqfzifusuZrywaBiF1R7LagXEDVoA5r4yyEJ3MCo=; b=qJaXirkurCNAcFJeh91cs3Y8bJjgGw7UXaIhC2fPoRCRrAjSqN8YWpmAt2p3wlUX52 GcMgKeFE3Y26P2dr6A1hlIWntf0DVGsBJ45FFcbCYdnFhJo+Z/wSmfvKFXEbSC29+AL1 aVUCEISMsYCj9IQW6f6qRU28PvWqArTQwJcMiPSvymR+NPblcSJRmuogw9jDWDzwkMj/ Z4vi1LyiramgeeCRscApxPLnJI/ijDJcw4gMeeXm11SaiUDkPxVuuXNvAIry7eLXSdHi fyTCCSRuVDvQtkSbBuMbDQk6V5z9lyOy2uhh7V2+tVm8++Jw/dKcZiE9dy20zFXDtp22 NI0A== X-Gm-Message-State: AElRT7Gk1Lb0mN23mKSHIlRL7R5Cxi0ykvees+IGCveqClDdLQrAbEey nSwfmKFWFQSl6tvemhl9gpwu8dcZN18= X-Received: by 10.80.185.34 with SMTP id m31mr3112657ede.214.1522419534006; Fri, 30 Mar 2018 07:18:54 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d22sm5831758eda.31.2018.03.30.07.18.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Mar 2018 07:18:53 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com Date: Fri, 30 Mar 2018 15:18:33 +0100 Message-Id: <1522419526-29494-6-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522419526-29494-1-git-send-email-bryan.odonoghue@linaro.org> Cc: rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH 05/18] warp7: Allocate specific region of memory to OPTEE 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" Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size. On WaRP7 we simply define the OPTEE region as from the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE bytes. Note the OPTEE boot process will itself subtract the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Bryan O'Donoghue --- board/warp7/warp7.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 0d3d324..56f0cdd 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -58,6 +58,11 @@ int dram_init(void) { gd->ram_size = PHYS_SDRAM_SIZE; + /* Subtract the defined OPTEE runtime firmware length */ +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; +#endif + return 0; }