From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 21 May 2026 11:19:06 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wPzYY-002BVT-1O for lore@lore.pengutronix.de; Thu, 21 May 2026 11:19:06 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wPzYX-0002fw-51 for lore@pengutronix.de; Thu, 21 May 2026 11:19:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UqVAewz6dxJ7BSsNBtcPGYiE3rca83X9UjHQeq1l6EM=; b=ABvMnaDef+/m2I i2FAaglQ8aNfSh6iQsI4aOj33WOtO/xoeITVJmrt6mMfektKQWEuWftKE5fRCgBKgflios/bN5eZS dF7IT8la3iCdQQaBO4ZcC5xhPRJmgQ5yuzJRnM2SebyJ2URbkKvDiWVC4y/M7Q+pBkGOPGePe1lcn BDJGBx6BRpPV0Fquhe/py100f2Z+MZDzoybtTcvajvmAldA+BEkxrdKdf1lLo7CKqXsMBEC0VzJrj 1LjV8Fg7XRZbxdv5VxMrfAw97ESRGvrAQDkGYXSxlyE+cv9IUnypErV+cotwMOsAdtQghAg87XszG ClMGgBHPWQqWh7E/+Jtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wPzX2-00000007HMh-43Tt; Thu, 21 May 2026 09:17:32 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wPzX0-00000007HLz-0YeC for barebox@lists.infradead.org; Thu, 21 May 2026 09:17:31 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wPzWy-0002Pd-LV; Thu, 21 May 2026 11:17:28 +0200 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wPzWx-0014y8-2o; Thu, 21 May 2026 11:17:28 +0200 Received: from [::1] (helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1wPzWy-0000000DY4Y-1MGA; Thu, 21 May 2026 11:17:28 +0200 From: Sascha Hauer To: Barebox List Date: Thu, 21 May 2026 11:17:27 +0200 Message-ID: <20260521091727.3229229-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260521_021730_176605_1E8CDB41 X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Shiyan Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.1 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH] ARM: rockchip: atf: move PBL malloc space away from OP-TEE memory X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) We recently introduced initializing the PBL early memory pool which might be needed for decompressing the BL31/BL32 firmware files. We used the end of the first DRAM region for the pool and with this we ended up exactly in the default OP-TEE memory region which is mapped as faulting. Move the pool directly beneath the OP-TEE memory. Fixes: 76b1f31275 ("ARM: rockchip: initialize PBL malloc") Signed-off-by: Sascha Hauer --- arch/arm/mach-rockchip/atf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/atf.c b/arch/arm/mach-rockchip/atf.c index 14797a1e06..96a891847b 100644 --- a/arch/arm/mach-rockchip/atf.c +++ b/arch/arm/mach-rockchip/atf.c @@ -173,7 +173,8 @@ static void rockchip_atf_load_bl31(void *fdt) unsigned long bl31_ep; mmu_early_enable(membase[0], memsize[0]); - pbl_malloc_init(membase[0] + memsize[0] - PBL_MALLOC_SIZE, PBL_MALLOC_SIZE); + pbl_malloc_init(membase[0] + memsize[0] - OPTEE_SIZE - PBL_MALLOC_SIZE, + PBL_MALLOC_SIZE); bl31_ep = load_elf64_image_phdr(&bl31); -- 2.47.3