aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kapi/memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/kapi/memory.cpp')
-rw-r--r--arch/x86_64/kapi/memory.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86_64/kapi/memory.cpp b/arch/x86_64/kapi/memory.cpp
index e366ee1..b71fa17 100644
--- a/arch/x86_64/kapi/memory.cpp
+++ b/arch/x86_64/kapi/memory.cpp
@@ -1,12 +1,12 @@
#include "kapi/memory.hpp"
#include "kapi/boot.hpp"
+#include "kapi/memory/buffered_allocator.hpp"
#include "kapi/system.hpp"
#include "arch/boot/boot.hpp"
#include "arch/boot/ld.hpp"
#include "arch/cpu/registers.hpp"
-#include "arch/memory/buffered_allocator.hpp"
#include "arch/memory/kernel_mapper.hpp"
#include "arch/memory/mmu.hpp"
#include "arch/memory/page_table.hpp"
@@ -151,7 +151,7 @@ namespace kapi::memory
}
auto constinit region_based_allocator = std::optional<arch::memory::region_allocator>{};
- auto constinit buffered_allocator = std::optional<arch::memory::buffered_allocator<4>>{};
+ auto constinit allocation_buffer = std::optional<buffered_allocator<4>>{};
auto constinit recursive_page_mapper = std::optional<arch::memory::recursive_page_mapper>{};
} // namespace
@@ -170,12 +170,12 @@ namespace kapi::memory
enable_cpu_protections();
region_based_allocator.emplace(collect_memory_information());
- buffered_allocator.emplace(&*region_based_allocator);
- recursive_page_mapper.emplace(*buffered_allocator);
+ allocation_buffer.emplace(&*region_based_allocator);
+ recursive_page_mapper.emplace(*allocation_buffer);
kstd::println("[x86_64:MEM] Preparing new paging hierarchy.");
- auto new_pml4_frame = inject_faux_pml4(*buffered_allocator, *recursive_page_mapper);
+ auto new_pml4_frame = inject_faux_pml4(*allocation_buffer, *recursive_page_mapper);
remap_kernel(*recursive_page_mapper);
remap_vga_text_mode_buffer(*recursive_page_mapper);
@@ -187,7 +187,7 @@ namespace kapi::memory
cr3.frame(new_pml4_frame);
arch::cpu::cr3::write(cr3);
- set_frame_allocator(*buffered_allocator);
+ set_frame_allocator(*allocation_buffer);
set_page_mapper(*recursive_page_mapper);
}