linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: "Li Yang-r58472" <LeoLi@freescale.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: reboot on PQ2FADS board.
Date: Wed, 19 Jul 2006 08:33:17 +0200	[thread overview]
Message-ID: <20060719063317.86A66352681@atlas.denx.de> (raw)
In-Reply-To: Your message of "Wed, 19 Jul 2006 13:06:39 +0800." <4879B0C6C249214CBE7AB04453F84E4D050B0F@zch01exm20.fsl.freescale.net>

In message <4879B0C6C249214CBE7AB04453F84E4D050B0F@zch01exm20.fsl.freescale.net> you wrote:
>
> > command cause machine check and kernel ooops.  The problem seems in
> > the "m8260_gorom" in head.S.  The restart() function in m8260_setup.c
> > passed 2 parameters to that assembly code, r3 is the bd_info , r4 is
> > the warm start address,  I changed it to 0xFF800100, that's where the
> > u-boot's _start_warm lives, I have verified that address by typing "g
> > ff800100" in u-boot console, which cause the board reset.
> 
> Are you sure ff800100 is _start_warm lives?  In latest u-boot

Trying to jump to some boot rom address is IMHO always a bad approach
to reboot a system. You should always try to cause a reset  condition
for  the CPU, and thus for all the associated hardware. On 8xx / 8260
systems this is usually done by going through  a  machine  check.  We
have  the  following code in our linuxppc_2_4_devel tree, which works
on ALL 8260 systems, no matter whioch boot loder they use:

static void
m8260_restart(char *cmd)
{   
        __volatile__ unsigned char dummy;
        ulong msr;
    
        cli();
        volatile immap_t *immap = (immap_t *) IMAP_ADDR;
    
        immap->im_clkrst.car_rmr = 1;    /* Checkstop Reset enable */
    
        /* Interrupts and MMU off */
        __asm__ __volatile__ ("mfmsr    %0":"=r" (msr):);
    
        msr &= ~(MSR_ME | MSR_EE | MSR_IR | MSR_DR);
        __asm__ __volatile__ ("mtmsr    %0"::"r" (msr)); 
    
        dummy = ((immap_t *)IMAP_ADDR)->im_clkrst.res[0];
    
        printk("Restart failed\n");
        for (;;);
}   


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
If a group of N persons implements a COBOL compiler,  there  will  be
N-1 passes. Someone in the group has to be the manager. - T. Cheatham

  reply	other threads:[~2006-07-19  6:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18  3:40 reboot on PQ2FADS board Lei Sun
2006-07-19  5:06 ` Li Yang-r58472
2006-07-19  6:33   ` Wolfgang Denk [this message]
2006-07-19 14:12     ` Lei Sun
2006-07-19 16:41       ` Mathieu Deschamps
2006-07-20  2:45         ` Lei Sun
2006-07-20  3:46     ` Lei Sun
2006-07-20  6:46       ` Wolfgang Denk
2006-07-20  7:22     ` Liu Dave-r63238
  -- strict thread matches above, loose matches on Subject: below --
2006-08-17 17:00 Zhimin (Jimmy) Liu
2006-08-18  1:45 ` Liu Dave-r63238

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=20060719063317.86A66352681@atlas.denx.de \
    --to=wd@denx.de \
    --cc=LeoLi@freescale.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).