summaryrefslogtreecommitdiffhomepage
path: root/Private/NewKit/PageManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Private/NewKit/PageManager.hpp')
-rw-r--r--Private/NewKit/PageManager.hpp103
1 files changed, 52 insertions, 51 deletions
diff --git a/Private/NewKit/PageManager.hpp b/Private/NewKit/PageManager.hpp
index b5337268..fdde95f8 100644
--- a/Private/NewKit/PageManager.hpp
+++ b/Private/NewKit/PageManager.hpp
@@ -18,64 +18,65 @@
#ifndef kBadAddress
#define kBadAddress (0)
-#endif // #ifndef kBadAddress
+#endif // #ifndef kBadAddress
-namespace HCore
-{
+namespace HCore {
class PageManager;
-class PTEWrapper final
-{
- public:
- explicit PTEWrapper(Boolean Rw = false, Boolean User = false, Boolean ExecDisable = false, UIntPtr Address = 0);
- ~PTEWrapper();
-
- PTEWrapper &operator=(const PTEWrapper &) = default;
- PTEWrapper(const PTEWrapper &) = default;
-
- public:
- void FlushTLB(Ref<PageManager> &pm);
- const UIntPtr &VirtualAddress();
-
- bool Reclaim();
- bool Shareable();
- bool Present();
- bool Access();
-
- private:
- Boolean m_Rw;
- Boolean m_User;
- Boolean m_ExecDisable;
- UIntPtr m_VirtAddr;
- Boolean m_Cache;
- Boolean m_Shareable;
- Boolean m_Wt;
- Boolean m_Present;
- Boolean m_Accessed;
-
- private:
- friend class PageManager;
- friend class Pmm;
+class PTEWrapper final {
+ public:
+ explicit PTEWrapper(Boolean Rw = false, Boolean User = false,
+ Boolean ExecDisable = false, UIntPtr Address = 0);
+ ~PTEWrapper();
+
+ PTEWrapper &operator=(const PTEWrapper &) = default;
+ PTEWrapper(const PTEWrapper &) = default;
+
+ public:
+ void FlushTLB(Ref<PageManager> &pm);
+ const UIntPtr &VirtualAddress();
+
+ void NoExecute(const bool enable = false);
+ const bool &NoExecute();
+
+ bool Reclaim();
+ bool Shareable();
+ bool Present();
+ bool Access();
+
+ private:
+ Boolean m_Rw;
+ Boolean m_User;
+ Boolean m_ExecDisable;
+ UIntPtr m_VirtAddr;
+ Boolean m_Cache;
+ Boolean m_Shareable;
+ Boolean m_Wt;
+ Boolean m_Present;
+ Boolean m_Accessed;
+
+ private:
+ friend class PageManager;
+ friend class Pmm;
};
-struct PageManager final
-{
- public:
- PageManager() = default;
- ~PageManager() = default;
+struct PageManager final {
+ public:
+ PageManager() = default;
+ ~PageManager() = default;
- PageManager &operator=(const PageManager &) = default;
- PageManager(const PageManager &) = default;
+ PageManager &operator=(const PageManager &) = default;
+ PageManager(const PageManager &) = default;
- public:
- PTEWrapper *Request(Boolean Rw, Boolean User, Boolean ExecDisable);
- bool Free(Ref<PTEWrapper*> &wrapper);
+ public:
+ PTEWrapper *Request(Boolean Rw, Boolean User, Boolean ExecDisable);
+ bool Free(Ref<PTEWrapper *> &wrapper);
- private:
- void FlushTLB(UIntPtr VirtAddr);
+ private:
+ void FlushTLB(UIntPtr VirtAddr);
- private:
- friend PTEWrapper;
- friend class Pmm;
+ private:
+ friend PTEWrapper;
+ friend class Pmm;
};
-} // namespace HCore
+} // namespace HCore