velvetfr
Still Fresh
Hi,
I experimented last night re. the different ARM modes (especially the User, System and Supervisor). I have noticed that GP32 gives Supervisor mode when entering any FXEs (I guess the same for GXEs), and then if you switch to user/system mode, setting a good stack pointer, then a lot of SWIs call make the GP32 crashing. I have attached a snippet of a such crash :
@ Switch to user mode, or system mode and disable IRQ and FIRQ
mov r0, #0xd0 @ same with 0xdf (system mode) ... works with 0xd3 (supervisor mode)
msr cpsr, r0
@ Set the stack pointer to a valid memory area
ldr sp, =0x0c6ffff0
@ Enable the video output
mov r2, #3
swi 0x8
Seems that the GP32 SWIs are not useable in user or system mode, but do not see really a good reason why not ....
Thanks,
velvetfr
I experimented last night re. the different ARM modes (especially the User, System and Supervisor). I have noticed that GP32 gives Supervisor mode when entering any FXEs (I guess the same for GXEs), and then if you switch to user/system mode, setting a good stack pointer, then a lot of SWIs call make the GP32 crashing. I have attached a snippet of a such crash :
@ Switch to user mode, or system mode and disable IRQ and FIRQ
mov r0, #0xd0 @ same with 0xdf (system mode) ... works with 0xd3 (supervisor mode)
msr cpsr, r0
@ Set the stack pointer to a valid memory area
ldr sp, =0x0c6ffff0
@ Enable the video output
mov r2, #3
swi 0x8
Seems that the GP32 SWIs are not useable in user or system mode, but do not see really a good reason why not ....
Thanks,
velvetfr