Setup independent page tables, map heap to a single location
This commit is contained in:
parent
7aafc165ec
commit
0501b2580d
1 changed files with 158 additions and 93 deletions
|
|
@ -63,10 +63,10 @@ impl<L> Table<L> where L: HierarchicalLevel {
|
|||
|
||||
pub fn next_table_create(&mut self, index: usize) -> &mut Table<L::NextLevel> {
|
||||
if self.next_table(index).is_none() {
|
||||
assert!(!self.entries[index].flags().contains(HUGE_PAGE),
|
||||
assert!(!self[index].flags().contains(HUGE_PAGE),
|
||||
"mapping code does not support huge pages");
|
||||
let frame = allocate_frame().expect("no frames available");
|
||||
self.entries[index].set(frame, PRESENT | WRITABLE);
|
||||
self[index].set(frame, PRESENT | WRITABLE);
|
||||
self.next_table_mut(index).unwrap().zero();
|
||||
}
|
||||
self.next_table_mut(index).unwrap()
|
||||
|
|
|
|||
Loading…
Reference in a new issue