Changes

Jump to navigation Jump to search
938 bytes added ,  18:56, 30 October 2018
Line 233: Line 233:  
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 buffer type 0xA lengths).
 
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 buffer type 0xA lengths).
   −
=== Domain message ===
+
=== Domains ===
This header is used to wrap up requests sent to domains instead of sessions.
+
Because the switch has relatively low limits on the total number of sessions available to the system (Kernel slabheap limits, sysmodule handle table size limits), HIPC supports a "Domains" feature that allows multiplexing multiple service sessions through a single handle. Domains store (effectively) a mapping from u32 object id to a SharedPointer<IServiceObject> -- When messages are sent to a domain, an extra header is sent in the raw data section (before anything else) with information about what object in the domain is being acted on; responses similarly contain an additional header. Official session code implements this by just using the dispatch table for the object in the map with the appropriate ID, instead of the dispatch table the session was initialized with.
    +
Format for the extra request header for domain message:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
! Word || Bits || Description
 
! Word || Bits || Description
Line 254: Line 255:  
|-
 
|-
 
| ... || || Input object IDs (u32s, not aligned)
 
| ... || || Input object IDs (u32s, not aligned)
 +
|}
 +
 +
Format for the extra response header for domain message:
 +
{| class="wikitable" border="1"
 +
! Word || Bits || Description
 +
|-
 +
| 0 || 31-0 || Output object count
 +
|-
 +
| 1-3 || || Padding
 +
|-
 
|}
 
|}
  

Navigation menu