linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* confusions of boot sequence in MPC8572?
@ 2008-09-18 13:49 Michael.Kang
  2008-09-23 18:29 ` Scott Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Michael.Kang @ 2008-09-18 13:49 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: Yu Chen, Xin-Xin.Yang

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@ha
114         addi    r4,r4,cur_cpu_spec@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-23 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-18 13:49 confusions of boot sequence in MPC8572? Michael.Kang
2008-09-23 18:29 ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).