113,6 → 113,7 |
/** Perform arm32 specific tasks needed before the new task is run. */ |
void before_task_runs_arch(void) |
{ |
tlb_invalidate_all(); |
/* TODO */ |
} |
|
148,13 → 149,6 |
} ustate_t; |
|
|
void prefetch_exception_generator(void) { |
asm __volatile__ ( |
"ldr pc, =0x7000000" |
); |
|
} |
|
/** Changes processor mode and jumps to the address specified in the first parameter. |
* |
* \param kernel_uarg userspace settings (entry point, stack, ...) |
178,8 → 172,10 |
ustate.lr = 3; |
|
//set user stack |
ustate.sp = ((uint32_t)kernel_uarg->uspace_stack) + PAGE_SIZE; |
|
ustate.sp = ((uint32_t)kernel_uarg->uspace_stack) + |
PAGE_SIZE - sizeof(void*); |
//on the bottom of stack there is pointer to TLS |
|
//set where uspace execution starts |
ustate.pc = (uintptr_t) kernel_uarg->uspace_entry; |
|