header foo
This commit is contained in:
@@ -34,7 +34,7 @@ OutputStream* copyout = ©stream;
|
||||
#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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user