From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC653C4338F for ; Wed, 25 Aug 2021 13:37:27 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E922D60FD8 for ; Wed, 25 Aug 2021 13:37:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E922D60FD8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E8B981EBD; Wed, 25 Aug 2021 15:37:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="hSsURnSB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8170280A22; Wed, 25 Aug 2021 15:23:19 +0200 (CEST) Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9F14580A22 for ; Wed, 25 Aug 2021 15:23:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=oleksandr.suvorov@foundries.io Received: by mail-lj1-x22b.google.com with SMTP id i28so43606597ljm.7 for ; Wed, 25 Aug 2021 06:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PFIJ/E+a6sltnHSa47FE0OFdhva/zaiLFob3wWT3i88=; b=hSsURnSBLrluW+/u2LOkaScqkc05Z28YlOCBuRTNWGz1paSwHNNdm3oL1PP8nXSkcM zDA2Ol+pe03gCPbdcIEfYhbOAhHexwgCsjl9geLaHjzXPM1+5K0hZNJnB8Qa2XKgWmBy ZKQWDg7pZAK7QSs39Q3XIls1YllNERnG0uCJiEGLmabEHGtRoE+pArodUgYp8P8LzkG1 o2QopM0HIDO6L7eIiei4lDPnwJ2cy5GImbnRoXaJfcdmk+tMwXpFL5rQDT6UZ60O3q6T RY2bfYDPA1MCJE4onq6dHndkQ+J3HiBsqqJsAgTg14DjBTlz5aBYrS9yaW2AaJ5h3OA1 82oQ== 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:mime-version :content-transfer-encoding; bh=PFIJ/E+a6sltnHSa47FE0OFdhva/zaiLFob3wWT3i88=; b=Kk947+64eGFGe/Lqy8EGeCwBJgUkISemR2BQCaxxMsVd4y0tNDI798K6n2A+9Zcg0P x8fo2YeFtPYyxzDZjBctMK9exGsP80w1+IZNrQnx5AclwYuGWFQUURGZ0DvxwToXcNqt QND+iafphp4lUMFQrZn3JOlKvjQMytxamhi5vT2D+4NDpY3tv/Xnh+DaOpL6Pdzg7ZEZ Q9VG63PpbAwQfrajiDP6EPVEXop41cEF/GK8gjkP4LdejpEz+Qv2hwiieM81p9hBap/K afA5yRoSNwMYQItYLoqw7upd8l1NCKjisyto+h+mhWxbYzGLTPnsz89mhicL3xWYgV76 Rs+Q== X-Gm-Message-State: AOAM5311YniwGWw4XkuqDfAbdEgc48eHqVnpeU2SS9YjwPkLqdqJTKbQ mgxrPT2xWDltcTYM5Z7vze3PX5zRVQfnhMas X-Google-Smtp-Source: ABdhPJwaUzbBgygu+T0L6yYp1hdcRZ2UV8O5ZM47ApC1GRdHiEXIRVaUABmznXgBIghrxh6LK4VlHQ== X-Received: by 2002:a2e:a806:: with SMTP id l6mr37982652ljq.91.1629897793821; Wed, 25 Aug 2021 06:23:13 -0700 (PDT) Received: from cryobook.bearlog ([82.193.109.226]) by smtp.gmail.com with ESMTPSA id bp25sm2366lfb.51.2021.08.25.06.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 06:23:13 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Ricardo Salveti , Simon Glass Subject: [PATCH] board: ea: mx7ulp_com: allocate specific region of memory to OP-TEE Date: Wed, 25 Aug 2021 16:22:55 +0300 Message-Id: <20210825132255.67631-1-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 25 Aug 2021 15:37:22 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Ricardo Salveti On the iMX7ULP uCOM board, OP-TEE uses the memory region defined by the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE, so subtract CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size to avoid conflicts. Note the OPTEE boot process itself subtracts the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Ricardo Salveti --- board/ea/mx7ulp_com/mx7ulp_com.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/ea/mx7ulp_com/mx7ulp_com.c b/board/ea/mx7ulp_com/mx7ulp_com.c index 5b2d444366..7fce75ade9 100644 --- a/board/ea/mx7ulp_com/mx7ulp_com.c +++ b/board/ea/mx7ulp_com/mx7ulp_com.c @@ -20,6 +20,10 @@ int dram_init(void) { gd->ram_size = imx_ddr_size(); +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; +#endif + return 0; } -- 2.31.1