In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
4,679 bytes added ,  22:20, 23 October 2015
Syscalls galore!
Line 94: Line 94:  
| 0x06 || int get_process_name(int pid, char *out_buffer, u32 out_size) || Get the specified process' name string || 0 on success
 
| 0x06 || int get_process_name(int pid, char *out_buffer, u32 out_size) || Get the specified process' name string || 0 on success
 
|-
 
|-
| 0x07 || int thread_resume(int threadid) || Resume the specified thread || 0 on success
+
| 0x07 || int IOS_StartThread(int threadid) || Resume the specified thread || 0 on success
 
|-
 
|-
 
| 0x08 || int thread_suspend(int threadid) || Suspend the specified thread || 0 on success
 
| 0x08 || int thread_suspend(int threadid) || Suspend the specified thread || 0 on success
Line 130: Line 130:  
| 0x18 || u32 time_now() || Fetch the current value of the Starbuck's timer || The current value of the timer register
 
| 0x18 || u32 time_now() || Fetch the current value of the Starbuck's timer || The current value of the timer register
 
|-
 
|-
| 0x19 || IOS_GetUpTimeStruct(???) || ||
+
| 0x19 || int IOS_GetUpTimeStruct(???) || || 0 on success
 
|-
 
|-
 
| 0x1A || int IOS_GetUpTime64(u64 *out_buf) || Returns the current time in wide format || 0 on success
 
| 0x1A || int IOS_GetUpTime64(u64 *out_buf) || Returns the current time in wide format || 0 on success
Line 136: Line 136:  
| 0x1B || int set_rtc_counter(u64 *in_buf) || Sets the RTC counter used by MCP (can only be called by MCP) || 0 on success
 
| 0x1B || int set_rtc_counter(u64 *in_buf) || Sets the RTC counter used by MCP (can only be called by MCP) || 0 on success
 
|-
 
|-
| 0x1C || IOS_GetAbsTimeCalendar(???) || ||
+
| 0x1C || int IOS_GetAbsTimeCalendar(void *out_buf) || Returns the current date and time in a 0x18 sized struct (0x00: year; 0x04: day; 0x08: month; 0x0C: hour; 0x10: minute; 0x14: second) || 0 on success
 
|-
 
|-
| 0x1D || IOS_GetAbsTime64(???) || ||
+
| 0x1D || int IOS_GetAbsTime64(???) || || 0 on success
 
|-
 
|-
| 0x1E || IOS_GetAbsTimeStruct(???) || ||
+
| 0x1E || int IOS_GetAbsTimeStruct(???) || || 0 on success
 
|-
 
|-
| 0x1F || || ||
+
| 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
 
|-
 
|-
| 0x20 || int check_otp() || Checks if the first word in bank 1 is 0x8000000 || 0 on success
+
| 0x20 || int get_key_type() || Gets the key type from the OTP (only 0 is valid) || 0 on success
 
|-
 
|-
 
| 0x21 || int check_jtag() || Get the current status of the JTAG || 0 if JTAG is enabled or -4 if disabled
 
| 0x21 || int check_jtag() || Get the current status of the JTAG || 0 if JTAG is enabled or -4 if disabled
Line 210: Line 210:  
| 0x40 || int IOS_IoctlvAsync(int fd, u32 request, u32 vector_count_in, u32 vector_count_out, struct iovec *vector, int queueid, ipcmessage *message) || Async implementation of IOS_Ioctlv || 0 on success
 
| 0x40 || int IOS_IoctlvAsync(int fd, u32 request, u32 vector_count_in, u32 vector_count_out, struct iovec *vector, int queueid, ipcmessage *message) || Async implementation of IOS_Ioctlv || 0 on success
 
|-
 
|-
| 0x41 || open_as_async(???) || ||
+
| 0x41 || int open_as_async(???) || ||
 
|-
 
|-
| 0x42 || write_as_async(???) || ||
+
| 0x42 || int write_as_async(???) || ||
 
|-
 
|-
| 0x43 || ipc_resume(???) || ||
+
| 0x43 || int ipc_resume(???) || ||
 
|-
 
|-
| 0x44 || ipc_suspend(???) || ||
+
| 0x44 || int ipc_suspend(???) || ||
 
|-
 
|-
| 0x45 || ipc_svcmsg(???) || ||
+
| 0x45 || int ipc_svcmsg(???) || ||
 
|-
 
|-
| 0x46 || ipc_resume_async(???) || ||
+
| 0x46 || int ipc_resume_async(???) || ||
 
|-
 
