Skip to content

Commit

Permalink
Re-enable paging
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgian committed Jun 30, 2023
1 parent 9de643b commit 91e7e88
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions kernel/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub extern "C" fn _start() -> ! {
}

//setup paging
/*unsafe {
unsafe {
let table0 = PageTable::new(0x0);
let table1 = PageTable::new(0x0040_0000);
let table2 = PageTable::new(0x0080_0000);
Expand All @@ -63,7 +63,7 @@ pub extern "C" fn _start() -> ! {
PAGING.set_table(4, &table);

PAGING.enable();
}*/
}

unsafe {
asm!("xchg bx, bx");
Expand Down
10 changes: 0 additions & 10 deletions kernel/src/memory/paging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,4 @@ impl PageTable {

table
}

pub fn test() -> Self {
let mut table = Self { entries: [0; 1024] };
for i in 0..4 {
//0b011 (supervisor, write, present)
table.entries[i] = (((i * 0x1000) + 0x0050_0000) | 0b011) as u32;
}

table
}
}
2 changes: 0 additions & 2 deletions kernel/src/shell/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

use crate::filesystem::fat::FAT;
use crate::syscalls::print::PRINTER;
use crate::multitasking::task::Task;
use crate::multitasking::task::CPUState;
use crate::multitasking::task::TASK_MANAGER;

const APP_TARGET: u32 = 0x0050_0000;
Expand Down

0 comments on commit 91e7e88

Please sign in to comment.