Skip to contentSkip to conversation

Does kexec support SMP on powerpc? E500 V2

DISCUSSION wilbur.chan 2 participants 3 messages Aug 27, 2009 – Aug 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

There was a patch of kexec on SMP mips 64 , and I attempt to implement kexec on SMP powerpc .

I found that ,  it was a little different with  mips when booting a kernel. We know  that, every CPU jumped directly into kernel on

mips, but on powerpc , E500 SMP,  the 'master' CPU was in charge of 'slave'  CPUs , so 'slave' CPU  could do nothing

but to  wait for 'master'  to wake him up in Init function.

How to implement kexec on SMP powerpc?

Any suggestions would be appreciate

regards,

wilbur

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw
Quoted 6 lines · wilbur.chan

There was a patch of kexec on SMP mips 64 , and I attempt to implement kexec on SMP powerpc .

I found that ,  it was a little different with  mips when booting a kernel. We know  that, every CPU jumped directly into kernel on

Quoted 7 lines

mips, but on powerpc , E500 SMP,  the 'master' CPU was in charge of 'slave'  CPUs , so 'slave' CPU  could do nothing

but to  wait for 'master'  to wake him up in Init function.

How to implement kexec on SMP powerpc?

Wilbur, I am not sure about ppc32 arch. Check kexec/purgatory/arch/ppc64/v2wrap.S which makes all secondary cpus to spin in a loop at the physical address 0x60

Regards,
M. Mohan Kumar

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw

2009/8/28 M. Mohan Kumar <[email protected]>:

Quoted 8 lines

Wilbur, I am not sure about ppc32 arch. Check kexec/purgatory/arch/ppc64/v2wrap.S which makes all secondary cpus to spin in a loop at the physical address 0x60

Regards,
M. Mohan Kumar

I've read the code of kexec-elf-ppc64.c and v2wrap.S,

but got quit confused .

Hmmm... as matter of fact, I'm not quit familliar with the principle of purgatory , because I

modified the standard kexec-tool that , I only passed in the kernel segment , without any

ramdisk or other segments.

My questions are as followed:

q1: const unsigned char purgatory[] =... (kexec/purgatory.c)

where are the elements in Array 'purgatory' coming from ?

Is it the binary form of v2wrap.S ?

(kexec_elf_ppc64.c)

q2: elf_rel_build_load(info, &info->rhdr, (const char *)purgatory,\
purgatory_size, 0, max_addr, 1, 0);

Does the 'purgatory' here stand for the array above or v2wrap.S ? or both?

What is this code used for?

q3: elf_rel_get_symbol(&info->rhdr, "purgatory_start", slave_code,

			sizeof(slave_code));

master_entry = slave_code[0];

Does master_entry euqal to the address of instruction 'b master' in
v2wrap.S ?

q4: memcpy(slave_code, info->segment[0].buf, sizeof(slave_code));

why coying 256 bytes of kernel data to slave_code , modify first 4 bytes

to master_entry,then copy back to info->rhdr ?

Why doing this?

I saw comment saying :

'a copy of the first 0x100 bytes of this code(v2wrap.S) is copied to
0, and , The above 0x100

bytes at purgatory_start are replaced with the code from the kernel'

After this, how the slave cpus jumps to 'slave' point in v2wrap.S , while master cpu jumps to

'purgatory_start' ?

Thank you

regards,

wilbur

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec