blob: 12343081921a6c8cda1e6a618a74f9e13bc2838d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "x86_64/memory/paging_root.hpp"
#include <cstdint>
namespace teachos::memory::x86_64
{
namespace
{
constexpr auto PML_RECURSIVE_BASE = std::uintptr_t{0177777'776'776'776'776'0000uz};
}
auto paging_root::get() -> paging_root &
{
auto pml4_address = std::bit_cast<paging_root *>(PML_RECURSIVE_BASE);
return *pml4_address;
}
} // namespace teachos::memory::x86_64
|