Quick reply on top Take a look at https://www.ibm.com/developerworks/mydeveloperworks/blogs/ddou/tags/u-boot?lang=en This may help, I suppose. Why don't forward this message to uboot mailing list? On Wed, Sep 29, 2010 at 08:11:32AM +0800, wilbur.chan wrote: > 2010/9/29 David Daney <ddaney@xxxxxxxxxxxxxxxxxx>: > > 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 > > RESTORE_ALL. > > > OK, I 've added SAVL_ALL and RESTORE_ALL in handle_int,it works. > > > LEAF(handle_int) > print 'A' /* add for debug purpose*/ > SAVE_ALL > nop > CLI > la t9,do_IRQ > nop > jalr t9 > nop > RESTORE_ALL > nop > END(handle_int) > > > However, a new problem arised : > > > if I modify the main_loop like this: > > > void main_loop() > { > local_irq_enable(); /* enable timer interrupt*/ > while(1) > { > loop_test1(); > > } > } > void loop_test1() > { > loop_test2(); > } > > void loop_test2() > { > > } > > 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 >