From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@armlinux.org.uk (Russell King - ARM Linux) Date: Thu, 23 Nov 2017 10:52:20 +0000 Subject: problem of kexec In-Reply-To: References: <33D4DBCAC5F2D74E96B07F6E7632BF732EEA03D3@G08CNEXMBPEKD01.g08.fujitsu.local> Message-ID: <20171123105220.GM31757@n2100.armlinux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Nov 23, 2017 at 03:52:25PM +0530, Bhupesh Sharma wrote: > Cc: linux-arm and kexec mailing lists for further inputs (Hoping some > NXP guys would see this and be able to help with the DPAA issue - > Q/BMAN issues you are seeing the crash boot logs).. ... > 1. crashkernel logs with DTB being passed: > > a. I am pasting the logs below again for reference - > > root at ubinux-armv8:~# kexec -l ./Image --dtb="./fsl-ls1046a-rdb-sdk.dtb" --comman > d-line="$(cat /proc/cmdline)" > root at ubinux-armv8:~# > root at ubinux-armv8:~# > root at ubinux-armv8:~# kexec -e ... > [ 0.000000] cma: Failed to reserve 16 MiB > [ 0.000000] Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 byte > s below 0x0. This is as I've said previously. The kernel here knows nothing about the MEMORY on your platform, so it can't do any memory allocations, and so it panics. kexec assumes that the dtb you pass it contains everything needed to boot the platform, including all the platform modifications that the boot loader would have done. In other words, it expects that the dtb is the exact dtb that gets passed to the kernel, as already updated by the boot loader with parameters such as the location and size of memory, ethernet addresses, etc. The exceptions to that are the command line (/chosen/bootargs) and the initial disk image. So, passing the .dtb that was generated by the kernel build system won't work, because that hasn't had these other parameters added to it by the boot loader. If you don't use the --dtb option, then kexec will read the existing kernel's dtb from /proc/device-tree, and that device tree will include all the changes that the boot loader has done, including adding details of the available memory in the system. My general advice is: avoid the --dtb option unless you _really_ need to supply a different dtb, and if you do need to supply a different dtb, then make sure you've updated it with whatever modifications that the boot loader has done to (eg) tell the kernel about where memory is in your system, and all the other modifications. If you don't know what those are, stay away from the --dtb option. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up