Signed-off-by: Hariprasad Nellitheertha --- linux-old-hari/arch/i386/Kconfig | 10 ++++ linux-old-hari/arch/i386/boot/compressed/head.S | 6 +- linux-old-hari/arch/i386/boot/compressed/misc.c | 7 +- linux-old-hari/arch/i386/kernel/vmlinux.lds.S | 56 +++++++++++++---------- linux-old-hari/include/asm-generic/vmlinux.lds.h | 2 linux-old-hari/include/asm-i386/segment.h | 2 6 files changed, 54 insertions(+), 29 deletions(-) diff -puN arch/i386/Kconfig~kd-kern-offset arch/i386/Kconfig --- linux-old/arch/i386/Kconfig~kd-kern-offset 2004-10-19 19:00:17.000000000 +0530 +++ linux-old-hari/arch/i386/Kconfig 2004-10-19 19:03:47.000000000 +0530 @@ -882,6 +882,16 @@ config REGPARM source "drivers/perfctr/Kconfig" +config KERN_PHYS_OFFSET + int "Physical address where the kernel is loaded (1-112)MB" + range 1 112 + default "1" + help + This gives the physical address where the kernel is loaded. + Primarily used in the case of kexec on panic where the + recovery kernel needs to run at a different address than + the panic-ed kernel. + config KEXEC bool "kexec system call (EXPERIMENTAL)" depends on EXPERIMENTAL diff -puN arch/i386/boot/compressed/head.S~kd-kern-offset arch/i386/boot/compressed/head.S --- linux-old/arch/i386/boot/compressed/head.S~kd-kern-offset 2004-10-19 19:04:55.000000000 +0530 +++ linux-old-hari/arch/i386/boot/compressed/head.S 2004-10-19 19:06:02.000000000 +0530 @@ -74,7 +74,7 @@ startup_32: popl %esi # discard address popl %esi # real mode pointer xorl %ebx,%ebx - ljmp $(__BOOT_CS), $0x100000 + ljmp $(__BOOT_CS), $KERN_PHYS_OFFSET /* * We come here, if we were loaded high. @@ -99,7 +99,7 @@ startup_32: popl %ecx # lcount popl %edx # high_buffer_start popl %eax # hcount - movl $0x100000,%edi + movl $KERN_PHYS_OFFSET,%edi cli # make sure we don't get interrupted ljmp $(__BOOT_CS), $0x1000 # and jump to the move routine @@ -124,5 +124,5 @@ move_routine_start: movsl movl %ebx,%esi # Restore setup pointer xorl %ebx,%ebx - ljmp $(__BOOT_CS), $0x100000 + ljmp $(__BOOT_CS), $KERN_PHYS_OFFSET move_routine_end: diff -puN arch/i386/boot/compressed/misc.c~kd-kern-offset arch/i386/boot/compressed/misc.c --- linux-old/arch/i386/boot/compressed/misc.c~kd-kern-offset 2004-10-19 19:04:55.000000000 +0530 +++ linux-old-hari/arch/i386/boot/compressed/misc.c 2004-10-19 19:08:07.000000000 +0530 @@ -14,6 +14,7 @@ #include #include