Kexec on arm64
Arun Chandran
achandran at mvista.com
Fri Jul 11 02:23:29 PDT 2014
Hi Geoff,
Finally I am able to get my kernel loaded with the patch below.
diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
index 894e0e1..bfca40d 100644
--- a/kexec/arch/arm64/kexec-arm64.c
+++ b/kexec/arch/arm64/kexec-arm64.c
@@ -327,7 +327,7 @@ static int get_memory_ranges_dt(struct
memory_range *array, unsigned int *count)
dbgprintf("%s: RAM: %016llx - %016llx\n", __func__,
r.start, r.end);
- if (!arm64_mem.memstart || r.start < arm64_mem.memstart)
+ if ((region->size) && (!arm64_mem.memstart ||
r.start < arm64_mem.memstart))
arm64_mem.memstart = r.start;
}
}
I suspect it was due to zero sized memory ranges in my dtb followed by the
actual region.
get_memory_ranges_dt: node_1676 memory
get_memory_ranges_dt: RAM: 0000004000000000 - 0000004400000000
get_memory_ranges_dt: RAM: 0000000000000000 - 0000000000000000
get_memory_ranges_dt: RAM: 0000000000000000 - 0000000000000000
get_memory_ranges_dt: RAM: 0000000000000000 - 0000000000000000
get_memory_ranges_dt: RAM: 0000000000000000 - 0000000000000000
As a result of that arm64_mem.memstart was getting overwritten with zero.
and I was stuck at the error
kexec: kexec/arch/arm64/kexec-arm64.c:242: virt_to_phys: Assertion
`arm64_mem.memstart' failed.
So check the validity of region before updating the 'memstart'
I will try with kexec -e next.
--Arun
On Thu, Jul 10, 2014 at 12:19 AM, Geoff Levand <geoff at infradead.org> wrote:
> Hi Arun,
>
> On Wed, 2014-07-09 at 19:28 +0530, Arun Chandran wrote:
>> After copying the resulting binaries to my target; I tried loading the
>> kernel Image
>>
>> # kexec -l /Image
>> Modified cmdline: root=/dev/nfs
>> Unable to find /proc/device-tree//chosen/linux,stdout-path, printing
>> from purgatory is diabled
>> Cannot determine the file type of /Image
>>
>> It failed to load the kernel Image. Any pointers?
>
> My kexec-tools [1] only supports loading of arm64 elf files, so
> vmlinux, or a stripped version of it. Image is a raw binary, and
> is not yet supported.
>
> Maybe something like this is what you need:
>
> ./kexec -d --load /boot/vmlinux.strip --append="console=ttyAMA0 earlyprintk=pl011,0x1c090000 root=/dev/vda rw --verbose" --dtb=/boot/fdt.dtb
> ./kexec -d -e
>
> Also, my current master branch will only work reliably with PSCI
> boot. Spin-table boot has a bug and will be unstable for the next
> few days. Spin-table will re-boot, but only the primary cpu will
> come up.
>
> [1] https://git.linaro.org/people/geoff.levand/kexec-tools.git
> https://git.linaro.org/people/geoff.levand/linux-kexec.git
>
> -Geoff
>
More information about the kexec
mailing list