2010/9/29 David Daney <email@example.com>:
> On 09/28/2010 09:00 AM, wilbur.chan wrote:
> Probably not a good choice.
>> because it is just a demo,
> If you want your demo to work, you cannot clobber all the registers in an
> exception handler. Most ABIs allow you to clobber only k0 and k1.
> In general any exception handler must save and restore all registers it
> modifies except for k0 and k1. That is the function of SAVE_ALL and
OK, I 've added SAVL_ALL and RESTORE_ALL in handle_int,it works.
print 'A' /* add for debug purpose*/
However, a new problem arised :
if I modify the main_loop like this:
local_irq_enable(); /* enable timer interrupt*/
That is to say, if main_loop invoke a function that do noting but to
invoke another nop function, the timer interrupt seems
not to work properly， at fisrt few seconds, 'do_irq_enter' print
every 4 seconds, but after a while ,system print 'A' from time to
time , but not print 'do_irq_enter' any more. it seemed that ,
system has not acked the timer interrupt.
If I remove the loop_test1 in main_loop, everything works well.
I don't know why this happened. Any suggestion？ Thank you