more hardware multitasking problems
Yes, When the interrupt fires it will switch to PL0. But when the interrupt is done and executes the iret the processor will automatically switch back to whatever privelege level that it was at before the interrupt was triggered.
About your problem with switching back to PL0, Are you trying to iret from the PL3 task back to the PL0 task? Because from looking at your code, that is what I think you are trying to do. In that case you will have to do a long call to the new task instead of a long jump. Remember you can return from a call but not from a jump.
About your problem with switching back to PL0, Are you trying to iret from the PL3 task back to the PL0 task? Because from looking at your code, that is what I think you are trying to do. In that case you will have to do a long call to the new task instead of a long jump. Remember you can return from a call but not from a jump.
Finally It's working I was tring to go back from PL3 to PL0
and I was using long jump to switch to PL3 but I ccouldn't go back again.
Now I'm using long call as frank said with iret instruction at the end
of called task and now my multitasking can switch from PL0->PL3->PL0.
Thank you guys for your help,I'm so grateful.
Thanx.
and I was using long jump to switch to PL3 but I ccouldn't go back again.
Now I'm using long call as frank said with iret instruction at the end
of called task and now my multitasking can switch from PL0->PL3->PL0.
Thank you guys for your help,I'm so grateful.
Thanx.