NOVA
Stripped down NOVA kernel for the OSY course
|
Public Types | |
enum | { PRESENT = 1<<0 , RW = 1<<1 , USER = 1<<2 , ACCESS = 1<<5 , DIRTY = 1<<6 } |
Page attributes. | |
Static Public Member Functions | |
static bool | insert_mapping (mword virt, mword phys, mword attr) |
Inserts a 4 KB mapping into the page table. More... | |
static mword | get_mapping (mword virt) |
Returns the page table entry for the virtual address virt , INCLUDING THE ATTRIBUTE BITS. More... | |
static void * | remap (mword phys) |
Maps the passed physical address to the fixed virtual address REMAP_SADDR as a single 4MB page. More... | |
|
static |
Returns the page table entry for the virtual address virt
, INCLUDING THE ATTRIBUTE BITS.
Get a page table entry corresponding to virtual address virt.
|
static |
Inserts a 4 KB mapping into the page table.
Set a page table entry corresponding to virtual address virt to the combination of phys and attr.
[in] | virt | Virtual address to be mapped. |
[in] | phys | Physical address to map at virt. |
[in] | attr | Page attributes such as PRESENT, RW, USER, ACCESS, DIRTY. |
|
static |
Maps the passed physical address to the fixed virtual address REMAP_SADDR as a single 4MB page.
This mapping is temporary, and is changed the next time this method is called.
This is useful for one-off reads from a given physical address. We cannot use Kalloc::phys2virt(), because the 1:1 mapping used by it may not cover the whole physical RAM.