Loading...
Searching...
No Matches
__kernel_object_impl.h
#pragma once
#include <l4/sys/ipc.h>
L4_INLINE l4_msgtag_t
l4_invoke_debugger(l4_cap_idx_t obj, l4_msgtag_t tag, l4_utcb_t *utcb) L4_NOTHROW
{
l4_msgtag_t t2;
unsigned const words = l4_msgtag_words(tag);
l4_msg_regs_t *mr = l4_utcb_mr_u(utcb);
if (l4_is_invalid_cap(obj))
return l4_msgtag(-L4_EINVAL, 0, 0, 0);
if (words + 2 > L4_UTCB_GENERIC_DATA_SIZE)
return l4_msgtag(-L4_EMSGTOOLONG, 0, 0, 0);
mr->mr[0] += 0x100;
mr->mr[words] = L4_ITEM_MAP;
mr->mr[words + 1] = l4_obj_fpage(obj, 0, L4_CAP_FPAGE_RWS).raw;
t2 = l4_msgtag(L4_PROTO_DEBUGGER, words, 1, l4_msgtag_flags(tag));
return l4_ipc_call(L4_BASE_DEBUGGER_CAP, utcb, t2, L4_IPC_NEVER);
}
l4_cap_idx_t
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:336
l4_is_invalid_cap
unsigned l4_is_invalid_cap(l4_cap_idx_t c) L4_NOTHROW
Test if a capability selector is the invalid capability.
Definition types.h:389
L4_BASE_DEBUGGER_CAP
@ L4_BASE_DEBUGGER_CAP
Capability selector for the debugger cap.
Definition consts.h:366
L4_EINVAL
@ L4_EINVAL
Invalid argument.
Definition err.h:46
L4_EMSGTOOLONG
@ L4_EMSGTOOLONG
Message too long.
Definition err.h:57
l4_obj_fpage
l4_fpage_t l4_obj_fpage(l4_cap_idx_t obj, unsigned int order, unsigned char rights) L4_NOTHROW
Create a kernel-object flexpage.
Definition __l4_fpage.h:715
L4_CAP_FPAGE_RWS
@ L4_CAP_FPAGE_RWS
Read, interface specific 'W', and 'S' rights for capability flexpages.
Definition __l4_fpage.h:206
l4_ipc_call
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).
Definition ipc.h:565
L4_ITEM_MAP
@ L4_ITEM_MAP
Identify a message item as map item.
Definition consts.h:214
l4_msgtag
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
Definition types.h:405
l4_msgtag_words
unsigned l4_msgtag_words(l4_msgtag_t t) L4_NOTHROW
Get the number of untyped words.
Definition types.h:427
l4_msgtag_flags
unsigned l4_msgtag_flags(l4_msgtag_t t) L4_NOTHROW
Get the flags.
Definition types.h:435
L4_PROTO_DEBUGGER
@ L4_PROTO_DEBUGGER
Protocol ID for the debugger.
Definition types.h:65
L4_IPC_NEVER
#define L4_IPC_NEVER
never timeout
Definition __timeout.h:76
l4_utcb_t
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:56
L4_NOTHROW
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:161
L4_INLINE
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51
ipc.h
Common IPC interface.
l4_msgtag_t
Message tag data structure.
Definition types.h:154
l4_fpage_t::raw
l4_umword_t raw
Raw value.
Definition __l4_fpage.h:78
l4_msg_regs_t
Encapsulation of the message-register block in the UTCB.
Definition utcb.h:68
l4_msg_regs_t::mr
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.
Definition utcb.h:69