On Mon, Dec 20, 2010 at 09:37:51PM +0900, Lei Wen wrote:
 
 I am trying kdump on ARM. But there is one things that very confuse me...
 
 The parameter "elfcorehdr" should pass to the second kernel by the first one,
 but I cannot find anywhere that I could figure out what this offset
 value I should give
 to elfcorehdr... 
It is set automatically by kexec-tools (once you load the crashkernel
via '-p' command line option).
See code in kexec/arch/arm/crashdump-arm.c:
int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
{
	...
        /*
         * We allocate ELF core header from the end of the memory area reserved
         * for the crashkernel. We align the header to SECTION_SIZE (which is
         * 1MB) so that available memory passed in kernel command line will be
         * aligned to 1MB. This is because kernel create_mapping() wants memory
         * regions to be aligned to SECTION_SIZE.
         */
        elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
                                          crash_reserved_mem.start,
                                          crash_reserved_mem.end, -1, 0);
        dbgprintf("elfcorehdr: %#lx\n", elfcorehdr);
        cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
	...
Regards,
MW