linux-mips-fnet
[Top] [All Lists]

Re: Booting Linux on Vadem Clio

To: <linux-mips@fnet.fr>, <linuxce-devel@linuxce.org>
Subject: Re: Booting Linux on Vadem Clio
From: "Bradley D. LaRonde" <brad@ltc.com>
Date: Mon, 19 Jul 1999 17:24:25 -0400
>On 19-Jul-99 Mike Klar wrote:
>> I would still suspect the place that it writes ra to the stack.
>
>Me too :-)
>
>Bradley, what about replacing your init.c with the following init.S?
>
>--- snip here ---
>LEAF(prom_init)
>        li $v0,16
>        lui $at,0xab00
>        sh $v0,576($at)
>        sh $v0,578($at)
>        li $v0,1
>        sh $v0,584($at)
>        jr $ra
>        END(prom_init)
>--- snip here ---


Good idea.  I did that, except I put an endless loop instead of the 'jr ra'.
The code gets executed.  Then I put in the 'addiu sp, sp, -16' to make it
look exactly like my init.c:prom_init.  It works - no exception.  I then
stuck in a 'sw ra, 16(sp)' just to see if that would except.  Nope.  Works
fine with no exception.

So it's not jaling or messing with the sp register or even writing to the
stack that's causing the exception.  What does that leave?  The bootloader
not loading my code (it is pretty far away from the head.S stuff)?  The
alignment of init.c:prom_init?  That's all I can think of.  Can anyone else
think of ANY other possibility?


Regards,
Brad

<Prev in Thread] Current Thread [Next in Thread>