L4Re Operating System Framework
Interface and Usage Documentation
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
h
i
k
m
o
p
r
s
t
u
w
Functions
a
b
c
k
m
r
s
t
w
Variables
Typedefs
Enumerations
Enumerator
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
_
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
Enumerations
a
c
d
e
f
i
m
n
p
q
r
s
t
v
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
w
x
Related Symbols
Files
File List
Globals
All
_
a
b
d
e
f
g
l
m
n
o
p
r
s
Functions
_
b
e
f
g
l
o
p
Typedefs
e
g
l
p
Enumerations
e
l
p
Enumerator
a
d
e
f
l
n
p
r
s
Macros
_
e
g
l
m
p
s
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
io_regblock_port.h
1
/*
2
* Copyright (C) 2012 Technische Universität Dresden.
3
* Author(s): Adam Lackorzynski <adam@os.inf.tu-dresden.de>
4
*
5
* License: see LICENSE.spdx (in this directory or the directories above)
6
*/
7
#pragma once
8
9
#include "io_regblock.h"
10
11
namespace
L4
12
{
13
class
Io_register_block_port :
public
Io_register_block
14
{
15
public
:
16
Io_register_block_port(
unsigned
long
base)
17
: _base(base)
18
{}
19
20
unsigned
long
addr(
unsigned
long
reg)
const override
{
return
_base + reg; }
21
22
unsigned
char
read8(
unsigned
long
reg)
const override
23
{
24
unsigned
char
val;
25
asm
volatile
(
"inb %w1, %b0"
:
"=a"
(val) :
"Nd"
(_base + reg));
26
return
val;
27
}
28
29
unsigned
short
read16(
unsigned
long
reg)
const override
30
{
31
unsigned
short
val;
32
asm
volatile
(
"inw %w1, %w0"
:
"=a"
(val) :
"Nd"
(_base + reg));
33
return
val;
34
}
35
36
unsigned
int
read32(
unsigned
long
reg)
const override
37
{
38
unsigned
int
val;
39
asm
volatile
(
"in %w1, %0"
:
"=a"
(val) :
"Nd"
(_base + reg));
40
return
val;
41
}
42
43
void
write8(
unsigned
long
reg,
unsigned
char
val)
const override
44
{
asm
volatile
(
"outb %b0, %w1"
: :
"a"
(val),
"Nd"
(_base + reg)); }
45
46
void
write16(
unsigned
long
reg,
unsigned
short
val)
const override
47
{
asm
volatile
(
"outw %w0, %w1"
: :
"a"
(val),
"Nd"
(_base + reg)); }
48
49
void
write32(
unsigned
long
reg,
unsigned
int
val)
const override
50
{
asm
volatile
(
"out %0, %w1"
: :
"a"
(val),
"Nd"
(_base + reg)); }
51
52
void
delay()
const override
53
{
asm
volatile
(
"outb %al,$0x80"
); }
54
55
private
:
56
unsigned
long
_base;
57
};
58
}
L4
L4 low-level kernel interface.
Definition
l4sys-l4f-groups.dox:50
pkg
drivers-frst
include
io_regblock_port.h
Generated on Mon Mar 3 2025 23:08:49 for L4Re Operating System Framework by
1.9.8