35 entry.set_phys_addr(
g_mm->virtptr_to_physint(m_pt.get()));
36 entry.set_present(
true);
51 auto &&iter = bfn::find(m_pts,
index);
55 (*iter) = std::make_unique<page_table_x64>(&view.at(
index));
64 m_pts.shrink_to_fit();
78 auto &&iter = bfn::find(m_pts,
index);
79 if (
auto pt = (*iter).get())
107 auto &&iter = bfn::cfind(m_pts,
index);
108 if (
auto pt = (*iter).get())
111 throw std::runtime_error(
"unable to locate pte. invalid address");
121 auto &&
virt =
reinterpret_cast<uintptr_t
>(m_pt.get());
122 auto &&phys =
g_mm->virtint_to_physint(
virt);
127 for (
const auto &
pt : m_pts)
128 if (
pt !=
nullptr)
pt->pt_to_mdl(mdl);
134 page_table_x64::empty() const
noexcept 139 for (
auto element : view)
140 size += element != 0 ? 1U : 0U;
146 page_table_x64::global_size() const
noexcept 151 for (
auto element : view)
152 size += element != 0 ? 1U : 0U;
154 for (
const auto &
pt : m_pts)
155 if (
pt !=
nullptr)
size +=
pt->global_size();
161 page_table_x64::global_capacity() const
noexcept 163 auto size = m_pts.capacity();
165 for (
const auto &
pt : m_pts)
166 if (
pt !=
nullptr)
size +=
pt->global_capacity();
page_table_x64(gsl::not_null< pointer > pte)
std::vector< memory_descriptor > memory_descriptor_list
constexpr const auto num_entries
page_table_entry_x64 virt_to_pte(integer_pointer addr) const
void remove_page(integer_pointer addr)
memory_descriptor_list pt_to_mdl() const
constexpr const auto size
constexpr const auto size
void uint64_t uint64_t uint64_t *rdx noexcept
auto index(const T virt, const F from)
constexpr const auto addr
constexpr page_table_x64::integer_pointer virt
uintptr_t integer_pointer
constexpr const auto write_back_index
auto end(reversed_container< T > container) -> decltype(container.container.rend())