Changes

271 bytes added ,  10:35, 13 December 2015
no edit summary
Line 73: Line 73:     
Syscalls are invoked by way of the invalid instruction handler; syscalls take the form 0xE7F000F0 | (syscall_num << 8). (E.g. E7F000F0 is syscall 0, E7F036F0 is syscall 0x36, etc.).<br>
 
Syscalls are invoked by way of the invalid instruction handler; syscalls take the form 0xE7F000F0 | (syscall_num << 8). (E.g. E7F000F0 is syscall 0, E7F036F0 is syscall 0x36, etc.).<br>
The IOSU currently has 0x94 available syscalls (the number of installed syscalls can vary between system versions).<br><br>
+
The IOSU has 0x94 available syscalls with 5.3.2 (the number of installed syscalls can vary between system versions).<br><br>
 
NOTE: Official syscall names begin with "IOS_", the rest are merely educated guesses.
 
NOTE: Official syscall names begin with "IOS_", the rest are merely educated guesses.
    
{|border=1
 
{|border=1
 
|-
 
|-
! ID # !! Internal name !! Description !! Return value
+
! ID (with 5.3.2) # !! Internal name !! Description !! Return value
 
|-
 
|-
 
| 0x00 || int IOS_CreateThread(u32 (*proc)(void* arg), void* arg, u32* stack_top, u32 stacksize, int priority, BOOL detached)  || Creates a thread (in paused state) || New threadid or error (negative value)
 
| 0x00 || int IOS_CreateThread(u32 (*proc)(void* arg), void* arg, u32* stack_top, u32 stacksize, int priority, BOOL detached)  || Creates a thread (in paused state) || New threadid or error (negative value)
Line 142: Line 142:  
| 0x1E || int IOS_GetAbsTimeStruct(???) || || 0 on success
 
| 0x1E || int IOS_GetAbsTimeStruct(???) || || 0 on success
 
|-
 
|-
| 0x1F || int set_fault_behavior(int pid, u32 flag) || Enables or disables raising a panic when a system fault occurs in the specified process || 0 on success
+
| 0x1F || int set_fault_behavior(int pid, u32 flag) || Enables or disables raising a panic when a system fault occurs in the specified process. This is only usable from the IOS-MCP process. Once finished, this will always set the flag for PID0(IOS-KERNEL) to value 1. This is the same field mentioned [[IOSU|here]] for exception handling. || 0 on success, -1 when curpid is not 1, and -29 when the input pid is >13.
 
|-
 
|-
 
| 0x20 || int get_key_type() || Gets the key type from the OTP (only 0 is valid) || 0 on success
 
| 0x20 || int get_key_type() || Gets the key type from the OTP (only 0 is valid) || 0 on success
340

edits