NOVA
Stripped down NOVA kernel for the OSY course
Loading...
Searching...
No Matches
ptab.h
1/*
2 * Simple page table manipulation routines
3 */
4
5#pragma once
6
7#include "types.h"
8#include "cpu.h"
9
10class Ptab
11{
12 public:
13
15 enum {
16 PRESENT = 1<<0,
17 RW = 1<<1,
18 USER = 1<<2,
19 ACCESS = 1<<5,
20 DIRTY = 1<<6,
21 };
22
24 static bool insert_mapping (mword virt, mword phys, mword attr);
26 static mword get_mapping (mword virt);
27
35 static void* remap (mword phys);
36};
Definition ptab.h:11
static void * remap(mword phys)
Maps the passed physical address to the fixed virtual address REMAP_SADDR as a single 4MB page.
Definition ptab.cc:65
static mword get_mapping(mword virt)
Returns the page table entry for the virtual address virt, INCLUDING THE ATTRIBUTE BITS.
Definition ptab.cc:52
static bool insert_mapping(mword virt, mword phys, mword attr)
Inserts a 4 KB mapping into the page table.
Definition ptab.cc:20