Refactor the source structure in aster_frame::mm

This commit is contained in:
Zhang Junyang
2024-06-02 11:00:34 +00:00
committed by Tate, Hongliang Tian
parent e8595b95fe
commit 7095b37e7e
38 changed files with 177 additions and 129 deletions

View File

@ -13,7 +13,7 @@ use crate::{
dma::Daddr,
page_prop::{CachePolicy, PageProperty, PrivilegedPageFlags as PrivFlags},
page_table::PageTableError,
Frame, Paddr, PageFlags, PageTable, VmAllocOptions, VmIo, PAGE_SIZE,
Frame, FrameAllocOptions, Paddr, PageFlags, PageTable, VmIo, PAGE_SIZE,
},
};
@ -51,7 +51,7 @@ pub enum ContextTableError {
impl RootTable {
pub fn new() -> Self {
Self {
root_frame: VmAllocOptions::new(1).alloc_single().unwrap(),
root_frame: FrameAllocOptions::new(1).alloc_single().unwrap(),
context_tables: BTreeMap::new(),
}
}
@ -240,7 +240,7 @@ pub struct ContextTable {
impl ContextTable {
fn new() -> Self {
Self {
entries_frame: VmAllocOptions::new(1).alloc_single().unwrap(),
entries_frame: FrameAllocOptions::new(1).alloc_single().unwrap(),
page_tables: BTreeMap::new(),
}
}