linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: zjzhou@newrocktech.com
Cc: linuxppc embedded <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: reboot by software
Date: 16 Dec 2003 06:10:59 -0700	[thread overview]
Message-ID: <1071580258.17911.69.camel@hermes> (raw)
In-Reply-To: <000101c3c3b8$68333110$b702a8c0@newrock2>


On Tue, 2003-12-16 at 02:38, John Zhou wrote:
> Hello!
>
> I have a linux running on my mpc8260 board( power on reset at
> 0xfff00100, I use 32 bit flash, and directly maping
> 0xF0000000 ~ 0xFFFFFFF in kernel).
>
> Now, I want to reboot system by software. But, when I jump
> to 0xfff00100 in kernel mode, it's going dead. Can anybody help me?

Just jumping into the reset vector of the ROM/FLASH isn't going
to work since Linux is running with the MMU on, etc.  What you
really need is some way to tell the hardware to reenter the
RESET condition.

Probably the best way on that platform is to cause a machine
check (checkstop) and set it up to reset on checkstop.  Look
at the description of HID0 on the 8260 to see how to do it.

Here's how I did it on an 8250 (same core):
    unsigned long hid0;
    // Need interrupts off to force checkstop
    cli();
    ((immap_t *)IMAP_ADDR)->im_clkrst.car_rmr |= 0x01;  // Checkstop reset enable
    // Force a checkstop by turning on parity which is not implemented
    hid0 = mfspr(HID0);
    hid0 |= 0x30000000;
    mtspr(HID0, hid0);

--
Gary Thomas <gary@mlbassoc.com>
MLB Associates


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2003-12-16 13:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-16  8:38 ELDK and suse 9.0 Kate Alhola
2003-12-16  8:50 ` Steven Scholz
2003-12-16  9:38   ` reboot by software John Zhou
2003-12-16 10:24     ` Wolfgang Denk
2003-12-16 13:10     ` Gary Thomas [this message]
2003-12-16 10:12 ` ELDK and suse 9.0 Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2003-12-16 13:16 reboot by software VanBaren, Gerald (AGRE)
2003-12-16 14:40 Wells, Charles

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=1071580258.17911.69.camel@hermes \
    --to=gary@mlbassoc.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=zjzhou@newrocktech.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).