37 Dataspace::__map(
unsigned long offset,
unsigned char *size,
unsigned long flags,
43 r = L4::Ipc::Rcv_fpage::mem(base, *size, 0);
46 long err = map_t::call(c(), offset, spot, flags, r, fp,
l4_utcb());
50 *size = fp.rcv_order();
64 while (min_addr < max_addr)
66 unsigned char order_mapped;
69 err = __map(offset, &order_mapped, flags, min_addr);
73 if (order > order_mapped)
76 min_addr += 1UL << order;
77 offset += 1UL << order;
79 if (min_addr >= max_addr)
102 return __map(offset, &order, flags, local_addr);
109 int err =
info(&stats);
119 int err =
info(&stats);
long map_region(l4_addr_t offset, unsigned long flags, l4_addr_t min_addr, l4_addr_t max_addr) const
Map a part of a dataspace completely.
unsigned long size() const
Get size of a dataspace.
long allocate(l4_addr_t offset, l4_size_t size)
Allocate a range in the dataspace.
l4_addr_t l4_round_page(l4_addr_t address) L4_NOTHROW
Round address up to the next page.
Information about the dataspace.
l4_addr_t l4_round_size(l4_umword_t value, unsigned char bits) L4_NOTHROW
Round value up to the next alignment with bits size.
l4_addr_t l4_trunc_page(l4_addr_t address) L4_NOTHROW
Round an address down to the next lower page boundary.
long copy_in(l4_addr_t dst_offs, L4::Ipc::Cap< Dataspace > src, l4_addr_t src_offs, unsigned long size)
Copy contents from another dataspace.
l4_addr_t l4_trunc_size(l4_addr_t address, unsigned char bits) L4_NOTHROW
Round an address down to the next lower flex page with size bits.
long clear(l4_addr_t offset, unsigned long size)
Clear parts of a dataspace.
long info(Stats *stats)
Get information on the dataspace.
#define L4_LOG2_PAGESIZE
Number of bits used for page offset.
#define L4_UNLIKELY(x)
Expression is unlikely to execute.
long phys(l4_addr_t offset, l4_addr_t &phys_addr, l4_size_t &phys_size)
Get the physical addresses of a dataspace.
unsigned char l4_fpage_max_order(unsigned char order, l4_addr_t addr, l4_addr_t min_addr, l4_addr_t max_addr, l4_addr_t hotspot=0)
Determine maximum flex page size of a region.
unsigned long l4_umword_t
Unsigned machine word.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
#define L4_RPC_DEF(name)
Generate the definition of an RPC stub.
long flags() const
Get flags of the dataspace.
long map(l4_addr_t offset, unsigned long flags, l4_addr_t local_addr, l4_addr_t min_addr, l4_addr_t max_addr) const
Request a flex-page mapping from the dataspace.
unsigned long l4_addr_t
Address type.
Generic RPC wrapper for L4 flex-pages.