Disable data access memory abort : Патчи : Форум | 
| Страница 1 из 2: [1] 2 » | 
 | 
07.06.09, 16:57 | 
| 
 hi, im writing small patch, memory viewer to read phone memory, but i stack when invalid address is specified i tried to disable data abort vector Код:  ... bx pc nop .code 32 // disable data aborts mrs r2, CPSR bic r2, r2, 100 msr CPSR, r2 // read DWORD from memory ldr r3, r3, 0 //enable data aborts mrs r2, CPSR orr r2, r2, 100 msr CPSR, r2 adr lr, @thumb+1 bx lr @thumb: ... with no luck :( i was thinking disabling MMU should help, but i cant even read from coprocessor Код: //disable MMU mrc cp15, 0, r2, c1, c1 bic r2, r2, 1 mcr cp15, 0, r2, c1, c1 causing undefined instruction exception... regards, Bartek [ Редактировано ndt в 7.6.09 14:58 ]  | |
 | 
07.06.09, 17:37 | 
| 
 ndt, you can simply use get_mem function typedef OSBOOLEAN (*GET_MEM)(PROCESS pid, OSADDRESS from, void* to, OSADDRESS size); //z610 GET_MEM get_mem //w550 //GET_MEM get_mem  | |
 | 
07.06.09, 17:38 | 
| 
 den_po, а можно по-русски  | |
 | 
07.06.09, 18:46 | 
| 
 den_po, i didnt know we have such function to play with, thanks im using c702, but hopefully this function is easy to locate now my code is something like that Код:  /* ... */ push r3 ; address ldr r4, _current_process blx r4 pop r1 ; address mov r2, sp sub sp 4 mov r3, 4 ldr r4, _get_mem blx r4 add sp 4 ldr r3, sp, 0 /* ... */ when the valid address is specified (eg 0x10000000, 0x2AF99AD8) works fine if i specify wrong address (like 0x12702000, in c702 end of phone_app.cxc) data abort occurs :( Added 7.6.09 17:16 Joker XT, я пишу патч "memory viewer". если подан адрес правильный он отлично работает, но если подан неправильный адрес (нап. 0x12702000 в c702) появляется data abort exception. я пытался отключить его Код: // disable data aborts mrs r2, cpsr bic r2, r2, 100 msr cpsr, r2 не повезло :/ извините за мои русский;) [ Edited by ndt в 7.6.09 17:29 ]  | |
 | 
07.06.09, 19:55 | 
| 
 ребут короче хочет убрать как понимаю | |
 | 
07.06.09, 20:29 | 
| 
 Ребут из-за чего?) что-то я не понял))  | |
 | 
07.06.09, 20:35 | 
| 
 Joker XT, из-за доступа к памяти, которая из usermode недоступна | |
 | 
07.06.09, 21:20 | 
| 
 im pretty sure, im accessing it in supervisor mode ( CPSR, M[4:0] = 0b10011 ) | |
 | 
07.06.09, 21:58 | 
| 
 den_po, тада другой вопрос, зачем это нужно)) | |
 | 
07.06.09, 22:09 | 
| 
 ndt, try to play with DACR | |
| Страница 1 из 2: [1] 2 » | 
URL этой темы: https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=4045 © 2005-2018 mobilefree.justdanpo.ru  |