Add a PTE extension mechanism

This commit is contained in:
Zhang Junyang
2024-04-15 09:46:21 +08:00
committed by Tate, Hongliang Tian
parent 513ac97969
commit 82bdadf754
12 changed files with 110 additions and 89 deletions

View File

@ -6,7 +6,7 @@ use core::mem::size_of;
use log::warn;
use pod::Pod;
use super::second_stage::{DeviceMode, PageTableConsts, PageTableEntry};
use super::second_stage::{DeviceMode, PageTableConsts, PageTableEntry, PageTableFlags};
use crate::{
bus::pci::PciDeviceLocation,
vm::{
@ -296,6 +296,8 @@ impl ContextTable {
&(paddr..paddr + PAGE_SIZE),
MapProperty {
perm: VmPerm::RW,
global: false,
extension: PageTableFlags::empty().bits(),
cache: CachePolicy::Uncacheable,
},
);