linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "David H. Lynch Jr" <dhlii@comcast.net>
To: zjznliang <zjznliang_popo@163.com>
Cc: linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: Help ! 2.6.14 kernel can't bring up
Date: Wed, 23 Nov 2005 10:54:52 -0500	[thread overview]
Message-ID: <438490CC.6040205@comcast.net> (raw)

 I was stuck at exactly this point for over a week. Basically, at this
point lots of things happen all at once:
Prior to this the MMU has had a small collection of TLB's setup.
The 6 lines of code you listed:
change from whatever Machine Status you powered up in to the proper
Machine status for running the kernel with memory translation and
exception handling enabled.
and switch from executing using physical addresses to executing using
virtual addresses.
and "jump" via the "rfi" from real mode to virtual mode at virtual
address start_here.

If you are using a LED IO port for debugging, then you MUST setup a TLB
entry for that LED or after the rfi you will not be able to write to it.
There should be a setup tlb block inside a CONFIG_SERIAL_TEXT_DEBUG
block copy it, change the address to match your LED port and set a new
index and your LED debug port should be good to go.

In my instance, my problem turned out to be with Machine Check
exceptions - The moment that rfi executes not only is virtual memory
enabled - but all exception handling is turned on.
I was able to find this my "testing" things one bit in the MSR at a
time, until I figured out which ones could be turned on and which could not.


zjznliang wrote:
> Hello David H. Lynch Jr.,!
>
> 	Now ,I am tracing the code in Linux 2.6.14 in head_8xx.S .
> 	I used led to trace the procedure,and I found the block in it .
> 	
> 644	/* Now turn on the MMU for real! */
> 645		li	r4,MSR_KERNEL
> 646		lis	r3,start_kernel@h
> 647		ori	r3,r3,start_kernel@l
> 648		mtspr	SPRN_SRR0,r3
> 649		mtspr	SPRN_SRR1,r4
> 650		rfi			/* enable MMU and jump to start_kernel */
>
> I set the led between the 649 and 650 ,and the led was light ,
> but when I set the led in the function start_kernel the led is not
> light .
>
> I thought the function start_kernel was not jumped to .
>
> what do you think ?
>   

             reply	other threads:[~2005-11-23 16:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23 15:54 David H. Lynch Jr [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-18  2:02 Help ! 2.6.14 kernel can't bring up zjznliang
2005-11-18 18:44 ` Clemens Koller
2005-11-18 23:14 ` David H. Lynch Jr.
2005-11-17  7:50 zjznliang
2005-11-17 11:02 ` Clemens Koller

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=438490CC.6040205@comcast.net \
    --to=dhlii@comcast.net \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=zjznliang_popo@163.com \
    /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).