On 3/28/07, Vivek Goyal <[EMAIL PROTECTED]> wrote:
> On Wed, Mar 28, 2007 at 03:13:22PM +0900, Magnus Damm wrote:
> > Hi Vivek!
> >
> > On 3/28/07, Vivek Goyal <[EMAIL PROTECTED]> wrote:
> > >On Wed, Mar 28, 2007 at 01:37:31PM +0900, Magnus Damm wrote:
> > >> --- 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?
> >
> > The special handling of kern_vaddr_offset is there because we need to
> > scan through the memory segments to get the physical address that we
> > then add to kern_vaddr_offset. This is different compared to
> > kern_vaddr_start which only contains a fixed value.
>
> Are you doing this because you can't get the kernel virtual address in
> user space? Hence adding the physical address of the kernel to LOAD_OFFSET
> to comeup with virtual address?
I'm doing this based on the patch by Jonathan which in turn is based
on the original kexec-tools code (before my crashdump-elf.c code came
into the picture).
> Won't /proc/kcore give this information on IA64? It works for x86_64.
Maybe, maybe not. I'm mainly interested in getting IA64 to work
properly with as few changes as possible. How this is done is not so
important IMO as long as the other architectures keep working.
> Even otherwise, then this is a architecture detail and should be part
> of architecture code and not arch independent code. This
> info->kerne_vaddr_offset is not intitutive at all.
Well, you are right that it is a per-architecture detail. I would be
happy to accept a less intrusive patch. But I suspect that IA64 and
x86_64 could be implemented using some common code and a similar
strategy. I feel that in the kexec community not that many people care
enough to zoom out and merge similar code. We just constantly keep on
adding more and more crap.
This means that we will end up with many architecture-specific
differences that may not be needed but they are there because no one
really had enough knowledge or time to see the big picture.
So, I think we should solve this by a simple and well documented fix
now. And long-term we can try to share the /proc/kcore code between
ia64 and x86_64.
> I think in arch dependent code you should set
> kern_vaddr=LOAD_OFFSET + kernel_physical start.
Right. Patches are welcome. =)
Thanks!
/ magnus
_______________________________________________
fastboot mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/fastboot