diff --git a/Cargo.lock b/Cargo.lock index 075a262201a69cbad8ebd41efe14e7208c21238c..87e7aaf46a5728d63954f580e83e84f65c18d09b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -21,9 +21,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -32,7 +32,7 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -52,14 +52,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cargo_metadata" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -74,32 +74,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "clippy" -version = "0.0.206" +version = "0.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy_lints 0.0.206 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy_lints 0.0.209 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clippy_lints" -version = "0.0.206" +version = "0.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cargo_metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -130,11 +130,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "goblin" -version = "0.0.10" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "plain 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "scroll 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -170,14 +170,14 @@ name = "kernel" version = "0.1.33" dependencies = [ "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy 0.0.206 (registry+https://github.com/rust-lang/crates.io-index)", - "goblin 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "linked_list_allocator 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "raw-cpuid 3.1.0 (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.2 (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.40", "slab_allocator 0.3.1", "spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "x86 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x86 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -187,12 +187,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.41" +version = "0.2.42" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "linked_list_allocator" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -208,7 +208,7 @@ name = "memchr" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -218,12 +218,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "plain" -version = "0.0.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -248,7 +248,7 @@ name = "quote" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -261,11 +261,14 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "3.1.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -274,19 +277,19 @@ version = "0.1.40" [[package]] name = "regex" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -307,7 +310,7 @@ dependencies = [ [[package]] name = "scroll" -version = "0.5.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -316,7 +319,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -326,34 +329,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.19" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "slab_allocator" version = "0.3.1" dependencies = [ - "linked_list_allocator 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "linked_list_allocator 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -364,10 +367,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -386,7 +389,7 @@ name = "toml" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -442,7 +445,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -461,9 +464,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "x86" -version = "0.7.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "raw-cpuid 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -475,45 +479,45 @@ dependencies = [ "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" "checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" -"checksum cargo_metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ebd6272a2ca4fd39dbabbd6611eb03df45c2259b3b80b39a9ff8fbdcf42a4b3" +"checksum cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "682476b87b3e22cd3820d86b26cd8603cd84ab76dce7547b2631858347aa8967" "checksum cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "49ec142f5768efb5b7622aebc3fdbdbb8950a4b9ba996393cb76ef7466e8747d" "checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18" -"checksum clippy 0.0.206 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ee3a52bb1a86cbd575205449951cb425c14afcebc4f1cb7a423cee1e9f7f1f" -"checksum clippy_lints 0.0.206 (registry+https://github.com/rust-lang/crates.io-index)" = "9d936ee2f2a30d1421d57d653dba488f806f25e46e24a8fe667bcbfb9fa7cfee" +"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" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" -"checksum goblin 0.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81af14056c25d33759862c5ae2035452acb1255bfb1b16db57819f183921e259" +"checksum goblin 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5e3ba9fec4dc9a09553388bff2724d3bf06bd64013539f2d3e1e3838eefb310a" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" "checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8" "checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" "checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682" "checksum lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e6412c5e2ad9584b0b8e979393122026cdd6d2a80b933f890dcd694ddbe73739" -"checksum libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)" = "ac8ebf8343a981e2fa97042b14768f02ed3e1d602eac06cae6166df3c8ced206" -"checksum linked_list_allocator 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1ee3eeeadfa301cf51b59684c034ad47a9796d03a8b70650d46b6b400a4a3258" +"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1" +"checksum linked_list_allocator 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ff3122438431172229f65f54f3c7eb9924a9f14e0df1895756cb19834e3b93" "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum plain 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "595830506990cbd6a1a08ed73bd9b40beb4692f38334885bf25a5daa654c6fae" -"checksum proc-macro2 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1fa93823f53cfd0f5ac117b189aed6cfdfb2cfc0a9d82e956dd7927595ed7d46" +"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +"checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6" "checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" "checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" "checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035" "checksum raw-cpuid 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13b844e4049605ff38fed943f5c7b2c691fad68d9d5bf074d2720554c4e48246" -"checksum raw-cpuid 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "233ec1847057cf4d4591a0d76908aa12812140b11ea7d7d05b4c38cadb069c31" -"checksum regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75ecf88252dce580404a22444fc7d626c01815debba56a7f4f536772a5ff19d3" -"checksum regex-syntax 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1ac0f60d675cc6cf13a20ec076568254472551051ad5dd050364d70671bf6b" +"checksum raw-cpuid 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "90e0d3209fac374e168cef2d8806dde7b31ef0ee82a965bcc0bec562c078a6f5" +"checksum regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13c93d55961981ba9226a213b385216f83ab43bd6ac53ab16b2eeb47e337cf4e" +"checksum regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05b06a75f5217880fc5e905952a42750bf44787e56a6c6d6852ed0992f5e1d54" "checksum rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "76d7ba1feafada44f2d38eed812bd2489a03c0f5abb975799251518b68848649" "checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a" -"checksum scroll 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d916a75d18d4c559fa7312afe6f522fe5b63176e6591d02ed81017c22f8ea27" +"checksum scroll 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66f024a8cc5e456eb870f688dbd899c84f61190c82c7a911e40f926941969074" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)" = "fba5be06346c5200249c8c8ca4ccba4a09e8747c71c16e420bd359a0db4d8f91" -"checksum serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)" = "79e4620ba6fbe051fc7506fab6f84205823564d55da18d55b695160fb3479cd8" -"checksum serde_json 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "93aee34bb692dde91e602871bc792dd319e489c7308cdbbe5f27cf27c64280f5" +"checksum serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)" = "e9a2d9a9ac5120e0f768801ca2b58ad6eec929dc9d1d616c162f208869c2ce95" +"checksum serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)" = "0a90213fa7e0f5eac3f7afe2d5ff6b088af515052cc7303bd68c7e3b91a3fb79" +"checksum serde_json 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "eb40600c756f02d7ea34943626cefa85732fdae5f95b90b31f9797b3c526d1e6" "checksum spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14db77c5b914df6d6173dda9a3b3f5937bd802934fa5edaf934df06a3491e56f" -"checksum syn 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6dfd71b2be5a58ee30a6f8ea355ba8290d397131c00dfa55c3d34e6e13db5101" +"checksum syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c67da57e61ebc7b7b6fff56bb34440ca3a83db037320b0507af4c10368deda7d" "checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" "checksum toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a0263c6c02c4db6c8f7681f9fd35e90de799ebd4cfdeab77a38f4ff6b3d8c0d9" "checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" @@ -524,7 +528,7 @@ dependencies = [ "checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" +"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum x86 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "127728f29f7cfb243a9264c80fc7e57bd1abb3ab015850b05736efda2abe5859" +"checksum x86 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "178718d3f2c7dd98d44f8e353b0ccc8c89b2e81e31e5eed93e7fdf5f36db7a13" diff --git a/Cargo.toml b/Cargo.toml index 72e0ae1d87968785ff40e4af788f0c61e015b005..03debdda61543f10e3ce59e03e56e38ff8d8f388 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,21 +9,21 @@ path = "src/lib.rs" crate-type = ["staticlib"] [dependencies] -bitflags = "1" -clippy = { version = "*", optional = true } -linked_list_allocator = "0.6.1" -raw-cpuid = "3.0" +bitflags = "1.0.3" +clippy = { version = "0.0.209", optional = true } +linked_list_allocator = "0.6.2" +raw-cpuid = "4.0.0" redox_syscall = { path = "syscall" } slab_allocator = { path = "slab_allocator", optional = true } -spin = "0.4" +spin = "0.4.8" [dependencies.goblin] -version = "0.0.10" +version = "0.0.15" default-features = false features = ["elf32", "elf64"] [dependencies.x86] -version = "0.7" +version = "0.9.0" default-features = false [features] diff --git a/src/allocator/linked_list.rs b/src/allocator/linked_list.rs index b7de5a1b8de64d9714d3b287253768644a71b4a5..1887256ba4b2b00b036c7c01a262c8ac80490a79 100644 --- a/src/allocator/linked_list.rs +++ b/src/allocator/linked_list.rs @@ -1,4 +1,4 @@ -use alloc::heap::{AllocErr, GlobalAlloc, Layout, Opaque}; +use core::alloc::{AllocErr, GlobalAlloc, Layout}; use core::ptr::NonNull; use linked_list_allocator::Heap; use spin::Mutex; @@ -16,7 +16,7 @@ impl Allocator { } unsafe impl GlobalAlloc for Allocator { - unsafe fn alloc(&self, layout: Layout) -> *mut Opaque { + unsafe fn alloc(&self, layout: Layout) -> *mut u8 { loop { let res = if let Some(ref mut heap) = *HEAP.lock() { heap.allocate_first_fit(layout) @@ -40,12 +40,12 @@ unsafe impl GlobalAlloc for Allocator { panic!("__rust_allocate: heap not initialized"); } }, - other => return other.ok().map_or(0 as *mut Opaque, |allocation| allocation.as_ptr()), + other => return other.ok().map_or(0 as *mut u8, |allocation| allocation.as_ptr()), } } } - unsafe fn dealloc(&self, ptr: *mut Opaque, layout: Layout) { + unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { if let Some(ref mut heap) = *HEAP.lock() { heap.deallocate(NonNull::new_unchecked(ptr), layout) } else { diff --git a/src/allocator/slab.rs b/src/allocator/slab.rs index ddc50501412ba70e03f8501d6ce9232889cec300..9ada9e689926b602964943b23c4ba7c113e0f3c0 100644 --- a/src/allocator/slab.rs +++ b/src/allocator/slab.rs @@ -1,4 +1,4 @@ -use alloc::heap::{Alloc, AllocErr, Layout}; +use core::alloc::{Alloc, AllocErr, Layout}; use spin::Mutex; use slab_allocator::Heap; diff --git a/src/arch/x86_64/device/cpu.rs b/src/arch/x86_64/device/cpu.rs index e48547b34b697ee1d9b0490b9c35174ef5ff85a0..516ebfe2cda9611cb1e34bca6b62a1d2718e79b7 100644 --- a/src/arch/x86_64/device/cpu.rs +++ b/src/arch/x86_64/device/cpu.rs @@ -115,7 +115,7 @@ pub fn cpu_info<W: Write>(w: &mut W) -> Result { if info.has_rep_movsb_stosb() { write!(w, " erms")? }; if info.has_invpcid() { write!(w, " invpcid")? }; if info.has_rtm() { write!(w, " rtm")? }; - if info.has_qm() { write!(w, " qm")? }; + //if info.has_qm() { write!(w, " qm")? }; if info.has_fpu_cs_ds_deprecated() { write!(w, " fpu_seg")? }; if info.has_mpx() { write!(w, " mpx")? }; } diff --git a/src/arch/x86_64/device/local_apic.rs b/src/arch/x86_64/device/local_apic.rs index 0b5c175075ccd8fcd164c092aa5e24739c9c491a..2bb7e2784609041a97c8bfe652bb751c86c4f5ca 100644 --- a/src/arch/x86_64/device/local_apic.rs +++ b/src/arch/x86_64/device/local_apic.rs @@ -1,6 +1,6 @@ use core::intrinsics::{volatile_load, volatile_store}; -use x86::cpuid::CpuId; -use x86::msr::*; +use x86::shared::cpuid::CpuId; +use x86::shared::msr::*; use memory::Frame; use paging::{ActivePageTable, PhysicalAddress, Page, VirtualAddress}; diff --git a/src/arch/x86_64/gdt.rs b/src/arch/x86_64/gdt.rs index 00c9430a5482e0dde51d50efa032ce7a2e45337b..9228093c14dff324db0d4e5c8703c67ad9ef2ae7 100644 --- a/src/arch/x86_64/gdt.rs +++ b/src/arch/x86_64/gdt.rs @@ -1,9 +1,12 @@ //! Global descriptor table use core::mem; -use x86::dtables::{self, DescriptorTablePointer}; -use x86::segmentation::{self, SegmentSelector}; -use x86::task::{self, TaskStateSegment}; +use x86::current::segmentation::set_cs; +use x86::current::task::TaskStateSegment; +use x86::shared::PrivilegeLevel; +use x86::shared::dtables::{self, DescriptorTablePointer}; +use x86::shared::segmentation::{self, SegmentDescriptor, SegmentSelector}; +use x86::shared::task; pub const GDT_NULL: usize = 0; pub const GDT_KERNEL_CODE: usize = 1; @@ -33,9 +36,9 @@ pub const GDT_F_PAGE_SIZE: u8 = 1 << 7; pub const GDT_F_PROTECTED_MODE: u8 = 1 << 6; pub const GDT_F_LONG_MODE: u8 = 1 << 5; -static mut INIT_GDTR: DescriptorTablePointer = DescriptorTablePointer { +static mut INIT_GDTR: DescriptorTablePointer<SegmentDescriptor> = DescriptorTablePointer { limit: 0, - base: 0 + base: 0 as *const SegmentDescriptor }; static mut INIT_GDT: [GdtEntry; 4] = [ @@ -50,9 +53,9 @@ static mut INIT_GDT: [GdtEntry; 4] = [ ]; #[thread_local] -pub static mut GDTR: DescriptorTablePointer = DescriptorTablePointer { +pub static mut GDTR: DescriptorTablePointer<SegmentDescriptor> = DescriptorTablePointer { limit: 0, - base: 0 + base: 0 as *const SegmentDescriptor }; #[thread_local] @@ -105,18 +108,18 @@ pub unsafe fn init() { // Setup the initial GDT with TLS, so we can setup the TLS GDT (a little confusing) // This means that each CPU will have its own GDT, but we only need to define it once as a thread local INIT_GDTR.limit = (INIT_GDT.len() * mem::size_of::<GdtEntry>() - 1) as u16; - INIT_GDTR.base = INIT_GDT.as_ptr() as u64; + INIT_GDTR.base = INIT_GDT.as_ptr() as *const SegmentDescriptor; // Load the initial GDT, before we have access to thread locals dtables::lgdt(&INIT_GDTR); // Load the segment descriptors - segmentation::load_cs(SegmentSelector::new(GDT_KERNEL_CODE as u16)); - segmentation::load_ds(SegmentSelector::new(GDT_KERNEL_DATA as u16)); - segmentation::load_es(SegmentSelector::new(GDT_KERNEL_DATA as u16)); - segmentation::load_fs(SegmentSelector::new(GDT_KERNEL_DATA as u16)); - segmentation::load_gs(SegmentSelector::new(GDT_KERNEL_DATA as u16)); - segmentation::load_ss(SegmentSelector::new(GDT_KERNEL_DATA as u16)); + set_cs(SegmentSelector::new(GDT_KERNEL_CODE as u16, PrivilegeLevel::Ring0)); + segmentation::load_ds(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); + segmentation::load_es(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); + segmentation::load_fs(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); + segmentation::load_gs(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); + segmentation::load_ss(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); } /// Initialize GDT with TLS @@ -128,11 +131,11 @@ pub unsafe fn init_paging(tcb_offset: usize, stack_offset: usize) { dtables::lgdt(&INIT_GDTR); // Load the segment descriptors - segmentation::load_fs(SegmentSelector::new(GDT_KERNEL_TLS as u16)); + segmentation::load_fs(SegmentSelector::new(GDT_KERNEL_TLS as u16, PrivilegeLevel::Ring0)); // Now that we have access to thread locals, setup the AP's individual GDT GDTR.limit = (GDT.len() * mem::size_of::<GdtEntry>() - 1) as u16; - GDTR.base = GDT.as_ptr() as u64; + GDTR.base = GDT.as_ptr() as *const SegmentDescriptor; // Set the TLS segment to the offset of the Thread Control Block GDT[GDT_KERNEL_TLS].set_offset(tcb_offset as u32); @@ -151,15 +154,15 @@ pub unsafe fn init_paging(tcb_offset: usize, stack_offset: usize) { dtables::lgdt(&GDTR); // Reload the segment descriptors - segmentation::load_cs(SegmentSelector::new(GDT_KERNEL_CODE as u16)); - segmentation::load_ds(SegmentSelector::new(GDT_KERNEL_DATA as u16)); - segmentation::load_es(SegmentSelector::new(GDT_KERNEL_DATA as u16)); - segmentation::load_fs(SegmentSelector::new(GDT_KERNEL_TLS as u16)); - segmentation::load_gs(SegmentSelector::new(GDT_KERNEL_DATA as u16)); - segmentation::load_ss(SegmentSelector::new(GDT_KERNEL_DATA as u16)); + set_cs(SegmentSelector::new(GDT_KERNEL_CODE as u16, PrivilegeLevel::Ring0)); + segmentation::load_ds(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); + segmentation::load_es(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); + segmentation::load_fs(SegmentSelector::new(GDT_KERNEL_TLS as u16, PrivilegeLevel::Ring0)); + segmentation::load_gs(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); + segmentation::load_ss(SegmentSelector::new(GDT_KERNEL_DATA as u16, PrivilegeLevel::Ring0)); // Load the task register - task::load_ltr(SegmentSelector::new(GDT_TSS as u16)); + task::load_tr(SegmentSelector::new(GDT_TSS as u16, PrivilegeLevel::Ring0)); } #[derive(Copy, Clone, Debug)] diff --git a/src/arch/x86_64/graphical_debug/display.rs b/src/arch/x86_64/graphical_debug/display.rs index 778c0bd74aa25608a2e372c3480399131e2b03a6..9a130750a0022696f596fb0f2ac386a1008d7529 100644 --- a/src/arch/x86_64/graphical_debug/display.rs +++ b/src/arch/x86_64/graphical_debug/display.rs @@ -1,7 +1,5 @@ -use alloc::allocator::{Alloc, Layout}; -use alloc::heap::Heap; +use core::alloc::{Alloc, GlobalAlloc, Layout}; use core::{cmp, slice}; -use core::ptr::NonNull; use super::FONT; use super::primitive::{fast_set32, fast_set64, fast_copy}; @@ -17,7 +15,7 @@ pub struct Display { impl Display { pub fn new(width: usize, height: usize, onscreen: usize) -> Display { let size = width * height; - let offscreen = unsafe { Heap.alloc(Layout::from_size_align_unchecked(size * 4, 4096)).unwrap().as_ptr() }; + let offscreen = unsafe { ::ALLOCATOR.alloc(Layout::from_size_align_unchecked(size * 4, 4096)).unwrap() }; unsafe { fast_set64(offscreen as *mut u64, 0, size/2) }; Display { width: width, @@ -146,6 +144,6 @@ impl Display { impl Drop for Display { fn drop(&mut self) { - unsafe { Heap.dealloc(NonNull::new(self.offscreen.as_mut_ptr()).unwrap().as_opaque(), Layout::from_size_align_unchecked(self.offscreen.len() * 4, 4096)) }; + unsafe { ::ALLOCATOR.dealloc(self.offscreen.as_mut_ptr() as *mut u8, Layout::from_size_align_unchecked(self.offscreen.len() * 4, 4096)) }; } } diff --git a/src/arch/x86_64/idt.rs b/src/arch/x86_64/idt.rs index 59ec6c075db1bd27703e599dd262672364a36790..1317ba6b02cb0527ce15778954b210a07822abde 100644 --- a/src/arch/x86_64/idt.rs +++ b/src/arch/x86_64/idt.rs @@ -1,16 +1,17 @@ use core::mem; -use x86::dtables::{self, DescriptorTablePointer}; +use x86::current::irq::IdtEntry as X86IdtEntry; +use x86::shared::dtables::{self, DescriptorTablePointer}; use interrupt::*; -pub static mut INIT_IDTR: DescriptorTablePointer = DescriptorTablePointer { +pub static mut INIT_IDTR: DescriptorTablePointer<X86IdtEntry> = DescriptorTablePointer { limit: 0, - base: 0 + base: 0 as *const X86IdtEntry }; -pub static mut IDTR: DescriptorTablePointer = DescriptorTablePointer { +pub static mut IDTR: DescriptorTablePointer<X86IdtEntry> = DescriptorTablePointer { limit: 0, - base: 0 + base: 0 as *const X86IdtEntry }; pub static mut IDT: [IdtEntry; 256] = [IdtEntry::new(); 256]; @@ -21,7 +22,7 @@ pub unsafe fn init() { pub unsafe fn init_paging() { IDTR.limit = (IDT.len() * mem::size_of::<IdtEntry>() - 1) as u16; - IDTR.base = IDT.as_ptr() as u64; + IDTR.base = IDT.as_ptr() as *const X86IdtEntry; // Set up exceptions IDT[0].set_func(exception::divide_by_zero); diff --git a/src/arch/x86_64/paging/mod.rs b/src/arch/x86_64/paging/mod.rs index f29fead812ffe3ba29797132a242800bc6a9ef7a..b2fb446d28f8c1f934f9d5ab34c3fc0df2189d36 100644 --- a/src/arch/x86_64/paging/mod.rs +++ b/src/arch/x86_64/paging/mod.rs @@ -3,7 +3,7 @@ use core::{mem, ptr}; use core::ops::{Deref, DerefMut}; -use x86::{msr, tlb}; +use x86::shared::{control_regs, msr, tlb}; use memory::{allocate_frames, Frame}; @@ -283,15 +283,13 @@ impl ActivePageTable { } pub fn switch(&mut self, new_table: InactivePageTable) -> InactivePageTable { - use x86::controlregs; - let old_table = InactivePageTable { p4_frame: Frame::containing_address( - PhysicalAddress::new(unsafe { controlregs::cr3() } as usize) + PhysicalAddress::new(unsafe { control_regs::cr3() } as usize) ), }; unsafe { - controlregs::cr3_write(new_table.p4_frame.start_address().get() as u64); + control_regs::cr3_write(new_table.p4_frame.start_address().get() as u64); } old_table } @@ -307,10 +305,8 @@ impl ActivePageTable { pub fn with<F>(&mut self, table: &mut InactivePageTable, temporary_page: &mut TemporaryPage, f: F) where F: FnOnce(&mut Mapper) { - use x86::controlregs; - { - let backup = Frame::containing_address(PhysicalAddress::new(unsafe { controlregs::cr3() as usize })); + let backup = Frame::containing_address(PhysicalAddress::new(unsafe { control_regs::cr3() as usize })); // map temporary_page to current p4 table let p4_table = temporary_page.map_table_frame(backup.clone(), EntryFlags::PRESENT | EntryFlags::WRITABLE | EntryFlags::NO_EXECUTE, self); @@ -331,8 +327,7 @@ impl ActivePageTable { } pub unsafe fn address(&self) -> usize { - use x86::controlregs; - controlregs::cr3() as usize + control_regs::cr3() as usize } } diff --git a/src/context/file.rs b/src/context/file.rs index 222cd37a06191ebd0d029db588b61debf65fdcc4..d9dbf2952656e409167c8ce519ce2cfe2b342ed1 100644 --- a/src/context/file.rs +++ b/src/context/file.rs @@ -5,7 +5,6 @@ use event; use spin::RwLock; use scheme::{self, SchemeId}; use syscall::error::{Result, Error, EBADF}; -use scheme::FileHandle; /// A file description #[derive(Debug)] diff --git a/src/context/list.rs b/src/context/list.rs index 6b2dc3d33a8aff7840348821ac47825670fc2dfb..bbc8e28c110b60a595848cf5d0ca050e2f762f76 100644 --- a/src/context/list.rs +++ b/src/context/list.rs @@ -1,8 +1,7 @@ -use alloc::allocator::{Alloc, Layout}; use alloc::arc::Arc; use alloc::boxed::Box; -use alloc::heap::Heap; use alloc::BTreeMap; +use core::alloc::{Alloc, GlobalAlloc, Layout}; use core::mem; use core::sync::atomic::Ordering; use paging; @@ -67,7 +66,7 @@ impl ContextList { let context_lock = self.new_context()?; { let mut context = context_lock.write(); - let mut fx = unsafe { Box::from_raw(Heap.alloc(Layout::from_size_align_unchecked(512, 16)).unwrap().as_ptr() as *mut [u8; 512]) }; + let mut fx = unsafe { Box::from_raw(::ALLOCATOR.alloc(Layout::from_size_align_unchecked(512, 16)) as *mut [u8; 512]) }; for b in fx.iter_mut() { *b = 0; } diff --git a/src/context/mod.rs b/src/context/mod.rs index 3902794d1cc93fc528d11eeb8330415263284c1e..b815690f92548caa559ede678e6c17cc00155cc0 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -1,7 +1,6 @@ //! Context management -use alloc::allocator::{Alloc, Layout}; use alloc::boxed::Box; -use alloc::heap::Heap; +use core::alloc::{Alloc, GlobalAlloc, Layout}; use core::sync::atomic::Ordering; use spin::{Once, RwLock, RwLockReadGuard, RwLockWriteGuard}; @@ -49,7 +48,7 @@ pub fn init() { let mut contexts = contexts_mut(); let context_lock = contexts.new_context().expect("could not initialize first context"); let mut context = context_lock.write(); - let mut fx = unsafe { Box::from_raw(Heap.alloc(Layout::from_size_align_unchecked(512, 16)).unwrap().as_ptr() as *mut [u8; 512]) }; + let mut fx = unsafe { Box::from_raw(::ALLOCATOR.alloc(Layout::from_size_align_unchecked(512, 16)) as *mut [u8; 512]) }; for b in fx.iter_mut() { *b = 0; } diff --git a/src/lib.rs b/src/lib.rs index 530377dc0679a8cfd934e1042f9c4903d05e59bf..a8e6c59c850c3e17eb45741894c658365744552c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,6 +27,7 @@ #![feature(lang_items)] #![feature(naked_functions)] #![feature(never_type)] +#![feature(panic_implementation)] #![feature(ptr_internals)] #![feature(thread_local)] #![feature(unique)] diff --git a/src/panic.rs b/src/panic.rs index 7c3ead336eb239a0a48de2b2b0b919a496e0f380..24eb00df4db8b777f4a521c4a70cd30f7dea125f 100644 --- a/src/panic.rs +++ b/src/panic.rs @@ -1,5 +1,7 @@ //! Intrinsics for panic handling +use core::panic::PanicInfo; + use interrupt; #[lang = "eh_personality"] @@ -7,12 +9,10 @@ use interrupt; pub extern "C" fn rust_eh_personality() {} /// Required to handle panics -#[lang = "panic_fmt"] +#[panic_implementation] #[no_mangle] -pub extern "C" fn rust_begin_unwind(fmt: ::core::fmt::Arguments, file: &str, line: u32) -> ! { - println!("PANIC: {}", fmt); - println!("FILE: {}", file); - println!("LINE: {}", line); +pub extern "C" fn rust_begin_unwind(info: &PanicInfo) -> ! { + println!("KERNEL PANIC: {}", info); unsafe { interrupt::stack_trace(); } diff --git a/src/syscall/process.rs b/src/syscall/process.rs index 362b7359fb5c9e897551abdb461318257871dac0..297f645b97637022ac64335e30b6762ca0bcc18d 100644 --- a/src/syscall/process.rs +++ b/src/syscall/process.rs @@ -1,8 +1,7 @@ -use alloc::allocator::{Alloc, Layout}; use alloc::arc::Arc; use alloc::boxed::Box; -use alloc::heap::Heap; use alloc::{BTreeMap, Vec}; +use core::alloc::{Alloc, GlobalAlloc, Layout}; use core::{intrinsics, mem, str}; use core::ops::DerefMut; use spin::Mutex; @@ -113,7 +112,7 @@ pub fn clone(flags: usize, stack_base: usize) -> Result<ContextId> { arch = context.arch.clone(); if let Some(ref fx) = context.kfx { - let mut new_fx = unsafe { Box::from_raw(Heap.alloc(Layout::from_size_align_unchecked(512, 16)).unwrap().as_ptr() as *mut [u8; 512]) }; + let mut new_fx = unsafe { Box::from_raw(::ALLOCATOR.alloc(Layout::from_size_align_unchecked(512, 16)) as *mut [u8; 512]) }; for (new_b, b) in new_fx.iter_mut().zip(fx.iter()) { *new_b = *b; }