218 L4_FPAGE_SPECIAL = 0,
229 L4_FPAGE_CONTROL_OFFSET_SHIFT = 10,
230 L4_FPAGE_CONTROL_MASK = ~0UL << L4_FPAGE_CONTROL_OFFSET_SHIFT,
464 L4_INLINE
unsigned long
512 L4_INLINE
unsigned long
557 L4_INLINE
unsigned char
584 L4_INLINE
unsigned long
590 L4_INLINE
unsigned long
599 return f.raw & L4_FPAGE_ADDR_MASK;
605 return f.raw & L4_FPAGE_ADDR_MASK;
610 __l4_fpage_generic(
unsigned long address,
unsigned int type,
611 unsigned int size,
unsigned char rights)
L4_NOTHROW;
614 __l4_fpage_generic(
unsigned long address,
unsigned int type,
615 unsigned int size,
unsigned char rights)
L4_NOTHROW
621 | ((address ) & L4_FPAGE_ADDR_MASK);
629 f.
raw = ((L4_FPAGE_TYPE_MASK | L4_FPAGE_SIZE_MASK | L4_FPAGE_ADDR_MASK) & src.raw)
637 return __l4_fpage_generic(address, L4_FPAGE_MEMORY, size, rights);
650 "Capability index does not fit into fpage.");
651 return __l4_fpage_generic(obj, L4_FPAGE_OBJ, order, rights);
663 return __l4_fpage_generic(0, 0, 0, 0);
676 return (snd_base & L4_FPAGE_CONTROL_MASK)
691 && (fa + (1UL <<
l4_fpage_size(fpage)) >= addr + (1UL << log2size));
694 L4_INLINE
unsigned char
706 if (base + (1UL << (order + 1)) - 1 > max_addr - 1)
709 mask = ~(~0UL << (order + 1));
710 if (hotspot == ~0UL || ((addr ^ hotspot) & mask))
#define L4_MWORD_BITS
Size of machine words in bits.
L4 compiler related defines.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_addr_t
Address type.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
@ L4_CAP_SHIFT
Capability index shift.
unsigned long l4_fpage_page(l4_fpage_t f) L4_NOTHROW
Return the page part from a flex page.
l4_fpage_t l4_obj_fpage(l4_cap_idx_t obj, unsigned int order, unsigned char rights) L4_NOTHROW
Create a kernel-object flex page.
l4_fpage_t l4_fpage(l4_addr_t address, unsigned int size, unsigned char rights) L4_NOTHROW
Create a memory flex page.
l4_fpage_cacheability_opt_t
Flex-page cacheability option.
l4_fpage_t l4_fpage_all(void) L4_NOTHROW
Get a flex page, describing all address spaces at once.
l4_fpage_t l4_fpage_set_rights(l4_fpage_t src, unsigned char new_rights) L4_NOTHROW
Set new right in a flex page.
L4_fpage_rights
Flex-page rights.
l4_fpage_consts
L4 flexpage structure.
L4_fpage_control
Flex-page map control flags.
unsigned l4_fpage_type(l4_fpage_t f) L4_NOTHROW
Return type from a flex page.
unsigned long l4_fpage_ioport(l4_fpage_t f) L4_NOTHROW
Return the IO port number from the IO flex page.
l4_addr_t l4_fpage_memaddr(l4_fpage_t f) L4_NOTHROW
Return the memory address from the memory flex page.
int l4_fpage_contains(l4_fpage_t fpage, l4_addr_t addr, unsigned size) L4_NOTHROW
Test whether a given range is completely within an fpage.
unsigned l4_fpage_size(l4_fpage_t f) L4_NOTHROW
Return size from a flex page.
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 l4_fpage_rights(l4_fpage_t f) L4_NOTHROW
Return rights from a flex page.
int l4_is_fpage_writable(l4_fpage_t fp) L4_NOTHROW
Test if the flex page is writable.
l4_fpage_t l4_iofpage(unsigned long port, unsigned int size) L4_NOTHROW
Create an IO-port flex page.
L4_fpage_type
Flex-page type.
L4_obj_fpage_ctl
Flex-page map control for capabilities (snd_base)
l4_fpage_t l4_fpage_invalid(void) L4_NOTHROW
Get an invalid flex page.
l4_cap_idx_t l4_fpage_obj(l4_fpage_t f) L4_NOTHROW
Return the capability index from the object flex page.
L4_cap_fpage_rights
Cap-flex-page rights.
@ L4_FPAGE_CACHEABLE
Cacheability option to enable caches for the mapping.
@ L4_FPAGE_CACHE_OPT
Enable the cacheability option in a send flex page.
@ L4_FPAGE_UNCACHEABLE
Cacheability option to disable caching for the mapping.
@ L4_FPAGE_BUFFERABLE
Cacheability option to enable buffered writes for the mapping.
@ L4_FPAGE_X
Executable flex page.
@ L4_FPAGE_RWX
Read-write-execute flex page.
@ L4_FPAGE_RX
Read-execute flex page.
@ L4_FPAGE_RO
Read-only flex page
@ L4_FPAGE_RW
Read-write flex page.
@ L4_FPAGE_W
Writable flex page.
@ L4_FPAGE_ADDR_SHIFT
Page address shift.
@ L4_FPAGE_TYPE_SHIFT
Flexpage type shift (memory, IO port, obj...)
@ L4_FPAGE_RIGHTS_MASK
Mask to get the flexpage rights.
@ L4_FPAGE_TYPE_BITS
Flexpage type size (memory, IO port, obj...)
@ L4_FPAGE_RIGHTS_BITS
Access permissions size.
@ L4_FPAGE_ADDR_BITS
Page address size.
@ L4_FPAGE_SIZE_BITS
Flexpage size size (log2-based)
@ L4_FPAGE_RIGHTS_SHIFT
Access permissions shift.
@ L4_FPAGE_SIZE_SHIFT
Flexpage size shift (log2-based)
@ L4_WHOLE_ADDRESS_SPACE
Whole address space size.
@ L4_WHOLE_IOADDRESS_SPACE
Whole I/O address space size.
@ L4_IOPORT_MAX
Maximum I/O port address.
@ L4_FPAGE_C_NO_REF_CNT
Don't increase the reference counter.
@ L4_FPAGE_C_OBJ_RIGHT1
Object-type specific right.
@ L4_FPAGE_C_IPCGATE_SVR
The receiver may invoke IPC-gate-specific functions on the capability, e.g.
@ L4_FPAGE_C_OBJ_RIGHT2
Object-type specific right.
@ L4_FPAGE_C_OBJ_RIGHT3
Object-type specific right.
@ L4_FPAGE_C_OBJ_RIGHTS
All Object-type specific right bits.
@ L4_FPAGE_C_REF_CNT
Mapping is reference-counted (default).
@ L4_CAP_FPAGE_RO
Read right for capability flex-pages.
@ L4_CAP_FPAGE_R
Read right for capability flex-pages.
@ L4_CAP_FPAGE_RW
Read and interface specific 'W' right for capability flex-pages.
@ L4_CAP_FPAGE_W
Interface specific 'W' right for capability flex-pages.
@ L4_CAP_FPAGE_RS
Read and interface specific 'S' right for capability flex-pages.
@ L4_CAP_FPAGE_RWSD
Full rights for capability flex-pages.
@ L4_CAP_FPAGE_RSD
Read, 'S', and delete right for capability flex-pages.
@ L4_CAP_FPAGE_RWS
Read, interface specific 'W', and 'S' rights for capability flex-pages.
@ L4_CAP_FPAGE_D
Delete right for capability flex-pages.
@ L4_CAP_FPAGE_S
Interface specific 'S' right for capability flex-pages.
@ L4_CAP_FPAGE_RWD
Read, write, and delete right for capability flex-pages.
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.
l4_umword_t l4_map_control(l4_umword_t spot, unsigned char cache, unsigned grant) L4_NOTHROW
Create the first word for a map item for the memory space.
l4_umword_t l4_map_obj_control(l4_umword_t spot, unsigned grant) L4_NOTHROW
Create the first word for a map item for the object space.
@ L4_ITEM_MAP
Identify a message item as map item.
l4_fpage_t fpage
Source flex-page descriptor.
l4_umword_t snd_base
Offset in receive window (send base)
l4_umword_t raw
Raw value.
l4_umword_t fpage
Raw value.