Line 132:
Line 132:
| 0x19 || IOS_GetUpTimeStruct(???) || ||
| 0x19 || IOS_GetUpTimeStruct(???) || ||
|-
|-
−
| 0x1A || IOS_GetUpTime64(???) || ||
+
| 0x1A || int IOS_GetUpTime64(u64 *out_buf) || Returns the current time in wide format || 0 on success
|-
|-
−
| 0x1B || || ||
+
| 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 || IOS_GetAbsTimeCalendar(???) || ||
Line 164:
Line 164:
| 0x29 || void IOS_Free(int heapid, void *ptr) || Release allocated memory back to the heap || 0 on success
| 0x29 || void IOS_Free(int heapid, void *ptr) || Release allocated memory back to the heap || 0 on success
|-
|-
−
| 0x2A || || ||
+
| 0x2A || void heap_free_and_clear(int heapid, void *ptr) || Same as IOS_Free, but clears the contents of ptr || 0 on success
|-
|-
−
| 0x2B || || ||
+
| 0x2B || int heap_expand(int heapid, void *ptr, u32 size) || Expands an allocated memory block by size bytes || 0 on success
|-
|-
| 0x2C || int device_register(const char* device, int queueid) || Registers device to the device tree, so it can be opened (from ARM and PPC) || 0 on success
| 0x2C || int device_register(const char* device, int queueid) || Registers device to the device tree, so it can be opened (from ARM and PPC) || 0 on success
|-
|-
−
| 0x2D || || ||
+
| 0x2D || int device_associate(const char* device, int internal_id) || Associates a device to the specified internal IOS ID || 0 on success
|-
|-
−
| 0x2E || || ||
+
| 0x2E || int device_set_flags(const char* device, u32 flags) || Sets some flags in the device's internal structure || 0 on success
|-
|-
−
| 0x2F || || ||
+
| 0x2F || int set_client_capabilities(int client_pid, int feature_id, u32 *masks) || Sets the client's capability masks/permissions (can only be called by MCP) || 0 on success
|-
|-
−
| 0x30 || || ||
+
| 0x30 || int clear_client_capabilities(int client_pid) || Clears the client's capability masks/permissions (can only be called by MCP) || 0 on success
|-
|-
−
| 0x31 || || ||
+
| 0x31 || int query_client_capabilities(int client_pid, int feature_id, void *out_buffer) || Gets the client's capability masks/permissions (out_buffer gets 0x08 bytes; mask1 and mask2) || 0 on success
|-
|-
−
| 0x32 || int query_featureid(int featureid, int out_size, void *out_buffer) || ||
+
| 0x32 || int query_feature_id(int feature_id, int out_count, void *out_buffer) || Retrieves information associated with a feature_id (out_buffer receives out_count * 0x34 bytes structures with the client pid, busy close violations count, active TXN count and open handles count) || 0 on success
|-
|-
| 0x33 || int IOS_Open(const char* device, int mode) || Similar to IOS_Open on PPC, except now internal to the IOSU system || Returns an fd or error (negative)
| 0x33 || int IOS_Open(const char* device, int mode) || Similar to IOS_Open on PPC, except now internal to the IOSU system || Returns an fd or error (negative)
Line 350:
Line 350:
| 0x86 || || ||
| 0x86 || || ||
|-
|-
−
| 0x87 || || ||
+
| 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
|-
|-
| 0x88 || || ||
| 0x88 || || ||