HIPC: Difference between revisions
|  Split up HIPC and CMIF |  Document ReceiveListOffset field of HIPC header | ||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| HIPC (Horizon Inter-Process Communication) is a custom IPC implementation tailored for the Horizon OS. | HIPC (Horizon Inter-Process Communication) is a custom IPC implementation tailored for the Horizon OS. | ||
| =  | There are two protocols over [[#HIPC|HIPC]]: | ||
| * [[#CMIF|CMIF]]: Command Interface (?). Supports session management with domains and dynamic multiplexing of services. | |||
| * [[#TIPC|TIPC]]: Tiny IPC. Simple and lightweight protocol. | |||
| [[#CMIF|CMIF]] is universally used for virtually almost all Switch services. [[#TIPC|TIPC]] is only used by the [[Services_API|Service Manager]] and [[PGL_services|pgl]]. | |||
| = HIPC = | |||
| This is a buffer located in the [[Thread Local Region]]. | This is a buffer located in the [[Thread Local Region]]. | ||
| Line 129: | Line 136: | ||
| |- | |- | ||
| | 0-9 | | 0-9 | ||
| | RawCount | | RawCount (number of 32-bit words in RawData) | ||
| |- | |- | ||
| | 10-13 | | 10-13 | ||
| | ReceiveListCount | | ReceiveListCount | ||
| |- | |- | ||
| | 14- | | 14-19 | ||
| | Reserved | | Reserved | ||
| |- | |||
| | 20-30 | |||
| | ReceiveListOffset | |||
| |- | |- | ||
| | 31 | | 31 | ||
| Line 357: | Line 367: | ||
| == RawData == | == RawData == | ||
| Depending on the protocol, either [[#CMIF|CMIF]] or [[#TIPC|TIPC]] data is used here. | |||
| = CMIF  | = CMIF = | ||
| == Raw Data == | == Raw Data == | ||
| [[File:Ipc msg buffer type a example.png|thumb|An example of an IPC message with a type 0xA (OutPointer) buffer in it. Red is headers/descriptors, yellow is padding, and blue is data/buffer lengths. Note that the size of the u16 array for type 0xA lengths is padded to fill up a whole word.]] | [[File:Ipc msg buffer type a example.png|thumb|An example of an IPC message with a type 0xA (OutPointer) buffer in it. Red is headers/descriptors, yellow is padding, and blue is data/buffer lengths. Note that the size of the u16 array for type 0xA lengths is padded to fill up a whole word.]] | ||
| Line 597: | Line 608: | ||
| | HipcMove | | HipcMove | ||
| |} | |} | ||
| = TIPC = | |||
| TIPC (Tiny IPC) is a simpler protocol than CMIF. It has no concept of domains, so it cannot support multiple objects per session. It is only used in the Service Manager. | |||
| == MessageType == | |||
| In TIPC, the request ID is stored in the lowest 16 bits of [[#Header0Tag|Header0Tag]]. | |||
| == RawData == | |||
| In TIPC, [[#RawData|RawData]] field directly contains the payload. | |||
| = Server = | = Server = | ||