Skip to contentSkip to conversation

Initial implementation of kdump for ARM

PATCH New Mika Westerberg 4 participants 18 messages Apr 20, 2010 – May 3, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Initial implementation of kdump for ARM

Hello,

This is revised series of kdump code, now without "RFC"-prefix. Original series can be found here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/012353.html

Changes to previous version:
- crash_setup_regs() uses Russell's suggestion for saving registers
- copy_oldmem_page() code is changed to use ioremap()
- there is no need for special 'mem=' parameters

I've been testing this on my N900.

I have patches for kexec-tools ready and send them once this kernel part is accepted.

As a sidenote: I got crashkernel booting correctly just by modifying PHYS_OFFSET and mach/Makefile.boot for my platform. So it is enough just to pass 'mem=size' to dump capture kernel. This is documented in Kconfig CONFIG_CRASH_DUMP.

Regards,
MW

Mika Westerberg (8):
arm: kdump: reserve memory for crashkernel
arm: kdump: implement crash_setup_regs()
arm: kdump: implement machine_crash_shutdown()
arm: kdump: skip indirection page when crashing
arm: kdump: implement copy_oldmem_page()
arm: allow passing an ELF64 header to elf_check_arch()
arm: kdump: add support for elfcorehdr= parameter
arm: kdump: add CONFIG_CRASH_DUMP Kconfig option

 arch/arm/Kconfig                  |   12 ++++++
 arch/arm/include/asm/elf.h        |    4 +-
 arch/arm/include/asm/kexec.h      |   22 +++++++++-
 arch/arm/kernel/Makefile          |    1 +
 arch/arm/kernel/crash_dump.c      |   58 ++++++++++++++++++++++++++++
 arch/arm/kernel/elf.c             |    6 ++-
 arch/arm/kernel/machine_kexec.c   |    4 ++
 arch/arm/kernel/relocate_kernel.S |    6 +++
 arch/arm/kernel/setup.c           |   76 +++++++++++++++++++++++++++++++++++++
 9 files changed, 182 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/kernel/crash_dump.c
#1 lore raw

PATCH 1/8 arm: kdump: reserve memory for crashkernel

Implemented ARM support for command line option "crashkernel=size at start" which allows user to reserve some memory for a dump capture kernel.

---
 arch/arm/kernel/setup.c |   51 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)
arch/arm/kernel/setup.c +51 -0
index c91c77b..076454f 100644
@@ -19,6 +19,7 @@
 #include <linux/seq_file.h>
 #include <linux/screen_info.h>
 #include <linux/init.h>
+#include <linux/kexec.h>
 #include <linux/root_dev.h>
 #include <linux/cpu.h>
 #include <linux/interrupt.h>
@@ -661,6 +662,55 @@ static int __init customize_machine(void)
 }
 arch_initcall(customize_machine);
 
+#ifdef CONFIG_KEXEC
+static inline unsigned long long get_total_mem(void)
+{
+	unsigned long total;
+
+	total = max_low_pfn - min_low_pfn;
+	return total << PAGE_SHIFT;
+}
+
+/**
+ * reserve_crashkernel() - reserves memory are for crash kernel
+ *
+ * This function reserves memory area given in "crashkernel=" kernel command
+ * line parameter. The memory reserved is used by a dump capture kernel when
+ * primary kernel is crashing.
+ */
+static void __init reserve_crashkernel(void)
+{
+	unsigned long long crash_size, crash_base;
+	unsigned long long total_mem;
+	int ret;
+
+	total_mem = get_total_mem();
+	ret = parse_crashkernel(boot_command_line, total_mem,
+				&crash_size, &crash_base);
+	if (ret)
+		return;
+
+	ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE);
+	if (ret < 0) {
+		printk(KERN_WARNING "crashkernel reservation failed - "
+		       "memory is in use (0x%lx)\n", (unsigned long)crash_base);
+		return;
+	}
+
+	printk(KERN_INFO "Reserving %ldMB of memory@%ldMB "
+	       "for crashkernel (System RAM: %ldMB)\n",
+	       (unsigned long)(crash_size >> 20),
+	       (unsigned long)(crash_base >> 20),
+	       (unsigned long)(total_mem >> 20));
+
+	crashk_res.start = crash_base;
+	crashk_res.end = crash_base + crash_size - 1;
+	insert_resource(&iomem_resource, &crashk_res);
+}
+#else
+static inline void reserve_crashkernel(void) {}
+#endif /* CONFIG_KEXEC */
+
 void __init setup_arch(char **cmdline_p)
 {
 	struct tag *tags = (struct tag *)&init_tags;
@@ -720,6 +770,7 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_SMP
 	smp_init_cpus();
 #endif
+	reserve_crashkernel();
 
 	cpu_init();
 	tcm_init();
Signature · 1 line
1.5.6.5
#2 lore raw

PATCH 2/8 arm: kdump: implement crash_setup_regs()

In reply to Mika Westerberg

Implement machine specific function crash_setup_regs() which is responsible for storing machine state when crash occured.

---
 arch/arm/include/asm/kexec.h |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)
arch/arm/include/asm/kexec.h +19 -3
index df15a0d..8df7e5f 100644
@@ -19,10 +19,26 @@
 
 #ifndef __ASSEMBLY__
 
-struct kimage;
-/* Provide a dummy definition to avoid build failures. */
+/*
+ * crash_setup_regs() - save registers for the panic kernel
+ * @newregs: registers are saved here
+ * @oldregs: registers to be saved (may be %NULL)
+ *
+ * Function copies machine registers from @oldregs to @newregs. If @oldregs is
+ * %NULL then current registers are stored there.
+ */
 static inline void crash_setup_regs(struct pt_regs *newregs,
-                                        struct pt_regs *oldregs) { }
+				    struct pt_regs *oldregs)
+{
+	if (oldregs) {
+		memcpy(newregs, oldregs, sizeof(*newregs));
+	} else {
+		__asm__ __volatile__ ("stmia %0, {r0 - r15}"
+				      : : "r" (&newregs->ARM_r0));
+		__asm__ __volatile__ ("mrs %0, cpsr"
+				      : "=r" (newregs->ARM_cpsr));
+	}
+}
 
 #endif /* __ASSEMBLY__ */
 
Signature · 1 line
1.5.6.5
#3 lore raw

PATCH 3/8 arm: kdump: implement machine_crash_shutdown()

In reply to Mika Westerberg

Implement function machine_crash_shutdown() which disables IRQs and saves machine state to ELF notes structure.

---
 arch/arm/kernel/machine_kexec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/kernel/machine_kexec.c +4 -0
index 598ca61..81e9898 100644
@@ -43,6 +43,10 @@ void machine_shutdown(void)
 
 void machine_crash_shutdown(struct pt_regs *regs)
 {
+	local_irq_disable();
+	crash_save_cpu(regs, smp_processor_id());
+
+	printk(KERN_INFO "Loading crashdump kernel...\n");
 }
 
 void machine_kexec(struct kimage *image)
Signature · 1 line
1.5.6.5
#4 lore raw

PATCH 4/8 arm: kdump: skip indirection page when crashing

In reply to Mika Westerberg

When we are crashing there is no indirection page in place. Only control page is present.

---
 arch/arm/kernel/relocate_kernel.S |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/kernel/relocate_kernel.S +6 -0
index 61930eb..fd26f8d 100644
@@ -10,6 +10,12 @@ relocate_new_kernel:
 	ldr	r0,kexec_indirection_page
 	ldr	r1,kexec_start_address
 
+	/*
+	 * If there is no indirection page (we are doing crashdumps)
+	 * skip any relocation.
+	 */
+	cmp	r0, #0
+	beq	2f
 
 0:	/* top, read another word for the indirection page */
 	ldr	r3, [r0],#4
Signature · 1 line
1.5.6.5
#5 lore raw

PATCH 5/8 arm: kdump: implement copy_oldmem_page()

In reply to Mika Westerberg

This function is used by vmcore code to read a page from the old kernel memory.

---
 arch/arm/kernel/Makefile     |    1 +
 arch/arm/kernel/crash_dump.c |   58 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/kernel/crash_dump.c
arch/arm/kernel/Makefile +1 -0
index 26d302c..ea023c6 100644
@@ -39,6 +39,7 @@ obj-$(CONFIG_ARM_THUMBEE)	+= thumbee.o
 obj-$(CONFIG_KGDB)		+= kgdb.o
 obj-$(CONFIG_ARM_UNWIND)	+= unwind.o
 obj-$(CONFIG_HAVE_TCM)		+= tcm.o
+obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
 
 obj-$(CONFIG_CRUNCH)		+= crunch.o crunch-bits.o
 AFLAGS_crunch-bits.o		:= -Wa,-mcpu=ep9312
arch/arm/kernel/crash_dump.c new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#6 lore raw

PATCH 6/8 arm: allow passing an ELF64 header to elf_check_arch()

In reply to Mika Westerberg

This is needed to shut following compiler warning when CONFIG_PROC_VMCORE is enabled:

fs/proc/vmcore.c: In function 'parse_crash_elf64_headers':
fs/proc/vmcore.c:500: warning: passing argument 1 of 'elf_check_arch' from incompatible pointer type

ELF32 and ELF64 headers have common fields of same size (namely e_ident and e_machine) which are checked in arm_elf_check_arch().

---
 arch/arm/include/asm/elf.h |    4 ++--
 arch/arm/kernel/elf.c      |    6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/include/asm/elf.h +2 -2
index bff0564..aa71815 100644
@@ -92,8 +92,8 @@ struct elf32_hdr;
 /*
  * This is used to ensure we don't load something for the wrong architecture.
  */
-extern int elf_check_arch(const struct elf32_hdr *);
-#define elf_check_arch elf_check_arch
+extern int arm_elf_check_arch(const struct elf32_hdr *);
+#define elf_check_arch(x) arm_elf_check_arch((const struct elf32_hdr *)(x))
 
 extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int);
 #define elf_read_implies_exec(ex,stk) arm_elf_read_implies_exec(&(ex), stk)
arch/arm/kernel/elf.c +4 -2
index d4a0da1..14e501b 100644
@@ -4,11 +4,13 @@
 #include <linux/binfmts.h>
 #include <linux/elf.h>
 
-int elf_check_arch(const struct elf32_hdr *x)
+int arm_elf_check_arch(const struct elf32_hdr *x)
 {
 	unsigned int eflags;
 
 	/* Make sure it's an ARM executable */
+	if (x->e_ident[EI_CLASS] != ELF_CLASS)
+		return 0;
 	if (x->e_machine != EM_ARM)
 		return 0;
 
@@ -35,7 +37,7 @@ int elf_check_arch(const struct elf32_hdr *x)
 	}
 	return 1;
 }
