leegong wrote:Well ,the first step is to find who sets or clears @FFFFFFE8 .
Well, not easy as it's mostly accessed indirectly. That address appears 21 times in the table @BFC04688.
Apart from that, it is also the initial
value of the $SP in register sets 1-7, but as $sp is decremented before writing to it, that memory is probably never written to by writing to the stack.
But it is the very first value read by TaskDispatch(). I think I'll have to take a deeper look at it...
EDIT : regarding sub_BFC12E7C , i tend to think it is a RTOS service call , which is called without input parameter ,returns one bool output in v0 , it might be one of
the following RTOS service calls ,maybe this could provide some help with us :
sns_dsp
sns_ctx
sns_loc
sns_dpn
Indeed, I named the following functions:
-s 0xBFC02BE8=clear_bit13_of_FFFFFFE8_and_Task_Dispatch
-s 0xBFC03984=set_bit5_of_FFFFFFE8_and_Task_Dispatch
-s 0xBFC03948=reload_low8_FFFFFFE8_and_Task_Dispatch
-s 0xBFC031BC=check_FFFFFFE8_low11b_nonzero($v0 [OUT is_non_zero])
They are "rewrapped" into functions at higher addresses:
-s 0xBFC12E58=clear_bit13_of_FFFFFFE8_and_Task_Dispatch_00
-s 0xBFC12E64=set_bit5_of_FFFFFFE8_and_Task_Dispatch_00
-s 0xBFC12E70=reload_low8_FFFFFFE8_and_Task_Dispatch_00
-s 0xBFC12E7C=check_FFFFFFE8_low11b_nonzero_00($v0 [OUT is_non_zero])
The latter being called very frequently indeed. I thought about a "sanity check" but I'll have to check the syscalls you indicated.
Thanks, and don't hesitate to comment of course.
Best regards,
Vicne