ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
etiss
src
mm
PageFaultVector.cpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-3-Clause
2
//
3
// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4
// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5
// LICENSE file.
6
7
#include <sstream>
8
#include "
etiss/ETISS.h
"
9
#include "
etiss/mm/PageFaultVector.h
"
10
#include "
etiss/ETISS.h
"
11
#include "
etiss/mm/MMU.h
"
12
#include <sstream>
13
14
namespace
etiss
15
{
16
namespace
mm
17
{
18
19
PAGE_FAULT
(0,
NOERROR
)
20
PAGE_FAULT
(1,
PTEOVERLAP
)
21
PAGE_FAULT
(2,
TLBMISS
)
22
PAGE_FAULT
(3,
PTENOTEXISTED
)
23
PAGE_FAULT
(4,
TLBISFULL
)
24
PAGE_FAULT
(5,
PROTECTIONVIALATION
)
25
26
std
::
string
PAGE_FAULT_MSG
[
MAX_PAGE_FAULT_NUM
] = {
"no error occurs"
,
27
"page table entry already existed"
,
28
"TLB miss"
,
29
"evict a non-existed PTE"
,
30
"TLB is already full"
,
31
"TLB is already full"
};
32
33
static
int32_t
page_fault_ni_
(
int32_t
fault,
MMU
*mmu,
uint64_t
,
MM_ACCESS
)
34
{
35
if
(fault)
36
{
37
std::stringstream msg;
38
msg <<
"Fault message: ["
<<
PAGE_FAULT_MSG
[fault] <<
"]"
;
39
msg <<
"Corresponding handler not registered yet. "
<< std::endl;
40
DUMP_MMU
(mmu);
41
etiss::log
(
etiss::FATALERROR
, msg.str());
42
}
43
return
NOERROR
;
44
}
45
46
handler_ptr
page_fault_handler
[
MAX_PAGE_FAULT_NUM
] = {
47
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
48
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
49
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
page_fault_ni_
,
50
};
51
52
}
// namespace mm
53
}
// 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:39
MAX_PAGE_FAULT_NUM
#define MAX_PAGE_FAULT_NUM
Definition
PageFaultVector.h:36
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:38
etiss::mm::MM_ACCESS
MM_ACCESS
Definition
PageFaultVector.h:25
etiss::mm::PTENOTEXISTED
MM_EXPORT const int32_t PTENOTEXISTED
etiss::mm::page_fault_handler
MM_EXPORT handler_ptr page_fault_handler[]
Definition
PageFaultVector.cpp:46
etiss::mm::DUMP_MMU
void DUMP_MMU(MMU *mmu)
Definition
MMU.cpp:209
etiss::mm::page_fault_ni_
static int32_t page_fault_ni_(int32_t fault, MMU *mmu, uint64_t, MM_ACCESS)
Definition
PageFaultVector.cpp:33
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:34
etiss::mm::PTEOVERLAP
MM_EXPORT const int32_t PTEOVERLAP
etiss::mm::PAGE_FAULT_MSG
MM_EXPORT std::string PAGE_FAULT_MSG[]
Definition
PageFaultVector.cpp:26
etiss
forwards: include/jit/*
Definition
Benchmark.h:17
etiss::FATALERROR
@ FATALERROR
Definition
Misc.h:84
etiss::log
void log(Verbosity level, std::string msg)
write log message at the given level.
Definition
Misc.cpp:94
std
STL namespace.
Generated on Sat Nov 15 2025 19:30:10 for ETISS 0.11.2 by
1.9.8