paul@181 | 1 | #include <l4/re/protocols.h> /* L4RE_PROTO_DATASPACE */ |
paul@410 | 2 | #include <systypes/base.h> /* map_address_t, offset_t */ |
paul@181 | 3 | |
paul@181 | 4 | /* A dataspace interface. */ |
paul@181 | 5 | |
paul@181 | 6 | [protocol(L4RE_PROTO_DATASPACE)] |
paul@181 | 7 | interface Dataspace |
paul@181 | 8 | { |
paul@420 | 9 | /* Map memory within a dataspace. |
paul@432 | 10 | NOTE: Using opcode_type to work around L4Re dataspace IPC issues. In |
paul@432 | 11 | principle, this workaround is unnecessary for AMD64 and MIPS32 |
paul@432 | 12 | because even in the latter case, the opcode will be followed by the |
paul@432 | 13 | 64-bit offset aligned to a 64-bit boundary. Here, both the structure |
paul@432 | 14 | used to interpret the message and the L4Re RPC framework agree. |
paul@432 | 15 | However, on IA32, the "alignment requirement" of the 64-bit offset is |
paul@432 | 16 | actually only 32 bits, meaning that the offset structure member will |
paul@432 | 17 | immediately follow the opcode, but the L4Re RPC framework seems to |
paul@432 | 18 | observe a different alignment regime. */ |
paul@181 | 19 | |
paul@420 | 20 | [opcode(0),opcode_type(l4_uint64_t)] void map(in offset_t offset, in map_address_t hot_spot, |
paul@380 | 21 | in map_flags_t flags, out fpage region); |
paul@181 | 22 | |
paul@181 | 23 | /* Clear a dataspace. */ |
paul@181 | 24 | |
paul@410 | 25 | [opcode(1)] void clear(in offset_t offset, in offset_t size); |
paul@181 | 26 | |
paul@181 | 27 | /* Obtain statistics about a dataspace. */ |
paul@181 | 28 | |
paul@181 | 29 | [opcode(2)] void info(out offset_t size, out map_flags_t flags); |
paul@181 | 30 | |
paul@181 | 31 | /* Copy data between dataspaces. */ |
paul@181 | 32 | |
paul@410 | 33 | [opcode(3)] void copy_in(in offset_t dest_offset, in cap source, |
paul@410 | 34 | in offset_t source_offset, in offset_t size); |
paul@181 | 35 | |
paul@181 | 36 | /* Allocate at least the given size at the given address in a dataspace. */ |
paul@181 | 37 | |
paul@410 | 38 | [opcode(6)] void allocate(in offset_t offset, in l4_size_t size); |
paul@181 | 39 | }; |