31 #include <l4/sys/utcb.h>
245 l4_factory_create_start_u(
long obj,
l4_cap_idx_t target,
261 l4_factory_create_add_str_u(
char const *s,
l4_msgtag_t *tag,
265 l4_factory_create_add_lstr_u(
char const *s,
unsigned len,
l4_msgtag_t *tag,
286 #include <l4/sys/ipc.h>
295 l4_factory_create_add_fpage_u(utcb_area, &t, u);
296 return l4_factory_create_commit_u(factory, t, u);
313 l4_factory_create_add_uint_u(limit, &t, u);
314 return l4_factory_create_commit_u(factory, t, u);
326 t = l4_factory_create_start_u(0, target_cap, u);
327 l4_factory_create_add_uint_u(label, &t, u);
329 if (!(thread_cap & L4_INVALID_CAP_BIT))
336 return l4_factory_create_commit_u(factory, t, u);
351 return l4_factory_create_u(factory,
L4_PROTO_VM, target_cap, u);
403 l4_factory_create_start_u(
long obj,
l4_cap_idx_t target_cap,
422 v->
mr[w] = L4_VARG_TYPE_FPAGE | (
sizeof(
l4_fpage_t) << 16);
423 v->
mr[w + 1] = d.raw;
425 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
437 v->
mr[w] = L4_VARG_TYPE_MWORD | (
sizeof(
l4_mword_t) << 16);
440 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
452 v->
mr[w] = L4_VARG_TYPE_UMWORD | (
sizeof(
l4_umword_t) << 16);
455 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
460 l4_factory_create_add_str_u(
char const *s,
l4_msgtag_t *tag,
463 return l4_factory_create_add_lstr_u(s, __builtin_strlen(s) + 1, tag, u);
467 l4_factory_create_add_lstr_u(
char const *s,
unsigned len,
l4_msgtag_t *tag,
479 v->
mr[w] = L4_VARG_TYPE_STRING | (len << 16);
480 c = (
char*)&v->
mr[w + 1];
481 for (i = 0; i < len; ++i)
486 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
495 v->
mr[w] = L4_VARG_TYPE_NIL;
497 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
513 l4_msgtag_t t = l4_factory_create_start_u(obj, target, utcb);
514 return l4_factory_create_commit_u(factory, t, utcb);
522 return l4_factory_create_u(factory, obj, target,
l4_utcb());
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.
signed long l4_mword_t
Signed machine word.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
l4_msgtag_t l4_factory_create_gate(l4_cap_idx_t factory, l4_cap_idx_t target_cap, l4_cap_idx_t thread_cap, l4_umword_t label) L4_NOTHROW
Create a new IPC gate.
l4_msgtag_t l4_factory_create_irq_u(l4_cap_idx_t factory, l4_cap_idx_t target_cap, l4_utcb_t *utcb) L4_NOTHROW
Create a new IRQ.
l4_msgtag_t l4_factory_create_thread(l4_cap_idx_t factory, l4_cap_idx_t target_cap) L4_NOTHROW
Create a new thread.
l4_msgtag_t l4_factory_create_irq(l4_cap_idx_t factory, l4_cap_idx_t target_cap) L4_NOTHROW
Create a new IRQ sender.
l4_msgtag_t l4_factory_create_factory(l4_cap_idx_t factory, l4_cap_idx_t target_cap, unsigned long limit) L4_NOTHROW
Create a new factory.
l4_msgtag_t l4_factory_create_factory_u(l4_cap_idx_t factory, l4_cap_idx_t target_cap, unsigned long limit, l4_utcb_t *utcb) L4_NOTHROW
Create a new factory.
l4_msgtag_t l4_factory_create_gate_u(l4_cap_idx_t factory, l4_cap_idx_t target_cap, l4_cap_idx_t thread_cap, l4_umword_t label, l4_utcb_t *utcb) L4_NOTHROW
Create a new IPC gate.
l4_msgtag_t l4_factory_create_vm_u(l4_cap_idx_t factory, l4_cap_idx_t target_cap, l4_utcb_t *utcb) L4_NOTHROW
Create a new virtual machine.
l4_msgtag_t l4_factory_create_task(l4_cap_idx_t factory, l4_cap_idx_t target_cap, l4_fpage_t utcb_area) L4_NOTHROW
Create a new task.
l4_msgtag_t l4_factory_create_vm(l4_cap_idx_t factory, l4_cap_idx_t target_cap) L4_NOTHROW
Create a new virtual machine.
l4_msgtag_t l4_factory_create_thread_u(l4_cap_idx_t factory, l4_cap_idx_t target_cap, l4_utcb_t *utcb) L4_NOTHROW
Create a new thread.
l4_msgtag_t l4_factory_create_task_u(l4_cap_idx_t factory, l4_cap_idx_t target_cap, l4_fpage_t utcb_area, l4_utcb_t *utcb) L4_NOTHROW
Create a new task.
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_CAP_FPAGE_RWS
Read, interface specific 'W', and 'S' rights for capability flex-pages.
l4_msgtag_t l4_ipc_call(l4_cap_idx_t object, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
Object call (usual invocation).
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_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_RCV_ITEM_SINGLE_CAP
Mark the receive buffer to be a small receive item that describes a buffer for a single capability.
l4_msgtag_flags
Flags for message tags.
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
unsigned l4_msgtag_words(l4_msgtag_t t) L4_NOTHROW
Get the number of untyped words.
long l4_msgtag_label(l4_msgtag_t t) L4_NOTHROW
Get the protocol of tag.
@ L4_PROTO_FACTORY
Protocol for messages to a factory object.
@ L4_PROTO_IRQ_SENDER
Protocol for IRQ senders (IRQ -> IPC)
@ L4_PROTO_TASK
Protocol for messages to a task object.
@ L4_PROTO_VM
Protocol for messages to a virtual machine object.
@ L4_PROTO_THREAD
Protocol for messages to a thread object.
@ L4_UTCB_GENERIC_DATA_SIZE
Total number of message register (MRs) available.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Common L4 ABI Data Types.
Encapsulation of the buffer-registers block in the UTCB.
l4_umword_t br[L4_UTCB_GENERIC_BUFFERS_SIZE]
Buffer registers.
l4_umword_t bdr
Buffer descriptor.
Message tag data structure.
l4_umword_t raw
Raw value.
Encapsulation of the message-register block in the UTCB.
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.