Reset for MPC8245

VanBaren, Gerald (AGRE) Gerald.VanBaren at smiths-aerospace.com
Wed Jun 2 05:59:48 EST 2004


> -----Original Message-----
> From: owner-linuxppc-embedded at lists.linuxppc.org
> [mailto:owner-linuxppc-embedded at lists.linuxppc.org]On Behalf Of
> Arunachalam, Saravanan
> Sent: Tuesday, June 01, 2004 1:57 PM
> To: linuxppc-embedded at lists.linuxppc.org
> Subject: Reset for MPC8245
>
>
>
> Hi,
>
> I am trying to do Internal Hard Reset from the kernel for
> MPC8245 based
> custom board. I tried the Machine check stop approach but it doesn't
> work. I am able to successfully do from the u-boot bootloader. The
> following code generates Instruction Exception at the instruction that
> turns off MMU.
>
> msr = mfmsr();
>
> /* Interrupts and MMU off */
> __asm__ __volatile__ ("mfmsr    %0":"=r" (msr));
>
> msr &= ~0x1030;
> __asm__ __volatile__ ("mtmsr    %0"::"r" (msr)); <---
> Instruction Except
> addr = 0xfff00100;
> ((void (*)(void)) addr) ();
>
> If anyone has a solution to this, I would greatly appreciate it.
>
> Thanks
> Arun


I don't know if it is a solution, but I'm suspicious of the line " addr = 0xfff00100;".  The key to doing a machine check reset is (a) reconfiguring the MSR to do a reset on a machine check and (b) causing a machine check to occur.  Item (b) is typically done by jumping to a memory location that doesn't exist.  I suspect that in your case, location 0xfff00100 _does_ exist: it is the reset vector in your ROM.

Try setting addr to an invalid location.

gvb


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





More information about the Linuxppc-embedded mailing list