feat: initial paging setup

This commit is contained in:
2021-08-06 20:46:44 +02:00
parent 8152ad6e9a
commit f0cc2c73b7
15 changed files with 257 additions and 114 deletions

View File

@@ -9,7 +9,7 @@
#include <myke/cpu/cpu.h>
#include <myke/libk/libk.h>
#include <myke/mem/pmm.h>
#include <myke/mem/pm.h>
#include <myke/tasks/task.h>
#define stack_end(task) ((task)->stack + ((task)->stack_page_count * PAGE_SIZE))
@@ -204,7 +204,7 @@ task_t *task_create(task_entrypoint entrypoint, void *entry_data) {
new_task->tid = last_tid++;
new_task->state = TASK_STATE_RUNNABLE;
new_task->stack = pmm_get_pages(16);
new_task->stack = pm_get_pages(16);
new_task->stack_page_count = 16;
// todo check for null