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 */ |