=================================================================== RCS file: /cvs/funnyos/arch/testarm/boot/loader.S,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- funnyos/arch/testarm/boot/loader.S 2007/11/05 18:54:35 1.4 +++ funnyos/arch/testarm/boot/loader.S 2007/11/23 13:37:42 1.5 @@ -1,5 +1,5 @@ /* - * $Id: loader.S,v 1.4 2007/11/05 18:54:35 init Exp $ + * $Id: loader.S,v 1.5 2007/11/23 13:37:42 nbrk Exp $ */ /* * FunnyOS loader @@ -67,10 +67,18 @@ /* store all system mode registers */ stmdb sp!, {r0-r12, lr} + /* store sys_mode's cpsr */ +// mrs r1, spsr +// stmdb sp!, {r1} + + /* pass sp (which now contains struct pcb of interrupted task) to irq_trampoline */ + mov r0, sp + bl irq_trampoline /* load r0-r12 and pc from the stack */ /* note ^ that copies SPSR into CPSR */ + /** here we may return to different task (if pcb was changed in the stack memory) **/ ldmia sp!, {r0-r12, pc}^ _vector_fiq: