Copy the flags set from physmap MemoryType over on scheme mmap
Propagating flags like uncachable or writecombining is necessary both for correctness and for performance.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use core::num::NonZeroUsize;
|
||||
|
||||
use alloc::{sync::Arc, vec::Vec};
|
||||
use alloc::sync::Arc;
|
||||
use rmm::PhysicalAddress;
|
||||
|
||||
use crate::{
|
||||
@@ -153,6 +153,7 @@ impl MemoryScheme {
|
||||
// Default
|
||||
MemoryType::Writeback => (),
|
||||
|
||||
// When adding a new flag make sure to modify Grant::borrow_fmap to copy the flag over
|
||||
MemoryType::WriteCombining => page_flags = page_flags.write_combining(true),
|
||||
MemoryType::Uncacheable => page_flags = page_flags.uncacheable(true),
|
||||
MemoryType::DeviceMemory => page_flags = page_flags.device_memory(true),
|
||||
|
||||
Reference in New Issue
Block a user