31struct BackedPhysicalPage;
54 return a.page_number == b.page_number;
57 return a.page_number <=> b.page_number;
62 return a.page_number <=> b;
79 VirtualAddress(0xFFFF800000000000_u64 + 4096_u64 * 512_u64 * 512_u64 * 512_u64);
84 return void_pointer_to_physical_address(&page);
88 return void_pointer_to_physical_address(&page);
92 return void_pointer_to_physical_address(&page);
96 static auto void_pointer_to_physical_address(
void const* pointer) ->
PhysicalAddress {
106 ASSERT(address.raw_value() % 4096 == 0);
107 auto const page_number = address.raw_value() / 4096;
#define ASSERT
Definition assert_bool.h:16
Definition list_forward_declaration.h:12
constexpr auto fetch_add(DeltaType delta, MemoryOrder order=MemoryOrder::SequentialConsistency) -> T requires(concepts::Integral< T >||concepts::Pointer< T >)
Definition atomic.h:88
constexpr auto fetch_sub(DeltaType delta, MemoryOrder order=MemoryOrder::SequentialConsistency) -> T requires(concepts::Integral< T >||concepts::Pointer< T >)
Definition atomic.h:99
RBTreeNode< Tag > IntrusiveTreeSetNode
Definition tree_set.h:11
@ AcquireRelease
Definition memory_order.h:11
__UINT64_TYPE__ u64
Definition integers.h:12
di::meta::Decay< decltype(T)> Tag
Definition tag_invoke.h:28
constexpr auto to_uintptr
Definition to_uintptr.h:13
Definition object_pool.h:14
Definition physical_page.h:81
Definition address_space.cpp:20
void deallocate_page_frame(PhysicalAddress)
Definition page_frame_allocator.cpp:81
auto page_structure_page(PhysicalAddress address) -> PageStructurePhysicalPage &
Definition physical_page.h:111
constexpr auto bump_page
Definition physical_page.h:132
constexpr auto physical_page_base
Definition physical_page.h:78
di::StrongInt< VirtualAddressTag > VirtualAddress
Definition virtual_address.h:25
constexpr auto drop_page
Definition physical_page.h:151
di::StrongInt< PhysicalAddressTag > PhysicalAddress
Definition physical_address.h:12
constexpr auto physical_address
Definition physical_page.h:103
auto backed_page(PhysicalAddress address) -> BackedPhysicalPage &
Definition physical_page.h:115
auto physical_page(PhysicalAddress address) -> PhysicalPage &
Definition physical_page.h:105
Definition intrusive_tag_base.h:8
Definition in_place_type.h:5
Definition physical_page.h:33
friend void tag_invoke(di::Tag< di::vocab::intrusive_ptr_increment >, di::InPlaceType< BackedPhysicalPagePtrTag >, BackedPhysicalPage *ptr)
friend void tag_invoke(di::Tag< di::vocab::intrusive_ptr_decrement >, di::InPlaceType< BackedPhysicalPagePtrTag >, BackedPhysicalPage *ptr)
Definition physical_page.h:41
static void did_remove(auto &, auto &node)
Definition physical_page.h:153
A physical page of memory tracked by a backing object.
Definition physical_page.h:46
constexpr friend auto operator<=>(BackedPhysicalPage const &a, u64 b) -> di::strong_ordering
Definition physical_page.h:61
constexpr friend auto operator==(BackedPhysicalPage const &a, BackedPhysicalPage const &b) -> bool
Definition physical_page.h:53
u64 page_number
Definition physical_page.h:50
constexpr BackedPhysicalPage(u64 page_number)
Definition physical_page.h:47
constexpr friend auto operator<=>(BackedPhysicalPage const &a, BackedPhysicalPage const &b) -> di::strong_ordering
Definition physical_page.h:56
constexpr friend auto operator==(BackedPhysicalPage const &a, u64 b) -> bool
Definition physical_page.h:60
di::sync::Atomic< usize > reference_count
Definition physical_page.h:49
Definition physical_page.h:20
Definition physical_page.h:19
A physical page of memory used for the page tables themselves.
Definition physical_page.h:18
u64 mapped_page_count
Definition physical_page.h:27
di::IntrusiveList< PageStructurePhysicalPage > children
Definition physical_page.h:26
constexpr PageStructurePhysicalPage(Parent)
Definition physical_page.h:22
constexpr PageStructurePhysicalPage(Leaf)
Definition physical_page.h:23
A physical page of memory.
Definition physical_page.h:71
BackedPhysicalPage as_backed_page
Definition physical_page.h:74
PageStructurePhysicalPage as_page_structure_page
Definition physical_page.h:73
Definition physical_page.h:120
void operator()(BackedPhysicalPage &page) const
Definition physical_page.h:121
void operator()(PhysicalAddress address) const
Definition physical_page.h:125
Definition physical_page.h:135
void operator()(PhysicalAddress address) const
Definition physical_page.h:142
void operator()(BackedPhysicalPage &page) const
Definition physical_page.h:136
Definition physical_page.h:82
auto operator()(PhysicalPage const &page) const -> PhysicalAddress
Definition physical_page.h:83
auto operator()(PageStructurePhysicalPage const &page) const -> PhysicalAddress
Definition physical_page.h:91
auto operator()(BackedPhysicalPage const &page) const -> PhysicalAddress
Definition physical_page.h:87