Hi,
was the alignment correct?
On 09/17/2014 02:53 PM, Björn Döbel wrote:
- What is thread_stacks[thread.id]?
It's the stack of that thread organized in an array, as suggested by Adam. The stack is prefilled with data:
thread_stacks[count][THREAD_STACK_SIZE - 1] = (l4_umword_t)thread->arg; thread_stacks[count][THREAD_STACK_SIZE - 2] = 0;
where 'thread->arg' is some argument to pass to the thread.
- What is the stack pointer you are setting at thread startup?
Again suggested by Adam, I'm setting thread_stacks[count][1998] as SP:
l4_thread_ex_regs(thread->cap, (l4_umword_t)thread->func,
(l4_umword_t)&thread_stacks[count][THREAD_STACK_SIZE - 2], 0);
- Is any of these addresses related to the page fault address you are seeing?
OK, I've found out something new. In the trace buffer, I'm getting the following entry:
pf: 0026 pfa=0000b014 ip=01000200 (w-) spc=0xfcffae94 err=6
The IP points to the head of the thread function, the pfa is &thread_stacks[count][THREAD_STACK_SIZE - 3]. But why?
You probably already mentioned it, but this thread has grown quite long: Why do you actually have to launch threads in a different AS and implement your own pager?
Yeah, I hope to fix this problem soon, because the EDF scheduler is part of my Bachelor's thesis. The concept requires the possibility to run the threads in different spaces due to security reasons.
Best regards, Valentin