HIPC: Difference between revisions
Misson20000 (talk | contribs) No edit summary |
|||
Line 15: | Line 15: | ||
| 0 || 31-28 || Number of buf W desciptors (each: 3 words), never observed. | | 0 || 31-28 || Number of buf W desciptors (each: 3 words), never observed. | ||
|- | |- | ||
| 1 || 9-0 || | | 1 || 9-0 || Size of raw data section in u32s. | ||
|- | |- | ||
| 1 || 13-10 || Flags for buf C descriptor. | | 1 || 13-10 || Flags for buf C descriptor. | ||
Line 21: | Line 21: | ||
| 1 || 31 || Enable handle descriptor. | | 1 || 31 || Enable handle descriptor. | ||
|- | |- | ||
| ... || || Handle descriptor, if enabled. | | ... || || [[#Handle descriptor|Handle descriptor]], if enabled. | ||
|- | |- | ||
| ... || || Buf X descriptors, each one 2 words. | | ... || || [[#Buffer descriptor X "Pointer"|Buf X descriptors]], each one 2 words. | ||
|- | |- | ||
| ... || || Buf A descriptors, each one 3 words. | | ... || || [[#Buffer descriptor A/B/W "Send"/"Receive"/"Exchange"|Buf A descriptors]], each one 3 words. | ||
|- | |- | ||
| ... || || Buf B descriptors, each one 3 words. | | ... || || [[#Buffer descriptor A/B/W "Send"/"Receive"/"Exchange"|Buf B descriptors]], each one 3 words. | ||
|- | |- | ||
| ... || || Type W descriptors, each one 3 words. | | ... || || [[#Buffer descriptor A/B/W "Send"/"Receive"/"Exchange"|Type W descriptors]], each one 3 words. | ||
|- | |- | ||
| ... || || Raw data (including | | ... || || [[#Raw_data_section|Raw data section]] (including padding before and after aligned data section). | ||
|- | |- | ||
| ... || || Buf C descriptors, each one 2 words. | | ... || || [[#Buffer descriptor C "ReceiveList"|Buf C descriptors]], each one 2 words. | ||
|} | |} | ||
Line 112: | Line 112: | ||
|} | |} | ||
== Raw data | == Raw data section == | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Word || Description | ! Word || Description | ||
|- | |- | ||
| ... || Padding to align to 16 | | ... || Padding to align to 16 bytes. | ||
|- | |||
| ... || If sent to an object domain, a [[#Domain_message|domain message]], otherwise a [[#Data payload|data payload]] | |||
|- | |||
| ... || Padding | |||
|} | |||
The total amount of padding within the raw data section is always 0x10 bytes. This means that if no padding is required before the message, there will be 0x10 bytes of padding after the message (before the C descriptors). The length of the message can be calculated as the length of the raw data section - 0x10 bytes, | |||
=== Domain message === | |||
This header is used to wrap up requests sent to domains instead of sessions. | |||
{| class="wikitable" border="1" | |||
! Word || Bits || Description | |||
|- | |||
| 0 || 7-0 || Command. 1=send message, 2=close virtual handle | |||
|- | |- | ||
| | | 0 || 31-16 || Length of [[IPC_Marshalling#Data_payload|data payload]] in bytes. | ||
|- | |- | ||
| | | 1 || || Object ID (from cmd 0 in [[IPC_Marshalling#Control|Control]]). | ||
|- | |- | ||
| | | 2 | ||
|rowspan="2"| | |||
|rowspan="2"| Padding to align to u64 | |||
|- | |- | ||
| | | 3 | ||
|- | |- | ||
| ... || | | 4... || || [[#Data payload|Data payload]] | ||
|} | |} | ||
=== | === Data payload === | ||
This is an | |||
This is an array of u32's, but individual parameters are generally stored as u64's. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Word | ! Word || Description | ||
|- | |- | ||
| 0 || | | 0 || Magic ("SFCI" for requests, "SFCO" for responses) as u64. | ||
|- | |- | ||
| | | 2 || Command id as u64 for requests, [[Error_codes|error code]] as u64 for responses. | ||
|- | |- | ||
| | | 4... || Input parameters or return values | ||
|} | |} | ||