31#include <l4/sys/utcb.h>
337l4_factory_create_add_str_u(
char const *s,
l4_msgtag_t *tag,
345l4_factory_create_add_lstr_u(
char const *s,
unsigned len,
l4_msgtag_t *tag,
394#include <l4/sys/ipc.h>
403 l4_factory_create_add_fpage_u(*utcb_area, &t, u);
404 t = l4_factory_create_commit_u(factory, t, u);
408 utcb_area->raw = v->
mr[0];
427 l4_factory_create_add_uint_u(limit, &t, u);
428 return l4_factory_create_commit_u(factory, t, u);
440 t = l4_factory_create_start_u(0, target_cap, u);
441 l4_factory_create_add_uint_u(label, &t, u);
443 if (!(thread_cap & L4_INVALID_CAP_BIT))
450 return l4_factory_create_commit_u(factory, t, u);
465 return l4_factory_create_u(factory,
L4_PROTO_VM, target_cap, u);
484 return l4_factory_create_task_u(factory, target_cap, utcb_area,
l4_utcb());
491 return l4_factory_create_thread_u(factory, target_cap,
l4_utcb());
499 return l4_factory_create_factory_u(factory, target_cap, limit,
l4_utcb());
507 return l4_factory_create_gate_u(factory, target_cap, thread_cap, label,
l4_utcb());
514 return l4_factory_create_irq_u(factory, target_cap,
l4_utcb());
521 return l4_factory_create_vm_u(factory, target_cap,
l4_utcb());
528 return l4_factory_create_vcpu_context_u(factory, target_cap,
l4_utcb());
532l4_factory_create_start_u(
long obj,
l4_cap_idx_t target_cap,
549 if (w + 2 > L4_UTCB_GENERIC_DATA_SIZE)
551 v->
mr[w] = L4_VARG_TYPE_FPAGE | (
sizeof(
l4_fpage_t) << 16);
552 v->
mr[w + 1] = d.raw;
554 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
564 if (w + 2 > L4_UTCB_GENERIC_DATA_SIZE)
566 v->
mr[w] = L4_VARG_TYPE_MWORD | (
sizeof(
l4_mword_t) << 16);
569 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
579 if (w + 2 > L4_UTCB_GENERIC_DATA_SIZE)
581 v->
mr[w] = L4_VARG_TYPE_UMWORD | (
sizeof(
l4_umword_t) << 16);
584 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
589l4_factory_create_add_str_u(
char const *s,
l4_msgtag_t *tag,
592 return l4_factory_create_add_lstr_u(s, __builtin_strlen(s) + 1, tag, u);
596l4_factory_create_add_lstr_u(
char const *s,
unsigned len,
l4_msgtag_t *tag,
608 v->
mr[w] = L4_VARG_TYPE_STRING | (len << 16);
609 c = (
char*)&v->
mr[w + 1];
610 for (i = 0; i < len; ++i)
615 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
624 v->
mr[w] = L4_VARG_TYPE_NIL;
626 tag->raw = (tag->raw & ~0x3fUL) | (w & 0x3f);
642 l4_msgtag_t t = l4_factory_create_start_u(obj, target, utcb);
643 return l4_factory_create_commit_u(factory, t, utcb);
651 return l4_factory_create_u(factory, obj, target,
l4_utcb());
L4 compiler related defines.
unsigned long l4_umword_t
Unsigned machine word.
signed long l4_mword_t
Signed machine word.
unsigned long l4_cap_idx_t
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_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_vcpu_context(l4_cap_idx_t factory, l4_cap_idx_t target_cap) L4_NOTHROW
Create a new hardware vCPU context.
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_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(l4_cap_idx_t factory, long obj, l4_cap_idx_t target) L4_NOTHROW
Create a new object.
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_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 object capabi...
unsigned l4_msgtag_has_error(l4_msgtag_t t) L4_NOTHROW
Test for error indicator flag.
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.
unsigned l4_msgtag_flags(l4_msgtag_t t) L4_NOTHROW
Get the flags.
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_PROTO_VCPU_CONTEXT
Protocol for hardware vCPU contexts.
#define L4_IPC_NEVER
never timeout
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.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
#define L4_INLINE
L4 Inline function attribute.
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.