confusions of boot sequence in MPC8572?
Michael.Kang
blackfin.kang at gmail.com
Thu Sep 18 23:49:34 EST 2008
I am reading the boot code in arch/powerpc/kernel/head_fsl_booke.S for
MPC8572( dual e500 core). The second core will encounter the following
code:
319 #ifdef CONFIG_SMP
320 /* Check to see if we're the second processor, and jump
321 * to the secondary_start code if so
322 */
323 mfspr r24,SPRN_PIR
324 cmpwi r24,0
325 bne __secondary_start
326 #endif
And jump to __secondary_start -> call_setup_cpu, source code in
call_setup_cpu as the following:
112 _GLOBAL(call_setup_cpu)
113 addis r4,r3,cur_cpu_spec at ha
114 addi r4,r4,cur_cpu_spec at l
115 lwz r4,0(r4)
116 add r4,r4,r3
117 lwz r5,CPU_SPEC_SETUP(r4)
118 cmpwi 0,r5,0
119 add r5,r5,r3
120 beqlr
121 mtctr r5
122 bctr
here it seems cur_cpu_spec here is not a valid value since
cur_cpu_spec will only be set in identify_cpu() [
arch/powerpc/kernel/cputable.c: 1301] later.
So what is my mistake? Who responsible for initialize cur_cpu_spec
variable for second core??
Thanks
MK
--
www.skyeye.org
More information about the Linuxppc-embedded
mailing list