]> git.buserror.net Git - polintos/scott/priv.git/blob - doc/orb/parameter-info-block
Lots of stuff.
[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, in IDs
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.  The IDs themselves are 32 bits each, unsigned,
23       regardless of the pointer size.
24
25    num_segments  3       Number of data segments
26    segment.ptr   4+n*4   Pointer to data segment
27    segment.len   5+n*4   Length of data segment in bytes
28    segment.flags 6+n*4   Attributes of data segment
29    reserved      7+n*4   Reserved for future use, and for
30                          power-of-two indexing
31    
32       Each segment describes data being transmitted to and/or from the
33       callee.  For out segments, the caller may designate a buffer to hold
34       the data, or it may leave the ptr field NULL.  The caller may
35       replace an out segment pointer with its own (it must do this if it
36       was NULL), and it may change the length of the segment.  Except when
37       flags such as Push or Shared force the kernel to map, rather than
38       copy, the data, it will choose which method to use based on the
39       size, page-alignment, and overmap status of the segment.
40
41 Segment Flags (see doc/orb/memory-management for more details):
42    In            0x01    Data is copied/mapped from caller to callee.
43    Out           0x02    Data is copied/mapped from callee to caller.
44    Shared        0x04    A permanent shared mapping is created.
45    Push          0x08    The region is unmapped from the source and
46                          transferred to the destination.
47    Inline        0x10    The callee cannot change the length of an
48                          Out segment.  Ignored for In segments.
49    Immutable     0x20    The segment is to be mapped read-only in
50                          the destination.  Ignored unless Shared is
51                          set.
52    Copy        0x8000    The segment is permanently copied into the
53                          destination address space, with read/write
54                          access.