On Tue, Jan 23, 2007 at 08:12:33PM +0530, Sachin P. Sant wrote: > kexec-tools-testing git tree is currently broken for ppc64 arch. > cp operation on /proc/vmcore fails with error "Invalid argument". > > The problem is because of the filesz calculation. > > On ppc64 memory ranges in device-tree is denoted as start and size. > While in case of other architectures like i386 it is represented as > start and end. Because of this when loading the memory ranges in > crashdump-elf.c the filesz calculation using start and end values > of memory range goes for a toss. > > phdr->p_filesz = phdr->p_memsz = mend - mstart + 1; >
Sachin, Then why we have not seen this problem earlier? > Because of the +1 in above statement the generated vmcore is not a > valid dump file. > > There are different ways in which this problem can be fixed. > A. Add a ifdef in crashdump-elf.c for elf machine type. > if EM_PPC64 then > filesz = end - start; > else > filesz = end - start + 1; > fi > B. Change the ppc64 specific code so as to follow the i386 convention > when it comes to representing memory ranges. > C. Create a PPC64 specific function to populate crash ranges and not > use the generic function from crashdump-elf.c > > Of all these solutions B is the smallest and works well. Here is a patch > to implement the same. > > Signed-off-by : Sachin Sant <[EMAIL PROTECTED]> > --- > > Thanks > -Sachin > > _______________________________________________ > fastboot mailing list > fastboot@lists.osdl.org > https://lists.osdl.org/mailman/listinfo/fastboot _______________________________________________ fastboot mailing list fastboot@lists.osdl.org https://lists.osdl.org/mailman/listinfo/fastboot