|-
| 0x47 || ipc_suspend_async(???) || ||
+
| 0x47 || int ipc_suspend_async(???) || ||
 
|-
 
|-
| 0x48 || ipc_svcmsg_async(???) || ||
+
| 0x48 || int ipc_svcmsg_async(???) || ||
 
|-
 
|-
 
| 0x49 || int IOS_ResourceReply(void *ipc_handle, u32 result) || Reply back through the IPC handle || 0 on success
 
| 0x49 || int IOS_ResourceReply(void *ipc_handle, u32 result) || Reply back through the IPC handle || 0 on success
 
|-
 
|-
| 0x4A || || ||
+
| 0x4A || int set_proc_unk_params(int pid, u32 param1, u32 param2, u32 param3) || Sets some unknown parameters on the specified process' internal structure || 0 on success
 
|-
 
|-
| 0x4B || || ||
+
| 0x4B || int get_proc_unk_params(int pid, u32 *out_buf1, u32 *out_buf2) || Gets some unknown parameters from the specified process' internal structure || 0 on success
 
|-
 
|-
| 0x4C || || ||
+
| 0x4C || int ahbMemFlush_wrapper(void *address) || Performs some additional checks and calls ahbMemFlush || 0 on success
 
|-
 
|-
| 0x4D || || ||
+
| 0x4D || int ahbMemFlush(void *address) || Performs AHB memory flushing || 0 on success
 
|-
 
|-
| 0x4E || || ||
+
| 0x4E || int ahbMemFlush_seq1(void *address) || Performs an unknown sequence associated with AHB memory flushing || 0 on success
 
|-
 
|-
| 0x4F || || ||
+
| 0x4F || int ahbMemFlush_seq2(void *address) || Performs an unknown sequence associated with AHB memory flushing || 0 on success
 
|-
 
|-
| 0x50 || IOS_ClearandEnable(???) || ||
+
| 0x50 || int IOS_ClearandEnable(int id) || Enables hardware interrupts (IRQs) for the specified device || 0 on success
 
|-
 
|-
 
| 0x51 || int access_iobuf_pool(int unk) || Unused || Always 0
 
| 0x51 || int access_iobuf_pool(int unk) || Unused || Always 0
Line 252: Line 252:  
| 0x55 || void iobuf_log_buffer_info() || Unused || Nothing
 
| 0x55 || void iobuf_log_buffer_info() || Unused || Nothing
 
|-
 
|-
| 0x56 || void *extend_iobuf(struct iobuf *iob, unsigned short num) || Extend the data in the buffer by num bytes || Returns a pointer to extended area
+
| 0x56 || void *extend_iobuf(struct iobuf *iob, unsigned short num) || Extend the data in the buffer by num bytes || Pointer to extended area
 
|-
 
|-
| 0x57 || void *IOS_PushIob(struct iobuf *iob, unsigned short num) || Move head pointer num bytes towards the buffer end || Returns old head pointer
+
| 0x57 || void *IOS_PushIob(struct iobuf *iob, unsigned short num) || Move head pointer num bytes towards the buffer end || Old head pointer
 
|-
 
|-
| 0x58 || void *IOS_PullIob(struct iobuf *iob, unsigned short num) || Move head pointer num bytes towards the buffer start || Returns old head pointer
+
| 0x58 || void *IOS_PullIob(struct iobuf *iob, unsigned short num) || Move head pointer num bytes towards the buffer start || Old head pointer
 
|-
 
|-
 
| 0x59 || int verify_iobuf(struct iobuf *iob) || Verify if the argument points to an iobuf || 0 on success
 
| 0x59 || int verify_iobuf(struct iobuf *iob) || Verify if the argument points to an iobuf || 0 on success
 
|-
 
|-
| 0x5A || || ||
+
| 0x5A || struct iobuf *copy_iobuf(struct iobuf *iob) || Copy an iobuf into the pool || Itself
 
|-
 
|-
| 0x5B || void IOS_InvalidateDCache(void *ptr, unsigned int len) || Invalidate data cache ||
+
| 0x5B || void IOS_InvalidateDCache(void *ptr, unsigned int len) || Invalidate data cache || Nothing
 
|-
 
|-
| 0x5C || void IOS_FlushDCache(void *ptr, unsigned int len) || Flush data cache ||
+
| 0x5C || void IOS_FlushDCache(void *ptr, unsigned int len) || Flush data cache || Nothing
 
|-
 
|-
| 0x5D || disable_memory_protection(???) || ||
+
| 0x5D || int disable_memory_protection(void *address) || Disables memory protection for the specified address || 0 on success
 
|-
 
