Flush TLB correctly when remapping

Seperate mouse and keyboard structs in PS/2 driver
This commit is contained in:
Jeremy Soller
2016-09-11 15:02:35 -06:00
parent 9b17495dd6
commit 9371120f0f
2 changed files with 13 additions and 20 deletions
+2
View File
@@ -34,6 +34,7 @@ pub fn brk(address: usize) -> Result<usize> {
if active_table.translate_page(page).is_none() {
//println!("Not found - mapping");
active_table.map(page, entry::PRESENT | entry::WRITABLE | entry::NO_EXECUTE | entry::USER_ACCESSIBLE);
active_table.flush(page);
} else {
//println!("Found - skipping");
}
@@ -49,6 +50,7 @@ pub fn brk(address: usize) -> Result<usize> {
if active_table.translate_page(page).is_some() {
//println!("Found - unmapping");
active_table.unmap(page);
active_table.flush(page);
} else {
//println!("Not found - skipping");
}