Changes

Jump to navigation Jump to search
954 bytes added ,  06:43, 19 July 2017
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 || Raw data size (in u32's).
+
| 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 any padding).
+
| ... || || [[#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 portion ==
+
== Raw data section ==
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 || 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
 
|-
 
|-
| ... || [[IPC_Marshalling#Domain_header|Domain header]] padded to 16 if required
+
| 0 || 31-16 || Length of [[IPC_Marshalling#Data_payload|data payload]] in bytes.
 
|-
 
|-
| +0 || Magic ("SFCI" for requests, "SFCO" for responses) as u64
+
| 1 || || Object ID (from cmd 0 in [[IPC_Marshalling#Control|Control]]).
 
|-
 
|-
| +2 || Cmd id as u64
+
  | 2
 +
  |rowspan="2"|
 +
  |rowspan="2"| Padding to align to u64
 
|-
 
|-
| ... || Input parameters
+
  | 3
 
|-
 
|-
| ... || Any u16 buffer sizes packed and aligned to 2 bytes
+
| 4... || || [[#Data payload|Data payload]]
 
|}
 
|}
   −
=== Domain header ===
+
=== Data payload ===
This is an optional header used to wrap up requests sent to domains instead of sessions.
+
 
 +
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 || Bits || Description
+
! Word || Description
 
|-
 
|-
| 0 || 15-0 || Always 1.
+
| 0 || Magic ("SFCI" for requests, "SFCO" for responses) as u64.
 
|-
 
|-
| 0 || 31-16 || Request size (0x10 bytes for SFCI magic and cmd ID, plus size of input parameters).
+
| 2 || Command id as u64 for requests, [[Error_codes|error code]] as u64 for responses.
 
|-
 
|-
| 1 || || Domain ID (from cmd 0 in [[IPC_Marshalling#Control|Control]]).
+
| 4... || Input parameters or return values
 
|}
 
|}
  
117

edits

Navigation menu