Line 191:
Line 191:
| 2b || IOSError SetUid(u32 pid, u32 uid) || Set the UID for a process (PID <= 0x13). This can only be used from the kernel or ES. || IPC_SUCCESS on success, IPC_EACCES (permission denied if current PID > 0x1) or IPC_EINVAL (invalid PID)
| 2b || IOSError SetUid(u32 pid, u32 uid) || Set the UID for a process (PID <= 0x13). This can only be used from the kernel or ES. || IPC_SUCCESS on success, IPC_EACCES (permission denied if current PID > 0x1) or IPC_EINVAL (invalid PID)
|-
|-
−
| 2c || u32 GetUid() || Get the UID for the active process (based on the thread PID). || UID (u32)
+
| 2c || IOSUid GetUid(void) || Get the UID for the active process (based on the thread PID). || UID (u32)
|-
|-
| 2d || IOSError SetGid(u32 pid, u16 gid) || Set the GID for a process (PID <= 0x13). This can only be used from the kernel or ES. || IPC_SUCCESS on success, IPC_EACCES (permission denied if current PID > 0x1) or IPC_EINVAL (invalid PID)
| 2d || IOSError SetGid(u32 pid, u16 gid) || Set the GID for a process (PID <= 0x13). This can only be used from the kernel or ES. || IPC_SUCCESS on success, IPC_EACCES (permission denied if current PID > 0x1) or IPC_EINVAL (invalid PID)
|-
|-
−
| 2e || u16 GetGid() || Get the GID for the active process (based on the thread PID). || GID (u16)
+
| 2e || IOSGid GetGid(void) || Get the GID for the active process (based on the thread PID). || GID (u16)
|-
|-
| 2f || int ahbMemFlush(int ahb_dev)
| 2f || int ahbMemFlush(int ahb_dev)
Line 201:
Line 201:
| 30 || syscall_ahbMemFlush_wrapper
| 30 || syscall_ahbMemFlush_wrapper
|-
|-
−
| 31 || int enable_irq_iop() || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for device 31 ([[Hardware/IPC|IPC (Starlet)]]) (can only be used from the kernel or ES) || 0 on success, -4 for no permission.
+
| 31 || IOSError ClearAndEnableIPCIOPIntr(void) || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for device 31 ([[Hardware/IPC|IPC (Starlet)]]) (can only be used from the kernel or ES) || 0 on success, -4 for no permission.
|-
|-
−
| 32 || int enable_irq_di() || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for device 18 ([[Hardware/Drive Interface|DI]]) (can only be used from DI) || 0 on success, -4 for no permission
+
| 32 || IOSError ClearAndEnableDIIntr(void) || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for device 18 ([[Hardware/Drive Interface|DI]]) (can only be used from DI) || 0 on success, -4 for no permission
|-
|-
−
| 33 || int enable_irq_sdhc(int id) || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for device 7 ([[Hardware/SD Host Controller|SDHC]] - must be SDI) if id==0, else device 8 ([[Hardware/802.11 Wireless|802.11 Wireless]] - must be WL) || 0 on success, -4 for no permission
+
| 33 || IOSError ClearAndEnableSDIntr(u8 hc) || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for device 7 ([[Hardware/SD Host Controller|SDHC]] - must be SDI) if hc==0, else device 8 ([[Hardware/802.11 Wireless|802.11 Wireless]] - must be WL) || 0 on success, -4 for no permission
|-
|-
−
| 34 || int enable_irq(int id) || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for the given device, with PID requirements (this is also used to syscalls 31 through 33):
+
| 34 || IOSError ClearAndEnableEvent(IOSEvent event) || Enables [[Hardware/Hollywood IRQs|hardware interrupts]] for the given device, with PID requirements (this is also used to syscalls 31 through 33):
{| class="wikitable"
{| class="wikitable"
! id !! PID
! id !! PID
Line 231:
Line 231:
| 0 on success, -1 for unknown IRQ (not in that table), -4 for no permission
| 0 on success, -1 for unknown IRQ (not in that table), -4 for no permission
|-
|-
−
| 35 || access_iobuf_pool(arg1) || no-op in IOS-35, arg1=0 || returns always 0
+
| 35 || IOSError AccessIobPool(u32 pool) || no-op in IOS-35, arg1=0 || returns always 0
|-
|-
| 36 || [[IOS/IoBuffer|struct iobuf]] *alloc_iobuf(arg1, sbuf) || allocate an iobuf, arg1=0 (unknown), sbuf = buffer size || return NULL on error
| 36 || [[IOS/IoBuffer|struct iobuf]] *alloc_iobuf(arg1, sbuf) || allocate an iobuf, arg1=0 (unknown), sbuf = buffer size || return NULL on error
Line 304:
Line 304:
| 56 || IOSError ACRRegWrite(u32 offset, u32 value) || Set gpio reg to value (can only be called from STM) || 0 on success, -1 on error
| 56 || IOSError ACRRegWrite(u32 offset, u32 value) || Set gpio reg to value (can only be called from STM) || 0 on success, -1 on error
|-
|-
−
| 57 || IOSError DDRRegWrite(u32 offset, u32 value) || Writes a 16-bit value to the specified Memory Controller register. Can only be called from the STM module. || Returns 0 on success, -1 on error.
+
| 57 || IOSError DDRRegWrite(u32 offset, u32 value) || Writes a 32-bit value to the specified Memory Controller register. Can only be called from the STM module. || Returns 0 on success, -1 on error.
|-
|-
| 58 || void OutputLed(u8 value) || Set [[Hardware/Hollywood GPIOs|GPIO]] lines 16-23 (DEBUG0-7, the [[debug port]]) to the provided value.
| 58 || void OutputLed(u8 value) || Set [[Hardware/Hollywood GPIOs|GPIO]] lines 16-23 (DEBUG0-7, the [[debug port]]) to the provided value.