summaryrefslogtreecommitdiffstats
path: root/apps/init/arch/x86_64/paging.c
blob: 641fc8abb0a35ed9598a14f7a7d9d55b3ab2d3ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#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;

    jove_pager_ensure(0x00000000F0000000);
}