1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

Add basic paging. Only identity maps the bottom 4MB as a start.

This commit is contained in:
Andreas Kling 2018-10-17 23:13:55 +02:00
parent 286e27ef40
commit 77299cf54d
5 changed files with 230 additions and 2 deletions

View file

@ -6,6 +6,7 @@
#include "i386.h"
#include "system.h"
#include "FileSystem.h"
#include "MemoryManager.h"
Task* current;
Task* s_kernelTask;
@ -129,6 +130,8 @@ Task::Task(void (*e)(), const char* n, IPC::Handle h, RingLevel ring)
m_tss.ss = stackSegment;
m_tss.cs = codeSegment;
m_tss.cr3 = MemoryManager::the().pageDirectoryBase().get();
m_tss.eip = (DWORD)m_entry;
// NOTE: Each task gets 4KB of stack.