All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Fastboot] [Patch] Kexec-tools: Fix physcal address value in vmcore ELF	segment header
Date: Thu, 21 Sep 2006 20:44:35 +0000	[thread overview]
Message-ID: <20060921204435.GA18921@in.ibm.com> (raw)
In-Reply-To: <20060921111550.GI18110@verge.net.au>

On Thu, Sep 21, 2006 at 01:01:04PM +0800, Zou Nan hai wrote:
> 
> I used fixed 64M as physical offset in vmcore ELF segment header.
> This gives trouble to crash utility to analyze vmcore on platform that
> load kernel to a different address.
> 
> This patch will fix it.
> 
> Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
> 
> diff -Nraup kexec-tools-1.101/kexec/arch/ia64/crashdump-ia64.c kexec-tools-1.101-fix/kexec/arch/ia64/crashdump-ia64.c
> --- kexec-tools-1.101/kexec/arch/ia64/crashdump-ia64.c	2006-09-20 15:29:29.000000000 +0800
> +++ kexec-tools-1.101-fix/kexec/arch/ia64/crashdump-ia64.c	2006-09-20 15:32:27.000000000 +0800
> @@ -28,7 +28,7 @@
>  #include "crashdump-ia64.h"
>  
>  int memory_ranges = 0;
> -#define LOAD_OFFSET 	(0xa000000000000000UL + 0x100000000UL - (1UL<<26))
> +#define LOAD_OFFSET 	(0xa000000000000000UL + 0x100000000UL - kernel_code_start)

This will work as long as virtual address for which kernel is being compiled
remains same. (I guess, 0xa000000000000000UL + 0x100000000UL). If you shift
the kernel little bit in virtual address space, this assumption will be
broken.

That's why I put a patch to read /proc/kcore and determine for which
virtual address the kernel has been built and there is no hardcoding.
(Thanks to Eric for the suggestion.)

-Vivek

      reply	other threads:[~2006-09-21 20:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-21 11:15 [Fastboot] [Patch] Kexec-tools: Fix physcal address value in vmcore ELF segment header Horms
2006-09-21 20:44 ` Vivek Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060921204435.GA18921@in.ibm.com \
    --to=vgoyal@in.ibm.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.