L4Re – L4 Runtime Environment
__task-arm.h
1 /*
2  * (c) 2018 Adam Lackorzynski <adam@l4re.org>
3  *
4  * This file is part of L4Re and distributed under the terms of the
5  * GNU General Public License 2.
6  * Please see the COPYING-GPL-2 file for details.
7  *
8  * As a special exception, you may use this file as part of a free software
9  * library without restriction. Specifically, if other files instantiate
10  * templates or use macros or inline functions from this file, or you compile
11  * this file and link it with other files to produce an executable, this
12  * file does not by itself cause the resulting executable to be covered by
13  * the GNU General Public License. This exception does not however
14  * invalidate any other reasons why the executable file might be covered by
15  * the GNU General Public License.
16  */
17 #pragma once
18 
19 #include <l4/sys/types.h>
20 
24 L4_INLINE l4_msgtag_t
25 l4_task_vgicc_map_u(l4_cap_idx_t task, l4_fpage_t vgicc_fpage,
27 
38 L4_INLINE l4_msgtag_t
40 
41 /* IMPLEMENTATION -----------------------------------------------------------*/
42 
43 #include <l4/sys/ipc.h>
44 
45 L4_INLINE l4_msgtag_t
46 l4_task_vgicc_map_u(l4_cap_idx_t task, l4_fpage_t vgicc_fpage,
48 {
49  l4_msg_regs_t *v = l4_utcb_mr_u(u);
51  v->mr[1] = vgicc_fpage.raw;
52  return l4_ipc_call(task, u, l4_msgtag(L4_PROTO_TASK, 2, 0, 0), L4_IPC_NEVER);
53 }
54 
55 L4_INLINE l4_msgtag_t
57 {
58  return l4_task_vgicc_map_u(task, vgicc_fpage, l4_utcb());
59 }
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition: compiler.h:186
unsigned long l4_cap_idx_t
L4 Capability selector Type.
Definition: types.h:342
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:463
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:408
@ L4_PROTO_TASK
Protocol for messages to a task object.
Definition: types.h:63
@ L4_TASK_MAP_VGICC_ARM_OP
Arm: Map virtual GICC area.
Definition: task.h:261
l4_msgtag_t l4_task_vgicc_map(l4_cap_idx_t task, l4_fpage_t vgicc_fpage) L4_NOTHROW
Map the GIC's virtual GICC page to the task.
Definition: __task-arm.h:56
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
Definition: utcb.h:67
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition: utcb.h:340
Common L4 ABI Data Types.
Message tag data structure.
Definition: types.h:160
L4 flexpage type.
Definition: __l4_fpage.h:83
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