L4Re/departure

Annotated libsystypes/idl/region_mapper.idl

181:49d8e9637cdb
2021-08-25 Paul Boddie Introduced various external packages into this distribution. Some small changes were made to Control files upon discovering build issues, and libext2fs/lib/Makefile was adjusted to enforce build ordering.
paul@181 1
#include <l4/re/protocols.h>  /* L4RE_PROTO_RM */
paul@181 2
#include <systypes/base.h>    /* address_t, offset_t */
paul@181 3
paul@181 4
/* A region mapper/manager interface. */
paul@181 5
paul@181 6
[protocol(L4RE_PROTO_RM)]
paul@181 7
interface RegionMapper
paul@181 8
{
paul@181 9
  /* Attach the memory associated with a dataspace, employing the given start
paul@181 10
     address to search for a suitable address for the region. */
paul@181 11
paul@181 12
  [opcode(0)] void attach(inout address_t start, in offset_t size,
paul@181 13
                          in map_flags_t flags, in cap ds,
paul@181 14
                          in address_t offset, in unsigned char align);
paul@181 15
paul@181 16
  /* Detach memory from the task, searching from the given address for a region
paul@181 17
     of the given size. Return the start address, region size and dataspace. */
paul@181 18
paul@181 19
  [opcode(1)] void detach(in address_t addr, in offset_t size,
paul@181 20
                          in map_flags_t flags, out address_t start,
paul@181 21
                          out offset_t rsize, out cap ds);
paul@181 22
paul@181 23
  /* Find a region starting from the given address and having the given size.
paul@181 24
     Return the start address, region size and dataspace. */
paul@181 25
paul@181 26
  [opcode(2)] void find(inout address_t addr, inout offset_t size,
paul@181 27
                        out map_flags_t flags, out address_t offset,
paul@181 28
                        out cap ds);
paul@181 29
paul@181 30
  /* Reserve an area in the region map. */
paul@181 31
paul@181 32
  [opcode(3)] void reserve_area(inout address_t start, in offset_t size,
paul@181 33
                                in map_flags_t flags, in unsigned char align);
paul@181 34
paul@181 35
  /* Free (or unreserve) an area in the region map. */
paul@181 36
paul@181 37
  [opcode(4)] void free_area(in address_t addr);
paul@181 38
paul@181 39
  /* Currently not fully supported by the interface generator...
paul@181 40
paul@181 41
  [opcode(5)] void get_regions(in address_t start, out Region[] regions);
paul@181 42
paul@181 43
  [opcode(6)] void get_areas(in address_t start, out Area[] areas);
paul@181 44
paul@181 45
  See pkg/l4re-core/l4re/include/rm for the Region and Area structures. */
paul@181 46
};