About the exception ipc reply
adam at os.inf.tu-dresden.de
Fri Oct 16 11:05:27 CEST 2009
On Thu Oct 15, 2009 at 13:57:32 +0800, Guanghui, Cheng wrote:
> BUT. I have a problem about my code when i fixing the stack of main thread.
> The correct code which could work well is like this:
> utcb = l4_utcb_get();
> eip = utcb->exc.eip;
> esp = utcb->exc.esp;
> utcb->values = (l4_umword_t)(do_irq);
> esp_loc = 1024 - (esp - (l4_umword_t)stack)/4;
> stack[esp_loc - 1] = eip;
> l4_msgtag ...
> In the code above i only reset the next stack with return address (old eip).
> But it seems i can't reset the new stack pointer like
> utcb->values = esp - 4
> In my opinion it should do but if i did it can't work. It seems some tricky
> here. Can you tell me why it is like this?
> Additinally, i tried this way about handling interrupt with interrupt number
> like this:
> void do_irq(int irq)
> it can't work either.
Please refer to the attached modified version of your program. It's a
bit more tricky than that, regs also need to be saved etc...
Adam adam at os.inf.tu-dresden.de
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3738 bytes
Desc: not available
More information about the l4-hackers