2011/12/16 Jonas Bonn <[email protected]>:
> On Thu, 2011-12-15 at 17:49 +0000, Julius Baxter wrote:
>
>> In the reset vector currently in the kernel (
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=arch/openrisc/kernel/head.S;hb=HEAD
>> ) I see this:
>>
>> /* ---[ 0x100: RESET exception ]----------------------------------------- */
>>     .org 0x100
>>       /* Jump to .init code at _start which lives in the .head section
>>        * and will be discarded after boot.
>>        */
>>       LOAD_SYMBOL_2_GPR(r4, _start)
>>       tophys  (r3,r4)                 /* MMU disabled */
>>       l.jr    r3
>>        l.nop
>>
>> Which does not appear to clear registers at reset.
>
> Keep reading... what does _start do?  Exactly... it starts by clearing
> registers!!!
>
> The problem, perhaps, is that the register clear is assuming that r0
> really is 0...???  Perhaps the first thing we should be doing is loading
> r0 with a 0:
>
> l.movhi r0,hi(0)
> l.ori r0,r0,0
>
> I haven't seen or heard about this issue before... why is this suddenly
> a problem for you?
>
>
It could be a simulator issue. Simulators sometimes handles these
things differently. (BTW, which sim are you using, Matthew?). And FPGA
will in almost all cases set the FFs to zero, so it wouldn't be an
issue there.

Anyway, if this is the problem, hard-wiring r0 to zero would solve
both problems that Matthew reported

-- 
Olof Kindgren
______________________________________________
ORSoC
Website: www.orsoc.se
Email: [email protected]
______________________________________________
FPGA, ASIC, DSP - embedded SoC design
_______________________________________________
Linux mailing list
[email protected]
http://lists.openrisc.net/listinfo/linux

Reply via email to