M. Mohan Kumar | 2 Jan 2009 15:08
Picon

[PATCH] ppc64: Support for relocatable kernel in kexec-tools

Support for relocatable kernel in kexec-tools

This patch is based on the  patch sent by Milton Miller with the subject [PATCH 1/2
 kexec-tools] ppc64: new relocatble kernel activation ABI

http://patchwork.ozlabs.org/patch/5378/

Even with the above patch, the relocatable kernel always move to physical
address 0 (ie PHYSICAL_START). Following patch fixes this problem by marking
a local variable to 1 in purgatory during kdump kernel load time (kexec -p).
After a crash, purgatory sets __run_at_load variable location in the kernel
to 1 if the local variable is set to 1. So that the kernel will be running
as a relocatable kernel.

Signed-off-by: M. Mohan Kumar <mohan@...>
Signed-off-by: Milton Miller <miltonm@...>
---
 kexec/arch/ppc64/crashdump-ppc64.h |    2 ++
 kexec/arch/ppc64/kexec-elf-ppc64.c |   17 +++++++++++++++++
 purgatory/arch/ppc64/v2wrap.S      |   25 ++++++++++++-------------
 3 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/kexec/arch/ppc64/crashdump-ppc64.h b/kexec/arch/ppc64/crashdump-ppc64.h
index 9608782..be02213 100644
--- a/kexec/arch/ppc64/crashdump-ppc64.h
+++ b/kexec/arch/ppc64/crashdump-ppc64.h
 <at>  <at>  -23,6 +23,8  <at>  <at>  void add_usable_mem_rgns(unsigned long long base, unsigned long long size);
 #define _ALIGN_UP(addr,size)	(((addr)+((size)-1))&(~((size)-1)))
 #define _ALIGN_DOWN(addr,size)	((addr)&(~((size)-1)))

(Continue reading)

Milton Miller | 2 Jan 2009 19:39
Favicon

Re: [PATCH] ppc64: Support for relocatable kernel in kexec-tools


On Jan 2, 2009, at 8:08 AM, M. Mohan Kumar wrote:

> Support for relocatable kernel in kexec-tools
>
> This patch is based on the  patch sent by Milton Miller with the 
> subject [PATCH 1/2
>  kexec-tools] ppc64: new relocatble kernel activation ABI
>
> http://patchwork.ozlabs.org/patch/5378/
>
> Even with the above patch, the relocatable kernel always move to 
> physical
> address 0 (ie PHYSICAL_START). Following patch fixes this problem by 
> marking
> a local variable to 1 in purgatory during kdump kernel load time 
> (kexec -p).
> After a crash, purgatory sets __run_at_load variable location in the 
> kernel
> to 1 if the local variable is set to 1. So that the kernel will be 
> running
> as a relocatable kernel.
>
> Signed-off-by: M. Mohan Kumar <mohan@...>
> Signed-off-by: Milton Miller <miltonm@...>

your sign-off should have been after mine as you were making changes to 
my patch.

I actually completed my own testing last night with a slightly 
(Continue reading)


Gmane