Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION=0
PATCHLEVEL=0
SUBLEVEL=2
SUBLEVEL=3
EXTRAVERSION=

export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION
Expand Down
22 changes: 22 additions & 0 deletions src/memory/pagetable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ use crate::memory::pageframe;
use crate::memory::page_map_indexer;
use core::ffi::c_void;

pub mod flags
{
pub const PDE_PRESENT: usize = 0b0000_0001;
pub const PDE_RW: usize = 0b0000_0010;
pub const PDE_US: usize = 0b0000_0100;
pub const PDE_PWT: usize = 0b0000_1000;
pub const PDE_PCD: usize = 0b0001_0000;
pub const PDE_ACCESSED: usize = 0b0010_0000;
pub const PDE_FLAG2: usize = 0b0100_0000;
pub const PDE_PS: usize = 0b1000_0000;

pub const PTE_PRESENT: usize = 0b0000_0001;
pub const PTE_RW: usize = 0b0000_0010;
pub const PTE_US: usize = 0b0000_0100;
pub const PTE_PWT: usize = 0b0000_1000;
pub const PTE_PCD: usize = 0b0001_0000;
pub const PTE_ACCESSED: usize = 0b0010_0000;
pub const PTE_DIRTY: usize = 0b0100_0000;
pub const PTE_PAT: usize = 0b1000_0000;
pub const PTE_GLOBAL: usize = 0b1_0000_0000;
}

pub struct Manager
{
pub page_directory: &'static mut [page::DirectoryEntry],
Expand Down