ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
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"
10#include "etiss/ETISS.h"
11#include "etiss/mm/MMU.h"
12#include <sstream>
13
14namespace etiss
15{
16namespace mm
17{
18
25
26std::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
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
51
52} // namespace mm
53} // namespace etiss
Header file of the ETISS library.
Modeling hardware memory management for virtual memory -> physical memory translation and protection.
Internal fault inside MMU and.
#define PAGE_FAULT(val, fault)
#define MAX_PAGE_FAULT_NUM
static __inline__ uint64_t
Definition arm_cde.h:31
static __inline__ int32_t
Definition arm_mve.h:51
MM_EXPORT const int32_t PTENOTEXISTED
MM_EXPORT handler_ptr page_fault_handler[]
void DUMP_MMU(MMU *mmu)
Definition MMU.cpp:209
static int32_t page_fault_ni_(int32_t fault, MMU *mmu, uint64_t, MM_ACCESS)
MM_EXPORT const int32_t TLBISFULL
MM_EXPORT const int32_t PROTECTIONVIALATION
MM_EXPORT const int32_t TLBMISS
MM_EXPORT const int32_t NOERROR
int32_t(* handler_ptr)(int32_t fault, MMU *mmu, uint64_t vma, MM_ACCESS access)
MM_EXPORT const int32_t PTEOVERLAP
MM_EXPORT std::string PAGE_FAULT_MSG[]
forwards: include/jit/*
Definition Benchmark.h:17
@ FATALERROR
Definition Misc.h:84
void log(Verbosity level, std::string msg)
write log message at the given level.
Definition Misc.cpp:94
STL namespace.