[PATCH 1/2] MIPS kexec,kdump support

Maxim Uvarov muvarov at gmail.com
Thu Mar 4 06:58:34 EST 2010

2010/3/3 wilbur.chan <wilbur512 at gmail.com>:
> 2010/3/3 Maxim Uvarov <muvarov at gmail.com>:
>> Hello folks,
>> Please find here MIPS crash and kdump patches.
>> This is patch set of 3 patches:
>> 1. generic MIPS changes (kernel);
>> 2. MIPS Cavium Octeon board kexec/kdump code (kernel);
>> 3. Kexec user space MIPS changes.
>> Patches were tested on the latest linux-mips@ git kernel and the latest
>> kexec-tools git on Cavium Octeon 50xx board.
>> I also made the same code working on RMI XLR/XLS boards for both
>> mips32 and mips64 kernels.
>> Best regards,
>> Maxim Uvarov.
>> Signed-off-by: Maxim Uvarov <muvarov at gmail.com>
> Hi, Maxim
> In XLR series ,
> 1)How to protect  boardinfo and pass it to second kernel ?
It is very simple. I just looked at physical addresses  where
boardinfo is and protect this
region.  For xls simple add additional exclude region to setup.c
static struct boot_mem_map_exclude_region static_exclude_regions[] = {
+	[1] = {0xc000000, 0xd000000 }, /*Bootloader stuctures*/

To pass it to second kernel copy pointer to original psb_info to
static variable in beginning of prom_init() and provide this pointer
as kexec_args[3].

kexec_args[0]  is argc on XLS
kexec_args[1] is argv on XLS

> 2)If all cpus jumped to same entry point , did you change head.s, if so , how ?
Please take a look how other platforms do this. You need write .macro
kernel_entry_setup which should be located in somewhere is
include/asm-mips/mach-rmi. Then you write this macro it will be
executed before kernel_entry. So after kexec all cpus jump to this
entry point and after they you can do all things what you want:
- make cpu0 boot new kernel and other cpus go to boot slaves procedure;
- take first cpu and make it boot, and all others go to boot slaves procedure;
- boot only cpu0 and infinite loop others  cpus (you might want to do
this for kdump)
> Thank you!

Best regards,
Maxim Uvarov

More information about the kexec mailing list