From patchwork Mon Apr 2 22:42:04 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: 894393 X-Patchwork-Delegate: sbabic@denx.de 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="eL49gY2z"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40FS5s50XNz9s0q for ; Tue, 3 Apr 2018 08:47:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 46C2FC21E31; Mon, 2 Apr 2018 22:45: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 811B8C21E12; Mon, 2 Apr 2018 22:43:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A0A34C21F05; Mon, 2 Apr 2018 22:42:29 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by lists.denx.de (Postfix) with ESMTPS id DC224C21EB1 for ; Mon, 2 Apr 2018 22:42:24 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id r131so30460079wmb.2 for ; Mon, 02 Apr 2018 15:42:24 -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=eL49gY2zBZ+vZbB9IQ9q1UHZEfkxYpvr90c6nJE07CE4Y8kUVCL4vkX8ahCg6sX0W7 SVz3RaPFuJIgOZLGy/35HPXBRur/9Ui7qcm1Jq+LvbQIobHNXiVtKEMPRsPRlg0r94ky k+oVHK9ZsAZiVIP/15t9ot9EFYfniM88c3Oo8= 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=sq+9J234HFXHKDbygZdZnqfwsjoahKnIUhItcY2qjG9q3aXg+2jpfakz1G6yOfFVUy G7i9KRGV3oPyPMocTteK+Ja92JsQPszzdDpJDyb43oOSvr/xJ6giArNtRxgNUWxeRnoe KB82T+fDrXOGUUjLHXph0jZLDdNhveLGB/MwhnD22p7oxP1vBVnvBFBHLtUxq3PNlAhm NhsWGPCKiIQo0yR2szQPk0vCtzYkJG3bZmxN3mpde1o7W+Iqv8RrW0J5xOfCOigb+6se 3UQyHBNaTAC5OBx5Z0p5QE5AimAEhh11VExGVUkcemtiIMhBwKYN9KrZK8EBnL7Bm94i LVGQ== X-Gm-Message-State: AElRT7EU7/IJGTTISQ4AJWjQ3ARYeS4kKumsIhBBOXybErvAXu9Njo6V xB1rQNvMlJMgInKv4yG8JSSh/y7PV8A= X-Google-Smtp-Source: AIpwx4+I/M9t9NjXaLDkUFfXPRsnm9qBJKJEV7HjEn8X7ARHaM7M+IWrb8JlzHGGyhNulys6LEtkMA== X-Received: by 10.80.136.107 with SMTP id c40mr14140728edc.231.1522708944143; Mon, 02 Apr 2018 15:42:24 -0700 (PDT) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id s8sm842086edk.76.2018.04.02.15.42.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Apr 2018 15:42:23 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, sbabic@denx.de Date: Mon, 2 Apr 2018 23:42:04 +0100 Message-Id: <1522708936-7603-6-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> References: <1522708936-7603-1-git-send-email-bryan.odonoghue@linaro.org> Cc: breno.lima@nxp.com, rui.silva@linaro.org, paul.liu@linaro.org Subject: [U-Boot] [PATCH v2 05/17] 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; }