L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
asm_access.h
1/*
2 * Copyright (C) 2021, 2024 Kernkonzept GmbH.
3 * Author(s): Jakub Jermar <jakub.jermar@kernkonzept.com>
4 *
5 * License: see LICENSE.spdx (in this directory or the directories above)
6 */
7
8#pragma once
9
10#include <l4/sys/l4int.h>
11#include <x86/l4/drivers/asm_access.h>
12
13namespace Asm_access {
14
15inline
17read(l4_uint64_t const *mem)
18{
19 l4_uint64_t val;
20
21 asm volatile ("movq %[mem], %[val]" : [val] "=r" (val) : [mem] "m" (*mem));
22
23 return val;
24}
25
26inline
27void
28write(l4_uint64_t val, l4_uint64_t *mem)
29{
30 asm volatile ("movq %[val], %[mem]" : [mem] "=m" (*mem) : [val] "r" (val));
31}
32
33}
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:31
T read(Istream &s)
Read a value out of a stream.
Definition ipc_stream:1289