30 memory_manager_ut::test_page_table_entry_x64_present()
33 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
35 pte->set_present(
true);
40 pte->set_present(
false);
46 memory_manager_ut::test_page_table_entry_x64_rw()
49 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
62 memory_manager_ut::test_page_table_entry_x64_us()
65 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
78 memory_manager_ut::test_page_table_entry_x64_pwt()
81 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
94 memory_manager_ut::test_page_table_entry_x64_pcd()
97 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
110 memory_manager_ut::test_page_table_entry_x64_accessed()
113 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
115 pte->set_accessed(
true);
120 pte->set_accessed(
false);
126 memory_manager_ut::test_page_table_entry_x64_dirty()
129 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
131 pte->set_dirty(
true);
136 pte->set_dirty(
false);
142 memory_manager_ut::test_page_table_entry_x64_pat()
145 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
147 pte->set_pat_4k(
true);
152 pte->set_pat_4k(
false);
156 pte->set_pat_large(
true);
161 pte->set_pat_large(
false);
167 memory_manager_ut::test_page_table_entry_x64_ps()
170 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
183 memory_manager_ut::test_page_table_entry_x64_global()
186 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
188 pte->set_global(
true);
193 pte->set_global(
false);
199 memory_manager_ut::test_page_table_entry_x64_nx()
202 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
215 memory_manager_ut::test_page_table_entry_x64_phys_addr()
218 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
220 pte->set_present(
true);
222 pte->set_phys_addr(0x0000ABCDEF123000);
225 this->
expect_true(pte->phys_addr() == 0x0000ABCDEF123000);
227 pte->set_phys_addr(0x0000ABCDEF123010);
228 this->
expect_true(pte->phys_addr() == 0x0000ABCDEF123000);
231 pte->set_present(
true);
233 pte->set_phys_addr(0x0);
240 memory_manager_ut::test_page_table_entry_x64_pat_index()
243 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
247 pte->set_pat_4k(
false);
252 pte->set_pat_4k(
false);
257 pte->set_pat_4k(
false);
262 pte->set_pat_4k(
false);
267 pte->set_pat_4k(
true);
272 pte->set_pat_4k(
true);
277 pte->set_pat_4k(
true);
282 pte->set_pat_4k(
true);
285 pte->set_pat_index_4k(0);
290 pte->set_pat_index_4k(1);
295 pte->set_pat_index_4k(2);
300 pte->set_pat_index_4k(3);
305 pte->set_pat_index_4k(4);
310 pte->set_pat_index_4k(5);
315 pte->set_pat_index_4k(6);
320 pte->set_pat_index_4k(7);
329 pte->set_pat_large(
false);
334 pte->set_pat_large(
false);
339 pte->set_pat_large(
false);
344 pte->set_pat_large(
false);
349 pte->set_pat_large(
true);
354 pte->set_pat_large(
true);
359 pte->set_pat_large(
true);
364 pte->set_pat_large(
true);
367 pte->set_pat_index_large(0);
372 pte->set_pat_index_large(1);
377 pte->set_pat_index_large(2);
382 pte->set_pat_index_large(3);
387 pte->set_pat_index_large(4);
392 pte->set_pat_index_large(5);
397 pte->set_pat_index_large(6);
402 pte->set_pat_index_large(7);
411 memory_manager_ut::test_page_table_entry_x64_clear()
413 pte_type entry = 0xFFFFFFFFFFFFFFFF;
414 auto &&pte = std::make_unique<page_table_entry_x64>(&entry);
#define expect_exception(f, e)
uintptr_t integer_pointer
auto num_bits_set(T t) noexcept
page_table_entry_x64::integer_pointer pte_type
auto is_bit_set(T t, B b) noexcept