26#ifndef __L4_SYS__INCLUDE__CONSTS_H__
27#define __L4_SYS__INCLUDE__CONSTS_H__
30#include <l4/sys/l4int.h>
173enum l4_sched_consts_t
175 L4_SCHED_MIN_PRIO = 0,
176 L4_SCHED_MAX_PRIO = 255,
297 L4_BDR_OFFSET_MASK = (1UL << 20) - 1,
365 L4_BASE_CAPS_LAST_P1,
380#define L4_PAGESIZE (1UL << L4_PAGESHIFT)
389#define L4_PAGEMASK (~(L4_PAGESIZE - 1))
398#define L4_LOG2_PAGESIZE L4_PAGESHIFT
407#define L4_SUPERPAGESIZE (1UL << L4_SUPERPAGESHIFT)
416#define L4_SUPERPAGEMASK (~(L4_SUPERPAGESIZE - 1))
424#define L4_LOG2_SUPERPAGESIZE L4_SUPERPAGESHIFT
449{
return address & (~0UL << bits); }
474{
return (value + (1UL << bits) - 1) & (~0UL << bits); }
501#define L4_INVALID_PTR ((void *)L4_INVALID_ADDR)
505# define NULL ((void *)0)
L4 compiler related defines.
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_addr_t
Address type.
l4_default_caps_t
Default capabilities setup for the initial tasks.
l4_cap_consts_t
Constants related to capability selectors.
@ L4_BASE_IOMMU_CAP
Capability selector for the IO-MMU cap.
@ L4_BASE_THREAD_CAP
Capability selector for the first thread.
@ L4_BASE_DEBUGGER_CAP
Capability selector for the debugger cap.
@ L4_BASE_PAGER_CAP
Capability selector for the pager gate.
@ L4_BASE_FACTORY_CAP
Capability selector for the factory.
@ L4_BASE_CAPS_LAST
Last capability index used for base capabilities.
@ L4_BASE_SCHEDULER_CAP
Capability selector for the scheduler cap.
@ L4_BASE_TASK_CAP
Capability selector for the current task.
@ L4_BASE_ARM_SMCCC_CAP
Capability selector for the ARM SMCCC cap.
@ L4_BASE_LOG_CAP
Capability selector for the log object.
@ L4_BASE_ICU_CAP
Capability selector for the base icu object.
@ L4_CAP_OFFSET
Offset of two consecutive capability selectors.
@ L4_CAP_MASK
Mask to get only the relevant bits of an l4_cap_idx_t.
@ L4_CAP_SHIFT
Capability index shift.
@ L4_INVALID_CAP
Invalid capability selector.
l4_syscall_flags_t
Capability selector flags.
@ L4_SYSF_SEND_AND_WAIT
Send-and-wait flags.
@ L4_SYSF_WAIT
Wait flags (combines receive and open wait).
@ L4_SYSF_REPLY
Reply flag.
@ L4_SYSF_CALL
Call flags (combines send and receive).
@ L4_SYSF_SEND
Send-phase flag.
@ L4_SYSF_REPLY_AND_WAIT
Reply-and-wait flags.
@ L4_SYSF_RECV
Receive-phase flag.
@ L4_SYSF_OPEN_WAIT
Open-wait flag.
@ L4_SYSF_NONE
Empty set of flags.
unsigned l4_bytes_to_mwords(unsigned size) L4_NOTHROW
Determine how many machine words (l4_umword_t) are required to store a buffer of 'size' bytes.
l4_addr_consts_t
Address related constants.
l4_addr_t l4_trunc_page(l4_addr_t address) L4_NOTHROW
Round an address down to the next lower page boundary.
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_addr_t l4_round_page(l4_addr_t address) L4_NOTHROW
Round address up to the next page.
#define L4_PAGESIZE
Minimal page size (in bytes).
#define L4_PAGEMASK
Mask for the page number.
l4_addr_t l4_round_size(l4_addr_t value, unsigned char bits) L4_NOTHROW
Round value up to the next alignment with bits size.
@ L4_INVALID_ADDR
Invalid address.
l4_msg_item_consts_t
Constants for message items.
@ L4_MAP_ITEM_GRANT
Flag as grant instead of map operation.
@ L4_ITEM_MAP
Identify a message item as map item.
@ L4_RCV_ITEM_LOCAL_ID
The receiver requests to receive a local ID instead of a mapping whenever possible.
@ L4_ITEM_CONT
Denote that the following item shall be put into the same receive item as this one.
@ L4_MAP_ITEM_MAP
Flag as usual map operation.
@ L4_RCV_ITEM_SINGLE_CAP
Mark the receive buffer to be a small receive item that describes a buffer for a single object capabi...
l4_unmap_flags_t
Flags for the unmap operation.
@ L4_FP_DELETE_OBJ
Flag that indicates that an unmap operation on object capabilities shall try to delete the correspond...
@ L4_FP_ALL_SPACES
Flag to tell the unmap operation to revoke permissions from all child mappings including the mapping ...
@ L4_FP_OTHER_SPACES
Counterpart to L4_FP_ALL_SPACES; revoke permissions from child mappings only.
l4_buffer_desc_consts_t
Constants for buffer descriptors.
@ L4_BDR_IO_SHIFT
Bit offset for the IO-buffer index.
@ L4_BDR_MEM_SHIFT
Bit offset for the memory-buffer index.
@ L4_BDR_OBJ_SHIFT
Bit offset for the capability-buffer index.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
#define L4_INLINE
L4 Inline function attribute.