mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Refactor the definition of page properties and permissions
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
351e08c897
commit
989970429a
@ -6,13 +6,14 @@ use core::mem::size_of;
|
||||
use log::warn;
|
||||
use pod::Pod;
|
||||
|
||||
use super::second_stage::{DeviceMode, PageTableEntry, PageTableFlags, PagingConsts};
|
||||
use super::second_stage::{DeviceMode, PageTableEntry, PagingConsts};
|
||||
use crate::{
|
||||
bus::pci::PciDeviceLocation,
|
||||
vm::{
|
||||
dma::Daddr,
|
||||
page_table::{CachePolicy, MapProperty, PageTableError},
|
||||
Paddr, PageTable, VmAllocOptions, VmFrame, VmIo, VmPerm, PAGE_SIZE,
|
||||
page_prop::{CachePolicy, PageProperty, PrivilegedPageFlags as PrivFlags},
|
||||
page_table::PageTableError,
|
||||
Paddr, PageFlags, PageTable, VmAllocOptions, VmFrame, VmIo, PAGE_SIZE,
|
||||
},
|
||||
};
|
||||
|
||||
@ -295,11 +296,10 @@ impl ContextTable {
|
||||
.map(
|
||||
&(daddr..daddr + PAGE_SIZE),
|
||||
&(paddr..paddr + PAGE_SIZE),
|
||||
MapProperty {
|
||||
perm: VmPerm::RW,
|
||||
global: false,
|
||||
extension: PageTableFlags::empty().bits(),
|
||||
PageProperty {
|
||||
flags: PageFlags::RW,
|
||||
cache: CachePolicy::Uncacheable,
|
||||
priv_flags: PrivFlags::empty(),
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
Reference in New Issue
Block a user