Hi all,

On page 26 of the manual (1.2) there's an instruction on how to restart a thread following a capability fault. The program counter where the faulting thread should pick up execution is said to be message register 0.

What I'm trying to do is to restart the execution on the next instruction following the system call instruction so as to skip it. Try as I might, it will not work and the faulting thread is stuck in an endless number of faults. Below is the relevant code:

seL4_Word pc = seL4_GetMR(0);
printf("cap fault, pc: %08x, on %s\n",pc,seL4_GetMR(2)?"wait":"send");
//assert(!faultnum++);
seL4_MessageInfo_t info = seL4_MessageInfo_new (seL4_CapFault,0,0,1);
seL4_SetMR(0,pc + 4);
seL4_Reply(info);

It does restart, but immediately cap-faults again at the very same program counter.

Is it supposed to work? What did I do wrong?


Cheers,
David