ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
PageFaultVector.h
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.
15#ifndef ETISS_INCLUDE_MM_PAGEFAULTVECTOR_H_
16#define ETISS_INCLUDE_MM_PAGEFAULTVECTOR_H_
17#include <iostream>
18
19namespace etiss
20{
21namespace mm
22{
23
30
31class MMU;
32void DUMP_MMU(MMU *mmu);
33
34typedef int32_t (*handler_ptr)(int32_t fault, MMU *mmu, uint64_t vma, MM_ACCESS access);
35
36#define MAX_PAGE_FAULT_NUM 20
37
38#ifndef PAGE_FAULT
39#define PAGE_FAULT(val, fault) const int32_t fault = val;
40#endif
41
42#ifndef REGISTER_PAGE_FAULT_HANDLER
43#define REGISTER_PAGE_FAULT_HANDLER(fault, handler) page_fault_handler[fault] = handler
44#endif
45
46#ifndef HANDLE_PAGE_FAULT
47#define HANDLE_PAGE_FAULT(fault, mmu, vma, access) (*page_fault_handler[fault])(fault, mmu, vma, access)
48#endif
49
50#ifdef _WIN32
51#ifdef ETISS_PLUGIN_IMPORTS
52#define MM_EXPORT __declspec(dllimport)
53#else
54#define MM_EXPORT __declspec(dllexport)
55#endif
56#else
57#define MM_EXPORT
58#endif
59
60extern MM_EXPORT const int32_t NOERROR;
61extern MM_EXPORT const int32_t PTEOVERLAP;
62extern MM_EXPORT const int32_t TLBMISS;
64extern MM_EXPORT const int32_t TLBISFULL;
66
67extern MM_EXPORT std::string PAGE_FAULT_MSG[];
69
70} // namespace mm
71} // namespace etiss
72
73#endif
#define MM_EXPORT
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
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