diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-24 13:51:12 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-24 13:51:12 +0000 |
| commit | c291e1ed629489c418049f6c4116433636717636 (patch) | |
| tree | aee0889f0d52ee51ada62ee992ee0b9682f78774 /arch/x86_64/src/kernel/main.cpp | |
| parent | 47732f54474a083e9f98e52714c12c0ca1181174 (diff) | |
| download | teachos-c291e1ed629489c418049f6c4116433636717636.tar.xz teachos-c291e1ed629489c418049f6c4116433636717636.zip | |
Add comments and rename file
Diffstat (limited to 'arch/x86_64/src/kernel/main.cpp')
| -rw-r--r-- | arch/x86_64/src/kernel/main.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/x86_64/src/kernel/main.cpp b/arch/x86_64/src/kernel/main.cpp index cbd6e68..ce13723 100644 --- a/arch/x86_64/src/kernel/main.cpp +++ b/arch/x86_64/src/kernel/main.cpp @@ -1,6 +1,9 @@ #include "arch/kernel/main.hpp" +#include "arch/memory/heap/bump_allocator.hpp" +#include "arch/memory/heap/concept.hpp" #include "arch/memory/main.hpp" +#include "arch/memory/multiboot/reader.hpp" #include "arch/video/vga/text.hpp" namespace teachos::arch::kernel @@ -13,15 +16,16 @@ namespace teachos::arch::kernel memory::initialize_memory_management(); - // heap::bump_allocator heap_allocator{memory::heap::HEAP_START, heap::HEAP_START + memory::heap::HEAP_SIZE}; - // auto test = heap_allocator.allocate(1024); + memory::heap::bump_allocator heap_allocator{memory::heap::HEAP_START, + memory::heap::HEAP_START + memory::heap::HEAP_SIZE}; + auto test = heap_allocator.allocate(1024); - // auto test2 = new (test) multiboot::memory_information{}; + auto test2 = new (test) memory::multiboot::memory_information{}; - // if (test || test2) - // { - // video::vga::text::write("Kernel remapping successfull", video::vga::text::common_attributes::green_on_black); - // } + if (test || test2) + { + video::vga::text::write("Kernel remapping successfull", video::vga::text::common_attributes::green_on_black); + } // TODO: Why is identity mapping multiboot2 information structure with new kernel not required and // allocator.allocate_frame still works? |
