L4Re/departure

Annotated libsystypes/idl/region_mapper.idl

631:ff536e5b5cf6
8 months ago Paul Boddie Introduced distinct region mapper flags and offset types.
paul@181 1
#include <l4/re/protocols.h>  /* L4RE_PROTO_RM */
paul@631 2
#include <systypes/base.h>    /* address_t, rm_flags_t, rm_offset_t */
paul@181 3
paul@546 4
/* A region mapper/manager interface.
paul@546 5
   See: pkg/l4re-core/l4re/util/include/region_mapping_svr_2 */
paul@181 6
paul@181 7
[protocol(L4RE_PROTO_RM)]
paul@181 8
interface RegionMapper
paul@181 9
{
paul@181 10
  /* Attach the memory associated with a dataspace, employing the given start
paul@181 11
     address to search for a suitable address for the region. */
paul@181 12
paul@419 13
  [opcode(0)] void attach(inout address_t start, in address_t size,
paul@631 14
                          in rm_flags_t flags, in cap ds,
paul@631 15
                          in rm_offset_t offset, in unsigned char align);
paul@181 16
paul@181 17
  /* Detach memory from the task, searching from the given address for a region
paul@561 18
     of the given size. Return the start address, region size and dataspace.
paul@561 19
     Note that the dataspace is returned as an index, not an actual capability.
paul@561 20
paul@561 21
     See: pkg/l4re-core/l4re/include/rm
paul@561 22
     See: pkg/l4re-core/l4sys/include/cxx/ipc_iface
paul@561 23
paul@561 24
     This is not obvious from the L4Re definitions and the IPC type system. */
paul@181 25
paul@419 26
  [opcode(1)] void detach(in address_t addr, in address_t size,
paul@631 27
                          in rm_flags_t flags, out address_t start,
paul@561 28
                          out address_t rsize, out l4_cap_idx_t ds);
paul@181 29
paul@181 30
  /* Find a region starting from the given address and having the given size.
paul@181 31
     Return the start address, region size and dataspace. */
paul@181 32
paul@419 33
  [opcode(2)] void find(inout address_t addr, inout address_t size,
paul@631 34
                        out rm_flags_t flags, out rm_offset_t offset,
paul@181 35
                        out cap ds);
paul@181 36
paul@181 37
  /* Reserve an area in the region map. */
paul@181 38
paul@419 39
  [opcode(3)] void reserve_area(inout address_t start, in address_t size,
paul@631 40
                                in rm_flags_t flags, in unsigned char align);
paul@181 41
paul@181 42
  /* Free (or unreserve) an area in the region map. */
paul@181 43
paul@181 44
  [opcode(4)] void free_area(in address_t addr);
paul@181 45
paul@181 46
  /* Currently not fully supported by the interface generator...
paul@181 47
paul@181 48
  [opcode(5)] void get_regions(in address_t start, out Region[] regions);
paul@181 49
paul@181 50
  [opcode(6)] void get_areas(in address_t start, out Area[] areas);
paul@181 51
paul@181 52
  See pkg/l4re-core/l4re/include/rm for the Region and Area structures. */
paul@181 53
};