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
13
namespace
Asm_access {
14
15
inline
16
l4_uint64_t
17
read
(
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
26
inline
27
void
28
write(
l4_uint64_t
val,
l4_uint64_t
*mem)
29
{
30
asm
volatile
(
"movq %[val], %[mem]"
: [mem]
"=m"
(*mem) : [val]
"r"
(val));
31
}
32
33
}
l4_uint64_t
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition
l4int.h:31
L4::Ipc::read
T read(Istream &s)
Read a value out of a stream.
Definition
ipc_stream:1289
pkg
drivers-frst
include
ARCH-amd64
asm_access.h
Generated on Mon Mar 3 2025 23:08:49 for L4Re Operating System Framework by
1.9.8