* Can't kexec/kdump on mpc85xx
@ 2010-09-27 1:59 Makito SHIOKAWA
2010-09-27 15:55 ` Matthew McClintock
0 siblings, 1 reply; 11+ messages in thread
From: Makito SHIOKAWA @ 2010-09-27 1:59 UTC (permalink / raw)
To: kexec; +Cc: Makito SHIOKAWA
I'm trying to kexec/kdump on MPC8548 custom board, but second kernel doesn't
boot. (Custom board's main difference to MPC8548CDS is memory map (CCSR,
PCI-IO addresses), RAM size (1GB), FLASH size. So, I modified mpc8548cds.dts
to boot kernel.)
I followed "mpc85xx kexec howto" (kexec-tools/doc/mpc85xx.txt) instructions.
As boot/kexec/kdump kernel, I used linux-2.6.35 and set below kernel configs.
* "kexec system call (EXPERIMENTAL)" (CONFG_KEXEC)
* "Build a relocatable kernel (EXPERIMENTAL)" (CONFIG_RELOCATABLE)
(CONFIG_CRASH_DUMP, CONFIG_PROC_VMCORE weren't settable on MPC8548CDS.)
As kexec-tools, I used git commit "dbe1163152ef6fca2a1bd22e11e219f58fd40c08"
(I got error on kexec-tools-2.0.2), and cross compiled with -DDEBUG.
As boot parameter, I set "crashkernel=256M@512M". (I also tried other sizes
and @256M combinations.)
---
# cat /proc/cmdline
console=ttyS0,38400 ip=bootp root=/dev/nfs rw crashkernel=256M@512M
---
Then, when I "kexec -l", I got below debug message and seems no problem.
---
# kexec -l --command-line="console=ttyS0,38400 ip=bootp root=/dev/nfs rw
maxcpus=1 noirqdistrib reset_devices" /boot/vmlinux
0000000000000000-0000000040000000 : 0
get base memory ranges:1
sym: .data info: 03 other: 00 shndx: 4 value: 0 size: 0
[..snip..]
Modified cmdline:console=ttyS0,38400 ip=bootp root=/dev/nfs rw maxcpus=1 noirqdi
strib reset_devices
reserve regions: 1
0: offset: 17fd000, size: 3000
debug.dtb written
---
But when I "kexec -e", second kernel doesn't boot and seems stalled.
---
# kexec -e
Starting new kernel
Bye!
---
Also, when I "kexec -p", I got below debug message and seems no problem.
---
# kexec -p --command-line="console=ttyS0,38400 ip=bootp root=/dev/nfs rw
maxcpus=1 noirqdistrib reset_devices" /boot/vmlinux
0000000000000000-0000000040000000 : 0
get base memory ranges:1
usable memory rgns size:1 base:0 size:30000000
exclude_range sorted exclude_range[0] start:0, end:41b000
setup_memory_ranges memory_range[0] start:41b001, end:30000000
CRASH MEMORY RANGES
0000000000000000-0000000000010000
0000000000010000-0000000020000000
0000000030000000-0000000040000000
Elf header: p_type = 4, p_offset = 0x1f880400 p_paddr = 0x1f880400 p_vaddr = 0x0
p_filesz = 0x400 p_memsz = 0x400
vmcoreinfo header: p_type = 4, p_offset = 0x4044f4 p_paddr = 0x4044f4 p_vaddr =
0x0 p_filesz = 0x1000 p_memsz = 0x1000
Elf header: p_type = 1, p_offset = 0x2041b000 p_paddr = 0x0 p_vaddr = 0xc0000000
p_filesz = 0x10000 p_memsz = 0x10000
Elf header: p_type = 1, p_offset = 0x10000 p_paddr = 0x10000 p_vaddr = 0xc001000
0 p_filesz = 0x1fff0000 p_memsz = 0x1fff0000
Elf header: p_type = 1, p_offset = 0x30000000 p_paddr = 0x30000000 p_vaddr = 0xf
fffffff p_filesz = 0x10000000 p_memsz = 0x10000000
Command line after adding elfcorehdr: elfcorehdr=528556K
Command line after adding elfcorehdr: elfcorehdr=528556K savemaxmem=1024M
sym: .data info: 03 other: 00 shndx: 4 value: 0 size: 0
[..snip..]
Modified cmdline:console=ttyS0,38400 ip=bootp root=/dev/nfs rw maxcpus=1 noirqdi
strib reset_devices elfcorehdr=528556K savemaxmem=1024M
reserve regions: 2
0: offset: 217fd000, size: 3000
1: offset: 20000000, size: 432000
debug.dtb written
---
But when I "echo c > /proc/sysrq-trigger", second kernel doesn't boot and
seems stalled.
---
# echo c > /proc/sysrq-trigger
SysRq : Trigger a crash
Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc01b7894
Oops: Kernel access of bad area, sig: 11 [#1]
MPC85xx CDS
last sysfs file: /sys/devices/system/cpu/cpu0/crash_notes
NIP: c01b7894 LR: c01b7b5c CTR: c01b7880
REGS: dfb13df0 TRAP: 0300 Not tainted (2.6.35)
MSR: 00021000 <ME,CE> CR: 22002442 XER: 20000000
DEAR: 00000000, ESR: 00800000
TASK = df9a7780[890] 'bash' THREAD: dfb12000
GPR00: 00000001 dfb13ea0 df9a7780 00000063 00000000 ffffffff c01bebf0 00000000
GPR08: 00002d02 00000000 00000010 00000000 22002422 1009cc80 10080000 10095a10
GPR16: 10090000 10090000 bfb3bea0 00000000 100956b0 10090000 100956c0 bfb3be90
GPR24: 00000000 00000007 c03e3488 00029000 c03e3584 c03e0000 00000000 00000063
NIP [c01b7894] sysrq_handle_crash+0x14/0x20
LR [c01b7b5c] __handle_sysrq+0xbc/0x1c0
Call Trace:
[dfb13ea0] [c01b7b44] __handle_sysrq+0xa4/0x1c0 (unreliable)
[dfb13ed0] [c01b7cbc] write_sysrq_trigger+0x5c/0x70
[dfb13ee0] [c00f1b9c] proc_reg_write+0x4c/0x70
[dfb13ef0] [c00a9380] vfs_write+0xc0/0x1a0
[dfb13f10] [c00a955c] sys_write+0x4c/0x90
[dfb13f40] [c00103b4] ret_from_syscall+0x0/0x3c
--- Exception: c01 at 0xfe1d758
LR = 0xfdb93ec
Instruction dump:
7d6b0078 7d60492d 40a2fff4 807e0018 7c7b1b78 4bfffefc 00000000 3d20c040
38000001 9009b12c 7c0004ac 39200000 <98090000> 4e800020 60000000 3803ffd0
Bye!
---
Is there any operation mistakes, or is something not ready on current
kernel/kexec-tools?
Not just kexec, I need to make kdump work on the custom board, but currently
CONFIG_CRASH_DUMP, CONFIG_PROC_VMCORE aren't settable on MPC8548. Is there any
plan to make these options settable, or what kind of work I need to do if I
implement by myself?
I would appreciate any help to this.
Thanks,
--
Makito SHIOKAWA <mshiokawa@miraclelinux.com>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Can't kexec/kdump on mpc85xx 2010-09-27 1:59 Can't kexec/kdump on mpc85xx Makito SHIOKAWA @ 2010-09-27 15:55 ` Matthew McClintock 2010-09-28 3:40 ` Makito SHIOKAWA 0 siblings, 1 reply; 11+ messages in thread From: Matthew McClintock @ 2010-09-27 15:55 UTC (permalink / raw) To: Makito SHIOKAWA; +Cc: kexec On Sep 26, 2010, at 8:59 PM, Makito SHIOKAWA wrote: > > Is there any operation mistakes, or is something not ready on current > kernel/kexec-tools? Actually, it looks like you did everything correct. I've never tested on a mpc8548 but it should work. > Not just kexec, I need to make kdump work on the custom board, but currently > CONFIG_CRASH_DUMP, CONFIG_PROC_VMCORE aren't settable on MPC8548. Is there any > plan to make these options settable, or what kind of work I need to do if I > implement by myself? I would focus on kexec -e first and you don't need those two options. I suspect those two things should work but I would have to look and see why they are not selectable. > > I would appreciate any help to this. > Thanks, > First off, what SHA of the kernel are you using? It looks like 2.6.35 should have the patches you need, but I want to double check. Also, how did you compile kexec-tools? Cross compile? What compiler are you using? -M _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-27 15:55 ` Matthew McClintock @ 2010-09-28 3:40 ` Makito SHIOKAWA 2010-09-28 15:47 ` Matthew McClintock 0 siblings, 1 reply; 11+ messages in thread From: Makito SHIOKAWA @ 2010-09-28 3:40 UTC (permalink / raw) To: Matthew McClintock; +Cc: kexec > First off, what SHA of the kernel are you using? It looks like 2.6.35 should have the patches you need, but I want to double check. Also, how did you compile kexec-tools? Cross compile? What compiler are you using? As kernel, I used vanilla 2.6.35. (http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.tar.gz. Git commit should be 9fe6206f400646a2322096b56c59891d530e8d51) As cross compiler, I used "Sourcery G++ Lite 4.4-254 for Power GNU/Linux". (http://www.codesourcery.com/sgpp/lite/power/portal/package6842/public/powerpc-linux-gnu/freescale-4.4-254-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2). I cross compiled kernel, kexec-tools on x86 host with it. * kernel, dtb # cd linux-2.6.35 # cp arch/powerpc/configs/85xx/mpc85xx_cds_defconfig .config # make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- menuconfig (Set CONFG_KEXEC, CONFIG_RELOCATABLE and others) # make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- uImage # ./scripts/dtc/dtc -f -I dts -O dtb -b powerpc -o mpc8548cds-mod.dtb arch/powerpc/boot/dts/mpc8548cds-mod.dts * kexec-tools (statically compiled) # cd kexec-tools # ./bootstrap # CFLAGS="-static -g -DDEBUG=1" LDFLAGS="-static -g -DDEBUG=1" ./configure --host=powerpc-linux-gnu # make Rootfs is built with different cross compiler, but I assume it doesn't affect much since kexec-tools is statically compiled. I'll paste kexec-tools build log below. --- # ./bootstrap + aclocal -I config + autoheader + autoconf # CFLAGS="-static -g -DDEBUG=1" LDFLAGS="-static -g -DDEBUG=1" ./configure --host=powerpc-linux-gnu configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking build system type... x86_64-unknown-linux-gnu checking host system type... powerpc-unknown-linux-gnu checking target system type... powerpc-unknown-linux-gnu checking for powerpc-linux-gnu-gcc... powerpc-linux-gnu-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether powerpc-linux-gnu-gcc accepts -g... yes checking for powerpc-linux-gnu-gcc option to accept ANSI C... none needed checking for -gcc... no checking for x86_64-unknown-linux-gnu-gcc... no checking for gcc... gcc checking how to run the C preprocessor... powerpc-linux-gnu-gcc -E checking for powerpc-linux-gnu-ld... powerpc-linux-gnu-ld checking for powerpc-linux-gnu-as... powerpc-linux-gnu-as checking for powerpc-linux-gnu-objcopy... powerpc-linux-gnu-objcopy checking for powerpc-linux-gnu-ar... powerpc-linux-gnu-ar checking whether powerpc-linux-gnu-gcc accepts -fno-zero-initialized-in-bss... Yes checking for a BSD-compatible install... /usr/bin/install -c checking for mkdir... mkdir checking for rm... rm checking for cp... cp checking for ln... ln checking for tar... tar checking for rpmbuild... rpmbuild checking for sed... sed checking for find... find checking for xargs... xargs checking for dirname... dirname checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking zlib.h usability... no checking zlib.h presence... no checking for zlib.h... no checking lzma.h usability... no checking lzma.h presence... no checking for lzma.h... no checking xenctrl.h usability... no checking xenctrl.h presence... no checking for xenctrl.h... no configure: creating ./config.status config.status: creating Makefile config.status: creating include/config.h config.status: include/config.h is unchanged # make powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec.o kexec/kexec.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/ifdown.o kexec/ifdown.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec-elf.o kexec/kexec-elf.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec-elf-exec.o kexec/kexec-elf-exec.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec-elf-core.o kexec/kexec-elf-core.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec-elf-rel.o kexec/kexec-elf-rel.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec-elf-boot.o kexec/kexec-elf-boot.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec-iomem.o kexec/kexec-iomem.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/firmware_memmap.o kexec/firmware_memmap.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/crashdump.o kexec/crashdump.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/crashdump-xen.o kexec/crashdump-xen.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/phys_arch.o kexec/phys_arch.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/lzma.o kexec/lzma.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/zlib.o kexec/zlib.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/proc_iomem.o kexec/proc_iomem.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/virt_to_phys.o kexec/virt_to_phys.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/phys_to_virt.o kexec/phys_to_virt.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/add_segment.o kexec/add_segment.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/add_buffer.o kexec/add_buffer.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch_init.o kexec/arch_init.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/kexec-ppc.o kexec/arch/ppc/kexec-ppc.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/kexec-elf-ppc.o kexec/arch/ppc/kexec-elf-ppc.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/kexec-elf-rel-ppc.o kexec/arch/ppc/kexec-elf-rel-ppc.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/kexec-dol-ppc.o kexec/arch/ppc/kexec-dol-ppc.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/kexec-uImage-ppc.o kexec/arch/ppc/kexec-uImage-ppc.c powerpc-linux-gnu-gcc -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/ppc-setup-simple.o kexec/arch/ppc/ppc-setup-simple.S powerpc-linux-gnu-gcc -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/ppc-setup-dol.o kexec/arch/ppc/ppc-setup-dol.S powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/fixup_dtb.o kexec/arch/ppc/fixup_dtb.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/fs2dt.o kexec/arch/ppc/fs2dt.c kexec/arch/ppc/fs2dt.c: In function 'putnode': kexec/arch/ppc/fs2dt.c:336: warning: passing argument 4 of 'scandir' from incompatible pointer type /opt/freescale-4.4/bin/../powerpc-linux-gnu/libc/usr/include/dirent.h:252: note: expected 'int (*)(const struct dirent **, const struct dirent **)' but argument is of type 'int (*)(const void *, const void *)' powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/crashdump-powerpc.o kexec/arch/ppc/crashdump-powerpc.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/kexec-uImage.o kexec/kexec-uImage.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/libfdt-wrapper.o kexec/arch/ppc/libfdt-wrapper.c kexec/arch/ppc/libfdt-wrapper.c:31: warning: "DEBUG" redefined <command-line>:0: note: this is the location of the previous definition powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/libfdt/fdt.o kexec/arch/ppc/libfdt/fdt.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/libfdt/fdt_ro.o kexec/arch/ppc/libfdt/fdt_ro.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/libfdt/fdt_wip.o kexec/arch/ppc/libfdt/fdt_wip.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/libfdt/fdt_sw.o kexec/arch/ppc/libfdt/fdt_sw.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/libfdt/fdt_rw.o kexec/arch/ppc/libfdt/fdt_rw.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/arch/ppc/libfdt/fdt_strerror.o kexec/arch/ppc/libfdt/fdt_strerror.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -MD -o purgatory/purgatory.o purgatory/purgatory.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -MD -o purgatory/printf.o purgatory/printf.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -MD -o purgatory/string.o purgatory/string.c powerpc-linux-gnu-gcc -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -MD -o purgatory/arch/ppc/v2wrap_32.o purgatory/arch/ppc/v2wrap_32.S powerpc-linux-gnu-gcc -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -MD -o purgatory/arch/ppc/misc.o purgatory/arch/ppc/misc.S powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -MD -o purgatory/arch/ppc/purgatory-ppc.o purgatory/arch/ppc/purgatory-ppc.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -MD -o purgatory/arch/ppc/console-ppc.o purgatory/arch/ppc/console-ppc.c mkdir -p purgatory powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding -O0 -I./purgatory/include -I./purgatory/arch/ppc/include -I./util_lib/include -I./include -I/opt/freescale-4.4/bin/../lib/gcc/powerpc-linux-gnu/4.4.1/include -c -o purgatory/sha256.o util_lib/sha256.c mkdir -p purgatory powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -Os -fno-builtin -ffreestanding --no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -o purgatory/purgatory.ro purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/ppc/v2wrap_32.o purgatory/arch/ppc/misc.o purgatory/arch/ppc/purgatory-ppc.o purgatory/arch/ppc/console-ppc.o purgatory/sha256.o gcc -O2 -Wall -o bin/bin-to-hex util/bin-to-hex.c mkdir -p kexec bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -c -MD -o kexec/purgatory.o kexec/purgatory.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -I./util_lib/include -c -MD -o util_lib/compute_ip_checksum.o util_lib/compute_ip_checksum.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -I./kexec/arch/ppc/include -I./util_lib/include -c -MD -o util_lib/sha256.o util_lib/sha256.c powerpc-linux-gnu-ar rs libutil.a util_lib/compute_ip_checksum.o util_lib/sha256.o powerpc-linux-gnu-ar: creating libutil.a powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -o build/sbin/kexec kexec/kexec.o kexec/ifdown.o kexec/kexec-elf.o kexec/kexec-elf-exec.o kexec/kexec-elf-core.o kexec/kexec-elf-rel.o kexec/kexec-elf-boot.o kexec/kexec-iomem.o kexec/firmware_memmap.o kexec/crashdump.o kexec/crashdump-xen.o kexec/phys_arch.o kexec/lzma.o kexec/zlib.o kexec/proc_iomem.o kexec/virt_to_phys.o kexec/phys_to_virt.o kexec/add_segment.o kexec/add_buffer.o kexec/arch_init.o kexec/arch/ppc/kexec-ppc.o kexec/arch/ppc/kexec-elf-ppc.o kexec/arch/ppc/kexec-elf-rel-ppc.o kexec/arch/ppc/kexec-dol-ppc.o kexec/arch/ppc/kexec-uImage-ppc.o kexec/arch/ppc/ppc-setup-simple.o kexec/arch/ppc/ppc-setup-dol.o kexec/arch/ppc/fixup_dtb.o kexec/arch/ppc/fs2dt.o kexec/arch/ppc/crashdump-powerpc.o kexec/kexec-uImage.o kexec/arch/ppc/libfdt-wrapper.o kexec/arch/ppc/libfdt/fdt.o kexec/arch/ppc/libfdt/fdt_ro.o kexec/arch/ppc/libfdt/fdt_wip.o kexec/arch/ppc/libfdt/fdt_sw.o kexec/arch/ppc/libfdt/fdt_rw.o kexec/arch/ppc/libfdt/fdt_strerror.o kexec/purgatory.o libutil.a -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/ -I./kexec/arch/ppc/libfdt -c -MD -o kdump/kdump.o kdump/kdump.c powerpc-linux-gnu-gcc -static -g -DDEBUG=1 -fno-strict-aliasing -Wall -Wstrict-prototypes -o build/sbin/kdump kdump/kdump.o cp kexec/kexec.8 build/man/man8/kexec.8 mkdir -p build/man/man8 cp kdump/kdump.8 build/man/man8/kdump.8 --- Thanks, -- Makito SHIOKAWA <mshiokawa@miraclelinux.com> _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-28 3:40 ` Makito SHIOKAWA @ 2010-09-28 15:47 ` Matthew McClintock 2010-09-29 8:38 ` Makito SHIOKAWA 0 siblings, 1 reply; 11+ messages in thread From: Matthew McClintock @ 2010-09-28 15:47 UTC (permalink / raw) To: Makito SHIOKAWA; +Cc: kexec On Sep 27, 2010, at 10:40 PM, Makito SHIOKAWA wrote: >> First off, what SHA of the kernel are you using? It looks like 2.6.35 should have the patches you need, but I want to double check. Also, how did you compile kexec-tools? Cross compile? What compiler are you using? > > As kernel, I used vanilla 2.6.35. (http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.tar.gz. Git commit should be 9fe6206f400646a2322096b56c59891d530e8d51) Ok, that should have all you need.... there are a few more patches but those are mostly for SMP systems. I will try to locate a 8548 board sometime if we can't get this working. > > As cross compiler, I used "Sourcery G++ Lite 4.4-254 for Power GNU/Linux". (http://www.codesourcery.com/sgpp/lite/power/portal/package6842/public/powerpc-linux-gnu/freescale-4.4-254-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2). > > I cross compiled kernel, kexec-tools on x86 host with it. Can you try this patch below when building kexec-tools? I ran in to an issue with my cross compiler... diff --git a/purgatory/Makefile b/purgatory/Makefile index ea0c19a..a558ed9 100644 --- a/purgatory/Makefile +++ b/purgatory/Makefile @@ -47,7 +47,7 @@ purgatory/sha256.o: $(srcdir)/util_lib/sha256.c $(PURGATORY): CC=$(TARGET_CC) $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \ $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ - -Os -fno-builtin -ffreestanding + -O0 -fno-builtin -ffreestanding $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ -I$(srcdir)/purgatory/include \ -M _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-28 15:47 ` Matthew McClintock @ 2010-09-29 8:38 ` Makito SHIOKAWA 2010-09-29 15:58 ` Matthew McClintock 2010-09-29 16:01 ` Matthew McClintock 0 siblings, 2 replies; 11+ messages in thread From: Makito SHIOKAWA @ 2010-09-29 8:38 UTC (permalink / raw) To: Matthew McClintock; +Cc: kexec (2010/09/29 0:47), Matthew McClintock wrote: > Can you try this patch below when building kexec-tools? I ran in to an issue with my cross compiler... Second kernel has booted normally on both "kexec -l", "kexec -p" with your patch! I've been working for this long time and could never find out this issue, big thanks! Now, next is to make CONFIG_CRASH_DUMP, CONFIG_PROC_VMCORE settable and get a dump from /proc/vmcore. So, as a trial, I made these option settable on MPC8548CDS forcibly. --- --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -368,7 +368,7 @@ config KEXEC config CRASH_DUMP bool "Build a kdump crash kernel" - depends on PPC64 || 6xx + depends on PPC64 || 6xx || FSL_BOOKE select RELOCATABLE if PPC64 help Build a kernel suitable for use as a kdump capture kernel. --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c @@ -128,7 +128,7 @@ ssize_t copy_oldmem_page(unsigned long p if (!csize) return 0; - csize = min(csize, PAGE_SIZE); + csize = min(csize, (size_t)PAGE_SIZE); --- And, set CONFIG_CRASH_DUMP, CONFIG_PROC_VMCORE and modified CONFIG_KERNEL_START to 0xc0000000. (CONFIG_KERNEL_START is set to 0xc2000000 with CONFIG_CRASH_DUMP enabled and first kernel didn't boot with that value) --- --- .config.bak 2010-09-14 06:32:36.000000000 +0900 +++ .config 2010-09-29 07:25:14.000000000 +0900 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.35 -# Tue Sep 7 08:52:12 2010 +# Wed Sep 29 07:25:14 2010 # # CONFIG_PPC64 is not set @@ -285,6 +285,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_HAS_WALK_MEMORY=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y CONFIG_KEXEC=y +CONFIG_CRASH_DUMP=y CONFIG_SPARSE_IRQ=y CONFIG_MAX_ACTIVE_REGIONS=32 CONFIG_ARCH_FLATMEM_ENABLE=y @@ -351,7 +352,7 @@ CONFIG_LOWMEM_CAM_NUM=3 CONFIG_RELOCATABLE=y # CONFIG_PAGE_OFFSET_BOOL is not set CONFIG_PAGE_OFFSET=0xc0000000 -# CONFIG_KERNEL_START_BOOL is not set +CONFIG_KERNEL_START_BOOL=y CONFIG_KERNEL_START=0xc0000000 # CONFIG_PHYSICAL_START_BOOL is not set CONFIG_PHYSICAL_START=0x00000000 @@ -1290,6 +1291,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +CONFIG_PROC_VMCORE=y CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_SYSFS=y --- But, after booting with this first kernel, /proc/vmcore still doesn't exist and this time second kernel gets panic on "kexec -p". ("kexec -l" works fine) --- # kexec -p --command-line="console=ttyS0,38400 ip=bootp root=/dev/nfs rw maxcpus =1 noirqdistrib reset_devices" /boot/vmlinux 0000000000000000-0000000040000000 : 0 get base memory ranges:1 usable memory rgns size:1 base:0 size:30000000 exclude_range sorted exclude_range[0] start:0, end:41d000 setup_memory_ranges memory_range[0] start:41d001, end:30000000 CRASH MEMORY RANGES 0000000000000000-0000000000010000 0000000000010000-0000000020000000 0000000030000000-0000000040000000 Elf header: p_type = 4, p_offset = 0x1f880400 p_paddr = 0x1f880400 p_vaddr = 0x0 p_filesz = 0x400 p_memsz = 0x400 vmcoreinfo header: p_type = 4, p_offset = 0x4064f4 p_paddr = 0x4064f4 p_vaddr = 0x0 p_filesz = 0x1000 p_memsz = 0x1000 Elf header: p_type = 1, p_offset = 0x2041d000 p_paddr = 0x0 p_vaddr = 0xc0000000 p_filesz = 0x10000 p_memsz = 0x10000 Elf header: p_type = 1, p_offset = 0x10000 p_paddr = 0x10000 p_vaddr = 0xc001000 0 p_filesz = 0x1fff0000 p_memsz = 0x1fff0000 Elf header: p_type = 1, p_offset = 0x30000000 p_paddr = 0x30000000 p_vaddr = 0xf fffffff p_filesz = 0x10000000 p_memsz = 0x10000000 Command line after adding elfcorehdr: elfcorehdr=528564K Command line after adding elfcorehdr: elfcorehdr=528564K savemaxmem=1024M sym: sha256_starts info: 12 other: 00 shndx: 1 value: 127c size: e0 sym: sha256_starts value: 2042f27c addr: 2042e01c sym: sha256_regions info: 11 other: 00 shndx: 4 value: 0 size: 100 sym: sha256_regions value: 20434788 addr: 2042e022 sym: sha256_regions info: 11 other: 00 shndx: 4 value: 0 size: 100 sym: sha256_regions value: 20434788 addr: 2042e026 sym: sha256_regions info: 11 other: 00 shndx: 4 value: 0 size: 100 sym: sha256_regions value: 20434688 addr: 2042e02e sym: sha256_regions info: 11 other: 00 shndx: 4 value: 0 size: 100 sym: sha256_regions value: 20434688 addr: 2042e032 sym: sha256_update info: 12 other: 00 shndx: 1 value: 5f3c size: 1b0 sym: sha256_update value: 20433f3c addr: 2042e078 sym: sha256_finish info: 12 other: 00 shndx: 1 value: 60ec size: 528 sym: sha256_finish value: 204340ec addr: 2042e0a8 sym: sha256_digest info: 11 other: 00 shndx: 4 value: 100 size: 20 sym: sha256_digest value: 20434788 addr: 2042e0b6 sym: sha256_digest info: 11 other: 00 shndx: 4 value: 100 size: 20 sym: sha256_digest value: 20434788 addr: 2042e0ba sym: memcmp info: 12 other: 00 shndx: 1 value: f38 size: bc sym: memcmp value: 2042ef38 addr: 2042e0c0 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434614 addr: 2042e0d2 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434614 addr: 2042e0d6 sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e0dc sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434634 addr: 2042e0e2 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434634 addr: 2042e0e6 sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e0ec sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434644 addr: 2042e116 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434644 addr: 2042e11a sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e124 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 2043464c addr: 2042e142 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 2043464c addr: 2042e146 sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e14c sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434650 addr: 2042e152 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434650 addr: 2042e156 sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e15c sym: sha256_digest info: 11 other: 00 shndx: 4 value: 100 size: 20 sym: sha256_digest value: 20434788 addr: 2042e172 sym: sha256_digest info: 11 other: 00 shndx: 4 value: 100 size: 20 sym: sha256_digest value: 20434788 addr: 2042e176 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434644 addr: 2042e182 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434644 addr: 2042e186 sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e190 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 2043464c addr: 2042e1ae sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 2043464c addr: 2042e1b2 sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e1b8 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434660 addr: 2042e1ee sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434660 addr: 2042e1f2 sym: printf info: 12 other: 00 shndx: 1 value: d10 size: a4 sym: printf value: 2042ed10 addr: 2042e1f8 sym: setup_arch info: 12 other: 00 shndx: 1 value: 11e0 size: 1c sym: setup_arch value: 2042f1e0 addr: 2042e1fc sym: verify_sha256_digest info: 12 other: 00 shndx: 1 value: 0 size: 1d8 sym: verify_sha256_digest value: 2042e000 addr: 2042e200 sym: post_verification_setup_arch info: 12 other: 00 shndx: 1 value: 11fc size: 44 sym: post_verification_setup_arch value: 2042f1fc addr: 2042e204 sym: putchar info: 12 other: 00 shndx: 1 value: 125c size: 20 sym: putchar value: 2042f25c addr: 2042e2b8 sym: putchar info: 12 other: 00 shndx: 1 value: 125c size: 20 sym: putchar value: 2042f25c addr: 2042e3b0 sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434674 addr: 2042e72a sym: .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0 sym: .rodata value: 20434674 addr: 2042e72e sym: putchar info: 12 other: 00 shndx: 1 value: 125c size: 20 sym: putchar value: 2042f25c addr: 2042ebe4 sym: vsprintf info: 12 other: 00 shndx: 1 value: 220 size: a4c sym: vsprintf value: 2042e220 addr: 2042ecf4 sym: vsprintf info: 12 other: 00 shndx: 1 value: 220 size: a4c sym: vsprintf value: 2042e220 addr: 2042ed98 sym: stack info: 11 other: 00 shndx: 5 value: 8 size: 4 sym: stack value: 204347f0 addr: 2042f106 sym: stack info: 11 other: 00 shndx: 5 value: 8 size: 4 sym: stack value: 204347f0 addr: 2042f10a sym: purgatory info: 12 other: 00 shndx: 1 value: 1d8 size: 48 sym: purgatory value: 2042e1d8 addr: 2042f114 sym: dt_offset info: 11 other: 00 shndx: 5 value: c size: 4 sym: dt_offset value: 204347f4 addr: 2042f12e sym: dt_offset info: 11 other: 00 shndx: 5 value: c size: 4 sym: dt_offset value: 204347f4 addr: 2042f132 sym: kernel info: 11 other: 00 shndx: 5 value: 14 size: 4 sym: kernel value: 204347fc addr: 2042f14a sym: kernel info: 11 other: 00 shndx: 5 value: 14 size: 4 sym: kernel value: 204347fc addr: 2042f14e sym: panic_kernel info: 11 other: 00 shndx: 5 value: 0 size: 4 sym: panic_kernel value: 204347e8 addr: 2042f212 sym: panic_kernel info: 11 other: 00 shndx: 5 value: 0 size: 4 sym: panic_kernel value: 204347e8 addr: 2042f21a sym: crashdump_backup_memory info: 12 other: 00 shndx: 1 value: 1240 size: 1c sym: crashdump_backup_memory value: 2042f240 addr: 2042f224 sym: memcpy info: 12 other: 00 shndx: 1 value: ea8 size: 90 sym: memcpy value: 2042eea8 addr: 2043402c sym: sha256_process info: 12 other: 00 shndx: 1 value: 135c size: 4be0 sym: sha256_process value: 2042f35c addr: 20434040 sym: sha256_process info: 12 other: 00 shndx: 1 value: 135c size: 4be0 sym: sha256_process value: 2042f35c addr: 20434078 sym: memcpy info: 12 other: 00 shndx: 1 value: ea8 size: 90 sym: memcpy value: 2042eea8 addr: 204340c8 sym: .data info: 03 other: 00 shndx: 4 value: 0 size: 0 sym: .data value: 204347a8 addr: 204341fa sym: .data info: 03 other: 00 shndx: 4 value: 0 size: 0 sym: .data value: 204347a8 addr: 204341fe sym: sha256_update info: 12 other: 00 shndx: 1 value: 5f3c size: 1b0 sym: sha256_update value: 20433f3c addr: 20434204 sym: sha256_update info: 12 other: 00 shndx: 1 value: 5f3c size: 1b0 sym: sha256_update value: 20433f3c addr: 20434218 Modified cmdline:console=ttyS0,38400 ip=bootp root=/dev/nfs rw maxcpus=1 noirqdi strib reset_devices elfcorehdr=528564K savemaxmem=1024M reserve regions: 2 0: offset: 217fd000, size: 3000 1: offset: 20000000, size: 435000 debug.dtb written # echo c > /proc/sysrq-trigger SysRq : Trigger a crash Unable to handle kernel paging request for data at address 0x00000000 Faulting instruction address: 0xc01b8044 Oops: Kernel access of bad area, sig: 11 [#1] MPC85xx CDS last sysfs file: /sys/devices/system/cpu/cpu0/crash_notes NIP: c01b8044 LR: c01b830c CTR: c01b8030 REGS: dfbbfdf0 TRAP: 0300 Not tainted (2.6.35) MSR: 00021000 <ME,CE> CR: 22002442 XER: 20000000 DEAR: 00000000, ESR: 00800000 TASK = df9a6e40[891] 'bash' THREAD: dfbbe000 GPR00: 00000001 dfbbfea0 df9a6e40 00000063 00000000 ffffffff c01bf3a0 00000000 GPR08: 00002d02 00000000 00000010 00000000 22002422 1009cc80 10080000 10095a10 GPR16: 10090000 10090000 bfd0ca70 00000000 100956b0 10090000 100956c0 bfd0ca60 GPR24: 00000000 00000007 c03e5490 00029000 c03e558c c03e0000 00000000 00000063 NIP [c01b8044] sysrq_handle_crash+0x14/0x20 LR [c01b830c] __handle_sysrq+0xbc/0x1c0 Call Trace: [dfbbfea0] [c01b82f4] __handle_sysrq+0xa4/0x1c0 (unreliable) [dfbbfed0] [c01b846c] write_sysrq_trigger+0x5c/0x70 [dfbbfee0] [c00f1cec] proc_reg_write+0x4c/0x70 [dfbbfef0] [c00a94d0] vfs_write+0xc0/0x1a0 [dfbbff10] [c00a96ac] sys_write+0x4c/0x90 [dfbbff40] [c0010594] ret_from_syscall+0x0/0x3c --- Exception: c01 at 0xfe1d758 LR = 0xfdb93ec Instruction dump: 7d6b0078 7d60492d 40a2fff4 807e0018 7c7b1b78 4bfffefc 00000000 3d20c040 38000001 9009d12c 7c0004ac 39200000 <98090000> 4e800020 60000000 3803ffd0 Bye! Using MPC85xx CDS machine description Memory CAM mapping: 256 Mb, residual: 0Mb Linux version 2.6.35 (root@ppcdev) (gcc version 4.4.1 (Sourcery G++ Lite 4.4-254 ) ) #40 Wed Sep 29 07:31:35 JST 2010 bootconsole [udbg0] enabled setup_arch: bootmem mpc85xx_cds_setup_arch() CDS Version = 0x64 in slot 2 Found FSL PCI host bridge at 0x00000000d0008000. Firmware bus number: 0->0 PCI host bridge /pci@d0008000 (primary) ranges: MEM 0x0000000080000000..0x00000000bfffffff -> 0x0000000080000000 IO 0x00000000d2000000..0x00000000d5ffffff -> 0x0000000000000000 /pci@d0008000: PCICSRBAR @ 0xfff00000 arch: exit Zone PFN ranges: DMA 0x00020000 -> 0x00030000 Normal empty Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0x00020000 -> 0x00030000 MMU: Allocated 1088 bytes of context maps for 255 contexts Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024 Kernel command line: console=ttyS0,38400 ip=bootp root=/dev/nfs rw maxcpus=1 noi rqdistrib reset_devices elfcorehdr=528564K savemaxmem=1024M PID hash table entries: 1024 (order: 0, 4096 bytes) Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Memory: 255492k/262144k available (3948k kernel code, 6652k reserved, 136k data, 126k bss, 160k init) Kernel virtual memory layout: * 0xfffdf000..0xfffff000 : fixmap * 0xfcffb000..0xfe000000 : early ioremap * 0xd1000000..0xfcffb000 : vmalloc & ioremap SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Hierarchical RCU implementation. RCU-based detection of stalled CPUs is disabled. Verbose stalled-CPUs detection is disabled. NR_IRQS:512 nr_irqs:512 mpic: Setting up MPIC " OpenPIC " version 1.2 at d0040000, max 1 CPUs mpic: ISU size: 80, shift: 7, mask: 7f mpic: Initializing for 80 sources clocksource: timebase mult[3c9b26d] shift[22] registered pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 NET: Registered protocol family 16 PCI: Probing PCI hardware bio: create slab <bio-0> at 0 vgaarb: loaded SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Switching to clocksource timebase NET: Registered protocol family 2 IP route cache hash table entries: 2048 (order: 1, 8192 bytes) TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 3, 32768 bytes) TCP: Hash tables configured (established 8192 bind 8192) TCP reno registered UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. i8259 legacy interrupt controller initialized Unable to handle kernel paging request for data at address 0xbf880400 Faulting instruction address: 0xc00166a8 Oops: Kernel access of bad area, sig: 11 [#1] MPC85xx CDS last sysfs file: NIP: c00166a8 LR: c000b9fc CTR: 00000080 REGS: cf82fd80 TRAP: 0300 Not tainted (2.6.35) MSR: 00029000 <EE,ME,CE> CR: 24002442 XER: 20000000 DEAR: bf880400, ESR: 00000000 TASK = cf830000[1] 'swapper' THREAD: cf82e000 GPR00: 00000000 cf82fe30 cf830000 cf8ed800 bf8803fc 00000400 cf8ed7fc 00000080 GPR08: 00000007 20000000 2042d0d4 c03f4d70 ffffffff 1009cc80 10080000 20435000 GPR16: 000000d4 cf82fe80 00000400 00000000 100956b0 10090000 100956c0 00000000 GPR24: 00000000 cf82fe80 00000000 00000000 0001f880 cf8ed800 00000000 00000400 NIP [c00166a8] memcpy+0x1c/0x9c LR [c000b9fc] copy_oldmem_vaddr+0xbc/0xe0 Call Trace: [cf82fe30] [cf8ed800] 0xcf8ed800 (unreliable) [cf82fe40] [c00fbb5c] read_from_oldmem+0x7c/0xe0 [cf82fe70] [c03c400c] parse_crash_elf32_headers+0x1a4/0x470 [cf82ff30] [c03c4834] vmcore_init+0x310/0x44c [cf82ffb0] [c0001dcc] do_one_initcall+0x3c/0x1f0 [cf82ffe0] [c03b31e4] kernel_init+0xc4/0x168 [cf82fff0] [c000ffec] kernel_thread+0x4c/0x68 Instruction dump: 38c60001 4200fff0 4e800020 7c032040 418100a0 54a7e8ff 38c3fffc 3884fffc 41820028 70c00003 7ce903a6 40820054 <80e40004> 85040008 90e60004 95060008 ---[ end trace 5e5d343531be722e ]--- Kernel panic - not syncing: Attempted to kill init! Rebooting in 180 seconds.. --- It'll be very helpful again if you notice something. Thanks, -- Makito SHIOKAWA <mshiokawa@miraclelinux.com> _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-29 8:38 ` Makito SHIOKAWA @ 2010-09-29 15:58 ` Matthew McClintock 2010-09-30 10:20 ` Makito SHIOKAWA 2010-09-29 16:01 ` Matthew McClintock 1 sibling, 1 reply; 11+ messages in thread From: Matthew McClintock @ 2010-09-29 15:58 UTC (permalink / raw) To: Makito SHIOKAWA; +Cc: kexec On Sep 29, 2010, at 3:38 AM, Makito SHIOKAWA wrote: > [cf82fe30] [cf8ed800] 0xcf8ed800 (unreliable) > [cf82fe40] [c00fbb5c] read_from_oldmem+0x7c/0xe0 > [cf82fe70] [c03c400c] parse_crash_elf32_headers+0x1a4/0x470 > [cf82ff30] [c03c4834] vmcore_init+0x310/0x44c > [cf82ffb0] [c0001dcc] do_one_initcall+0x3c/0x1f0 > [cf82ffe0] [c03b31e4] kernel_init+0xc4/0x168 > [cf82fff0] [c000ffec] kernel_thread+0x4c/0x68 > Instruction dump: > 38c60001 4200fff0 4e800020 7c032040 418100a0 54a7e8ff 38c3fffc 3884fffc > 41820028 70c00003 7ce903a6 40820054 <80e40004> 85040008 90e60004 95060008 > ---[ end trace 5e5d343531be722e ]--- There are some other patches I sent upstream after 2.6.35 that fix these issues... http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git&a=search&h=HEAD&st=commit&s=Matthew+McClintock I think the one that fixes this issue is the third one.... -M _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-29 15:58 ` Matthew McClintock @ 2010-09-30 10:20 ` Makito SHIOKAWA 2010-09-30 16:03 ` Matthew McClintock 0 siblings, 1 reply; 11+ messages in thread From: Makito SHIOKAWA @ 2010-09-30 10:20 UTC (permalink / raw) To: Matthew McClintock; +Cc: kexec (2010/09/30 0:58), Matthew McClintock wrote: > There are some other patches I sent upstream after 2.6.35 that fix these issues... I've missed your recent patches. After applying below patches to linux-2.6.35, CONFIG_CRASH_DUMP, CONFIG_PROC_VMCORE were settable and second kernel booted normally on "kexec -p". * powerpc/kexec: Adds correct calling convention for kexec purgatory * powerpc/85xx: kexec for SMP 85xx BookE systems * powerpc/crashdump: Fix issues with kexec and 36bit physical addr And at last, I could see /proc/vmcore! --- # gdb /boot/vmlinux /proc/vmcore GNU gdb Red Hat Linux (6.5-16rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "ppc-asianux-linux-gnu"...Using host libthread_db lib rary "/lib/libthread_db.so.1". warning: exec file is newer than core file. #0 0xc01b8054 in sysrq_handle_crash (key=99, tty=0x0) at drivers/char/sysrq.c:135 135 drivers/char/sysrq.c: No such file or directory. in drivers/char/sysrq.c (gdb) bt #0 0xc01b8054 in sysrq_handle_crash (key=99, tty=0x0) at drivers/char/sysrq.c:135 #1 0xc01b831c in __handle_sysrq (key=99, tty=0x0, check_mask=0) at drivers/char/sysrq.c:523 #2 0xc01b847c in write_sysrq_trigger (file=<value optimized out>, buf=<value optimized out>, count=2, ppos=0xc01bf3b0) at drivers/char/sysrq.c:768 #3 0xc00f1cfc in proc_reg_write (file=0x63, buf=0x0, count=4294967295, ppos=0xc01bf3b0) at fs/proc/inode.c:185 #4 0xc00a94e0 in vfs_write (file=0xdfb84400, buf=0x48020000 <Address 0x48020000 out of bounds>, count=<value optimized out>, pos=0xdfbbbf20) at fs/read_write.c:366 #5 0xc00a96bc in sys_write (fd=<value optimized out>, buf=0x48020000 <Address 0x48020000 out of bounds>, count=2) at fs/read_write.c:418 #6 0xc001059c in syscall_dotrace_cont () #7 0xc01b831c in __handle_sysrq (key=2, tty=0xfeb2ff4, check_mask=0) at drivers/char/sysrq.c:523 #8 0x00000000 in ?? () --- After all, problem was only kexec-tools' cross compiling optimization issue. Thanks a lot! -- Makito SHIOKAWA <mshiokawa@miraclelinux.com> _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-30 10:20 ` Makito SHIOKAWA @ 2010-09-30 16:03 ` Matthew McClintock 2010-10-01 3:15 ` Makito SHIOKAWA 0 siblings, 1 reply; 11+ messages in thread From: Matthew McClintock @ 2010-09-30 16:03 UTC (permalink / raw) To: Makito SHIOKAWA; +Cc: kexec On Sep 30, 2010, at 5:20 AM, Makito SHIOKAWA wrote: > (2010/09/30 0:58), Matthew McClintock wrote: > >> There are some other patches I sent upstream after 2.6.35 that fix these issues... > > I've missed your recent patches. After applying below patches to linux-2.6.35, CONFIG_CRASH_DUMP, CONFIG_PROC_VMCORE were settable and second kernel booted normally on "kexec -p". > > * powerpc/kexec: Adds correct calling convention for kexec purgatory > * powerpc/85xx: kexec for SMP 85xx BookE systems > * powerpc/crashdump: Fix issues with kexec and 36bit physical addr > > And at last, I could see /proc/vmcore! > What compiler were you using? One from Freescale or did you build your own? -M _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-30 16:03 ` Matthew McClintock @ 2010-10-01 3:15 ` Makito SHIOKAWA 2010-10-01 3:28 ` Matthew McClintock 0 siblings, 1 reply; 11+ messages in thread From: Makito SHIOKAWA @ 2010-10-01 3:15 UTC (permalink / raw) To: Matthew McClintock; +Cc: kexec (2010/10/01 1:03), Matthew McClintock wrote: > What compiler were you using? One from Freescale or did you build your own? Do you mean a cross compiler I was using before "Sourcery G++ Lite 4.4-254 for Power GNU/Linux"? Then, it is a one build by my own (gcc-4.1.1, glibc-2.5), but I get compile errors building 2.6.35 so I'm not using it. -- Makito SHIOKAWA <mshiokawa@miraclelinux.com> _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-10-01 3:15 ` Makito SHIOKAWA @ 2010-10-01 3:28 ` Matthew McClintock 0 siblings, 0 replies; 11+ messages in thread From: Matthew McClintock @ 2010-10-01 3:28 UTC (permalink / raw) To: Makito SHIOKAWA; +Cc: kexec On Sep 30, 2010, at 10:15 PM, Makito SHIOKAWA wrote: > (2010/10/01 1:03), Matthew McClintock wrote: > >> What compiler were you using? One from Freescale or did you build your own? > > Do you mean a cross compiler I was using before "Sourcery G++ Lite 4.4-254 for Power GNU/Linux"? Then, it is a one build by my own (gcc-4.1.1, glibc-2.5), but I get compile errors building 2.6.35 so I'm not using it. > > -- > Makito SHIOKAWA <mshiokawa@miraclelinux.com> > That is what I was looking for. I was having the purgatory optimization issue with that exact same compiler. -M _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Can't kexec/kdump on mpc85xx 2010-09-29 8:38 ` Makito SHIOKAWA 2010-09-29 15:58 ` Matthew McClintock @ 2010-09-29 16:01 ` Matthew McClintock 1 sibling, 0 replies; 11+ messages in thread From: Matthew McClintock @ 2010-09-29 16:01 UTC (permalink / raw) To: Eric W. Biederman; +Cc: Makito SHIOKAWA, kexec On Sep 29, 2010, at 3:38 AM, Makito SHIOKAWA wrote: > (2010/09/29 0:47), Matthew McClintock wrote: > >> Can you try this patch below when building kexec-tools? I ran in to an issue with my cross compiler... > > Second kernel has booted normally on both "kexec -l", "kexec -p" with your patch! I've been working for this long time and could never find out this issue, big thanks! Eric, This is related to my other thread about compiler optimizations: http://lists.infradead.org/pipermail/kexec/2010-September/004534.html I would like to get this working on ppc32 these commonly used cross compilers. Can we just disable optimizations for ppc32 entirely for now? -M _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-10-01 3:28 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-27 1:59 Can't kexec/kdump on mpc85xx Makito SHIOKAWA 2010-09-27 15:55 ` Matthew McClintock 2010-09-28 3:40 ` Makito SHIOKAWA 2010-09-28 15:47 ` Matthew McClintock 2010-09-29 8:38 ` Makito SHIOKAWA 2010-09-29 15:58 ` Matthew McClintock 2010-09-30 10:20 ` Makito SHIOKAWA 2010-09-30 16:03 ` Matthew McClintock 2010-10-01 3:15 ` Makito SHIOKAWA 2010-10-01 3:28 ` Matthew McClintock 2010-09-29 16:01 ` Matthew McClintock
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox