Add comments in ch5

This commit is contained in:
hypocrasy 2022-04-22 17:58:00 +08:00
parent 5aee0ddfd3
commit 4387d128d8

View File

@ -240,12 +240,12 @@ impl MemorySet {
}
memory_set
}
///Refresh TLB with `fence.vma`
///Refresh TLB with `sfence.vma`
pub fn activate(&self) {
let satp = self.page_table.token();
unsafe {
satp::write(satp);
asm!("fence.vma");
asm!("sfence.vma");
}
}
///Translate throuth pagetable