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=-7.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 6A7DCC4740A for ; Mon, 9 Sep 2019 22:31:30 +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 2B67020863 for ; Mon, 9 Sep 2019 22:31:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uUwJZm5P"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="G6bq9f59" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B67020863 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=tqH3MrncuhR3zdtS35qkytgJ8UjNmYDICKJYmdm01rw=; b=uUwJZm5PpfeujN MObR1tQ7qg41iJZfL79qENBd99VDHskRmbaoUD6uKZFLfZIWrt1pW4nBeyiqq2S/Wl5esvIFFcziF dbSlMAPsbcG2p37hf+47wQ8I1xq5kkt1rBdiwFmq67v2Kq3Q2QAeOrHxT6PRPv3HCpty8l2bxttZj oLSvXeEeJASePdGaLiOEfV0OyR7njwXBsiYRJlJV+0TejtDTXWOdEYm2BQ9dgzZqzHgRCAZvgxIvz SVLqKWmVhT7+sQ/tYkQWDxV3ehmkz7ptfLjDFUlWWhloaR8+WJV01YNx+nSwkMitu8Aw4fA6c+sfV xRV/J4lQYxQhnnQs8rSA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7SBt-0006P7-At; Mon, 09 Sep 2019 22:31:21 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7SBq-0006Oh-5L for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2019 22:31:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=u0oMZEsrwk7J/0FujHdKrmzaiHFyR66uRe3QqNZ8iKA=; b=G6bq9f59v6RPWMPua90CwqY8y vG0oNdBbJNLc7qd3BKmE7hE1vkdY4x0d8YsOeTihvkJbF90jkX0p9w+boY/CXJczUV9s5tAnRnQk+ mWxwkAy6Xs2nIDpMQjUsWSrey47PtVVAUoSEY82jU9Pk2N0Bv8IZ45oRVBPCCHHta/4KXbPZmpKhD ScyDtFeIhxBb4Ci7F84rrVoE/YOoO9qNSoxpymdPPy7xEEqDKKpF2wQGlU/L3TElUzKQQ0h0eHKqe RKwfmb9kiwBu8QXuOu/8cg7XZhDtMC3qoOxwrutGS8fetO71+CibjlN4CpOHqcXKKtFev6xOsxKGM jepa4RC6w==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:58296) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1i7SBg-00056N-Uh; Mon, 09 Sep 2019 23:31:09 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1i7SBc-0002LS-3X; Mon, 09 Sep 2019 23:31:04 +0100 Date: Mon, 9 Sep 2019 23:31:04 +0100 From: Russell King - ARM Linux admin To: Aggelis Aggelis Subject: Re: kexec broken on later 4 series arm kernels ? Message-ID: <20190909223103.GP13294@shell.armlinux.org.uk> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_153118_357494_2CD7BFC9 X-CRM114-Status: GOOD ( 19.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 09, 2019 at 09:15:58PM +0300, Aggelis Aggelis wrote: > I use MitySOM-5CSX dev kit (cyclone v)and i would like to boot to a > different kernel using kexec. > > In my configuration: > > KERNEL : https://github.com/altera-opensource/linux-socfpga/archive/socfpga-4.9.76-ltsi-rt.zip > COMPILER : https://releases.linaro.org/archive/14.04/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.bz2 > > In the kernel configuration kexec is enabled > > zcat /proc/config.gz |grep KEXEC > CONFIG_KEXEC_CORE=y > CONFIG_KEXEC=y > > and the default kernel cmdline is > > # cat /proc/cmdline > root=/dev/mmcblk0p3 rootwait rw earlycon > > First we load kernel with > > #./kexec --version > kexec-tools 2.0.19 > > # kexec -d -l zImagebkx --dtb=socfpga_cyclone5_mitysom5csx_devkit.dtb > --command-line="root=/dev/mmcblk0p3 rootwait rw earlycon" > syscall kexec_file_load not available. > kernel: 0xb6a9d008 kernel_size: 0x4a55c8 > MEMORY RANGES > 0000000000000000-000000003fffffff (0) > zImage header: 0x016f2818 0x00000000 0x004a55c8 > zImage size 0x4a55c8, file size 0x4a55c8 > zImage requires 0x004b65c8 bytes > Kernel: address=0x00008000 size=0x0178fce8 > DT : address=0x01799000 size=0x00007cf4 Same comments as per your previous email on this same subject. > kexec_load: entry = 0x8000 flags = 0x280000 > nr_segments = 2 > segment[0].buf = 0xb6a9d008kernel > segment[0].bufsz = 0x4a55cc > segment[0].mem = 0x8000 > segment[0].memsz = 0x4a6000 > segment[1].buf = 0x8e610 > segment[1].bufsz = 0x7cf4 > segment[1].mem = 0x1799000 > segment[1].memsz = 0x8000 > > and kexec kernel with > > # kexec -e > [ 134.110855] kexec_core: Starting new kernel > [ 134.115064] Disabling non-boot CPUs ... > [ 134.176961] CPU1: shutdown > [ 134.180624] Bye! > Uncompressing Linux... done, booting the kernel. > > and then nothing no messages on console. > > The same kernel boots successfully with U-Boot > > Using kernel 4.1.22 from https://github.com/dlaut/linux-socfpga and > applying the patch described in https://patchwork.kernel.org/patch/6504321/ > i successfully kexeced 4.9.76 kernel from 4.1.22 using the same > kexec-tools 2.0.19. > > root@node1:/mnt/test#uname -a Linux node1 4.1.22-ltsi-altera #2 SMP > PREEMPT Mon Jul 29 12:38:06 EEST 2019 armv7l GNU/L > root@node1:/mnt/test# kexec -d -e > [ 46.306102] kexec: Starting new kernel > [ 46.309928] Disabling non-boot CPUs ... > [ 46.306102] kexec: Starting new kernel > [ 46.378053] CPU1: shutdown > [ 46.381875] Bye! > Uncompressing Linux... done, booting the kernel. > [ 0.000000] Booting Linux on physical CPU 0x0 > [ 0.000000] Linux version 4.9.76-rt61-ltsi-altera (aggelis@corei5) > (gcc version 4.8.3 20140401 (prerelease) (crosstool-NG l9 > [ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d > [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing > instruction cache > [ 0.000000] OF: fdt:Machine model: MitySOM-5CSX Altera SOCFPGA Cyclone V > [ 0.000000] cma: Reserved 16 MiB at 0x3f000000 > [ 0.000000] Memory policy: Data cache writealloc > [ 0.000000] percpu: Embedded 15 pages/cpu @ef6bf000 s29184 r8192 > d24064 u61440 > [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. > Total pages: 260416 > [ 0.000000] Kernel command line: root=/dev/mmcblk0p3 rootwait > [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes) > [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) > [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) > [ 0.000000] allocated 1048576 bytes of page_ext > ... > ... > Angstrom v2017.12 - Kernel 4.9.76-rt61-ltsi-altera > node1 login: > > The kexec patch applied on the 4.1.22 kernel (enabling kexec on > socfpga) is already present in 4.9.76 kernel. > > Since the same kexec 2.0.19 userland tool runs successfully in the > older 4.1.22 > but not in 4.9.76 kernel did something break in kexec implementation > in later 4 series kernels? > > Aggelis Aggelis > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel