Pete Zaitcev wrote:
> One more question: how are other CPUs initialized in this area?
> I changed this place and removed my kludge from cpu_init(),
> now the thing blows up somewhere else with symptoms of EFAULT.
The boot cpu writes its own ar values to the lowcore of the
secondary cpus in do_boot_cpu (smp.c):
cpu_lowcore = get_cpu_lowcore(cpu);
cpu_lowcore->save_area[15] = idle->thread.ksp;
cpu_lowcore->kernel_stack = (__u64) idle + 16384;
__asm__ __volatile__("la 1,%0\n\t"
"stctg 0,15,0(1)\n\t"
"la 1,%1\n\t"
"stam 0,15,0(1)"
: "=m" (cpu_lowcore->cregs_save_area[0]),
"=m" (cpu_lowcore->access_regs_save_area[0])
: : "1", "memory");
and the secondary cpu loads those values in the restart
entry handler (entry.S):
restart_int_handler:
lg %r15,__LC_SAVE_AREA+120 # load ksp
lghi %r10,__LC_CREGS_SAVE_AREA
lctlg %c0,%c15,0(%r10) # get new ctl regs
lghi %r10,__LC_AREGS_SAVE_AREA
lam %a0,%a15,0(%r10)
stosm 0(%r15),0x04 # now we can turn dat on
lmg %r6,%r15,48(%r15) # load registers from clone
jg start_secondary
Bye,
Ulrich
--
Dr. Ulrich Weigand
[EMAIL PROTECTED]