header foo

This commit is contained in:
user
2026-02-17 16:28:36 +01:00
parent b5df4139dd
commit f11c9d02c8
21 changed files with 17 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ OutputStream* copyout = &copystream;
#include "./interrupt/guard.h"
#include "./boot/multiboot/data.h"
#include "./sync/semaphore.h"
#include "./memory/pageframealloc.h"
//Semaphore koutsem(1);
//TextStream kout(0, 80, 1, 17, true);
@@ -52,10 +52,10 @@ alignas(4096) four_lvl_paging_t paging_tree;
// Main function
extern "C" int main() {
PageFrameAllocator::stats();
Multiboot::Module* initrd = Multiboot::getModule(0);
DBG << "initrd address: " << hex << initrd->getStartAddress() << endl << "initrd size: " << initrd->getSize() << endl;
memcpy((void *)0x4000000, initrd->getStartAddress(), initrd->getSize());
mark_pageframes(0x400000, 0x4000000 + initrd->getSize(), false);
memset(&paging_tree, 0, sizeof(four_lvl_paging_t));
create_basic_page_table(&paging_tree);

View File

@@ -16,4 +16,8 @@ namespace PageFrameAllocator {
void free (PageFrame *frame);
void free (uintptr_t addr);
}
void mark_pageframes(uintptr_t start, uintptr_t end, bool available);
#endif