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=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 B4FA2C07E95 for ; Tue, 13 Jul 2021 09:27:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8858260FED for ; Tue, 13 Jul 2021 09:27:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8858260FED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3YPg6eQ/+e2Oo+gm49BetcZem1LwUz+e3KD9ZqPykGY=; b=gq6DemTW7lsIWM Q7kkSHAlUyS0czmtYnFjqAd7VtAyCRYfA4n7Pl2vjwTyqJeGlBWlnogX67ng1xiN4vKs8kbMrSXl7 P9MydldFtLPxULSh7ycBomCt8TYoOge0lhNoVA6LN44VFbYZPs8XcM9uFFeSNdycR3NKO8Makc6h9 KlRjCO3Vs76tDwmLdhrF1OKWUGBb/eY2g4oBAiXlLo6r0wLjRg2P5LgYcIT8/mkdYeNCyccfrKslj 0V1qL+OBF0md28v2m7jgxlRzZ+TIaUBi9UZe3GXoPDbP5GnvgiBGb0ZWOIxaH6Y6QO3nGeyCrDtri NGpMtCYtUvTKgZMvWpug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Eg5-009cwm-3o; Tue, 13 Jul 2021 09:26:09 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Eg0-009cvV-Vd for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 09:26:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E5B0C31B; Tue, 13 Jul 2021 02:26:01 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.6.209]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A91423F7D8; Tue, 13 Jul 2021 02:26:00 -0700 (PDT) Date: Tue, 13 Jul 2021 10:25:49 +0100 From: Mark Rutland To: Ahsan Hussain Cc: linux-arm-kernel@lists.infradead.org, u-boot@lists.denx.de, ardb@kernel.org Subject: Re: U-Boot: Arm64: bootm gets stuck if RANDOMIZE_BASE is disabled Message-ID: <20210713092549.GA13027@C02TD0UTHF1T.local> References: <55bdb150-ac99-26a5-76e5-a1d559b34f33@mentor.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <55bdb150-ac99-26a5-76e5-a1d559b34f33@mentor.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_022605_106967_F8C471A8 X-CRM114-Status: GOOD ( 17.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 13, 2021 at 02:15:08PM +0500, Ahsan Hussain wrote: > Hello, > > I'm dumbfounded by a seemingly unrelated early kernel hang/failing to boot > when CONFIG_RANDOMIZE_BASE=n is set in kernel and we use FIT uImage. I've > verified this behavior on a couple of i.MX8 SoCs (i.MX8M plus and i.MX8QXP) > and the results remain consistent. > > I'm able to boot kernel when I use booti command. However when I use bootm > to boot a U-Boot fitImage (with kernel and fdt load addresses/entrypoint in > .its file same as I used for booti command; also tried disabling relocation > for fdt by setting fdt_high=~0UL), the boot gets stuck at "Starting kernel > ...". On disabling RANDOMIZE_BASE kconfig in Linux the same fitImage is able > to boot. Can you say which address you're trying to load the kernel to? > I've tried enabling earlycon and U-Boot debug messages in common/bootm.c and > arch/arm/lib/bootm.c but found no helpful difference in both boot flows. > Please let me know if I'm missing something obvious or where do I start > looking to debug this issue. IIUC, the booti command respects the text_offset from the kernel header, whereas bootm will not. If you have a hard-coded offset, it's possible you're violating the offset the kernel expects, and where the kernel is not relocatable, if can't fix itself up. I suspect you have a hard-coded offset of 0x80000, whereas recent kernels have a text offset of 0x00000. Your bootloader *should* read this dynamially rather than hard-coding it. For details, see: https://www.kernel.org/doc/html/v5.4/arm64/booting.html#call-the-kernel-image Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel