[PATCH 4/11] powerpc: Add CONFIG_CRASH_DUMP
Haren Myneni
haren at us.ibm.com
Wed Jan 4 09:57:03 EST 2006
Olaf Hering wrote:
> On Sun, Dec 04, Michael Ellerman wrote:
>
>
>
>>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.
>>
>>
>
>
>
>>+++ kexec/include/asm-powerpc/page.h
>>@@ -37,8 +37,15 @@
>> */
>> #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
>>
>>+#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)
>>
>>
>
>This changes the vmlinux entry point, and breaks some assumptions in
>yaboot. It wont load an initrd anymore, flat_vmlinux is always false.
>
>It means also that a SLES9 installation cant load a SLES10 kernel+initrd via yaboot.
>Fixing it now in my tree.
>
>
>
Yes, it could be a problem if we do OF boot at 32MB (CONFIG_CRASH_DUMP)
since the the initrd's location is set at 36MB by the yaboot. However,
in the kdump boot, the initrd location is not at fixed location and
changed by the kexec-tool.
But, we found an issue (Oops) when we load the second kernel in to the
crash kernel region. During the first boot, the crash kernel region is
reserved (32M - 160M for crashkernel=128M at 32M) and the initrd is at 36M.
But, after loading the initrd, free_initrd() is freed initrd region even
though it is part of crash kernel reserved region. When we load the
second kernel using kexec-tool, we are copying into unallocated memory.
Thus caused panic.
One solution is move the initrd during prom_init. But, prom_claim is
failed if try to claim outside of first memory node (> rmo_top) on my P5
machine. The other one could be move the initrd later. Since we are
freeing the initrd anyway during early boot (before we load the second
kernel), it will be an extra step of moving initrd (allocating memory
and copy). The following patch could fix this issue - free only regions
that are not part of crash region. As this issue may also exists on
other archs, made changes in the init/initramfs.c. Is there any better
way to fix this problem?
Thanks
Haren
-------------- next part --------------
A non-text attachment was scrubbed...
Name: initrd_kdump_fix.patch
Type: text/x-patch
Size: 1708 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20060103/0260d115/attachment.bin
More information about the Linuxppc64-dev
mailing list