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=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 91CCFC07E95 for ; Tue, 13 Jul 2021 10:33:53 +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 518BB6120A for ; Tue, 13 Jul 2021 10:33:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 518BB6120A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mentor.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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/zz4WXut3qXTTB6relj5DhZay0b/Qo4gzJgzrQwhav8=; b=ydDThjioa2Jb6OjYsjqqwBSKTa LUWWIqj8uHRhU8R0vCf9LO/SZe2OaZYHu7c4qIVxEza2p1rF8IVb2398jeLxt4JbTXxmqq/pEb5Iz 0OE7Y4IOhjHycQBDhhGk12jY5Hpflx+v2sIpTXSOsZRIGKy3BltRoa17gRqNNJr6bSYiutb4PT7ow 7SEQvbk9Nh5eT8G91PrcrfsImKGAsrsg1pDCfjefme2CGLKIHIDYrK0CGSVOe4jknKfKsM2YbbM47 bvOpHfG5M1xr2/AH3CjjBZFz2llVvpsp2jjuzBGaa7dqQUO7AYg1781kFzLFd8Mv5ZE3p+6z6RSme 0JYhDUsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fhs-009wCq-Qk; Tue, 13 Jul 2021 10:32:05 +0000 Received: from esa3.mentor.iphmx.com ([68.232.137.180]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3FES-009mTC-Un for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:01:42 +0000 IronPort-SDR: LKXTGBamUZLD2j/odc1pCOZ8yWjnePWJGRBsXIu/5z5cFcDfRbhsqkQsiTmtXBWMn+Auh9IpeR gaGTg8rqHpsesC+MJ1/gF5fVSlxeQxQHzqlkhNM2Fon15par96A/pOe7gldrSoi3WcGoGHFH7P 3AqGIJ91FseDcvajPUnBGtO5KE5981ceZb0gkjS9v2LS0fRStEVE8xkNsCtZXuuqfBHyQDCg4z VAbF6HB6OsLjX9Qzb44aR37MeO1qbFxGubSqWmQZaGPveZkyse19lpDuFdFUQp7S4SNkatDMYk pKw= X-IronPort-AV: E=Sophos;i="5.84,236,1620720000"; d="scan'208";a="63455914" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 13 Jul 2021 01:53:27 -0800 IronPort-SDR: 2sblH4vY8aCgJk1QhgZpyzpFewM9J2A+ZcTL5u9YfRmwCJfiqV5HcRgUDO92jFNGOjAZKfTwxR 45tpQAa19iCYKFX2QJc/ErqPEXPv/SPQaUTwVZVEDmz/fRDJcDdnoPQtuy/QQc3YAVrdl115Mh RhUsCHAnRI/B1H+MjpKTEkeGJDkuMUq2PZyPRTDszjZQez5QwcOgTpA4SUDxR2ea1dWpmg/6OZ p2t4qmIHtYiEatxoZPq03cRmvd7uos2kIQSgD/a+X2P40AQItm+jFg3GQNbqvpWwMbWwT+aw4h IlY= Subject: Re: U-Boot: Arm64: bootm gets stuck if RANDOMIZE_BASE is disabled To: Mark Rutland CC: , , References: <55bdb150-ac99-26a5-76e5-a1d559b34f33@mentor.com> <20210713092549.GA13027@C02TD0UTHF1T.local> From: Ahsan Hussain Message-ID: Date: Tue, 13 Jul 2021 14:53:18 +0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210713092549.GA13027@C02TD0UTHF1T.local> Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_030141_121406_9DA232FF X-CRM114-Status: GOOD ( 17.66 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 7/13/21 2:25 PM, Mark Rutland wrote: > 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? At 0xf0000000, towards the end of first DRAM bank which starts at 0x40000000. >> 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. A minor correction is that when CONFIG_RANDOMIZE_BASE is _enabled_ the issue is gone. It is only observed when RANDOMIZE_BASE is _disabled_. Both booti and bootm calculate text_offset the same way based on arm64 image header->image_size field, in booti_setup() routine from U-Boot arch/arm/lib/image.c. Regards, Ahsan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel