ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
_
a
c
d
e
f
h
m
n
p
r
s
t
w
x
Typedefs
Enumerations
Enumerator
_
a
e
f
i
l
n
r
s
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Typedefs
_
a
c
d
i
m
o
p
r
s
t
u
v
w
Enumerations
Enumerator
a
b
c
e
i
l
m
n
o
p
r
t
u
v
w
Related Symbols
c
e
h
i
l
p
r
s
t
v
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
_
a
b
c
d
e
f
i
k
m
o
p
r
s
u
v
w
x
Enumerations
_
a
c
k
l
m
n
o
x
Enumerator
_
a
c
e
f
k
l
m
n
o
s
t
x
Macros
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
etiss
src
mm
PageFaultVector.cpp
Go to the documentation of this file.
1
/*
2
3
@copyright
4
5
<pre>
6
7
Copyright 2018 Infineon Technologies AG
8
9
This file is part of ETISS tool, see <https://github.com/tum-ei-eda/etiss>.
10
11
The initial version of this software has been created with the funding support by the German Federal
12
Ministry of Education and Research (BMBF) in the project EffektiV under grant 01IS13022.
13
14
Redistribution and use in source and binary forms, with or without modification, are permitted
15
provided that the following conditions are met:
16
17
1. Redistributions of source code must retain the above copyright notice, this list of conditions and
18
the following disclaimer.
19
20
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
21
and the following disclaimer in the documentation and/or other materials provided with the distribution.
22
23
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse
24
or promote products derived from this software without specific prior written permission.
25
26
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
27
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
28
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
29
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
POSSIBILITY OF SUCH DAMAGE.
34
35
</pre>
36
37
@author Chair of Electronic Design Automation, TUM
38
39
@version 0.1
40
41
*/
42
43
#include <sstream>
44
#include "
etiss/ETISS.h
"
45
#include "
etiss/mm/PageFaultVector.h
"
46
#include "
etiss/ETISS.h
"
47
#include "
etiss/mm/MMU.h
"
48
#include <sstream>
49
50
namespace
etiss
51
{
52
namespace
mm
53
{
54
55
PAGE_FAULT
(0,
NOERROR
)
56
PAGE_FAULT
(1,
PTEOVERLAP
)
57
PAGE_FAULT
(2,
TLBMISS
)
58
PAGE_FAULT
(3,
PTENOTEXISTED
)
59
PAGE_FAULT
(4,
TLBISFULL
)
60
PAGE_FAULT
(5,
PROTECTIONVIALATION
)
61
62
std
::
string
PAGE_FAULT_MSG
[
MAX_PAGE_FAULT_NUM
] = {
63
"no error occurs"
,
64
"page table entry already existed"
,
65
"TLB miss"
,
66
"evict a non-existed PTE"
,
67
"TLB is already full"
,
68
"TLB is already full"
69
};
62
std
::
string
PAGE_FAULT_MSG
[
MAX_PAGE_FAULT_NUM
] = {
…
};
70
71
static
int32_t
page_fault_ni_
(
int32_t
fault,
MMU
*mmu,
uint64_t
,
MM_ACCESS
)
72
{
73
if
(fault)
74
{
75
std::stringstream msg;
76
msg <<
"Fault message: ["
<<
PAGE_FAULT_MSG
[fault] <<
"]"
;
77
msg <<
"Corresponding handler not registered yet. "
<< std::endl;
78
DUMP_MMU
(mmu);
79
etiss::log
(
etiss::FATALERROR
, msg.str());
80
}
81
return
NOERROR
;
82
}
71
static
int32_t
page_fault_ni_
(
int32_t
fault,
MMU
*mmu,
uint64_t
,
MM_ACCESS
) {
…
}
83
84
handler_ptr
page_fault_handler
[
MAX_PAGE_FAULT_NUM
] = {
85
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
86
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
87
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
88
};
84
handler_ptr
page_fault_handler
[
MAX_PAGE_FAULT_NUM
] = {
…
};
89
90
}
// namespace mm
91
}
// namespace etiss
ETISS.h
Header file of the ETISS library.
MMU.h
Modeling hardware memory management for virtual memory -> physical memory translation and protection.
PageFaultVector.h
Internal fault inside MMU and.
PAGE_FAULT
#define PAGE_FAULT(val, fault)
Definition
PageFaultVector.h:77
MAX_PAGE_FAULT_NUM
#define MAX_PAGE_FAULT_NUM
Definition
PageFaultVector.h:74
uint64_t
static __inline__ uint64_t
Definition
arm_cde.h:31
int32_t
static __inline__ int32_t
Definition
arm_mve.h:51
etiss::mm::MMU
Definition
MMU.h:76
etiss::mm::MM_ACCESS
MM_ACCESS
Definition
PageFaultVector.h:63
etiss::mm::PTENOTEXISTED
MM_EXPORT const int32_t PTENOTEXISTED
etiss::mm::page_fault_handler
MM_EXPORT handler_ptr page_fault_handler[]
Definition
PageFaultVector.cpp:84
etiss::mm::DUMP_MMU
void DUMP_MMU(MMU *mmu)
Definition
MMU.cpp:244
etiss::mm::page_fault_ni_
static int32_t page_fault_ni_(int32_t fault, MMU *mmu, uint64_t, MM_ACCESS)
Definition
PageFaultVector.cpp:71
etiss::mm::TLBISFULL
MM_EXPORT const int32_t TLBISFULL
etiss::mm::PROTECTIONVIALATION
MM_EXPORT const int32_t PROTECTIONVIALATION
etiss::mm::TLBMISS
MM_EXPORT const int32_t TLBMISS
etiss::mm::NOERROR
MM_EXPORT const int32_t NOERROR
etiss::mm::handler_ptr
int32_t(* handler_ptr)(int32_t fault, MMU *mmu, uint64_t vma, MM_ACCESS access)
Definition
PageFaultVector.h:72
etiss::mm::PTEOVERLAP
MM_EXPORT const int32_t PTEOVERLAP
etiss::mm::PAGE_FAULT_MSG
MM_EXPORT std::string PAGE_FAULT_MSG[]
Definition
PageFaultVector.cpp:62
etiss
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition
Benchmark.h:53
etiss::FATALERROR
@ FATALERROR
Definition
Misc.h:126
etiss::log
void log(Verbosity level, std::string msg)
write log message at the given level.
Definition
Misc.cpp:125
std
STL namespace.
Generated on Mon Feb 17 2025 13:12:29 for ETISS 0.8.0 by
1.9.8