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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 13BE5C00A5A for ; Thu, 19 Jan 2023 08:38:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 24D5A8561D; Thu, 19 Jan 2023 09:38:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=collabora.com 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=collabora.com header.i=@collabora.com header.b="SzkZQFEi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7288D85665; Thu, 19 Jan 2023 09:38:26 +0100 (CET) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 21F6F85600 for ; Thu, 19 Jan 2023 09:38:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjoerd@collabora.com Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531:0:26cc:6c0f:ebfb:d967]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sjoerd) by madras.collabora.co.uk (Postfix) with ESMTPSA id 6B57E6600864; Thu, 19 Jan 2023 08:38:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1674117503; bh=HtuIql9UGfv3jfFum4ZKWjg0kTGjwG3mmCMThYazRn8=; h=From:To:Cc:Subject:Date:From; b=SzkZQFEik7vhxX3mRskEyehkhfGctqzTevK5beMtRraz1OYrlvZj8UQbvJlV5jY8l Mvx5p2Fi9Qpv/DZVdycB9Q/WpV6Zis1P7oA0DAgwwHw4HhMTqHbgAURs1aRVEsbw4u z2MqM727ue1XBsAPNGYw1H+TY3Pks+X2aBQE6Ph8mo6F8kyiXyUxc8z0Tggsym6wqt VYMZY4BI+CjFLEFr73XDMTcrDBjQV+lTIbPqZWc0y5LBer2tMJglHrzsQStL/eTTqY zv4Wz0wef9r6e4hin3PTRnBT0vt5FOtgJcBwhJHwP47+CXSWyLHyXVzdR+HMvGZ0Yl iTkRUGMRXm7LA== Received: by beast.luon.net (Postfix, from userid 1000) id A346661ACB0A; Thu, 19 Jan 2023 09:38:20 +0100 (CET) From: Sjoerd Simons To: u-boot@lists.denx.de Cc: Ashok Reddy Soma , Heinrich Schuchardt , Ilias Apalodimas , Kautuk Consul , Leo Yu-Chi Liang , Michal Simek , Patrice Chotard , Philippe Reynes , Rasmus Villemoes , Simon Glass , Sughosh Ganu Subject: [PATCH 0/3] Fix boot regressions on at least TI am62x Date: Thu, 19 Jan 2023 09:38:16 +0100 Message-Id: <20230119083820.2656710-1-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean When booting a recent u-boot master on TI am62x with the distro boot sequence it fails loading the FDT: Booting using the fdt blob at 0x88000000 Working FDT set to 88000000 Loading Ramdisk to 8d711000, end 8ffffd95 ... OK ERROR: reserving fdt memory region failed (addr=9e780000 size=80000 flags=4) ERROR: reserving fdt memory region failed (addr=9e800000 size=1800000 flags=4) ERROR: reserving fdt memory region failed (addr=9db00000 size=c00000 flags=4) ERROR: Failed to allocate 0x8f58 bytes below 0x90000000. device tree - allocation error FDT creation failed! resetting ... It turns out that this is caused by commit 06d514d77c37 ("lmb: consider EFI memory map") due to injecting both extra and some similar memory regions via a different path into the lmb. The following series fixes the apparent fallout from that ;) Sjoerd Simons (3): Bump LMB_MAX_REGIONS default to 16 lmb: Set correct lmb flags for EFI memory map entries lmb: Treat a region which is a subset as equal lib/Kconfig | 2 +- lib/lmb.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) -- 2.39.0