we take address that causes syscall from the ksCurThread and set them back. Thus, FaultInstruction should point to something different, right?
I have add FaultInstruction in the same manner as it made in ARM platform:
sub lr, lr, #4
/* Store FaultInstruction */
str lr, [sp, #(PT_FaultInstruction - PT_LR_svc)]
I am tacking address of an instruction causes exception, subtract 4 from the value, and save it into the FauiltInstruction. Now get* and set* functions are:
word_t PURE
getRestartPC(tcb_t *thread)
{
return getRegister(thread, FaultInstruction);
}
void
setNextPC(tcb_t *thread, word_t v)
{
setRegister(thread, CP0_EPC, v);
}
Also, Faultinstruction is part of frameRegisters and «linked» with cp0_epc of seL4_UserContext (sel4arch.xml)
Now both tests are passed:
Starting test 27: TEST_RECYCLE0001
TEST_RECYCLE0001
Running test RECYCLE0001 (Basic endpoint recycle testing.)
<
Hope that helps.
Regards, Hesham ________________________________________ From: Devel
on behalf of Vasily A.Sartakov Sent: Friday, October 14, 2016 12:33 AM To: devel@sel4.systems Subject: [seL4] endpoint.c Hello.
I have a problem with endpoint.c test (RECYCLE0001):
Error: seL4_MessageInfo_get_label(tag) == seL4_InvalidCapability at line 50 of file /long/path/apps/sel4test-tests/src/tests/endpoints.c
I am reading MR(0) in call_func above this check and see, that seL4_Call returns values that were sent before. For example, 100 for the first thread, 101 for the second and etc. Thus, as far I understand, cnode_recycle does not work at all. I am pretty sure that my seL4_Call syscall was implemented properly. I have looked inside the kernel, and tried to track everything related to cteRecycle and do not see anything platform specific. I know that it is a complicated question, but any ideas or hints where to look?