-EXPORT_SYMBOL(elf_check_arch);
+EXPORT_SYMBOL(arm_elf_check_arch);
 
 void elf_set_personality(const struct elf32_hdr *x)
 {
Signature · 1 line
1.5.6.5
#7 lore raw

PATCH 7/8 arm: kdump: add support for elfcorehdr= parameter

In reply to Mika Westerberg

This parameter is used by primary kernel to pass address of vmcore header to the dump capture kernel.

---
 arch/arm/kernel/setup.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
arch/arm/kernel/setup.c +25 -0
index 076454f..25a1664 100644
@@ -20,6 +20,7 @@
 #include <linux/screen_info.h>
 #include <linux/init.h>
 #include <linux/kexec.h>
+#include <linux/crash_dump.h>
 #include <linux/root_dev.h>
 #include <linux/cpu.h>
 #include <linux/interrupt.h>
@@ -711,6 +712,30 @@ static void __init reserve_crashkernel(void)
 static inline void reserve_crashkernel(void) {}
 #endif /* CONFIG_KEXEC */
 
+/*
+ * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
+ * is_kdump_kernel() to determine if we are booting after a panic. Hence
+ * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
+ */
+
+#ifdef CONFIG_CRASH_DUMP
+/*
+ * elfcorehdr= specifies the location of elf core header stored by the crashed
+ * kernel. This option will be passed by kexec loader to the capture kernel.
+ */
+static int __init setup_elfcorehdr(char *arg)
+{
+	char *end;
+
+	if (!arg)
+		return -EINVAL;
+
+	elfcorehdr_addr = memparse(arg, &end);
+	return end > arg ? 0 : -EINVAL;
+}
+early_param("elfcorehdr", setup_elfcorehdr);
+#endif /* CONFIG_CRASH_DUMP */
+
 void __init setup_arch(char **cmdline_p)
 {
 	struct tag *tags = (struct tag *)&init_tags;
Signature · 1 line
1.5.6.5
#8 lore raw

PATCH 8/8 arm: kdump: add CONFIG_CRASH_DUMP Kconfig option

In reply to Mika Westerberg

Add CONFIG_CRASH_DUMP configuration option which is used by dump capture kernels. Dump capture kernel must be loaded into different physical address than the primary kernel. This means that PHYS_OFFSET must be different and it also should match the 'crashkernel=size at start' value passed to primary kernel command line.

---
 arch/arm/Kconfig |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/Kconfig +12 -0
index c5408bf..b8c37dc 100644
@@ -1466,6 +1466,18 @@ config ATAGS_PROC
 	  Should the atags used to boot the kernel be exported in an "atags"
 	  file in procfs. Useful with kexec.
 
+config CRASH_DUMP
+	bool "Build kdump crash kernel (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	help
+	  Build a kernel suitable for use as kdump capture kernel. This should
+	  be set only on dump capture kernels. Note that dump capture kernel
+	  must be loaded into different physical address than the primary kernel
+	  (e.g set PHYS_OFFSET and related mach/Makefile.boot parameters
+	  to match value given in 'crashkernel=size at start').
+
+	  For more details see Documentation/kdump/kdump.txt
+
 endmenu
 
 menu "CPU Power Management"
Signature · 1 line
1.5.6.5
#9 lore raw

cover Initial implementation of kdump for ARM

In reply to Mika Westerberg
Quoted 12 lines · Mika Westerberg

Hello,

This is revised series of kdump code, now without "RFC"-prefix. Original series can be found here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/012353.html

Changes to previous version:
- crash_setup_regs() uses Russell's suggestion for saving registers
- copy_oldmem_page() code is changed to use ioremap()
- there is no need for special 'mem=' parameters

Quoted 4 lines

I've been testing this on my N900.

I have patches for kexec-tools ready and send them once this kernel part is accepted.

Hi,

Any comments on this?

Thanks,
MW

Quoted 35 lines

As a sidenote: I got crashkernel booting correctly just by modifying PHYS_OFFSET and mach/Makefile.boot for my platform. So it is enough just to pass 'mem=size' to dump capture kernel. This is documented in Kconfig CONFIG_CRASH_DUMP.

Regards,
MW

Mika Westerberg (8):
arm: kdump: reserve memory for crashkernel
arm: kdump: implement crash_setup_regs()
arm: kdump: implement machine_crash_shutdown()
arm: kdump: skip indirection page when crashing
arm: kdump: implement copy_oldmem_page()
arm: allow passing an ELF64 header to elf_check_arch()
arm: kdump: add support for elfcorehdr= parameter
arm: kdump: add CONFIG_CRASH_DUMP Kconfig option

 arch/arm/Kconfig                  |   12 ++++++
 arch/arm/include/asm/elf.h        |    4 +-
 arch/arm/include/asm/kexec.h      |   22 +++++++++-
 arch/arm/kernel/Makefile          |    1 +
 arch/arm/kernel/crash_dump.c      |   58 ++++++++++++++++++++++++++++
 arch/arm/kernel/elf.c             |    6 ++-
 arch/arm/kernel/machine_kexec.c   |    4 ++
 arch/arm/kernel/relocate_kernel.S |    6 +++
 arch/arm/kernel/setup.c           |   76 +++++++++++++++++++++++++++++++++++++
 9 files changed, 182 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/kernel/crash_dump.c

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#10 lore raw

cover Initial implementation of kdump for ARM

I am trying this. But it seems need to do a lot work to make kdump to work on other omap3 board.

Janboe

Quoted 65 lines · Mika Westerberg
Quoted 12 lines · Mika Westerberg

Hello,

This is revised series of kdump code, now without "RFC"-prefix. Original series can be found here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/012353.html

Changes to previous version:
- crash_setup_regs() uses Russell's suggestion for saving registers
- copy_oldmem_page() code is changed to use ioremap()
- there is no need for special 'mem=' parameters

Quoted 4 lines

I've been testing this on my N900.

I have patches for kexec-tools ready and send them once this kernel part is accepted.

Hi,

Any comments on this?

Thanks,
MW

Quoted 31 lines

As a sidenote: I got crashkernel booting correctly just by modifying PHYS_OFFSET and mach/Makefile.boot for my platform. So it is enough just to pass 'mem=size' to dump capture kernel. This is documented in Kconfig CONFIG_CRASH_DUMP.

Regards,
MW

Mika Westerberg (8):
arm: kdump: reserve memory for crashkernel
arm: kdump: implement crash_setup_regs()
arm: kdump: implement machine_crash_shutdown()
arm: kdump: skip indirection page when crashing
arm: kdump: implement copy_oldmem_page()
arm: allow passing an ELF64 header to elf_check_arch()
arm: kdump: add support for elfcorehdr= parameter
arm: kdump: add CONFIG_CRASH_DUMP Kconfig option

 arch/arm/Kconfig                  |   12 ++++++
 arch/arm/include/asm/elf.h        |    4 +-
 arch/arm/include/asm/kexec.h      |   22 +++++++++-
 arch/arm/kernel/Makefile          |    1 +
 arch/arm/kernel/crash_dump.c      |   58 ++++++++++++++++++++++++++++
 arch/arm/kernel/elf.c             |    6 ++-
 arch/arm/kernel/machine_kexec.c   |    4 ++
 arch/arm/kernel/relocate_kernel.S |    6 +++
 arch/arm/kernel/setup.c           |   76 +++++++++++++++++++++++++++++++++++++
 9 files changed, 182 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/kernel/crash_dump.c
Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#11 lore raw

cover Initial implementation of kdump for ARM

Quoted 2 lines · ext Janboe Ye

I am trying this. But it seems need to do a lot work to make kdump to work on other omap3 board.

You need to have userspace tools (in this case kexec-tools) which load the crashkernel into the running kernel. I'm planning to send my kexec-tools patches to upstream after the kernel part is accepted (so that they can be in sync) but I can provide you the patches if needed.

For kernel part, I believe only thing that needs to be done is to make sure that PHYS_OFFSET of the crashkernel is configured correctly.

For example in my platform (and I guess all OMAP3s) physical memory starts at 0x80000000 and this is the PHYS_OFFSET used by the primary kernel. I decided to load crashkernel at physical address 0x84000000.

So I boot the primary kernel with 'crashkernel=32M at 0x84000000'. Now memory for crashkernel is reserved.

Only thing left is to load the craskernel itself which is done like (with patched kexec-tools):

	# kexec -p /boot/zImage.crash --command-line="..."

What kind of problems you are having?

Thanks,
MW

#12 lore raw

cover Initial implementation of kdump for ARM

These are some other hard code address in some boards.

For example, beagle board boot_params is 0x80000100.

I guest nokia's Nseris does not use atags for transfering params.

When I test my relocated kernel, it blocks at machinee initialization.

Maybe there is other address mapping issue. I will look it tomorrow.

Janboe

Quoted 33 lines · Mika Westerberg
Quoted 2 lines · ext Janboe Ye

I am trying this. But it seems need to do a lot work to make kdump to work on other omap3 board.

You need to have userspace tools (in this case kexec-tools) which load the crashkernel into the running kernel. I'm planning to send my kexec-tools patches to upstream after the kernel part is accepted (so that they can be in sync) but I can provide you the patches if needed.

For kernel part, I believe only thing that needs to be done is to make sure that PHYS_OFFSET of the crashkernel is configured correctly.

For example in my platform (and I guess all OMAP3s) physical memory starts at 0x80000000 and this is the PHYS_OFFSET used by the primary kernel. I decided to load crashkernel at physical address 0x84000000.

So I boot the primary kernel with 'crashkernel=32M at 0x84000000'. Now memory for crashkernel is reserved.

Only thing left is to load the craskernel itself which is done like (with patched kexec-tools):

	# kexec -p /boot/zImage.crash --command-line="..."

What kind of problems you are having?

Thanks,
MW

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#13 lore raw

cover Initial implementation of kdump for ARM

Quoted 9 lines · ext Janboe Ye

These are some other hard code address in some boards.

For example, beagle board boot_params is 0x80000100.

I guest nokia's Nseris does not use atags for transfering params.

When I test my relocated kernel, it blocks at machinee initialization.

Maybe there is other address mapping issue. I will look it tomorrow.

Yes, we use atags.

I have following changes on top of these patches. Note that you should also change beagles board file so that it works with different PHYS_OFFSET (if you are going to pass initrd, then that will need to be changed also).

I actually have beagleboard in home and I can try it there as well but I'll be away weekend so it is going to happen earliest on monday.

Thanks,
MW

arch/arm/mach-omap2/Makefile.boot +6 -1
index 565aff7..b958007 100644
@@ -1,3 +1,8 @@
-  zreladdr-y		:= 0x80008000
+ifeq ($(CONFIG_CRASH_DUMP),y)
+zreladdr-y		:= 0x84008000
+params_phys-y		:= 0x84000100
+else
+zreladdr-y		:= 0x80008000
 params_phys-y		:= 0x80000100
+endif
 initrd_phys-y		:= 0x80800000
arch/arm/plat-omap/include/plat/memory.h +8 -0
index 9ad41dc..596a130 100644
@@ -40,7 +40,15 @@
 #define PHYS_OFFSET		UL(0x10000000)
 #elif defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \
 			defined(CONFIG_ARCH_OMAP4)
+/*
+ * We want crashdump kernels to be in different physical address than
+ * the primary kernel.
+ */
+#ifdef CONFIG_CRASH_DUMP
+#define PHYS_OFFSET		UL(0x84000000)
+#else
 #define PHYS_OFFSET		UL(0x80000000)
+#endif /* CONFIG_CRASH_DUMP */
 #endif
 
 /*
arch/arm/mach-omap2/board-omap3beagle.c +1 -1
index df5c918..a023f62 100644
@@ -459,7 +459,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
 	/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
 	.phys_io	= 0x48000000,
 	.io_pg_offst	= ((0xfa000000) >> 18) & 0xfffc,
-	.boot_params	= 0x80000100,
+	.boot_params	= PHYS_OFFSET + 0x100,
 	.map_io		= omap3_beagle_map_io,
 	.init_irq	= omap3_beagle_init_irq,
 	.init_machine	= omap3_beagle_init,
#14 lore raw

cover Initial implementation of kdump for ARM

In reply to Janboe Ye
Quoted 9 lines · ext Janboe Ye

These are some other hard code address in some boards.

For example, beagle board boot_params is 0x80000100.

I guest nokia's Nseris does not use atags for transfering params.

When I test my relocated kernel, it blocks at machinee initialization.

Maybe there is other address mapping issue. I will look it tomorrow.

Hi again,

I got it working on beagle with following patches. Hope it helps you.

Regards,
MW

#15 lore raw

cover Initial implementation of kdump for ARM

In reply to Mika Westerberg

Hi,

Quoted 9 lines · Mika Westerberg
Quoted 2 lines · ext Janboe Ye

I am trying this. But it seems need to do a lot work to make kdump to work on other omap3 board.

You need to have userspace tools (in this case kexec-tools) which load the crashkernel into the running kernel. I'm planning to send my kexec-tools patches to upstream after the kernel part is accepted (so that they can be in sync) but I can provide you the patches if needed.

I want to test your patches too. Can you send me the kexec-tools patches?

Thanks.

#16 lore raw

cover Initial implementation of kdump for ARM

Quoted 7 lines · ext Joonyoung Shim
Quoted 4 lines · Mika Westerberg

You need to have userspace tools (in this case kexec-tools) which load the crashkernel into the running kernel. I'm planning to send my kexec-tools patches to upstream after the kernel part is accepted (so that they can be in sync) but I can provide you the patches if needed.

I want to test your patches too. Can you send me the kexec-tools patches?

I sent those patches to LAKML and kexec list. You can pick them up from here:

	http://lists.infradead.org/pipermail/kexec/2010-April/004029.html

Regards,
MW

#17 lore raw

cover Initial implementation of kdump for ARM

In reply to Mika Westerberg
Quoted 4 lines · Mika Westerberg

This is revised series of kdump code, now without "RFC"-prefix. Original series can be found here:

Quoted 8 lines

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/012353.html

Changes to previous version:
- crash_setup_regs() uses Russell's suggestion for saving registers
- copy_oldmem_page() code is changed to use ioremap()
- there is no need for special 'mem=' parameters

I've been testing this on my N900.

Hi Russell,

Do have any comments on these patches? Any objections for sending these to your patch tracking system?

I've also tested these on beagleboard and it works there as well.

Thanks,
MW