L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
consts.h File Reference

Common constants. More...

#include <l4/sys/arch/consts.h>
#include <l4/sys/compiler.h>
#include <l4/sys/l4int.h>
Include dependency graph for consts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define L4_SYSF_NONE
 Capability selector flags.
#define L4_SYSF_SEND
 Send-phase flag.
#define L4_SYSF_RECV
 Receive-phase flag.
#define L4_SYSF_OPEN_WAIT
 Open-wait flag.
#define L4_SYSF_REPLY
 Reply flag.
#define L4_SYSF_CALL
 Call flags (combines send and receive).
#define L4_SYSF_WAIT
 Wait flags (combines receive and open wait).
#define L4_SYSF_SEND_AND_WAIT
 Send-and-wait flags.
#define L4_SYSF_REPLY_AND_WAIT
 Reply-and-wait flags.
#define L4_CAP_SHIFT
 Capability index shift.
#define L4_CAP_SIZE   (1UL << L4_CAP_SHIFT)
#define L4_CAP_OFFSET
 Offset of two consecutive capability selectors.
#define L4_CAP_MASK
 Mask to get only the relevant bits of an l4_cap_idx_t.
#define L4_INVALID_CAP
 Invalid capability selector.
#define L4_PAGESIZE
 Minimal page size (in bytes).
#define L4_PAGEMASK
 Mask for the page number.
#define L4_LOG2_PAGESIZE
 Number of bits used for page offset.
#define L4_SUPERPAGESIZE
 Size of a large page.
#define L4_SUPERPAGEMASK
 Mask for the number of a large page.
#define L4_LOG2_SUPERPAGESIZE
 Number of bits used as offset for a large page.
#define L4_INVALID_PTR   ((void *)L4_INVALID_ADDR)
 Invalid address as pointer type.

Enumerations

enum  l4_unmap_flags_t { L4_FP_ALL_SPACES , L4_FP_DELETE_OBJ , L4_FP_OTHER_SPACES }
 Flags for the unmap operation. More...
enum  l4_msg_item_consts_t {
  L4_ITEM_MAP = 8 , L4_ITEM_CONT = 1 , L4_MAP_ITEM_GRANT = 2 , L4_MAP_ITEM_MAP = 0 ,
  L4_RCV_ITEM_FORWARD_MAPPINGS = 1 , L4_RCV_ITEM_SINGLE_CAP = L4_ITEM_MAP | 2 , L4_RCV_ITEM_LOCAL_ID = 4
}
 Constants for message items. More...
enum  l4_buffer_desc_consts_t { L4_BDR_MEM_SHIFT = 0 , L4_BDR_IO_SHIFT = 5 , L4_BDR_OBJ_SHIFT = 10 , L4_BDR_OFFSET_MASK = (1UL << 20) - 1 }
 Constants for buffer descriptors. More...
enum  l4_default_caps_t {
  L4_BASE_TASK_CAP , L4_BASE_FACTORY_CAP , L4_BASE_THREAD_CAP , L4_BASE_PAGER_CAP ,
  L4_BASE_LOG_CAP , L4_BASE_ICU_CAP , L4_BASE_SCHEDULER_CAP , L4_BASE_IOMMU_CAP ,
  L4_BASE_DEBUGGER_CAP , L4_BASE_ARM_SMCCC_CAP , L4_BASE_CAPS_LAST_P1 , L4_BASE_CAPS_LAST = L4_BASE_CAPS_LAST_P1 - 1
}
 Default capabilities setup for the initial tasks. More...
enum  l4_addr_consts_t { L4_INVALID_ADDR = ~0UL }
 Address related constants. More...

Functions

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 flexpage with size bits.
l4_addr_t l4_round_page (l4_addr_t address) L4_NOTHROW
 Round address up to the next page.
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.
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.

Detailed Description

Common constants.

Definition in file consts.h.

Macro Definition Documentation

◆ L4_CAP_SIZE

#define L4_CAP_SIZE   (1UL << L4_CAP_SHIFT)
Deprecated
Superseded by L4_CAP_OFFSET.

Definition at line 139 of file consts.h.

◆ L4_SYSF_CALL

#define L4_SYSF_CALL

Call flags (combines send and receive).

Combines L4_SYSF_SEND and L4_SYSF_RECV.

Definition at line 107 of file consts.h.

Referenced by l4_ipc_call().

◆ L4_SYSF_OPEN_WAIT

#define L4_SYSF_OPEN_WAIT

Open-wait flag.

This flag indicates that the receive operation (see L4_SYSF_RECV) shall be an open wait. Open wait means that the invoking thread shall wait for a message from any possible sender and not from the sender denoted by the capability.

Definition at line 90 of file consts.h.

◆ L4_SYSF_RECV

#define L4_SYSF_RECV

Receive-phase flag.

Setting this flag in a capability selector induces a receive phase, this means the invoking thread waits for a message from the object denoted by the capability. For a send phase see L4_SYSF_SEND.

Definition at line 79 of file consts.h.

Referenced by l4_ipc_receive().

◆ L4_SYSF_REPLY

#define L4_SYSF_REPLY

Reply flag.

This flag indicates that the send phase shall use the in-kernel reply capability instead of the capability denoted by the selector index.

Definition at line 99 of file consts.h.

Referenced by L4::Server< LOOP_HOOKS >::reply_n_wait().

◆ L4_SYSF_REPLY_AND_WAIT

#define L4_SYSF_REPLY_AND_WAIT

Reply-and-wait flags.

Combines L4_SYSF_SEND, L4_SYSF_REPLY, and L4_SYSF_WAIT.

Definition at line 131 of file consts.h.

Referenced by l4_ipc_reply_and_wait().

◆ L4_SYSF_SEND

#define L4_SYSF_SEND

Send-phase flag.

Setting this flag in a capability selector induces a send phase, this means a message is sent to the object denoted by the capability. For receive phase see L4_SYSF_RECV.

In l4_vcpu_state_t::user_task this flag means that the kernel has cached the user task capability internally, see l4_thread_vcpu_resume_commit().

Definition at line 68 of file consts.h.

Referenced by l4_ipc_send().

◆ L4_SYSF_SEND_AND_WAIT

#define L4_SYSF_SEND_AND_WAIT

Send-and-wait flags.

Combines L4_SYSF_SEND and L4_SYSF_WAIT.

Definition at line 123 of file consts.h.

Referenced by l4_ipc_send_and_wait().

◆ L4_SYSF_WAIT

#define L4_SYSF_WAIT

Wait flags (combines receive and open wait).

Combines L4_SYSF_RECV and L4_SYSF_OPEN_WAIT.

Definition at line 115 of file consts.h.

Referenced by l4_ipc_wait().