IOSP

From WiiBrew
Jump to navigation Jump to search

IOSP is a set of threads built into the IOS kernel that loads modules from other ELF sections, and sets up several Broadway functions, such as crypto-related devices and the IPC server. While it has its own $IOSVersion tag, it is not a separate module.

IOSP creates several crypto devices to access the corresponding syscalls from the Broadway, and it forwards IPC messages to the IPC system within IOS.

MIOS has a single $IOSVersion tag for a module called "IOS." It is possible that the P in IOSP has the same meaning as the P in ESP, FSP, and FFSP, and IOSP simply refers to the entire kernel. It is not clear what the P means, or how those modules differ from the non-P modules, although the P modules tend to be in newer IOSes.

Devices

IPC server

The IPC server runs as a single thread with PID 0xF that receives a dummy IOSRequest with cmd 9 every time a message is received from the Broadway. The IPC server then calls the async version of the call (even if the request itself is not async; the async part of the request is handled on the Broadway side. Note that while this generally allows two requests to be sent at once, IOS_OpenAsync still blocks, meaning no requests can be made until IOS_Open returns.

This async call is set to return to the same message queue where IPC notifications from the Broadway are placed. All return messages in this queue have cmd 8 due to that being the cmd for IPC_REPLY; the message is directly sent to the Broadway.