linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael.Kang <blackfin.kang@gmail.com>
To: linuxppc-embedded@ozlabs.org
Cc: Yu Chen <chyyuu@gmail.com>, Xin-Xin.Yang@freescale.com
Subject: confusions of boot sequence in MPC8572?
Date: Thu, 18 Sep 2008 21:49:34 +0800	[thread overview]
Message-ID: <a7f827420809180649j1f0c6005iea4b9bc82aff3dad@mail.gmail.com> (raw)

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

             reply	other threads:[~2008-09-18 13:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 13:49 Michael.Kang [this message]
2008-09-23 18:29 ` confusions of boot sequence in MPC8572? Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7f827420809180649j1f0c6005iea4b9bc82aff3dad@mail.gmail.com \
    --to=blackfin.kang@gmail.com \
    --cc=Xin-Xin.Yang@freescale.com \
    --cc=chyyuu@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).