L4Re/departure

Annotated libsystypes/idl/region_mapper.idl

546:63966fe83b5b
19 months ago Paul Boddie Added a reference to the L4Re code describing the interface.
paul@181 1
#include <l4/re/protocols.h>  /* L4RE_PROTO_RM */
paul@419 2
#include <systypes/base.h>    /* address_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@181 14
                          in map_flags_t flags, in cap ds,
paul@181 15
                          in address_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@181 18
     of the given size. Return the start address, region size and dataspace. */
paul@181 19
paul@419 20
  [opcode(1)] void detach(in address_t addr, in address_t size,
paul@181 21
                          in map_flags_t flags, out address_t start,
paul@419 22
                          out address_t rsize, out cap ds);
paul@181 23
paul@181 24
  /* Find a region starting from the given address and having the given size.
paul@181 25
     Return the start address, region size and dataspace. */
paul@181 26
paul@419 27
  [opcode(2)] void find(inout address_t addr, inout address_t size,
paul@181 28
                        out map_flags_t flags, out address_t offset,
paul@181 29
                        out cap ds);
paul@181 30
paul@181 31
  /* Reserve an area in the region map. */
paul@181 32
paul@419 33
  [opcode(3)] void reserve_area(inout address_t start, in address_t size,
paul@181 34
                                in map_flags_t flags, in unsigned char align);
paul@181 35
paul@181 36
  /* Free (or unreserve) an area in the region map. */
paul@181 37
paul@181 38
  [opcode(4)] void free_area(in address_t addr);
paul@181 39
paul@181 40
  /* Currently not fully supported by the interface generator...
paul@181 41
paul@181 42
  [opcode(5)] void get_regions(in address_t start, out Region[] regions);
paul@181 43
paul@181 44
  [opcode(6)] void get_areas(in address_t start, out Area[] areas);
paul@181 45
paul@181 46
  See pkg/l4re-core/l4re/include/rm for the Region and Area structures. */
paul@181 47
};