Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2317 → Rev 2318

/branches/arm/kernel/arch/arm32/src/arm32.c
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;
 
/branches/arm/kernel/arch/arm32/src/mm/page_fault.c
134,7 → 134,6
* \return Type of access into memmory
* \note Returns #PF_ACESS_EXEC if no memory access is requested
*/
//TODO: remove debug print in final version ... instead panic return PF_ACESS_EXEC
static pf_access_t get_memory_access_type(uint32_t instr_addr, uintptr_t badvaddr)
{
instruction_union_t instr_union;
164,16 → 163,13
* Type of access that caused exception have to page tables
* and access rights.
*/
//TODO: ALF!!!!! cann't use AS asi is define as THE->as and THE structure is
//sored after stack_base of current thread
//but now ... in exception we have separate stacks <==> different
//stack_pointer ... so AS contains nonsence data
//same case as_page_fault .... it's nessesary to solve "stack" problem
pte_level1_t* pte = (pte_level1_t*)
pt_mapping_operations.mapping_find(AS, badvaddr);
 
ASSERT(pte);
if ( pte == NULL ) {
return PF_ACCESS_READ;
}
 
/* check if read possible
* Note: Don't check PTE_READABLE because it returns 1 everytimes */