Skip to content

Commit

Permalink
remove old commented out test code
Browse files Browse the repository at this point in the history
  • Loading branch information
EIRNf committed Nov 15, 2024
1 parent 780b481 commit 0296df5
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/kernel/src/arch/amd64/memory/pagetables/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,33 +194,3 @@ impl From<&MappingSettings> for EntryFlags {
}
}


// impl From<&MappingSettings> for EntryFlags {
// fn from(settings: &MappingSettings) -> Self {
// let c = match settings.cache() {
// CacheType::WriteBack => EntryFlags::empty(),
// CacheType::WriteThrough => (1 << 3).into(),
// CacheType::WriteCombining => EntryFlags::empty(),
// CacheType::Uncacheable => (1 << 4).into(),
// CacheType::MemoryMappedIO => todo!("mapping MMIO CacheType to EntryFlags"),
// };
// let mut p = EntryFlags::empty();
// if settings.perms().contains(2) {
// p |= (1 << 1).into();
// }
// if !settings.perms().contains(4) {
// p |= (1 << 63).into();
// }
// let f = if settings.flags().contains(1) {
// (1 << 8).into()
// } else {
// EntryFlags::empty()
// };
// let u = if settings.flags().contains(2) {
// (1 << 2).into()
// } else {
// EntryFlags::empty()
// };
// p | c | f | u
// }
// }

0 comments on commit 0296df5

Please sign in to comment.