|-
| 0x5E || || ||
+
| 0x5E || int get_unk_flags1(u32 *out_buf1, u16 *out_buf2) || Gets (u32*)out_buf1 = 0x03; (u16*)out_buf2 = 0x00 || 0 on success
 
|-
 
|-
| 0x5F || || ||
+
| 0x5F || int get_unk_flags2(u32 *out_buf1, u16 *out_buf2) || Gets (u32*)out_buf1 = 0x01; (u16*)out_buf2 = 0x00 || 0 on success
 
|-
 
|-
| 0x60 || || ||
+
| 0x60 || void* virt_to_phys(void *address) || Translate a virtual address to physical || The translated address
 
|-
 
|-
| 0x61 || IOS_CreateSemaphore(???) || ||
+
| 0x61 || int IOS_CreateSemaphore(???) || ||
 
|-
 
|-
| 0x62 || IOS_WaitSemaphore(???) || ||
+
| 0x62 || int IOS_WaitSemaphore(???) || ||
 
|-
 
|-
| 0x63 || IOS_SignalSemaphore(???) || ||
+
| 0x63 || int IOS_SignalSemaphore(???) || ||
 
|-
 
|-
| 0x64 || IOS_DestroySemaphore(???) || ||
+
| 0x64 || int IOS_DestroySemaphore(???) || ||
 
|-
 
|-
| 0x65 || || ||
+
| 0x65 || int flush_ipc_server() || Resets the HW_IPC_ARMCTRL register's flags || 0 on success
 
|-
 
|-
| 0x66 || || ||
+
| 0x66 || int set_bsp_ready() || Tells the IOSU that BSP is ready || 0 on success
 
|-
 
|-
| 0x67 || || ||
+
| 0x67 || int check_addr_range(void *address, u32 size, u32 rw_flags) || Checks an address range for read/write permissions || 0 on success
 
|-
 
|-
| 0x68 || get_ppc_log_region(???) || ||
+
| 0x68 || int get_ppc_log_region(int unk1, int unk2) || Gets the PPC log region, which can be either MEM2 or the IOSU global heap || 0 on success
 
|-
 
|-
 
| 0x69 || || ||
 
| 0x69 || || ||
 
|-
 
|-
| 0x6A || get_iop_cpu_utilization(???) || ||
+
| 0x6A || int get_iop_cpu_utilization(???) || || 0 on success
 
|-
 
|-
| 0x6B || || ||
+
| 0x6B || int get_thread_stack_info(int tid, u32 *out_buf) || Gets information on the specified thread's stack (0x00(out_buf) == sys stack base; 0x04(out_buf) == sys stack size (0x400); 0x08(out_buf) == sys stack used space; 0x0C(out_buf) == user stack base; 0x10(out_buf) == user stack size; 0x14(out_buf) == user stack used space) || 0 on success
 
|-
 
|-
| 0x6C || IOS_ThreadProfileCommand(???) || ||
+
| 0x6C || int IOS_ThreadProfileCommand(???) || || 0 on success
 
|-
 
|-
| 0x6D || get_thread_utilization(???) || ||
+
| 0x6D || int get_thread_utilization(???) || || 0 on success
 
|-
 
|-
 
| 0x6E || || ||
 
| 0x6E || || ||
Line 306: Line 306:  
| 0x70 || || ||
 
| 0x70 || || ||
 
|-
 
|-
| 0x71 || get_iobuf_utilization(???) || ||
+
| 0x71 || int get_iobuf_utilization(???) || || 0 on success
 
|-
 
|-
| 0x72 || get_message_utilization(???) || ||
+
| 0x72 || int get_message_utilization(???) || || 0 on success
 
|-
 
|-
| 0x73 || get_aggregate_resource_utilization(???) || ||
+
| 0x73 || int get_aggregate_resource_utilization(???) || || 0 on success
 
|-
 
|-
| 0x74 || get_per_process_resource_utilization(???) || ||
+
| 0x74 || int get_per_process_resource_utilization(???) || || 0 on success
 
|-
 
|-
| 0x75 || get_timer_utilization(???) || ||
+
| 0x75 || int get_timer_utilization(???) || || 0 on success
 
|-
 
|-
| 0x76 || get_semaphore_utilization(???) || ||
+
| 0x76 || int get_semaphore_utilization(???) || || 0 on success
 
|-
 
|-
| 0x77 || get_heap_profile(???) || ||
+
| 0x77 || int get_heap_profile(???) || || 0 on success
 
|-
 
|-
 
| 0x78 || || ||
 
| 0x78 || || ||
Line 332: Line 332:  
| 0x7D || || ||
 
