1 #include <l4/re/protocols.h> /* L4RE_PROTO_RM */ 2 #include <systypes/base.h> /* address_t, rm_flags_t, rm_offset_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 rm_flags_t flags, in cap ds, 15 in rm_offset_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 Note that the dataspace is returned as an index, not an actual capability. 20 21 See: pkg/l4re-core/l4re/include/rm 22 See: pkg/l4re-core/l4sys/include/cxx/ipc_iface 23 24 This is not obvious from the L4Re definitions and the IPC type system. */ 25 26 [opcode(1)] void detach(in address_t addr, in address_t size, 27 in rm_flags_t flags, out address_t start, 28 out address_t rsize, out l4_cap_idx_t ds); 29 30 /* Find a region starting from the given address and having the given size. 31 Return the start address, region size and dataspace. */ 32 33 [opcode(2)] void find(inout address_t addr, inout address_t size, 34 out rm_flags_t flags, out rm_offset_t offset, 35 out cap ds); 36 37 /* Reserve an area in the region map. */ 38 39 [opcode(3)] void reserve_area(inout address_t start, in address_t size, 40 in rm_flags_t flags, in unsigned char align); 41 42 /* Free (or unreserve) an area in the region map. */ 43 44 [opcode(4)] void free_area(in address_t addr); 45 46 /* Currently not fully supported by the interface generator... 47 48 [opcode(5)] void get_regions(in address_t start, out Region[] regions); 49 50 [opcode(6)] void get_areas(in address_t start, out Area[] areas); 51 52 See pkg/l4re-core/l4re/include/rm for the Region and Area structures. */ 53 };