On Wed, Mar 28, 2007 at 01:37:31PM +0900, Magnus Damm wrote:
> Hey Jonathan,
>
> Thanks for trying out the release candidate and tracking down this problem.
>
> On 3/28/07, Jonathan Lim <[EMAIL PROTECTED]> wrote:
> >In kexec-tools-1.101/kexec/arch/ia64/crashdump-ia64.c,
> >prepare_crash_memory_elf64_headers() has the following:
> >
> > p_vaddr = mstart + LOAD_OFFSET
> >
> >where
> >
> > LOAD_OFFSET = 0xa000000000000000UL + 0x100000000UL - kernel_code_start
> >
> >and mstart <= kernel_code_start, with kernel_code_start assigned to the
> >physical address of the kernel code region as read from /proc/iomem.
> >
> > ----------------------------------------
> >
> >However, in kexec-tools-testing/kexec/arch/ia64/crashdump-ia64.c where
> >load_crashdump_segments() calls crash_create_elf64_headers(), p_vaddr is
> >simply
> >set to LOAD_OFFSET.
>
> This is my fault. When I introduced crashdump-elf.c I must have missed
> porting over the mstart variable. Sorry about that.
>
> >I made the following change to kexec-tools-testing/kexec/crashdump-elf.c
> >to get
> >past the read error:
> >
> >161c161,168
> >< phdr->p_vaddr = info->kern_vaddr_start;
> >---
> >> for (i = 0; i < ranges; i++) {
> >> unsigned long long mstart = range[i].start;
> >> unsigned long long mend = range[i].end;
> >> if (!mstart && !mend)
> >> continue;
> >> if (info->kern_paddr_start >= mstart &&
> >> info->kern_paddr_start < mend)
> >> phdr->p_vaddr = mstart + info->kern_vaddr_start;
> >> }
> >
> >Does this look right?
>
> I think the idea looks good, but the file crashdump-elf.c is shared
> between multiple architectures. So we should really try to avoid
> breaking x86_64.
>
> Can you please give some feedback on the attached patch? It applies on
> top of kexec-tools-testing-20070319-rc.
>
> Thanks!
>
> / magnus
> --- 0001/kexec/arch/ia64/crashdump-ia64.c
> +++ work/kexec/arch/ia64/crashdump-ia64.c 2007-03-28 13:05:21.000000000
> +0900
> @@ -224,7 +224,7 @@ int load_crashdump_segments(struct kexec
> if (get_crash_memory_ranges(&mem_range, &nr_ranges) == 0) {
>
> info->kern_paddr_start = kernel_code_start;
> - info->kern_vaddr_start = LOAD_OFFSET;
> + info->kern_vaddr_offset = LOAD_OFFSET;
Hi Magnus,
I am unable to understand the introduction if info->kern_vaddr_offset
and then special handling of it while creating the 64 bit headers. Can
you please explain a bit more why it is required. Why can't we go the
regular way of getting the kernel virtual and physical address and continue
creating a separate header for it for IA64?
Thanks
Vivek
_______________________________________________
fastboot mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/fastboot