diff --git a/Cargo.lock b/Cargo.lock index 67719ec..786e057 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,7 +39,7 @@ name = "backtrace-sys" version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -72,7 +72,7 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -173,14 +173,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "kernel" -version = "0.1.53" +version = "0.1.54" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "clippy 0.0.209 (registry+https://github.com/rust-lang/crates.io-index)", "goblin 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", "linked_list_allocator 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "raw-cpuid 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.53", + "redox_syscall 0.1.54", "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "slab_allocator 0.3.1", "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -269,7 +269,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -277,7 +277,7 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.53" +version = "0.1.54" [[package]] name = "regex" @@ -497,7 +497,7 @@ dependencies = [ "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1efca0b863ca03ed4c109fb1c55e0bc4bbeb221d3e103d86251046b06a526bd0" -"checksum cc 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "30f813bf45048a18eda9190fd3c6b78644146056740c43172a5a3699118588fd" +"checksum cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83" "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" "checksum clippy 0.0.209 (registry+https://github.com/rust-lang/crates.io-index)" = "fe56cba96f8d67cd3af996bd2c61fbfea263cc555db9180dc1f7413418454c7d" "checksum clippy_lints 0.0.209 (registry+https://github.com/rust-lang/crates.io-index)" = "891679ac4d0890425ce9aa4db6ab7c05a60506048fb5e0fc2ae2eeaeb02626e8" diff --git a/Cargo.toml b/Cargo.toml index 0ef936c..378a4c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kernel" -version = "0.1.53" +version = "0.1.54" build = "build.rs" [lib] diff --git a/src/syscall/driver.rs b/src/syscall/driver.rs index 0529bc9..cef064c 100644 --- a/src/syscall/driver.rs +++ b/src/syscall/driver.rs @@ -5,7 +5,7 @@ use paging::entry::EntryFlags; use context; use context::memory::Grant; use syscall::error::{Error, EFAULT, EINVAL, ENOMEM, EPERM, ESRCH, Result}; -use syscall::flag::{PHYSMAP_WRITE, PHYSMAP_WRITE_COMBINE}; +use syscall::flag::{PHYSMAP_WRITE, PHYSMAP_WRITE_COMBINE, PHYSMAP_NO_CACHE}; fn enforce_root() -> Result<()> { let contexts = context::contexts(); @@ -73,6 +73,9 @@ pub fn inner_physmap(physical_address: usize, size: usize, flags: usize) -> Resu if flags & PHYSMAP_WRITE_COMBINE == PHYSMAP_WRITE_COMBINE { entry_flags |= EntryFlags::HUGE_PAGE; } + if flags & PHYSMAP_NO_CACHE == PHYSMAP_NO_CACHE { + entry_flags |= EntryFlags::NO_CACHE; + } let mut i = 0; while i < grants.len() { diff --git a/syscall b/syscall index a5c19c5..5cdc240 160000 --- a/syscall +++ b/syscall @@ -1 +1 @@ -Subproject commit a5c19c54dec6294533af99e733ced7ccac854743 +Subproject commit 5cdc240d1338b53a1d8b9f652b0cc628317f3109