23#include <l4/bid_config.h>
48 if (((flags & F::Rights_mask) == Flags(0)) || (flags & F::Reserved))
51 long e = attach_t::call(c(), start, size, flags, mem, offs, align, mem.cap().cap());
56 if ((flags & (F::Eager_map | F::No_eager_map)) == F::Eager_map)
58 if (!(flags & F::No_eager_map) && mem.is_valid())
60 e = mem.cap()->map_region(offs, map_flags(flags), *start, *start + size,
72 long e = detach_t::call(c(), start, size, flags, rstart, rsize, mem_cap);
84 unsigned long sz = (1UL << order);
85 for (
unsigned long p = rstart; rsize; p += sz, rsize -= sz)
95 unsigned long m = sz << 1;
long get_areas(l4_addr_t start, L4::Ipc::Ret_array< Range > areas)
Return the list of areas whose starting addresses are higher or equal to start in the address space m...
long free_area(l4_addr_t addr)
Free an area from the region map.
long get_regions(l4_addr_t start, L4::Ipc::Ret_array< Range > regions)
Return the list of regions whose starting addresses are higher or equal to start in the address space...
long reserve_area(l4_addr_t *start, unsigned long size, Flags flags=Flags(0), unsigned char align=L4_PAGESHIFT) const noexcept
Reserve the given area in the region map.
long find(l4_addr_t *addr, unsigned long *size, Offset *offset, L4Re::Rm::Flags *flags, L4::Cap< Dataspace > *m) noexcept
Find a region given an address and size.
long attach(l4_addr_t *start, unsigned long size, Flags flags, L4::Ipc::Cap< Dataspace > mem, Offset offs=0, unsigned char align=L4_PAGESHIFT, L4::Cap< L4::Task > const task=L4::Cap< L4::Task >::Invalid) const noexcept
Attach a data space to a region.
int detach(l4_addr_t addr, L4::Cap< Dataspace > *mem, L4::Cap< L4::Task > const &task=This_task) const noexcept
Detach and unmap a region from the address space.
C++ interface for capabilities.
Capability type for RPC interfaces (see L4::Cap<T>).
unsigned long l4_addr_t
Address type.
unsigned long l4_cap_idx_t
Capability selector type.
@ L4_INVALID_CAP
Invalid capability selector.
l4_fpage_t l4_fpage(l4_addr_t address, unsigned int size, unsigned char rights) L4_NOTHROW
Create a memory flex page.
@ L4_FPAGE_RWX
Read-write-execute flex page.
l4_addr_t l4_round_page(l4_addr_t address) L4_NOTHROW
Round address up to the next page.
#define L4_LOG2_PAGESIZE
Number of bits used for page offset.
@ L4_FP_ALL_SPACES
Flag to tell the unmap operation to revoke permissions from all child mappings including the mapping ...
#define L4_UNLIKELY(x)
Expression is unlikely to execute.
#define L4_RPC_DEF(name)
Generate the definition of an RPC stub.
Common task related definitions.