summaryrefslogtreecommitdiffstats
path: root/apps/init/arch/x86_64/paging.c
blob: 36fe950dc88c44851ad6b4bef4c02e3062b42050 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "../../memory.h"
#include "jove/object-dir.h"
#include "kernel/object.h"
#include <jove/arch/x86_64/object-pagemap.h>
#include <jove/arch/x86_64/pager.h>
#include <stdbool.h>

void
pager_setup(void)
{
    _jove_alloc_pagemap_inplace(&__jove_pagemap, &__rootdir, INIT_OBJECT_PAGEMAP);

    size_t lastfree = jove_objdir_lastmemb(&__rootdir) + 1;
    __jove_work_obj.membi = lastfree;
    __jove_work_obj.parent = &__rootdir;
}