]> git.buserror.net Git - polintos/scott/priv.git/blob - doc/orb/parameter-info-block
eeeb80095e0b3a6447861bbcc9b1254ee2d5653f
[polintos/scott/priv.git] / doc / orb / parameter-info-block
1 Parameter Info Block (PIB), all offsets in pointer-length words
2    Name          Offset  Meaning
3    buffer_size   0       Size of the destination buffer
4    
5       The total number of bytes in all of the segments that require a
6       buffer to be created in the destination address space.  This is
7       specified so that the kernel can allocate one large buffer for all
8       segments before traversing the segment list.  When returning from a
9       method, the buffer size only includes buffers allocated by the
10       caller; "inout" segments where the caller specified a non-NULL ptr,
11       and the callee did not increase the length, are not included
12       (because the kernel does not need to allocate a caller-side buffer
13       for them).  The kernel may throw an exception if the actual
14       size is greater than specified in this field.
15
16    objlist_ptr   1       Pointer to the object list
17    objlist_len   2       Length of the object list
18
19       The object list is a special segment that contains object IDs
20       rather than arbitrary data.  Each object ID will be translated
21       into the destination ID-space, allocating new IDs when
22       necessary.
23
24    num_segments  3       Number of data segments
25    segment.ptr   4+n*4   Pointer to data segment
26    segment.len   5+n*4   Length of data segment in bytes
27    segment.flags 6+n*4   Attributes of data segment
28    reserved      7+n*4   Reserved for future use, and to
29                          ensure power-of-two indexing
30    
31       Each segment describes data being transmitted to and/or from the
32       callee.  For out segments, the caller may designate a buffer to hold
33       the data, or it may leave the ptr field NULL.  The caller may
34       replace an out segment pointer with its own (it must do this if it
35       was NULL), and it may change the length of the segment.  Except when
36       flags such as Push or Shared force the kernel to map, rather than
37       copy, the data, it will choose which method to use based on the
38       size, page-alignment, and overmap status of the segment.
39
40 Segment Flags (see doc/orb/memory-management for more details):
41    In            0x01    Data is copied/mapped from caller to callee.
42    Out           0x02    Data is copied/mapped from callee to caller.
43    Shared        0x04    A permanent shared mapping is created.
44    Push          0x08    The region is unmapped from the source and
45                          transferred to the destination.
46    Inline        0x10    The callee cannot change the length of an
47                          Out segment.  Ignored for In segments.
48    Immutable     0x20    The segment is to be mapped read-only in
49                          the destination.  Ignored unless Shared is
50                          set.
51    Copy        0x8000    The segment is permanently copied into the
52                          destination address space, with read/write
53                          access.