]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc: Add CONFIG_CRASH_DUMP
authorMichael Ellerman <michael@ellerman.id.au>
Sun, 4 Dec 2005 07:39:23 +0000 (18:39 +1100)
committerPaul Mackerras <paulus@samba.org>
Mon, 9 Jan 2006 03:52:14 +0000 (14:52 +1100)
This patch adds a Kconfig variable, CONFIG_CRASH_DUMP, which configures the
built kernel for use as a Kdump kernel.

Currently "all" this involves is changing the value of KERNELBASE to 32 MB.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/Kconfig
arch/powerpc/kernel/setup_64.c
include/asm-powerpc/page.h

index 2c1186ada3ab4a9ccf974a0879b6d0b33f6e32b8..773b880d557743678e14a10e9c406a1d1a91776f 100644 (file)
@@ -379,6 +379,17 @@ config CELL_IIC
        bool
        default y
 
+config CRASH_DUMP
+       bool "kernel crash dumps (EXPERIMENTAL)"
+       depends on PPC_MULTIPLATFORM
+       depends on EXPERIMENTAL
+       help
+         Build a kernel suitable for use as a kdump capture kernel.
+         The kernel will be linked at a different address than normal, and
+         so can only be used for Kdump.
+
+         Don't change this unless you know what you are doing.
+
 config IBMVIO
        depends on PPC_PSERIES || PPC_ISERIES
        bool
index 65603e9af984e44a4ad96d3c35da16b7116d66a3..6509dd7c2f8f83ae368ceb75cf025d0b774816e6 100644 (file)
@@ -512,6 +512,9 @@ void __init setup_system(void)
               ppc64_caches.iline_size);
        printk("htab_address                  = 0x%p\n", htab_address);
        printk("htab_hash_mask                = 0x%lx\n", htab_hash_mask);
+#if PHYSICAL_START > 0
+       printk("physical_start                = 0x%x\n", PHYSICAL_START);
+#endif
        printk("-----------------------------------------------------\n");
 
        mm_init_ppc64();
index 4696bdbcc0855c8530cfcd2d028086e687f5d2d7..76d7cb4b4ffc3f63ec140ccc0740c810b9ac15a3 100644 (file)
  *
  * If you want to test if something's a kernel address, use is_kernel_addr().
  */
+
+#ifdef CONFIG_CRASH_DUMP
+/* Kdump kernel runs at 32 MB, change at your peril. */
+#define PHYSICAL_START 0x2000000
+#else
+#define PHYSICAL_START 0x0
+#endif
+
 #define PAGE_OFFSET     ASM_CONST(CONFIG_KERNEL_START)
-#define KERNELBASE      PAGE_OFFSET
+#define KERNELBASE      (PAGE_OFFSET + PHYSICAL_START)
 
 #ifdef CONFIG_DISCONTIGMEM
 #define page_to_pfn(page)      discontigmem_page_to_pfn(page)