Bernhard Walle wrote:
Currently, ia64_calc_phys_start() in ia64.c silently assumes DEFAULT_PHYS_START as start address with LKCD dumps. There are machines where this is not true.This patch implements querying from the dump header. Signed-off-by: Bernhard Walle <[EMAIL PROTECTED]> --- ia64.c | 11 ++++++++++- lkcd_common.c | 18 ++++++++++++++++++ lkcd_fix_mem.c | 10 ++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) --- a/ia64.c +++ b/ia64.c @@ -3810,7 +3810,16 @@ ia64_calc_phys_start(void) phys_start); } return; - } + } else if (LKCD_DUMPFILE()) { + + if (lkcd_get_kernel_start(&phys_start)) { + machdep->machspec->phys_start = phys_start; + if (CRASHDEBUG(1)) + fprintf(fp, + "LKCD dump: phys_start: %lx\n", + phys_start); + } + }if ((vd = get_kdump_vmcore_data())) {/* --- a/lkcd_common.c +++ b/lkcd_common.c @@ -787,6 +787,24 @@ get_offset(uint64_t paddr) }+int+lkcd_get_kernel_start(ulong *addr) +{ + if (!addr) + return 0; + + switch (lkcd->version) + { + case LKCD_DUMP_V8: + case LKCD_DUMP_V9: + return lkcd_get_kernel_start_v8(addr); + + default: + return 0; + } +} + +intlkcd_lseek(physaddr_t paddr) --- a/lkcd_fix_mem.c +++ b/lkcd_fix_mem.c @@ -113,4 +113,14 @@ get_lkcd_switch_stack(ulong task) return 0; }+int lkcd_get_kernel_start_v8(ulong *addr)+{ + if (!addr) + return 0; + + *addr = ((dump_header_asm_t *)lkcd->dump_header_asm)->dha_kernel_addr; + + return 1; +} + #endif // IA64 -- Crash-utility mailing list [email protected] https://www.redhat.com/mailman/listinfo/crash-utility
Looks good on paper, but my tree doesn't have a "dha_kernel_addr": # make TARGET: IA64 CRASH: 4.0-4.1 GDB: 6.1 cc -c -g -DIA64 build_data.c cc -c -g -DIA64 ia64.c cc -c -g -DIA64 lkcd_common.c cc -c -g -DIA64 lkcd_fix_mem.c lkcd_fix_mem.c: In function ‘lkcd_get_kernel_start_v8’: lkcd_fix_mem.c:121: error: ‘dump_header_asm_t’ has no member named ‘dha_kernel_a ddr’ make[3]: *** [lkcd_fix_mem.o] Error 1 make[2]: *** [gdb] Error 2 make[1]: *** [gdb_merge] Error 2 make: *** [all] Error 2 # Dave -- Crash-utility mailing list [email protected] https://www.redhat.com/mailman/listinfo/crash-utility
