L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
__platform_control-arm.h
1/*
2 * Copyright (C) 2024 Kernkonzept GmbH.
3 * Author(s): Jan Klötzke <jan.kloetzke@kernkonzept.com>
4 *
5 * License: see LICENSE.spdx (in this directory or the directories above)
6 */
7#pragma once
8
9#include <l4/sys/types.h>
10
11
31 l4_cap_idx_t task,
33
34
39l4_platform_ctl_set_task_asid_u(l4_cap_idx_t pfc,
40 l4_cap_idx_t task,
41 l4_umword_t asid,
42 l4_utcb_t *utcb) L4_NOTHROW;
43
44/* IMPLEMENTATION -----------------------------------------------------------*/
45
47l4_platform_ctl_set_task_asid_u(l4_cap_idx_t pfc,
48 l4_cap_idx_t task,
49 l4_umword_t asid,
51{
52 l4_msg_regs_t *v = l4_utcb_mr_u(utcb);
54 v->mr[1] = asid;
55 v->mr[2] = l4_map_obj_control(0,0);
56 v->mr[3] = l4_obj_fpage(task, 0, L4_CAP_FPAGE_RWS).raw;
57 return l4_ipc_call(pfc, utcb, l4_msgtag(L4_PROTO_PLATFORM_CTL, 2, 1, 0),
59}
60
63 l4_cap_idx_t task,
65{
66 return l4_platform_ctl_set_task_asid_u(pfc, task, asid, l4_utcb());
67}
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:51
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:359
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_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.
Definition __l4_fpage.h:714
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
@ L4_PROTO_PLATFORM_CTL
Protocol messages to a platform control object.
l4_msgtag_t l4_platform_ctl_set_task_asid(l4_cap_idx_t pfc, l4_cap_idx_t task, l4_umword_t asid) L4_NOTHROW
Set ASID of task.
@ L4_PLATFORM_CTL_SET_TASK_ASID_OP
Arm: set task ASID.
#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
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
Definition utcb.h:340
#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
Common L4 ABI Data Types.
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