L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
asm_access.h
1
/* SPDX-License-Identifier: GPL-2.0-only or License-Ref-kk-custom */
2
/*
3
* Copyright (C) 2021 Kernkonzept GmbH.
4
* Author(s): Jakub Jermar <jakub.jermar@kernkonzept.com>
5
*/
6
7
#pragma once
8
9
#include <l4/sys/l4int.h>
10
#include <x86/l4/drivers/asm_access.h>
11
12
namespace
Asm_access {
13
14
inline
15
l4_uint64_t
16
read(
l4_uint64_t
const
*mem)
17
{
18
l4_uint64_t
val;
19
20
asm
volatile
(
"movq %[mem], %[val]"
: [val]
"=r"
(val) : [mem]
"m"
(*mem));
21
22
return
val;
23
}
24
25
inline
26
void
27
write(
l4_uint64_t
val,
l4_uint64_t
*mem)
28
{
29
asm
volatile
(
"movq %[val], %[mem]"
: [mem]
"=m"
(*mem) : [val]
"r"
(val));
30
}
31
32
}
l4_uint64_t
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition
l4int.h:42
pkg
drivers-frst
include
ARCH-amd64
asm_access.h
Generated on Sat Aug 24 2024 16:07:21 for L4Re Operating System Framework by
1.9.8