| 0x7D || || ||
 
|-
 
|-
| 0x7E || || ||
+
| 0x7E || void ios_reset(int unk) || Resets the IOSU || Nothing
 
|-
 
|-
| 0x7F || panic(???) || ||
+
| 0x7F || void ios_panic(char *panic_desc, u32 panic_desc_size) || Issues a system panic (with optional description string) || Nothing
 
|-
 
|-
| 0x80 || crash(???) || ||
+
| 0x80 || || ||
 
|-
 
|-
| 0x81 || || ||
+
| 0x81 || void set_panic_behavior(int flag) || Changes the system behavior on panic (if flag is 0 -> crash on panic; if flag is 1 -> reset on panic; if flag is 2 -> reset EXI as well) || Nothing
 
|-
 
|-
| 0x82 || || ||
+
| 0x82 || int set_syslog_buffer(void *log_buf) || Sets up the system log buffer in the IOSU heap || 0 on success
 
|-
 
|-
| 0x83 || || ||
+
| 0x83 || int load_ppc_kernel(u32 address, u32 size) || Maps the PPC kernel image memory (address == 0x08000000; size == 0x00120000) || 0 on success
 
|-
 
|-
| 0x84 || || ||
+
| 0x84 || int load_ppc_user_space(int mem_id, int unk1, int unk2, u32 size, u32 address) || Maps the PPC user space memory (mem_id == 0x02; unk1 == 0x00; unk2 == 0x00; size == 0xA8000000; address == 0x28000000) || 0 on success
 
|-
 
|-
| 0x85 || || ||
+
| 0x85 || int set_security_level(int level) || Sets the master title security level (0x1E is normal; 0x0A is TEST; 0x14 is unknown) || 0 on success
 
|-
 
|-
| 0x86 || || ||
+
| 0x86 || int get_security_level() || Gets the master title security level || The security level
 
|-
 
|-
| 0x87 || int get_open_handles(int out_count, void *out_buffer, int pid) || Finds open resource handles for the specified pid (out_buffer receives out_count * 0x2C bytes structures with the handle number, handle path and more) || 0 on success
+
| 0x87 || int get_open_resource_handles(int out_count, void *out_buffer, int pid) || Finds open resource handles for the specified pid (out_buffer receives out_count * 0x2C bytes structures with the handle number, handle path and more) || 0 on success
 
|-
 
|-
| 0x88 || || ||
+
| 0x88 || int set_main_title_sdk_version(int version) || Sets the master title's SDK/kernel version || 0 on success
 
|-
 
|-
| 0x89 || || ||
+
| 0x89 || int get_main_title_sdk_version() || Gets the master title's SDK/kernel version || The SDK/kernel version
 
|-
 
|-
| 0x8A || get_dynamic_heap_access(???) || ||
+
| 0x8A || int get_dynamic_heap_access(???) || || 0 on success
 
|-
 
|-
| 0x8B || || ||
+
| 0x8B || int start_gpu_config_validation(void *out_buf, u32 size, int queue_id, int unk) || Validates the current GPU configuration using a message queue. Sends a pointer that is populated by the IOSU with the GPU configuration parameters (using GPIO) || 0 on success
 
|-
 
|-
| 0x8C || || ||
+
| 0x8C || int finish_gpu_config_validation(int queue_id, bool do_panic) || Resets the buffer sent to the IOSU and invalidates the associated queue ID. Also looks for any errors raised due to a bad configuration state and throws a panic if specifically told to do so || 0 on success
 
|-
 
|-
| 0x8D || || ||
+
| 0x8D || int return_null() || Unused || Always 0
 
|-
 
|-
| 0x8E || get_resource_violations(???) || ||
+
| 0x8E || int get_resource_violations(???) || || 0 on success
 
|-
 
|-
| 0x8F || || ||
+
| 0x8F || int device_get_client_handles(char *dev_node) || Returns the number of client handles created in the specified dev node || The number of active client handles
 
|-
 
|-
| 0x90 || || ||
+
| 0x90 || int device_disable_registration(bool do_disable) || Prevents any future dev node from being registered || An error code (0xFFFFFFE3)
 
|-
 
|-
| 0x91 || get_pending_resource_requests(???) || ||
+
| 0x91 || int get_pending_resource_requests(???) || || 0 on success
 
|-
 
|-
 
| 0x92 || || ||
 
| 0x92 || || ||
 
|-
 
|-
| 0x93 || || ||
+
| 0x93 || void exi_reset() || Resets the EXI for the PPC side || Nothing
 
|}
 
|}
  
108

edits

Navigation menu