1 #include <l4/re/protocols.h> /* L4RE_PROTO_RM */ 2 #include <systypes/base.h> /* address_t */ 3 4 /* A region mapper/manager interface. 5 See: pkg/l4re-core/l4re/util/include/region_mapping_svr_2 */ 6 7 [protocol(L4RE_PROTO_RM)] 8 interface RegionMapper 9 { 10 /* Attach the memory associated with a dataspace, employing the given start 11 address to search for a suitable address for the region. */ 12 13 [opcode(0)] void attach(inout address_t start, in address_t size, 14 in map_flags_t flags, in cap ds, 15 in address_t offset, in unsigned char align); 16 17 /* Detach memory from the task, searching from the given address for a region 18 of the given size. Return the start address, region size and dataspace. */ 19 20 [opcode(1)] void detach(in address_t addr, in address_t size, 21 in map_flags_t flags, out address_t start, 22 out address_t rsize, out cap ds); 23 24 /* Find a region starting from the given address and having the given size. 25 Return the start address, region size and dataspace. */ 26 27 [opcode(2)] void find(inout address_t addr, inout address_t size, 28 out map_flags_t flags, out address_t offset, 29 out cap ds); 30 31 /* Reserve an area in the region map. */ 32 33 [opcode(3)] void reserve_area(inout address_t start, in address_t size, 34 in map_flags_t flags, in unsigned char align); 35 36 /* Free (or unreserve) an area in the region map. */ 37 38 [opcode(4)] void free_area(in address_t addr); 39 40 /* Currently not fully supported by the interface generator... 41 42 [opcode(5)] void get_regions(in address_t start, out Region[] regions); 43 44 [opcode(6)] void get_areas(in address_t start, out Area[] areas); 45 46 See pkg/l4re-core/l4re/include/rm for the Region and Area structures. */ 47 };