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 02869C05027 for ; Sun, 12 Feb 2023 15:07:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2644855D2; Sun, 12 Feb 2023 16:07:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject 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="D/r2mY1n"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DDD528559B; Sun, 12 Feb 2023 16:07:11 +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 09DAC85011 for ; Sun, 12 Feb 2023 16:07:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjoerd@collabora.com Received: from beast.luon.net (simons.connected.by.freedominter.net [45.83.240.172]) (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 4689D6602121; Sun, 12 Feb 2023 15:07:08 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676214428; bh=n/2hz4Vv5nKlUmM+w/RIQFyskYHtPrfnm86koHNvW/0=; h=From:To:Cc:Subject:Date:From; b=D/r2mY1nRV1FsK7QFl+WIY8Z1kYDR7iF5FIn86KTntBVugk92E2+PXKEbv+zAx7/k QV5tPMI+fbWbB8/rbV2qhb/SDqyhkwvhIlK8+crIL5l0OIFZvhodRKJKUWa4qh+uxP TUSqJ/Ae8BdpOArwxwgTT+p7uDPXrUllBROaCDQV8QvBcHMmDhAxN9YcpLRSp/tdyA gjGumf1Kkd+UP6d2CwohMjBrOtJ+cpvJ84/kOWHmFkH1iG6sdn6++ZRd1kU9UT6tbP aPpNfCmQMvxSVlFsPRinqeNiLtLXgE5x7IutvRHxJCVHgcq9o1va1YojcbV+GNMKbP 3+msB82aVc8Uw== Received: by beast.luon.net (Postfix, from userid 1000) id 5C6ED6A72080; Sun, 12 Feb 2023 16:07:06 +0100 (CET) From: Sjoerd Simons To: Tom Rini Cc: Ashok Reddy Soma , Heinrich Schuchardt , Michal Simek , Patrice Chotard , u-boot@lists.denx.de Subject: [PATCH v2 0/1] Fix boot regressions on at least TI am62x Date: Sun, 12 Feb 2023 16:07:04 +0100 Message-Id: <20230212150706.2967007-1-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.1 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 ;) Changes in v2: - Adjust calculation to prevent integer overview (fixes lmb tests) - Drop first 2 patches as they were applied already Sjoerd Simons (1): lmb: Treat a region which is a subset as equal lib/lmb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.39.1