L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
__kernel_object_impl.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <l4/sys/ipc.h>
8
10l4_invoke_debugger(l4_cap_idx_t obj, l4_msgtag_t tag, l4_utcb_t *utcb) L4_NOTHROW
11{
12 l4_msgtag_t t2;
13 unsigned const words = l4_msgtag_words(tag);
14 l4_msg_regs_t *mr = l4_utcb_mr_u(utcb);
15
16 if (l4_is_invalid_cap(obj))
17 return l4_msgtag(-L4_EINVAL, 0, 0, 0);
18
19 if (words + 2 > L4_UTCB_GENERIC_DATA_SIZE)
20 return l4_msgtag(-L4_EMSGTOOLONG, 0, 0, 0);
21
22 mr->mr[0] += 0x100;
23 mr->mr[words] = L4_ITEM_MAP;
24 mr->mr[words + 1] = l4_obj_fpage(obj, 0, L4_CAP_FPAGE_RWS).raw;
25 t2 = l4_msgtag(L4_PROTO_DEBUGGER, words, 1, l4_msgtag_flags(tag));
26
28}
29
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:359
unsigned l4_is_invalid_cap(l4_cap_idx_t c) L4_NOTHROW
Test if a capability selector is the invalid capability.
Definition types.h:412
@ L4_BASE_DEBUGGER_CAP
Capability selector for the debugger cap.
Definition consts.h:355
@ L4_EINVAL
Invalid argument.
Definition err.h:57
@ L4_EMSGTOOLONG
Message too long.
Definition err.h:68
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.
Definition __l4_fpage.h:680
@ L4_CAP_FPAGE_RWS
Read, interface specific 'W', and 'S' rights for capability flex-pages.
Definition __l4_fpage.h:209
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:576
@ L4_ITEM_MAP
Identify a message item as map item.
Definition consts.h:226
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:428
unsigned l4_msgtag_words(l4_msgtag_t t) L4_NOTHROW
Get the number of untyped words.
Definition types.h:444
unsigned l4_msgtag_flags(l4_msgtag_t t) L4_NOTHROW
Get the flags.
Definition types.h:452
@ L4_PROTO_DEBUGGER
Protocol ID for the debugger.
Definition types.h:75
#define L4_IPC_NEVER
never timeout
Definition __timeout.h:84
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition utcb.h:67
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:188
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:62
Message tag data structure.
Definition types.h:164
l4_umword_t raw
Raw value.
Definition __l4_fpage.h:87
Encapsulation of the message-register block in the UTCB.
Definition utcb.h:79
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.
Definition utcb.h:80