Next Generation WASM Microkernel Operating System

refactor: the great renamening (#630)

This change adopts a new, more descriptive naming policy for workspace crates: `k23-<crate name>` rather than the previous much less helpful `k<crate name>`.

authored by

Jonas Kruckenberg and committed by
GitHub
17e99655 3fe6c9b6

+541 -640
+238 -339
Cargo.lock
··· 3 3 version = 4 4 4 5 5 [[package]] 6 - name = "abort" 7 - version = "0.1.0" 8 - dependencies = [ 9 - "cfg-if", 10 - "riscv", 11 - ] 12 - 13 - [[package]] 14 6 name = "addr2line" 15 7 version = "0.25.1" 16 8 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 118 110 checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" 119 111 120 112 [[package]] 121 - name = "arrayvec" 122 - version = "0.1.0" 123 - 124 - [[package]] 125 113 name = "autocfg" 126 114 version = "1.5.0" 127 115 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 139 127 "miniz_oxide", 140 128 "object", 141 129 "rustc-demangle", 142 - "windows-link 0.2.1", 130 + "windows-link", 143 131 ] 144 132 145 133 [[package]] ··· 174 162 175 163 [[package]] 176 164 name = "camino" 177 - version = "1.2.1" 165 + version = "1.2.2" 178 166 source = "registry+https://github.com/rust-lang/crates.io-index" 179 - checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" 167 + checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" 180 168 dependencies = [ 181 169 "serde_core", 182 170 ] ··· 212 200 213 201 [[package]] 214 202 name = "cc" 215 - version = "1.2.47" 203 + version = "1.2.51" 216 204 source = "registry+https://github.com/rust-lang/crates.io-index" 217 - checksum = "cd405d82c84ff7f35739f175f67d8b9fb7687a0e84ccdc78bd3568839827cf07" 205 + checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" 218 206 dependencies = [ 219 207 "find-msvc-tools", 220 208 "jobserver", ··· 318 306 dependencies = [ 319 307 "once_cell", 320 308 "owo-colors", 321 - "tracing-core 0.1.34", 309 + "tracing-core 0.1.36", 322 310 "tracing-error 0.2.1", 323 311 ] 324 312 ··· 335 323 checksum = "688d7fbb8092b8de775ef2536f36c8c31f2bc4006ece2e8d8ad2d17d00ce0a2a" 336 324 dependencies = [ 337 325 "loom", 338 - "tracing 0.1.41", 339 - ] 340 - 341 - [[package]] 342 - name = "cpu-local" 343 - version = "0.1.0" 344 - dependencies = [ 345 - "util", 326 + "tracing 0.1.44", 346 327 ] 347 328 348 329 [[package]] ··· 647 628 checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 648 629 649 630 [[package]] 650 - name = "fdt" 651 - version = "0.1.0" 652 - dependencies = [ 653 - "fallible-iterator", 654 - ] 655 - 656 - [[package]] 657 631 name = "find-msvc-tools" 658 - version = "0.1.5" 632 + version = "0.1.6" 659 633 source = "registry+https://github.com/rust-lang/crates.io-index" 660 - checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" 634 + checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" 661 635 662 636 [[package]] 663 637 name = "fnv" ··· 743 717 744 718 [[package]] 745 719 name = "generator" 746 - version = "0.8.7" 720 + version = "0.8.8" 747 721 source = "registry+https://github.com/rust-lang/crates.io-index" 748 - checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" 722 + checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9" 749 723 dependencies = [ 750 724 "cc", 751 725 "cfg-if", 752 726 "libc", 753 727 "log", 754 728 "rustversion", 755 - "windows", 729 + "windows-link", 730 + "windows-result", 756 731 ] 757 732 758 733 [[package]] ··· 781 756 782 757 [[package]] 783 758 name = "git2" 784 - version = "0.20.2" 759 + version = "0.20.3" 785 760 source = "registry+https://github.com/rust-lang/crates.io-index" 786 - checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" 761 + checksum = "3e2b37e2f62729cdada11f0e6b3b6fe383c69c29fc619e391223e12856af308c" 787 762 dependencies = [ 788 763 "bitflags", 789 764 "libc", ··· 878 853 879 854 [[package]] 880 855 name = "icu_properties" 881 - version = "2.1.1" 856 + version = "2.1.2" 882 857 source = "registry+https://github.com/rust-lang/crates.io-index" 883 - checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" 858 + checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" 884 859 dependencies = [ 885 860 "icu_collections", 886 861 "icu_locale_core", ··· 892 867 893 868 [[package]] 894 869 name = "icu_properties_data" 895 - version = "2.1.1" 870 + version = "2.1.2" 896 871 source = "registry+https://github.com/rust-lang/crates.io-index" 897 - checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" 872 + checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" 898 873 899 874 [[package]] 900 875 name = "icu_provider" ··· 980 955 981 956 [[package]] 982 957 name = "itoa" 983 - version = "1.0.15" 958 + version = "1.0.17" 984 959 source = "registry+https://github.com/rust-lang/crates.io-index" 985 - checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 960 + checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" 986 961 987 962 [[package]] 988 963 name = "jobserver" ··· 996 971 997 972 [[package]] 998 973 name = "js-sys" 999 - version = "0.3.82" 974 + version = "0.3.83" 1000 975 source = "registry+https://github.com/rust-lang/crates.io-index" 1001 - checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" 976 + checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" 1002 977 dependencies = [ 1003 978 "once_cell", 1004 979 "wasm-bindgen", 1005 980 ] 1006 981 1007 982 [[package]] 1008 - name = "kaddr2line" 983 + name = "k23-abort" 984 + version = "0.1.0" 985 + dependencies = [ 986 + "cfg-if", 987 + "k23-riscv", 988 + ] 989 + 990 + [[package]] 991 + name = "k23-addr2line" 1009 992 version = "0.24.2" 1010 993 dependencies = [ 1011 994 "fallible-iterator", 1012 995 "gimli 0.31.1", 996 + "k23-spin", 1013 997 "smallvec", 1014 - "spin", 998 + ] 999 + 1000 + [[package]] 1001 + name = "k23-arrayvec" 1002 + version = "0.1.0" 1003 + 1004 + [[package]] 1005 + name = "k23-backtrace" 1006 + version = "0.1.0" 1007 + dependencies = [ 1008 + "fallible-iterator", 1009 + "gimli 0.31.1", 1010 + "k23-addr2line", 1011 + "k23-arrayvec", 1012 + "k23-unwind", 1013 + "rustc-demangle", 1014 + "xmas-elf", 1015 + ] 1016 + 1017 + [[package]] 1018 + name = "k23-cpu-local" 1019 + version = "0.1.0" 1020 + dependencies = [ 1021 + "k32-util", 1022 + ] 1023 + 1024 + [[package]] 1025 + name = "k23-fastrand" 1026 + version = "0.1.0" 1027 + dependencies = [ 1028 + "criterion", 1029 + ] 1030 + 1031 + [[package]] 1032 + name = "k23-fdt" 1033 + version = "0.1.0" 1034 + dependencies = [ 1035 + "fallible-iterator", 1036 + ] 1037 + 1038 + [[package]] 1039 + name = "k23-panic-unwind" 1040 + version = "0.1.0" 1041 + dependencies = [ 1042 + "k23-abort", 1043 + "k23-cpu-local", 1044 + "k23-riscv", 1045 + "k23-spin", 1046 + "k23-unwind", 1047 + "tracing 0.2.0", 1048 + ] 1049 + 1050 + [[package]] 1051 + name = "k23-riscv" 1052 + version = "0.1.0" 1053 + dependencies = [ 1054 + "bitflags", 1055 + "cfg-if", 1056 + "k23-spin", 1057 + "trap", 1058 + ] 1059 + 1060 + [[package]] 1061 + name = "k23-sharded-slab" 1062 + version = "0.1.7" 1063 + dependencies = [ 1064 + "k23-cpu-local", 1065 + "k23-spin", 1066 + "log", 1015 1067 ] 1016 1068 1017 1069 [[package]] 1070 + name = "k23-spin" 1071 + version = "0.1.0" 1072 + dependencies = [ 1073 + "cfg-if", 1074 + "k32-util", 1075 + "lazy_static", 1076 + "lock_api", 1077 + "loom", 1078 + "rand", 1079 + ] 1080 + 1081 + [[package]] 1082 + name = "k23-unwind" 1083 + version = "0.1.0" 1084 + dependencies = [ 1085 + "cfg-if", 1086 + "fallible-iterator", 1087 + "gimli 0.31.1", 1088 + "k23-abort", 1089 + "k23-spin", 1090 + "tracing 0.2.0", 1091 + ] 1092 + 1093 + [[package]] 1094 + name = "k23-wast" 1095 + version = "228.0.0" 1096 + dependencies = [ 1097 + "anyhow", 1098 + "bumpalo", 1099 + "gimli 0.31.1", 1100 + "hashbrown 0.15.5", 1101 + "k23-cpu-local", 1102 + "leb128fmt", 1103 + "libtest-mimic", 1104 + "memchr", 1105 + "unicode-width", 1106 + "wasm-encoder 0.241.2", 1107 + "wasmparser 0.228.0", 1108 + "wat", 1109 + ] 1110 + 1111 + [[package]] 1112 + name = "k32-util" 1113 + version = "0.1.0" 1114 + 1115 + [[package]] 1018 1116 name = "kasync" 1019 1117 version = "0.1.0" 1020 1118 dependencies = [ 1021 - "arrayvec", 1022 1119 "bitflags", 1023 1120 "cfg-if", 1024 1121 "cordyceps", 1025 - "cpu-local", 1026 1122 "criterion", 1027 1123 "futures", 1028 - "kfastrand", 1124 + "k23-arrayvec", 1125 + "k23-cpu-local", 1126 + "k23-fastrand", 1127 + "k23-panic-unwind", 1128 + "k23-spin", 1129 + "k32-util", 1029 1130 "lazy_static", 1030 1131 "loom", 1031 1132 "mycelium-bitfield", 1032 - "panic-unwind2", 1033 1133 "pin-project", 1034 - "spin", 1035 1134 "static_assertions", 1036 1135 "tracing 0.2.0", 1037 1136 "tracing-subscriber 0.3.0", 1038 - "util", 1039 - ] 1040 - 1041 - [[package]] 1042 - name = "kbacktrace" 1043 - version = "0.1.0" 1044 - dependencies = [ 1045 - "arrayvec", 1046 - "fallible-iterator", 1047 - "gimli 0.31.1", 1048 - "kaddr2line", 1049 - "rustc-demangle", 1050 - "unwind2", 1051 - "xmas-elf", 1052 1137 ] 1053 1138 1054 1139 [[package]] 1055 1140 name = "kernel" 1056 1141 version = "0.1.0" 1057 1142 dependencies = [ 1058 - "abort", 1059 1143 "anyhow", 1060 - "arrayvec", 1061 1144 "bitflags", 1062 1145 "bumpalo", 1063 1146 "cfg-if", 1064 1147 "cordyceps", 1065 - "cpu-local", 1066 1148 "cranelift-codegen", 1067 1149 "cranelift-entity", 1068 1150 "cranelift-frontend", 1069 1151 "fallible-iterator", 1070 - "fdt", 1071 1152 "futures", 1072 1153 "gimli 0.31.1", 1073 1154 "hashbrown 0.15.5", 1074 - "kaddr2line", 1155 + "k23-abort", 1156 + "k23-addr2line", 1157 + "k23-arrayvec", 1158 + "k23-cpu-local", 1159 + "k23-fastrand", 1160 + "k23-fdt", 1161 + "k23-panic-unwind", 1162 + "k23-riscv", 1163 + "k23-sharded-slab", 1164 + "k23-spin", 1165 + "k23-unwind", 1166 + "k23-wast", 1167 + "k32-util", 1075 1168 "kasync", 1076 - "kfastrand", 1077 1169 "kmem", 1078 - "ksharded-slab", 1079 1170 "ktest", 1080 1171 "loader-api", 1081 1172 "log", 1082 1173 "mycelium-bitfield", 1083 1174 "ouroboros", 1084 - "panic-unwind2", 1085 1175 "pin-project", 1086 1176 "rand", 1087 1177 "rand_chacha", 1088 - "riscv", 1089 1178 "rustc-demangle", 1090 1179 "smallvec", 1091 - "spin", 1092 1180 "static_assertions", 1093 1181 "talc", 1094 1182 "target-lexicon", ··· 1096 1184 "tracing-core 0.2.0", 1097 1185 "trap", 1098 1186 "uart-16550", 1099 - "unwind2", 1100 - "util", 1101 1187 "vergen-git2", 1102 1188 "wasmparser 0.228.0", 1103 1189 "wasmtime-slab", 1104 - "wast 228.0.0", 1105 1190 "wavltree", 1106 1191 "xmas-elf", 1107 1192 ] 1108 1193 1109 1194 [[package]] 1110 - name = "kfastrand" 1111 - version = "0.1.0" 1112 - dependencies = [ 1113 - "criterion", 1114 - ] 1115 - 1116 - [[package]] 1117 1195 name = "kmem" 1118 1196 version = "0.1.0" 1119 1197 dependencies = [ 1120 - "arrayvec", 1121 - "cpu-local", 1198 + "k23-arrayvec", 1199 + "k23-cpu-local", 1200 + "k23-riscv", 1201 + "k23-spin", 1122 1202 "kmem", 1123 1203 "lock_api", 1124 1204 "log", ··· 1126 1206 "parking_lot", 1127 1207 "proptest", 1128 1208 "proptest-derive", 1129 - "riscv", 1130 - "spin", 1131 1209 "test-log", 1132 1210 ] 1133 1211 1134 1212 [[package]] 1135 - name = "ksharded-slab" 1136 - version = "0.1.7" 1137 - dependencies = [ 1138 - "cpu-local", 1139 - "log", 1140 - "spin", 1141 - ] 1142 - 1143 - [[package]] 1144 1213 name = "ktest" 1145 1214 version = "0.1.0" 1146 1215 dependencies = [ ··· 1171 1240 1172 1241 [[package]] 1173 1242 name = "libc" 1174 - version = "0.2.177" 1243 + version = "0.2.178" 1175 1244 source = "registry+https://github.com/rust-lang/crates.io-index" 1176 - checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" 1245 + checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" 1177 1246 1178 1247 [[package]] 1179 1248 name = "libgit2-sys" 1180 - version = "0.18.2+1.9.1" 1249 + version = "0.18.3+1.9.2" 1181 1250 source = "registry+https://github.com/rust-lang/crates.io-index" 1182 - checksum = "1c42fe03df2bd3c53a3a9c7317ad91d80c81cd1fb0caec8d7cc4cd2bfa10c222" 1251 + checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" 1183 1252 dependencies = [ 1184 1253 "cc", 1185 1254 "libc", ··· 1233 1302 name = "loader" 1234 1303 version = "0.1.0" 1235 1304 dependencies = [ 1236 - "abort", 1237 - "arrayvec", 1238 1305 "bitflags", 1239 1306 "cfg-if", 1240 1307 "fallible-iterator", 1241 - "fdt", 1308 + "k23-abort", 1309 + "k23-arrayvec", 1310 + "k23-fdt", 1311 + "k23-riscv", 1312 + "k23-spin", 1242 1313 "kmem", 1243 1314 "loader-api", 1244 1315 "log", 1245 1316 "rand", 1246 1317 "rand_chacha", 1247 - "riscv", 1248 - "spin", 1249 1318 "xmas-elf", 1250 1319 ] 1251 1320 ··· 1280 1349 "cfg-if", 1281 1350 "generator", 1282 1351 "scoped-tls", 1283 - "tracing 0.1.41", 1284 - "tracing-subscriber 0.3.20", 1352 + "tracing 0.1.44", 1353 + "tracing-subscriber 0.3.22", 1285 1354 ] 1286 1355 1287 1356 [[package]] ··· 1412 1481 dependencies = [ 1413 1482 "libc", 1414 1483 "winapi", 1415 - ] 1416 - 1417 - [[package]] 1418 - name = "panic-unwind2" 1419 - version = "0.1.0" 1420 - dependencies = [ 1421 - "abort", 1422 - "cpu-local", 1423 - "riscv", 1424 - "spin", 1425 - "tracing 0.2.0", 1426 - "unwind2", 1427 1484 ] 1428 1485 1429 1486 [[package]] ··· 1446 1503 "libc", 1447 1504 "redox_syscall", 1448 1505 "smallvec", 1449 - "windows-link 0.2.1", 1506 + "windows-link", 1450 1507 ] 1451 1508 1452 1509 [[package]] ··· 1523 1580 1524 1581 [[package]] 1525 1582 name = "portable-atomic" 1526 - version = "1.11.1" 1583 + version = "1.13.0" 1527 1584 source = "registry+https://github.com/rust-lang/crates.io-index" 1528 - checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" 1585 + checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" 1529 1586 1530 1587 [[package]] 1531 1588 name = "portable-atomic-util" ··· 1743 1800 checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" 1744 1801 1745 1802 [[package]] 1746 - name = "riscv" 1747 - version = "0.1.0" 1748 - dependencies = [ 1749 - "bitflags", 1750 - "cfg-if", 1751 - "spin", 1752 - "trap", 1753 - ] 1754 - 1755 - [[package]] 1756 1803 name = "rustc-demangle" 1757 1804 version = "0.1.26" 1758 1805 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1775 1822 1776 1823 [[package]] 1777 1824 name = "rustix" 1778 - version = "1.1.2" 1825 + version = "1.1.3" 1779 1826 source = "registry+https://github.com/rust-lang/crates.io-index" 1780 - checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" 1827 + checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" 1781 1828 dependencies = [ 1782 1829 "bitflags", 1783 1830 "errno", ··· 1803 1850 "tempfile", 1804 1851 "wait-timeout", 1805 1852 ] 1806 - 1807 - [[package]] 1808 - name = "ryu" 1809 - version = "1.0.20" 1810 - source = "registry+https://github.com/rust-lang/crates.io-index" 1811 - checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1812 1853 1813 1854 [[package]] 1814 1855 name = "same-file" ··· 1873 1914 1874 1915 [[package]] 1875 1916 name = "serde_json" 1876 - version = "1.0.145" 1917 + version = "1.0.148" 1877 1918 source = "registry+https://github.com/rust-lang/crates.io-index" 1878 - checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" 1919 + checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" 1879 1920 dependencies = [ 1880 1921 "itoa", 1881 1922 "memchr", 1882 - "ryu", 1883 1923 "serde", 1884 1924 "serde_core", 1925 + "zmij", 1885 1926 ] 1886 1927 1887 1928 [[package]] ··· 1915 1956 checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 1916 1957 1917 1958 [[package]] 1918 - name = "spin" 1919 - version = "0.1.0" 1920 - dependencies = [ 1921 - "cfg-if", 1922 - "lazy_static", 1923 - "lock_api", 1924 - "loom", 1925 - "rand", 1926 - "util", 1927 - ] 1928 - 1929 - [[package]] 1930 1959 name = "stable_deref_trait" 1931 1960 version = "1.2.1" 1932 1961 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1946 1975 1947 1976 [[package]] 1948 1977 name = "syn" 1949 - version = "2.0.111" 1978 + version = "2.0.112" 1950 1979 source = "registry+https://github.com/rust-lang/crates.io-index" 1951 - checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" 1980 + checksum = "21f182278bf2d2bcb3c88b1b08a37df029d71ce3d3ae26168e3c653b213b99d4" 1952 1981 dependencies = [ 1953 1982 "proc-macro2", 1954 1983 "quote", ··· 1983 2012 1984 2013 [[package]] 1985 2014 name = "tempfile" 1986 - version = "3.23.0" 2015 + version = "3.24.0" 1987 2016 source = "registry+https://github.com/rust-lang/crates.io-index" 1988 - checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" 2017 + checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" 1989 2018 dependencies = [ 1990 2019 "fastrand", 1991 2020 "getrandom", ··· 2002 2031 dependencies = [ 2003 2032 "env_logger", 2004 2033 "test-log-macros", 2005 - "tracing-subscriber 0.3.20", 2034 + "tracing-subscriber 0.3.22", 2006 2035 ] 2007 2036 2008 2037 [[package]] ··· 2172 2201 2173 2202 [[package]] 2174 2203 name = "tracing" 2175 - version = "0.1.41" 2204 + version = "0.1.44" 2176 2205 source = "registry+https://github.com/rust-lang/crates.io-index" 2177 - checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 2206 + checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" 2178 2207 dependencies = [ 2179 2208 "pin-project-lite", 2180 - "tracing-attributes 0.1.30", 2181 - "tracing-core 0.1.34", 2209 + "tracing-attributes 0.1.31", 2210 + "tracing-core 0.1.36", 2182 2211 ] 2183 2212 2184 2213 [[package]] ··· 2194 2223 2195 2224 [[package]] 2196 2225 name = "tracing-attributes" 2197 - version = "0.1.30" 2226 + version = "0.1.31" 2198 2227 source = "registry+https://github.com/rust-lang/crates.io-index" 2199 - checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" 2228 + checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" 2200 2229 dependencies = [ 2201 2230 "proc-macro2", 2202 2231 "quote", ··· 2215 2244 2216 2245 [[package]] 2217 2246 name = "tracing-core" 2218 - version = "0.1.34" 2247 + version = "0.1.36" 2219 2248 source = "registry+https://github.com/rust-lang/crates.io-index" 2220 - checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" 2249 + checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" 2221 2250 dependencies = [ 2222 2251 "once_cell", 2223 2252 "valuable", ··· 2248 2277 source = "registry+https://github.com/rust-lang/crates.io-index" 2249 2278 checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db" 2250 2279 dependencies = [ 2251 - "tracing 0.1.41", 2252 - "tracing-subscriber 0.3.20", 2280 + "tracing 0.1.44", 2281 + "tracing-subscriber 0.3.22", 2253 2282 ] 2254 2283 2255 2284 [[package]] ··· 2260 2289 dependencies = [ 2261 2290 "log", 2262 2291 "once_cell", 2263 - "tracing-core 0.1.34", 2292 + "tracing-core 0.1.36", 2264 2293 ] 2265 2294 2266 2295 [[package]] ··· 2293 2322 2294 2323 [[package]] 2295 2324 name = "tracing-subscriber" 2296 - version = "0.3.20" 2325 + version = "0.3.22" 2297 2326 source = "registry+https://github.com/rust-lang/crates.io-index" 2298 - checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" 2327 + checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" 2299 2328 dependencies = [ 2300 2329 "matchers", 2301 2330 "nu-ansi-term", ··· 2304 2333 "sharded-slab", 2305 2334 "smallvec", 2306 2335 "thread_local", 2307 - "tracing 0.1.41", 2308 - "tracing-core 0.1.34", 2336 + "tracing 0.1.44", 2337 + "tracing-core 0.1.36", 2309 2338 "tracing-log 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 2310 2339 ] 2311 2340 ··· 2318 2347 version = "0.1.0" 2319 2348 dependencies = [ 2320 2349 "bitflags", 2321 - "spin", 2350 + "k23-spin", 2322 2351 ] 2323 2352 2324 2353 [[package]] ··· 2340 2369 checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" 2341 2370 2342 2371 [[package]] 2343 - name = "unwind2" 2344 - version = "0.1.0" 2345 - dependencies = [ 2346 - "abort", 2347 - "cfg-if", 2348 - "fallible-iterator", 2349 - "gimli 0.31.1", 2350 - "spin", 2351 - "tracing 0.2.0", 2352 - ] 2353 - 2354 - [[package]] 2355 2372 name = "url" 2356 2373 version = "2.5.7" 2357 2374 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2374 2391 version = "0.2.2" 2375 2392 source = "registry+https://github.com/rust-lang/crates.io-index" 2376 2393 checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2377 - 2378 - [[package]] 2379 - name = "util" 2380 - version = "0.1.0" 2381 2394 2382 2395 [[package]] 2383 2396 name = "valuable" ··· 2469 2482 2470 2483 [[package]] 2471 2484 name = "wasm-bindgen" 2472 - version = "0.2.105" 2485 + version = "0.2.106" 2473 2486 source = "registry+https://github.com/rust-lang/crates.io-index" 2474 - checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" 2487 + checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" 2475 2488 dependencies = [ 2476 2489 "cfg-if", 2477 2490 "once_cell", ··· 2482 2495 2483 2496 [[package]] 2484 2497 name = "wasm-bindgen-macro" 2485 - version = "0.2.105" 2498 + version = "0.2.106" 2486 2499 source = "registry+https://github.com/rust-lang/crates.io-index" 2487 - checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" 2500 + checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" 2488 2501 dependencies = [ 2489 2502 "quote", 2490 2503 "wasm-bindgen-macro-support", ··· 2492 2505 2493 2506 [[package]] 2494 2507 name = "wasm-bindgen-macro-support" 2495 - version = "0.2.105" 2508 + version = "0.2.106" 2496 2509 source = "registry+https://github.com/rust-lang/crates.io-index" 2497 - checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" 2510 + checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" 2498 2511 dependencies = [ 2499 2512 "bumpalo", 2500 2513 "proc-macro2", ··· 2505 2518 2506 2519 [[package]] 2507 2520 name = "wasm-bindgen-shared" 2508 - version = "0.2.105" 2521 + version = "0.2.106" 2509 2522 source = "registry+https://github.com/rust-lang/crates.io-index" 2510 - checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" 2523 + checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" 2511 2524 dependencies = [ 2512 2525 "unicode-ident", 2513 2526 ] ··· 2570 2583 2571 2584 [[package]] 2572 2585 name = "wast" 2573 - version = "228.0.0" 2574 - dependencies = [ 2575 - "anyhow", 2576 - "bumpalo", 2577 - "cpu-local", 2578 - "gimli 0.31.1", 2579 - "hashbrown 0.15.5", 2580 - "leb128fmt", 2581 - "libtest-mimic", 2582 - "memchr", 2583 - "unicode-width", 2584 - "wasm-encoder 0.241.2", 2585 - "wasmparser 0.228.0", 2586 - "wat", 2587 - ] 2588 - 2589 - [[package]] 2590 - name = "wast" 2591 2586 version = "243.0.0" 2592 2587 source = "registry+https://github.com/rust-lang/crates.io-index" 2593 2588 checksum = "df21d01c2d91e46cb7a221d79e58a2d210ea02020d57c092e79255cc2999ca7f" ··· 2605 2600 source = "registry+https://github.com/rust-lang/crates.io-index" 2606 2601 checksum = "226a9a91cd80a50449312fef0c75c23478fcecfcc4092bdebe1dc8e760ef521b" 2607 2602 dependencies = [ 2608 - "wast 243.0.0", 2603 + "wast", 2609 2604 ] 2610 2605 2611 2606 [[package]] ··· 2618 2613 2619 2614 [[package]] 2620 2615 name = "web-sys" 2621 - version = "0.3.82" 2616 + version = "0.3.83" 2622 2617 source = "registry+https://github.com/rust-lang/crates.io-index" 2623 - checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" 2618 + checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" 2624 2619 dependencies = [ 2625 2620 "js-sys", 2626 2621 "wasm-bindgen", ··· 2658 2653 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2659 2654 2660 2655 [[package]] 2661 - name = "windows" 2662 - version = "0.61.3" 2663 - source = "registry+https://github.com/rust-lang/crates.io-index" 2664 - checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" 2665 - dependencies = [ 2666 - "windows-collections", 2667 - "windows-core", 2668 - "windows-future", 2669 - "windows-link 0.1.3", 2670 - "windows-numerics", 2671 - ] 2672 - 2673 - [[package]] 2674 - name = "windows-collections" 2675 - version = "0.2.0" 2676 - source = "registry+https://github.com/rust-lang/crates.io-index" 2677 - checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" 2678 - dependencies = [ 2679 - "windows-core", 2680 - ] 2681 - 2682 - [[package]] 2683 - name = "windows-core" 2684 - version = "0.61.2" 2685 - source = "registry+https://github.com/rust-lang/crates.io-index" 2686 - checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" 2687 - dependencies = [ 2688 - "windows-implement", 2689 - "windows-interface", 2690 - "windows-link 0.1.3", 2691 - "windows-result", 2692 - "windows-strings", 2693 - ] 2694 - 2695 - [[package]] 2696 - name = "windows-future" 2697 - version = "0.2.1" 2698 - source = "registry+https://github.com/rust-lang/crates.io-index" 2699 - checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" 2700 - dependencies = [ 2701 - "windows-core", 2702 - "windows-link 0.1.3", 2703 - "windows-threading", 2704 - ] 2705 - 2706 - [[package]] 2707 - name = "windows-implement" 2708 - version = "0.60.2" 2709 - source = "registry+https://github.com/rust-lang/crates.io-index" 2710 - checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" 2711 - dependencies = [ 2712 - "proc-macro2", 2713 - "quote", 2714 - "syn", 2715 - ] 2716 - 2717 - [[package]] 2718 - name = "windows-interface" 2719 - version = "0.59.3" 2720 - source = "registry+https://github.com/rust-lang/crates.io-index" 2721 - checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" 2722 - dependencies = [ 2723 - "proc-macro2", 2724 - "quote", 2725 - "syn", 2726 - ] 2727 - 2728 - [[package]] 2729 - name = "windows-link" 2730 - version = "0.1.3" 2731 - source = "registry+https://github.com/rust-lang/crates.io-index" 2732 - checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" 2733 - 2734 - [[package]] 2735 2656 name = "windows-link" 2736 2657 version = "0.2.1" 2737 2658 source = "registry+https://github.com/rust-lang/crates.io-index" 2738 2659 checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" 2739 2660 2740 2661 [[package]] 2741 - name = "windows-numerics" 2742 - version = "0.2.0" 2743 - source = "registry+https://github.com/rust-lang/crates.io-index" 2744 - checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" 2745 - dependencies = [ 2746 - "windows-core", 2747 - "windows-link 0.1.3", 2748 - ] 2749 - 2750 - [[package]] 2751 2662 name = "windows-result" 2752 - version = "0.3.4" 2753 - source = "registry+https://github.com/rust-lang/crates.io-index" 2754 - checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" 2755 - dependencies = [ 2756 - "windows-link 0.1.3", 2757 - ] 2758 - 2759 - [[package]] 2760 - name = "windows-strings" 2761 - version = "0.4.2" 2663 + version = "0.4.1" 2762 2664 source = "registry+https://github.com/rust-lang/crates.io-index" 2763 - checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" 2665 + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" 2764 2666 dependencies = [ 2765 - "windows-link 0.1.3", 2667 + "windows-link", 2766 2668 ] 2767 2669 2768 2670 [[package]] ··· 2771 2673 source = "registry+https://github.com/rust-lang/crates.io-index" 2772 2674 checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" 2773 2675 dependencies = [ 2774 - "windows-link 0.2.1", 2775 - ] 2776 - 2777 - [[package]] 2778 - name = "windows-threading" 2779 - version = "0.1.0" 2780 - source = "registry+https://github.com/rust-lang/crates.io-index" 2781 - checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" 2782 - dependencies = [ 2783 - "windows-link 0.1.3", 2676 + "windows-link", 2784 2677 ] 2785 2678 2786 2679 [[package]] 2787 2680 name = "winnow" 2788 - version = "0.7.13" 2681 + version = "0.7.14" 2789 2682 source = "registry+https://github.com/rust-lang/crates.io-index" 2790 - checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" 2683 + checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" 2791 2684 dependencies = [ 2792 2685 "memchr", 2793 2686 ] ··· 2868 2761 2869 2762 [[package]] 2870 2763 name = "zerocopy" 2871 - version = "0.8.30" 2764 + version = "0.8.31" 2872 2765 source = "registry+https://github.com/rust-lang/crates.io-index" 2873 - checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c" 2766 + checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" 2874 2767 dependencies = [ 2875 2768 "zerocopy-derive", 2876 2769 ] 2877 2770 2878 2771 [[package]] 2879 2772 name = "zerocopy-derive" 2880 - version = "0.8.30" 2773 + version = "0.8.31" 2881 2774 source = "registry+https://github.com/rust-lang/crates.io-index" 2882 - checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5" 2775 + checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" 2883 2776 dependencies = [ 2884 2777 "proc-macro2", 2885 2778 "quote", ··· 2939 2832 "quote", 2940 2833 "syn", 2941 2834 ] 2835 + 2836 + [[package]] 2837 + name = "zmij" 2838 + version = "1.0.7" 2839 + source = "registry+https://github.com/rust-lang/crates.io-index" 2840 + checksum = "de9211a9f64b825911bdf0240f58b7a8dac217fe260fc61f080a07f61372fbd5"
+14 -14
Cargo.toml
··· 78 78 missing_errors_doc = "deny" 79 79 80 80 [workspace.dependencies] 81 - kaddr2line = { path = "libs/kaddr2line" } 82 - kbacktrace = { path = "libs/kbacktrace" } 83 - riscv = { path = "libs/riscv" } 84 - spin = { path = "libs/spin" } 81 + k23-addr2line = { path = "libs/addr2line" } 82 + k23-backtrace = { path = "libs/backtrace" } 83 + k23-riscv = { path = "libs/riscv" } 84 + k23-spin = { path = "libs/spin" } 85 85 trap = { path = "libs/trap" } 86 - cpu-local = { path = "libs/cpu-local" } 87 - unwind2 = { path = "libs/unwind2" } 88 - wast = { path = "libs/wast" } 86 + k23-cpu-local = { path = "libs/cpu-local" } 87 + k23-unwind = { path = "libs/unwind" } 88 + k23-wast = { path = "libs/wast" } 89 89 wavltree = { path = "libs/wavltree" } 90 90 loader-api = { path = "loader/api" } 91 - fdt = { path = "libs/fdt" } 92 - ksharded-slab = { path = "libs/ksharded-slab" } 91 + k23-fdt = { path = "libs/fdt" } 92 + k23-sharded-slab = { path = "libs/sharded-slab" } 93 93 ktest = { path = "libs/ktest" } 94 94 uart-16550 = { path = "libs/uart-16550" } 95 - kfastrand = { path = "libs/kfastrand" } 96 - abort = { path = "libs/abort" } 97 - panic-unwind2 = { path = "libs/panic-unwind2" } 98 - util = { path = "libs/util" } 95 + k23-fastrand = { path = "libs/fastrand" } 96 + k23-abort = { path = "libs/abort" } 97 + k23-panic-unwind = { path = "libs/panic-unwind" } 98 + k32-util = { path = "libs/util" } 99 99 kasync = { path = "libs/kasync" } 100 100 kmem = { path = "libs/kmem" } 101 - arrayvec = { path = "libs/arrayvec" } 101 + k23-arrayvec = { path = "libs/arrayvec" } 102 102 103 103 # 3rd-party dependencies 104 104 cfg-if = "1.0.0"
+3 -3
justfile
··· 88 88 # ============================================================================== 89 89 90 90 # crates that have hosted tests 91 - _hosted_crates := "-p kaddr2line -p kmem -p cpu-local -p kfastrand -p fdt -p kasync --features counters -p ksharded-slab -p spin -p wast@228.0.0 -p wavltree" 91 + _hosted_crates := "-p k23-addr2line -p kmem -p k23-cpu-local -p k23-fastrand -p k23-fdt -p kasync --features counters -p k23-sharded-slab -p k23-spin -p k23-wast -p wavltree" 92 92 # run hosted tests 93 93 test crate="" *cargo_args="": _get-nextest 94 94 RUSTFLAGS=-Dwarnings {{ _cargo }} {{ _testcmd }} \ ··· 98 98 {{ cargo_args }} 99 99 100 100 # crates that have miri tests 101 - _miri_crates := "-p kasync --features counters -p ksharded-slab -p spin -p wavltree" 101 + _miri_crates := "-p kasync --features counters -p k23-sharded-slab -p k23-spin -p wavltree" 102 102 # run hosted tests under miri 103 103 miri crate="" *cargo_args="": _get-nextest 104 104 MIRIFLAGS="{{ env_var_or_default("MIRIFLAGS", "-Zmiri-strict-provenance -Zmiri-disable-isolation") }} -Zmiri-env-forward=RUST_BACKTRACE -Zmiri-env-forward=RUST_LOG" \ ··· 110 110 {{ cargo_args }} 111 111 112 112 # crates that have loom tests 113 - _loom_crates := "-p kasync --features counters -p spin" 113 + _loom_crates := "-p kasync --features counters -p k23-spin" 114 114 # run hosted tests under loom 115 115 loom crate="" *cargo_args='': _get-nextest 116 116 #!/usr/bin/env bash
+14 -14
kernel/Cargo.toml
··· 11 11 12 12 [dependencies] 13 13 loader-api.workspace = true 14 - cpu-local.workspace = true 14 + k23-cpu-local.workspace = true 15 15 trap.workspace = true 16 - spin = { workspace = true, features = ["thread-local"] } 17 - unwind2.workspace = true 16 + k23-spin = { workspace = true, features = ["thread-local"] } 17 + k23-unwind.workspace = true 18 18 wavltree = { workspace = true, features = ["dot"] } 19 - fdt.workspace = true 20 - ksharded-slab.workspace = true 19 + k23-fdt.workspace = true 20 + k23-sharded-slab.workspace = true 21 21 ktest.workspace = true 22 - kaddr2line.workspace = true 22 + k23-addr2line.workspace = true 23 23 uart-16550.workspace = true 24 - wast.workspace = true 25 - kfastrand.workspace = true 26 - abort.workspace = true 27 - panic-unwind2.workspace = true 28 - util.workspace = true 29 - kasync = { workspace = true, features = ["unwind2", "counters"] } 24 + k23-wast.workspace = true 25 + k23-fastrand.workspace = true 26 + k23-abort.workspace = true 27 + k23-panic-unwind.workspace = true 28 + k32-util.workspace = true 29 + kasync = { workspace = true, features = ["k23-unwind", "counters"] } 30 30 kmem.workspace = true 31 31 32 32 # 3rd-party dependencies ··· 35 35 cfg-if.workspace = true 36 36 talc.workspace = true 37 37 static_assertions.workspace = true 38 - arrayvec.workspace = true 38 + k23-arrayvec.workspace = true 39 39 bitflags.workspace = true 40 40 xmas-elf.workspace = true 41 41 fallible-iterator.workspace = true ··· 62 62 wasmtime-slab.workspace = true 63 63 64 64 [target.'cfg(any(target_arch = "riscv64", target_arch = "riscv32"))'.dependencies] 65 - riscv.workspace = true 65 + k23-riscv.workspace = true 66 66 67 67 [build-dependencies] 68 68 vergen-git2 = { version = "1.0.7", features = ["build", "cargo", "rustc"] }
+1 -1
kernel/src/allocator.rs
··· 16 16 use crate::{INITIAL_HEAP_SIZE_PAGES, arch}; 17 17 18 18 #[global_allocator] 19 - static KERNEL_ALLOCATOR: Talck<spin::RawMutex, ErrOnOom> = Talc::new(ErrOnOom).lock(); 19 + static KERNEL_ALLOCATOR: Talck<k23_spin::RawMutex, ErrOnOom> = Talc::new(ErrOnOom).lock(); 20 20 21 21 pub fn init(boot_alloc: &mut BootstrapAllocator, boot_info: &BootInfo) { 22 22 let layout =
+1 -1
kernel/src/arch/mod.rs
··· 26 26 if #[cfg(target_arch = "riscv64")] { 27 27 mod riscv64; 28 28 pub use riscv64::*; 29 - pub use riscv::*; 29 + pub use k23_riscv::*; 30 30 } else if #[cfg(target_arch = "aarch64")] { 31 31 mod aarch64; 32 32 pub use aarch64::*;
+2 -2
kernel/src/arch/riscv64/asid_allocator.rs
··· 9 9 use alloc::vec::Vec; 10 10 use core::fmt; 11 11 12 - use riscv::satp; 13 - use spin::OnceLock; 12 + use k23_riscv::satp; 13 + use k23_spin::OnceLock; 14 14 15 15 // FIXME: A OnceLock to store a u16? yikes 16 16 static MAX_ASID: OnceLock<u16> = OnceLock::new();
+2 -2
kernel/src/arch/riscv64/block_on.rs
··· 11 11 use core::sync::atomic::{AtomicBool, Ordering}; 12 12 use core::task::{Context, Poll, RawWaker, RawWakerVTable, Waker}; 13 13 14 - use cpu_local::cpu_local; 15 14 use futures::pin_mut; 16 15 use futures::task::WakerRef; 17 - use riscv::sbi; 16 + use k23_cpu_local::cpu_local; 17 + use k23_riscv::sbi; 18 18 19 19 use crate::state; 20 20
+2 -2
kernel/src/arch/riscv64/device/clock.rs
··· 8 8 use core::ptr; 9 9 use core::time::Duration; 10 10 11 + use k23_riscv::sbi; 11 12 use kasync::time::{Clock, NANOS_PER_SEC, RawClock, RawClockVTable}; 12 - use riscv::sbi; 13 13 14 14 use crate::device_tree::Device; 15 15 ··· 24 24 unsafe fn now_raw(_ptr: *const ()) -> u64 { 25 25 debug_assert!(_ptr.is_null()); 26 26 27 - riscv::register::time::read64() 27 + k23_riscv::register::time::read64() 28 28 } 29 29 30 30 unsafe fn schedule_wakeup_raw(_ptr: *const (), at: u64) {
+2 -2
kernel/src/arch/riscv64/device/cpu.rs
··· 9 9 use core::fmt; 10 10 use core::str::FromStr; 11 11 12 - use riscv::extensions::RiscvExtensions; 12 + use k23_riscv::extensions::RiscvExtensions; 13 13 14 14 use crate::arch::device; 15 15 use crate::device_tree::DeviceTree; ··· 104 104 } 105 105 } 106 106 107 - fn parse_riscv_extensions(strs: fdt::StringList) -> RiscvExtensions { 107 + fn parse_riscv_extensions(strs: k23_fdt::StringList) -> RiscvExtensions { 108 108 let mut out = RiscvExtensions::empty(); 109 109 110 110 for str in strs {
+2 -2
kernel/src/arch/riscv64/mem.rs
··· 13 13 use core::{fmt, slice}; 14 14 15 15 use bitflags::bitflags; 16 + use k23_riscv::satp; 17 + use k23_riscv::sbi::rfence::sfence_vma_asid; 16 18 use kmem::{AddressRangeExt, PhysicalAddress, VirtualAddress}; 17 - use riscv::satp; 18 - use riscv::sbi::rfence::sfence_vma_asid; 19 19 use static_assertions::const_assert_eq; 20 20 21 21 use crate::arch::{mb, wmb};
+3 -3
kernel/src/arch/riscv64/mod.rs
··· 18 18 use anyhow::ensure; 19 19 pub use asid_allocator::AsidAllocator; 20 20 pub use block_on::block_on; 21 + use k23_riscv::sstatus::FS; 22 + use k23_riscv::{interrupt, scounteren, sie, sstatus}; 21 23 use kmem::VirtualAddress; 22 24 pub use mem::{ 23 25 AddressSpace, DEFAULT_ASID, KERNEL_ASPACE_RANGE, PAGE_SHIFT, PAGE_SIZE, USER_ASPACE_RANGE, 24 26 invalidate_range, is_canonical, is_kernel_address, is_user_address, phys_to_virt, 25 27 }; 26 - use riscv::sstatus::FS; 27 - use riscv::{interrupt, scounteren, sie, sstatus}; 28 28 pub use setjmp_longjmp::{JmpBuf, JmpBufStruct, call_with_setjmp, longjmp}; 29 29 30 30 use crate::arch::device::cpu::Cpu; ··· 35 35 /// Global RISC-V specific initialization. 36 36 #[cold] 37 37 pub fn init() -> state::Global { 38 - let supported = riscv::sbi::supported_extensions().unwrap(); 38 + let supported = k23_riscv::sbi::supported_extensions().unwrap(); 39 39 tracing::trace!("Supported SBI extensions: {supported:?}"); 40 40 41 41 mem::init();
+1 -1
kernel/src/arch/riscv64/setjmp_longjmp.rs
··· 48 48 use core::mem::{ManuallyDrop, MaybeUninit}; 49 49 use core::ptr::addr_of_mut; 50 50 51 - use riscv::{load_fp, load_gp, save_fp, save_gp}; 51 + use k23_riscv::{load_fp, load_gp, save_fp, save_gp}; 52 52 53 53 /// A store for the register state used by `setjmp` and `longjmp`. 54 54 ///
+8 -8
kernel/src/arch/riscv64/trap_handler.rs
··· 9 9 use core::arch::{asm, naked_asm}; 10 10 use core::cell::Cell; 11 11 12 - use cpu_local::cpu_local; 13 - use kmem::VirtualAddress; 14 - use riscv::scause::{Exception, Interrupt}; 15 - use riscv::{ 12 + use k23_cpu_local::cpu_local; 13 + use k23_riscv::scause::{Exception, Interrupt}; 14 + use k23_riscv::{ 16 15 load_fp, load_gp, save_fp, save_gp, scause, sepc, sip, sscratch, sstatus, stval, stvec, 17 16 }; 17 + use kmem::VirtualAddress; 18 18 19 19 use crate::arch::PAGE_SIZE; 20 20 use crate::arch::trap::Trap; ··· 355 355 356 356 tracing::error!("KERNEL TRAP {cause:?} epc={epc};tval={tval}"); 357 357 358 - let mut regs = unwind2::Registers { 358 + let mut regs = k23_unwind::Registers { 359 359 gp: frame.gp, 360 360 fp: frame.fp, 361 361 }; ··· 371 371 372 372 // begin a panic on the original stack 373 373 // Safety: we saved the register state at the beginning of the trap handler 374 - unsafe { panic_unwind2::begin_unwind(payload, regs, epc.add(1).get()) }; 374 + unsafe { k23_panic_unwind::begin_unwind(payload, regs, epc.add(1).get()) }; 375 375 } 376 376 377 377 fn handle_recursive_fault(frame: &TrapFrame, epc: VirtualAddress) -> ! { 378 - let mut regs = unwind2::Registers { 378 + let mut regs = k23_unwind::Registers { 379 379 gp: frame.gp, 380 380 fp: frame.fp, 381 381 }; ··· 390 390 // begin a panic on the original stack 391 391 // Safety: we saved the register state at the beginning of the trap handler 392 392 unsafe { 393 - panic_unwind2::begin_unwind(payload, regs, epc.add(1).get()); 393 + k23_panic_unwind::begin_unwind(payload, regs, epc.add(1).get()); 394 394 } 395 395 }
+9 -9
kernel/src/backtrace/mod.rs
··· 11 11 use core::str::FromStr; 12 12 use core::{fmt, slice}; 13 13 14 - use arrayvec::ArrayVec; 15 14 use fallible_iterator::FallibleIterator; 15 + use k23_arrayvec::ArrayVec; 16 + use k23_spin::OnceLock; 17 + use k23_unwind::FrameIter; 16 18 use kmem::{AddressRangeExt, VirtualAddress}; 17 19 use loader_api::BootInfo; 18 - use spin::OnceLock; 19 20 use symbolize::SymbolizeContext; 20 - use unwind2::FrameIter; 21 21 22 22 use crate::backtrace::print::BacktraceFmt; 23 23 ··· 103 103 /// 104 104 /// # Errors 105 105 /// 106 - /// Returns the underlying [`unwind2::Error`] if walking the stack fails. 106 + /// Returns the underlying [`k23_unwind::Error`] if walking the stack fails. 107 107 #[inline] 108 - pub fn capture() -> Result<Self, unwind2::Error> { 108 + pub fn capture() -> Result<Self, k23_unwind::Error> { 109 109 Self::new_inner(FrameIter::new()) 110 110 } 111 111 ··· 119 119 /// 120 120 /// # Errors 121 121 /// 122 - /// Returns the underlying [`unwind2::Error`] if walking the stack fails. 122 + /// Returns the underlying [`k23_unwind::Error`] if walking the stack fails. 123 123 #[inline] 124 124 pub fn from_registers( 125 - regs: unwind2::Registers, 125 + regs: k23_unwind::Registers, 126 126 pc: VirtualAddress, 127 - ) -> Result<Self, unwind2::Error> { 127 + ) -> Result<Self, k23_unwind::Error> { 128 128 let iter = FrameIter::from_registers(regs, pc.get()); 129 129 Self::new_inner(iter) 130 130 } 131 131 132 - fn new_inner(iter: FrameIter) -> Result<Self, unwind2::Error> { 132 + fn new_inner(iter: FrameIter) -> Result<Self, k23_unwind::Error> { 133 133 let mut frames = ArrayVec::new(); 134 134 135 135 let mut iter = iter.take(MAX_FRAMES);
+4 -4
kernel/src/backtrace/symbolize.rs
··· 19 19 /// `addr2line`'s frame internally has all the nitty gritty details. 20 20 Frame { 21 21 addr: *mut c_void, 22 - location: Option<kaddr2line::Location<'a>>, 22 + location: Option<k23_addr2line::Location<'a>>, 23 23 name: Option<&'a str>, 24 24 }, 25 25 /// Couldn't find debug information, but we found it in the symbol table of ··· 126 126 addr: u64, 127 127 elf: &'ctx xmas_elf::ElfFile<'a>, 128 128 symtab: &'ctx [xmas_elf::symbol_table::Entry64], 129 - iter: kaddr2line::FrameIter<'ctx, EndianSlice<'a, NativeEndian>>, 129 + iter: k23_addr2line::FrameIter<'ctx, EndianSlice<'a, NativeEndian>>, 130 130 anything: bool, 131 131 } 132 132 ··· 174 174 175 175 /// Context necessary to resolve an address to its symbol name and source location. 176 176 pub struct SymbolizeContext<'a> { 177 - addr2line: kaddr2line::Context<EndianSlice<'a, NativeEndian>>, 177 + addr2line: k23_addr2line::Context<EndianSlice<'a, NativeEndian>>, 178 178 elf: xmas_elf::ElfFile<'a>, 179 179 adjust_vma: u64, 180 180 } ··· 191 191 }; 192 192 Ok(EndianSlice::new(data, NativeEndian)) 193 193 })?; 194 - let addr2line = kaddr2line::Context::from_dwarf(dwarf)?; 194 + let addr2line = k23_addr2line::Context::from_dwarf(dwarf)?; 195 195 196 196 Ok(Self { 197 197 addr2line,
+6 -6
kernel/src/device_tree.rs
··· 11 11 12 12 use bumpalo::Bump; 13 13 use fallible_iterator::FallibleIterator; 14 - use fdt::{CellSizes, Error, Fdt, NodeName, StringList}; 15 14 use hashbrown::HashMap; 15 + use k23_fdt::{CellSizes, Error, Fdt, NodeName, StringList}; 16 16 use smallvec::{SmallVec, smallvec}; 17 17 18 18 type Link<T> = Option<NonNull<T>>; ··· 60 60 61 61 /// A property of a device. 62 62 pub struct Property<'a> { 63 - inner: fdt::Property<'a>, 63 + inner: k23_fdt::Property<'a>, 64 64 next: Link<Property<'a>>, 65 65 } 66 66 ··· 266 266 } 267 267 } 268 268 269 - pub fn regs(&self) -> Option<fdt::Regs<'_>> { 269 + pub fn regs(&self) -> Option<k23_fdt::Regs<'_>> { 270 270 self.properties() 271 271 .find(|p| p.name() == "reg") 272 272 .map(|prop| prop.inner.as_regs(self.cell_sizes())) ··· 517 517 } 518 518 519 519 fn unflatten_node<'a>( 520 - node: fdt::Node, 520 + node: k23_fdt::Node, 521 521 phandle2ptr: &mut HashMap<u32, NonNull<Device<'a>>>, 522 522 mut parent: NonNull<Device<'a>>, 523 523 prev_sibling: Link<Device<'a>>, ··· 576 576 } 577 577 578 578 fn unflatten_property<'a>( 579 - prop: fdt::Property, 579 + prop: k23_fdt::Property, 580 580 head: &mut Link<Property<'a>>, 581 581 tail: &mut Link<Property<'a>>, 582 582 alloc: &'a Bump, 583 583 ) { 584 584 let prop = NonNull::from(alloc.alloc(Property { 585 - inner: fdt::Property { 585 + inner: k23_fdt::Property { 586 586 name: alloc.alloc_str(prop.name), 587 587 raw: alloc.alloc_slice_copy(prop.raw), 588 588 },
+1 -1
kernel/src/irq.rs
··· 9 9 use core::num::NonZero; 10 10 11 11 use hashbrown::HashMap; 12 + use k23_spin::{LazyLock, RwLock}; 12 13 use kasync::sync::wait_queue::WaitQueue; 13 - use spin::{LazyLock, RwLock}; 14 14 15 15 use crate::state::cpu_local; 16 16
+6 -6
kernel/src/main.rs
··· 23 23 #![feature(asm_unwind)] 24 24 25 25 extern crate alloc; 26 - extern crate panic_unwind2; 26 + extern crate k23_panic_unwind; 27 27 28 28 mod allocator; 29 29 mod arch; ··· 45 45 use core::slice; 46 46 use core::time::Duration; 47 47 48 - use abort::abort; 49 - use arrayvec::ArrayVec; 50 48 use cfg_if::cfg_if; 49 + use k23_abort::abort; 50 + use k23_arrayvec::ArrayVec; 51 + use k23_fastrand::FastRand; 51 52 use kasync::executor::{Executor, Worker}; 52 53 use kasync::time::{Instant, Ticks, Timer}; 53 - use kfastrand::FastRand; 54 54 use kmem::{AddressRangeExt, PhysicalAddress}; 55 55 use loader_api::{BootInfo, LoaderConfig, MemoryRegionKind}; 56 56 use mem::frame_alloc; ··· 86 86 87 87 #[unsafe(no_mangle)] 88 88 fn _start(cpuid: usize, boot_info: &'static BootInfo, boot_ticks: u64) -> ! { 89 - panic_unwind2::set_hook(|info| { 89 + k23_panic_unwind::set_hook(|info| { 90 90 tracing::error!("CPU {info}"); 91 91 92 92 // FIXME 32 seems adequate for unoptimized builds where the callstack can get quite deep ··· 107 107 // Unwinding expects at least one landing pad in the callstack, but capturing all unwinds that 108 108 // bubble up to this point is also a good idea since we can perform some last cleanup and 109 109 // print an error message. 110 - let res = panic_unwind2::catch_unwind(|| { 110 + let res = k23_panic_unwind::catch_unwind(|| { 111 111 backtrace::__rust_begin_short_backtrace(|| kmain(cpuid, boot_info, boot_ticks)); 112 112 }); 113 113
+1 -1
kernel/src/mem/address_space.rs
··· 714 714 fn drop(&mut self) { 715 715 if !self.actions.is_empty() { 716 716 tracing::error!("batch was not flushed before dropping"); 717 - // panic_unwind::panic_in_drop!("batch was not flushed before dropping"); 717 + // k23_panic_unwind::panic_in_drop!("batch was not flushed before dropping"); 718 718 } 719 719 } 720 720 }
+1 -1
kernel/src/mem/address_space_region.rs
··· 16 16 use core::ptr::NonNull; 17 17 18 18 use anyhow::bail; 19 + use k23_spin::LazyLock; 19 20 use kmem::{AddressRangeExt, PhysicalAddress, VirtualAddress}; 20 21 use pin_project::pin_project; 21 - use spin::LazyLock; 22 22 23 23 use crate::arch; 24 24 use crate::mem::frame_alloc::FrameAllocator;
+2 -2
kernel/src/mem/frame_alloc/mod.rs
··· 19 19 20 20 use arena::{Arena, select_arenas}; 21 21 use cordyceps::list::List; 22 - use cpu_local::collection::CpuLocal; 23 22 use fallible_iterator::FallibleIterator; 24 23 pub use frame::{Frame, FrameInfo}; 24 + use k23_cpu_local::collection::CpuLocal; 25 + use k23_spin::{Mutex, OnceLock}; 25 26 use kmem::PhysicalAddress; 26 - use spin::{Mutex, OnceLock}; 27 27 28 28 use crate::arch; 29 29 use crate::mem::bootstrap_alloc::BootstrapAllocator;
+1 -1
kernel/src/mem/mmap.rs
··· 12 12 use core::ops::Range; 13 13 use core::{ptr, slice}; 14 14 15 + use k23_spin::Mutex; 15 16 use kmem::{AddressRangeExt, PhysicalAddress, VirtualAddress}; 16 - use spin::Mutex; 17 17 18 18 use crate::arch; 19 19 use crate::mem::{AddressSpace, AddressSpaceRegion, ArchAddressSpace, Batch, Permissions};
+1 -1
kernel/src/mem/mod.rs
··· 25 25 pub use address_space::{AddressSpace, Batch}; 26 26 pub use address_space_region::AddressSpaceRegion; 27 27 pub use flush::Flush; 28 + use k23_spin::{Mutex, OnceLock}; 28 29 use kmem::{AddressRangeExt, PhysicalAddress, VirtualAddress}; 29 30 use loader_api::BootInfo; 30 31 pub use mmap::Mmap; 31 32 use rand::SeedableRng; 32 33 use rand_chacha::ChaCha20Rng; 33 - use spin::{Mutex, OnceLock}; 34 34 pub use trap_handler::handle_page_fault; 35 35 pub use vmo::Vmo; 36 36 use xmas_elf::program::Type;
+1 -1
kernel/src/mem/provider.rs
··· 11 11 use core::iter; 12 12 use core::num::NonZeroUsize; 13 13 14 - use spin::{LazyLock, OnceLock}; 14 + use k23_spin::{LazyLock, OnceLock}; 15 15 16 16 use crate::arch; 17 17 use crate::mem::frame_alloc::frame_list::FrameList;
+1 -1
kernel/src/mem/trap_handler.rs
··· 7 7 8 8 use core::ops::ControlFlow; 9 9 10 + use k23_riscv::scause::Exception; 10 11 use kmem::VirtualAddress; 11 - use riscv::scause::Exception; 12 12 13 13 use crate::arch::trap::Trap; 14 14 use crate::mem::{PageFaultFlags, with_kernel_aspace};
+1 -1
kernel/src/mem/vmo.rs
··· 9 9 use core::ops::Range; 10 10 11 11 use anyhow::ensure; 12 + use k23_spin::RwLock; 12 13 use kmem::{AddressRangeExt, PhysicalAddress}; 13 - use spin::RwLock; 14 14 15 15 use crate::arch; 16 16 use crate::mem::frame_alloc::frame_list::{Entry, FrameList};
+2 -2
kernel/src/metrics.rs
··· 27 27 28 28 use core::sync::atomic::{AtomicU64, Ordering}; 29 29 30 - use cpu_local::collection::CpuLocal; 30 + use k23_cpu_local::collection::CpuLocal; 31 31 32 32 /// Declares a new counter. 33 33 #[macro_export] 34 34 macro_rules! counter { 35 35 ($name:expr) => {{ 36 36 #[unsafe(link_section = concat!(".bss.kcounter.", $name))] 37 - static ARENA: $crate::cpu_local::CpuLocal<::core::sync::atomic::AtomicU64> = 37 + static ARENA: $crate::k23_cpu_local::CpuLocal<::core::sync::atomic::AtomicU64> = 38 38 $crate::cpu_local::CpuLocal::new(); 39 39 40 40 Counter::new(&ARENA, $name)
+4 -5
kernel/src/shell.rs
··· 22 22 use core::str::FromStr; 23 23 24 24 use fallible_iterator::FallibleIterator; 25 + use k23_spin::{Barrier, OnceLock}; 25 26 use kasync::executor::Executor; 26 27 use kmem::{AddressRangeExt, PhysicalAddress}; 27 - use spin::{Barrier, OnceLock}; 28 28 29 29 use crate::device_tree::DeviceTree; 30 30 use crate::mem::{Mmap, with_kernel_aspace}; ··· 231 231 if let Some(current) = chunk.strip_prefix(cmd.name) { 232 232 let current = current.trim(); 233 233 234 - return panic_unwind2::catch_unwind(|| cmd.run(Context { current, ..ctx })).unwrap_or( 235 - { 234 + return k23_panic_unwind::catch_unwind(|| cmd.run(Context { current, ..ctx })) 235 + .unwrap_or({ 236 236 Err(Error { 237 237 line: cmd.name, 238 238 kind: ErrorKind::Other("command failed"), 239 239 }) 240 - }, 241 - ); 240 + }); 242 241 } 243 242 } 244 243
+2 -2
kernel/src/state.rs
··· 7 7 8 8 use core::cell::OnceCell; 9 9 10 - use cpu_local::cpu_local; 10 + use k23_cpu_local::cpu_local; 11 + use k23_spin::OnceLock; 11 12 use kasync::executor::Executor; 12 13 use kasync::time::{Instant, Timer}; 13 14 use loader_api::BootInfo; 14 - use spin::OnceLock; 15 15 16 16 use crate::arch; 17 17 use crate::device_tree::DeviceTree;
+6 -6
kernel/src/tests/wast.rs
··· 12 12 use core::fmt::{Display, LowerHex}; 13 13 14 14 use anyhow::{Context, anyhow, bail}; 15 - use spin::Mutex; 16 - use wasmparser::Validator; 17 - use wast::core::{EncodeOptions, NanPattern, V128Pattern, WastArgCore, WastRetCore}; 18 - use wast::parser::ParseBuffer; 19 - use wast::token::{F32, F64}; 20 - use wast::{ 15 + use k23_spin::Mutex; 16 + use k23_wast::core::{EncodeOptions, NanPattern, V128Pattern, WastArgCore, WastRetCore}; 17 + use k23_wast::parser::ParseBuffer; 18 + use k23_wast::token::{F32, F64}; 19 + use k23_wast::{ 21 20 Error, QuoteWat, Wast, WastArg, WastDirective, WastExecute, WastInvoke, WastRet, Wat, parser, 22 21 }; 22 + use wasmparser::Validator; 23 23 24 24 use crate::wasm::{ 25 25 ConstExprEvaluator, Engine, Extern, Instance, Linker, Module, PlaceholderAllocatorDontUse,
+1 -1
kernel/src/tracing/log.rs
··· 5 5 // http://opensource.org/licenses/MIT>, at your option. This file may not be 6 6 // copied, modified, or distributed except according to those terms. 7 7 8 + use k23_spin::LazyLock; 8 9 use log::Record; 9 - use spin::LazyLock; 10 10 use tracing::field; 11 11 use tracing_core::{Callsite, Collect, Event, Kind, Level, Metadata, dispatch, identify_callsite}; 12 12
+2 -2
kernel/src/tracing/mod.rs
··· 17 17 18 18 pub use ::tracing::*; 19 19 use color::{Color, SetColor}; 20 - use cpu_local::cpu_local; 21 20 pub use filter::Filter; 21 + use k23_cpu_local::cpu_local; 22 + use k23_spin::OnceLock; 22 23 use registry::Registry; 23 - use spin::OnceLock; 24 24 use tracing::field; 25 25 use tracing_core::span::{Attributes, Current, Id, Record}; 26 26 use tracing_core::{Collect, Dispatch, Event, Interest, Level, LevelFilter, Metadata};
+5 -5
kernel/src/tracing/registry.rs
··· 10 10 use core::sync::atomic; 11 11 use core::sync::atomic::{AtomicUsize, Ordering}; 12 12 13 - use cpu_local::collection::CpuLocal; 14 - use ksharded_slab::Pool; 15 - use ksharded_slab::pool::Ref; 13 + use k23_cpu_local::collection::CpuLocal; 14 + use k23_sharded_slab::Pool; 15 + use k23_sharded_slab::pool::Ref; 16 16 use tracing_core::field::FieldSet; 17 17 use tracing_core::span::{Attributes, Current, Id, Record}; 18 18 use tracing_core::{Collect, Dispatch, Event, Interest, Metadata, dispatch}; ··· 61 61 /// `tracing` spans using [fields] and/or [stored span data]. 62 62 /// 63 63 /// [span IDs]: https://docs.rs/tracing-core/latest/tracing_core/span/struct.Id.html 64 - /// [slab]: https://docs.rs/crate/sharded-slab/ 64 + /// [slab]: https://docs.rs/crate/k23-sharded-slab/ 65 65 /// [closed]: https://docs.rs/tracing/latest/tracing/span/index.html#closing-spans 66 66 /// [considered closed]: https://docs.rs/tracing-core/latest/tracing_core/subscriber/trait.Subscriber.html#method.try_close 67 67 /// [`Span`]: https://docs.rs/tracing/latest/tracing/span/struct.Span.html ··· 316 316 } 317 317 } 318 318 319 - impl ksharded_slab::Clear for DataInner { 319 + impl k23_sharded_slab::Clear for DataInner { 320 320 /// Clears the span's data in place, dropping the parent's reference count. 321 321 fn clear(&mut self) { 322 322 // A span is not considered closed until all of its children have closed.
+3 -3
kernel/src/tracing/writer.rs
··· 9 9 use core::fmt::{Arguments, Write}; 10 10 use core::{cmp, fmt}; 11 11 12 - use spin::{ReentrantMutex, ReentrantMutexGuard}; 12 + use k23_spin::{ReentrantMutex, ReentrantMutexGuard}; 13 13 use tracing_core::Metadata; 14 14 15 15 use crate::tracing::color::{AnsiEscapes, Color, SetColor}; ··· 166 166 // Architecture-specific debug output implementation 167 167 cfg_if::cfg_if! { 168 168 if #[cfg(target_arch = "riscv64")] { 169 - type DebugStream = riscv::hio::HostStream; 169 + type DebugStream = k23_riscv::hio::HostStream; 170 170 171 171 fn new_debug_stream() -> DebugStream { 172 - riscv::hio::HostStream::new_stdout() 172 + k23_riscv::hio::HostStream::new_stdout() 173 173 } 174 174 } else { 175 175 compile_error!("Unsupported architecture for debug output");
+1 -1
kernel/src/wasm/code_registry.rs
··· 8 8 use alloc::collections::BTreeMap; 9 9 use alloc::sync::Arc; 10 10 11 - use spin::{OnceLock, RwLock}; 11 + use k23_spin::{OnceLock, RwLock}; 12 12 13 13 use crate::wasm::vm::CodeObject; 14 14
+1 -1
kernel/src/wasm/cranelift/compiler.rs
··· 21 21 use cranelift_codegen::isa::{OwnedTargetIsa, TargetIsa}; 22 22 use cranelift_codegen::{TextSectionBuilder, ir}; 23 23 use cranelift_frontend::FunctionBuilder; 24 - use spin::Mutex; 24 + use k23_spin::Mutex; 25 25 use target_lexicon::Triple; 26 26 use wasmparser::{FuncValidatorAllocations, FunctionBody}; 27 27
+1 -1
kernel/src/wasm/engine.rs
··· 9 9 use core::sync::atomic::AtomicU64; 10 10 11 11 use cranelift_codegen::settings::{Configurable, Flags}; 12 + use k23_spin::{Mutex, MutexGuard}; 12 13 use rand::{Rng, SeedableRng}; 13 14 use rand_chacha::ChaCha20Rng; 14 - use spin::{Mutex, MutexGuard}; 15 15 16 16 use crate::arch; 17 17 use crate::wasm::compile::Compiler;
+1 -1
kernel/src/wasm/func/typed.rs
··· 464 464 465 465 fn store(self, _store: &mut StoreOpaque, _func_ty: &FuncType, _dst: &mut MaybeUninit<Self::VMValStorage>) -> crate::Result<()> { 466 466 #[allow(unused_imports, reason = "macro quirk")] 467 - use ::util::MaybeUninitExt; 467 + use ::k32_util::MaybeUninitExt; 468 468 469 469 let ($($t,)*) = self; 470 470 let mut _i: usize = 0;
+1 -1
kernel/src/wasm/store/mod.rs
··· 16 16 use core::ptr::NonNull; 17 17 use core::{fmt, mem}; 18 18 19 - use abort::abort; 19 + use k23_abort::abort; 20 20 use kmem::VirtualAddress; 21 21 use pin_project::pin_project; 22 22 use static_assertions::{assert_impl_all, const_assert};
+3 -3
kernel/src/wasm/trap_handler.rs
··· 15 15 use core::ptr::NonNull; 16 16 use core::{fmt, ptr}; 17 17 18 - use cpu_local::cpu_local; 18 + use k23_cpu_local::cpu_local; 19 19 use kmem::VirtualAddress; 20 20 21 21 use crate::arch; ··· 140 140 141 141 match unwind_reason { 142 142 UnwindReason::Trap(reason) => Err(Trap { reason, backtrace }), 143 - UnwindReason::Panic(payload) => panic_unwind2::resume_unwind(payload), 143 + UnwindReason::Panic(payload) => k23_panic_unwind::resume_unwind(payload), 144 144 } 145 145 } 146 146 } ··· 384 384 Err(reason) => (T::SENTINEL, Some(UnwindReason::Trap(reason.into()))), 385 385 }; 386 386 387 - panic_unwind2::catch_unwind(AssertUnwindSafe(f)) 387 + k23_panic_unwind::catch_unwind(AssertUnwindSafe(f)) 388 388 .unwrap_or_else(|payload| (T::SENTINEL, Some(UnwindReason::Panic(payload)))) 389 389 } 390 390 }
+1 -1
kernel/src/wasm/type_registry.rs
··· 20 20 use cranelift_entity::packed_option::{PackedOption, ReservedValue}; 21 21 use cranelift_entity::{PrimaryMap, SecondaryMap, iter_entity_range}; 22 22 use hashbrown::HashSet; 23 - use spin::RwLock; 23 + use k23_spin::RwLock; 24 24 use wasmtime_slab::Slab; 25 25 26 26 use crate::wasm::Engine;
+1 -1
kernel/src/wasm/vm/mmap_vec.rs
··· 12 12 use core::slice; 13 13 14 14 use anyhow::Context; 15 - use spin::Mutex; 15 + use k23_spin::Mutex; 16 16 17 17 use crate::arch; 18 18 use crate::mem::{AddressSpace, Mmap};
+1 -1
libs/_kmem/Cargo.toml
··· 7 7 8 8 [dependencies] 9 9 wavltree = { workspace = true, features = ["dot"] } 10 - cpu-local.workspace = true 10 + k23-cpu-local.workspace = true 11 11 12 12 # 3rd-party dependencies 13 13 lock_api.workspace = true
+1 -1
libs/_kmem/src/frame_allocator.rs
··· 15 15 16 16 pub use area_selection::{AreaSelection, SelectionError, select_areas}; 17 17 use cordyceps::List; 18 - use cpu_local::collection::CpuLocal; 18 + use k23_cpu_local::collection::CpuLocal; 19 19 use lock_api::Mutex; 20 20 use smallvec::SmallVec; 21 21
+2 -2
libs/abort/Cargo.toml
··· 1 1 [package] 2 - name = "abort" 2 + name = "k23-abort" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true ··· 10 10 cfg-if.workspace = true 11 11 12 12 [target.'cfg(any(target_arch = "riscv64", target_arch = "riscv32"))'.dependencies] 13 - riscv.workspace = true 13 + k23-riscv.workspace = true 14 14 15 15 [lints] 16 16 workspace = true
+1 -1
libs/abort/src/lib.rs
··· 28 28 extern crate std; 29 29 std::process::abort(); 30 30 } else if #[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))] { 31 - riscv::exit(1); 31 + k23_riscv::exit(1); 32 32 } else { 33 33 compile_error!("unsupported target architecture") 34 34 }
+1 -1
libs/arrayvec/Cargo.toml
··· 1 1 [package] 2 - name = "arrayvec" 2 + name = "k23-arrayvec" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true
+2 -2
libs/cpu-local/Cargo.toml
··· 1 1 [package] 2 - name = "cpu-local" 2 + name = "k23-cpu-local" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true 6 6 license.workspace = true 7 7 8 8 [dependencies] 9 - util.workspace = true 9 + k32-util.workspace = true 10 10 11 11 [lints] 12 12 workspace = true
+1 -1
libs/cpu-local/src/collection.rs
··· 12 12 use core::sync::atomic::{AtomicBool, AtomicPtr, AtomicUsize, Ordering}; 13 13 use core::{fmt, mem, ptr, slice}; 14 14 15 - use util::CheckedMaybeUninit; 15 + use k32_util::CheckedMaybeUninit; 16 16 17 17 use crate::cpu_local; 18 18
+1 -1
libs/fdt/Cargo.toml
··· 1 1 [package] 2 - name = "fdt" 2 + name = "k23-fdt" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true
libs/kaddr2line/CHANGELOG.md libs/addr2line/CHANGELOG.md
+2 -2
libs/kaddr2line/Cargo.toml libs/addr2line/Cargo.toml
··· 1 1 [package] 2 - name = "kaddr2line" 2 + name = "k23-addr2line" 3 3 version = "0.24.2" 4 4 description = "A cross-platform symbolication library written in Rust, using `gimli`" 5 5 edition.workspace = true ··· 7 7 license = "Apache-2.0 OR MIT" 8 8 9 9 [dependencies] 10 - spin.workspace = true 10 + k23-spin.workspace = true 11 11 gimli = { workspace = true, default-features = false, features = ["read"] } 12 12 smallvec.workspace = true 13 13 fallible-iterator.workspace = true
libs/kaddr2line/LICENSE-APACHE libs/addr2line/LICENSE-APACHE
libs/kaddr2line/LICENSE-MIT libs/addr2line/LICENSE-MIT
libs/kaddr2line/README.md libs/addr2line/README.md
libs/kaddr2line/src/frame.rs libs/addr2line/src/frame.rs
libs/kaddr2line/src/function.rs libs/addr2line/src/function.rs
libs/kaddr2line/src/lazy.rs libs/addr2line/src/lazy.rs
+1 -1
libs/kaddr2line/src/lib.rs libs/addr2line/src/lib.rs
··· 47 47 mod line; 48 48 49 49 mod lookup; 50 + use k23_spin::OnceLock; 50 51 pub use lookup::{LookupContinuation, LookupResult, SplitDwarfLoad}; 51 - use spin::OnceLock; 52 52 53 53 mod unit; 54 54 pub use unit::LocationRangeIter;
libs/kaddr2line/src/line.rs libs/addr2line/src/line.rs
libs/kaddr2line/src/lookup.rs libs/addr2line/src/lookup.rs
libs/kaddr2line/src/unit.rs libs/addr2line/src/unit.rs
+7 -7
libs/kasync/Cargo.toml
··· 11 11 harness = false 12 12 13 13 [dependencies] 14 - util.workspace = true 15 - cpu-local.workspace = true 16 - spin.workspace = true 17 - kfastrand.workspace = true 18 - panic-unwind2 = { workspace = true, optional = true } 14 + k32-util.workspace = true 15 + k23-cpu-local.workspace = true 16 + k23-spin.workspace = true 17 + k23-fastrand.workspace = true 18 + k23-panic-unwind = { workspace = true, optional = true } 19 19 cordyceps.workspace = true 20 + k23-arrayvec.workspace = true 20 21 21 22 # 3rd-party dependencies 22 23 static_assertions.workspace = true ··· 24 25 mycelium-bitfield.workspace = true 25 26 tracing.workspace = true 26 27 bitflags.workspace = true 27 - arrayvec.workspace = true 28 28 pin-project.workspace = true 29 29 futures = { workspace = true, default-features = false } 30 30 ··· 38 38 loom.workspace = true 39 39 40 40 [features] 41 - unwind2 = ["dep:panic-unwind2"] 41 + k23-unwind = ["dep:k23-panic-unwind"] 42 42 counters = [] 43 43 __bench = ["tracing/max_level_off"] 44 44
+3 -3
libs/kasync/src/executor.rs
··· 14 14 use core::sync::atomic::Ordering; 15 15 16 16 use cordyceps::mpsc_queue::{MpscQueue, TryDequeueError}; 17 - use cpu_local::collection::CpuLocal; 18 17 use futures::pin_mut; 19 - use kfastrand::FastRand; 20 - use spin::Backoff; 18 + use k23_cpu_local::collection::CpuLocal; 19 + use k23_fastrand::FastRand; 20 + use k23_spin::Backoff; 21 21 22 22 use crate::error::{Closed, SpawnError}; 23 23 use crate::executor::steal::{Injector, Stealer, TryStealError};
+1 -1
libs/kasync/src/sync/wait_cell.rs
··· 11 11 use core::{fmt, task}; 12 12 13 13 use bitflags::bitflags; 14 + use k32_util::{CachePadded, loom_const_fn}; 14 15 use static_assertions::const_assert_eq; 15 - use util::{CachePadded, loom_const_fn}; 16 16 17 17 use crate::error::Closed; 18 18 use crate::loom::cell::UnsafeCell;
+2 -2
libs/kasync/src/sync/wait_queue.rs
··· 15 15 use core::{fmt, mem, ptr}; 16 16 17 17 use cordyceps::{Linked, List, list}; 18 + use k23_spin::{Mutex, MutexGuard}; 19 + use k32_util::{CachePadded, loom_const_fn}; 18 20 use mycelium_bitfield::{FromBits, bitfield, enum_from_bits}; 19 21 use pin_project::{pin_project, pinned_drop}; 20 - use spin::{Mutex, MutexGuard}; 21 - use util::{CachePadded, loom_const_fn}; 22 22 23 23 use crate::error::Closed; 24 24 use crate::sync::wake_batch::WakeBatch;
+1 -1
libs/kasync/src/sync/wake_batch.rs
··· 7 7 8 8 use core::task::Waker; 9 9 10 - use arrayvec::ArrayVec; 10 + use k23_arrayvec::ArrayVec; 11 11 12 12 const NUM_WAKERS: usize = 32; 13 13
+3 -3
libs/kasync/src/task.rs
··· 26 26 use cordyceps::mpsc_queue; 27 27 pub use id::Id; 28 28 pub use join_handle::{JoinError, JoinHandle}; 29 - use util::{CachePadded, CheckedMaybeUninit, loom_const_fn}; 29 + use k32_util::{CachePadded, CheckedMaybeUninit, loom_const_fn}; 30 30 pub use yield_now::yield_now; 31 31 32 32 use crate::executor::Scheduler; ··· 869 869 cfg_if::cfg_if! { 870 870 if #[cfg(test)] { 871 871 let result = ::std::panic::catch_unwind(poll); 872 - } else if #[cfg(feature = "unwind2")] { 873 - let result = panic_unwind2::catch_unwind(poll); 872 + } else if #[cfg(feature = "k23-unwind")] { 873 + let result = k23_panic_unwind::catch_unwind(poll); 874 874 } else { 875 875 let result = Ok(poll()); 876 876 }
+2 -2
libs/kasync/src/task/state.rs
··· 7 7 8 8 use core::fmt; 9 9 10 - use spin::Backoff; 11 - use util::loom_const_fn; 10 + use k23_spin::Backoff; 11 + use k32_util::loom_const_fn; 12 12 13 13 use crate::loom::sync::atomic::{self, AtomicUsize, Ordering}; 14 14 use crate::task::PollResult;
+1 -1
libs/kasync/src/test_util.rs
··· 10 10 11 11 use futures::pin_mut; 12 12 use futures::task::WakerRef; 13 - use util::loom_const_fn; 13 + use k32_util::loom_const_fn; 14 14 15 15 use crate::loom::sync::{Arc, Condvar, Mutex as StdMutex}; 16 16
+1 -1
libs/kasync/src/time/sleep.rs
··· 140 140 141 141 #[cfg(test)] 142 142 mod tests { 143 - use kfastrand::FastRand; 143 + use k23_fastrand::FastRand; 144 144 use tracing_subscriber::EnvFilter; 145 145 use tracing_subscriber::fmt::format::FmtSpan; 146 146
+2 -2
libs/kasync/src/time/timer.rs
··· 15 15 16 16 use cordyceps::List; 17 17 pub(in crate::time) use entry::Entry; 18 - use spin::Mutex; 19 - use util::loom_const_fn; 18 + use k23_spin::Mutex; 19 + use k32_util::loom_const_fn; 20 20 use wheel::Wheel; 21 21 22 22 use crate::loom::sync::atomic::Ordering;
+1 -1
libs/kasync/src/time/timer/entry.rs
··· 11 11 use core::sync::atomic::{AtomicBool, Ordering}; 12 12 13 13 use cordyceps::{Linked, list}; 14 + use k32_util::loom_const_fn; 14 15 use pin_project::pin_project; 15 - use util::loom_const_fn; 16 16 17 17 use crate::sync::wait_cell::WaitCell; 18 18 use crate::time::Ticks;
+6 -4
libs/kbacktrace/Cargo.toml libs/backtrace/Cargo.toml
··· 1 1 [package] 2 - name = "kbacktrace" 2 + name = "k23-backtrace" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true ··· 9 9 workspace = true 10 10 11 11 [dependencies] 12 - unwind2.workspace = true 12 + k23-addr2line.workspace = true 13 + k23-arrayvec.workspace = true 14 + k23-unwind.workspace = true 15 + 16 + # 3rd-party dependencies 13 17 gimli.workspace = true 14 - kaddr2line.workspace = true 15 18 xmas-elf.workspace = true 16 19 rustc-demangle.workspace = true 17 20 fallible-iterator.workspace = true 18 - arrayvec.workspace = true
+8 -8
libs/kbacktrace/src/lib.rs libs/backtrace/src/lib.rs
··· 13 13 use core::fmt; 14 14 use core::fmt::Formatter; 15 15 16 - use arrayvec::ArrayVec; 17 16 use fallible_iterator::FallibleIterator; 18 - use unwind2::FrameIter; 17 + use k23_arrayvec::ArrayVec; 18 + use k23_unwind::FrameIter; 19 19 20 20 pub use crate::symbolize::SymbolizeContext; 21 21 ··· 37 37 /// 38 38 /// # Errors 39 39 /// 40 - /// Returns the underlying [`unwind2::Error`] if walking the stack fails. 40 + /// Returns the underlying [`k23_unwind::Error`] if walking the stack fails. 41 41 #[inline] 42 - pub fn capture(ctx: &'a SymbolizeContext<'data>) -> Result<Self, unwind2::Error> { 42 + pub fn capture(ctx: &'a SymbolizeContext<'data>) -> Result<Self, k23_unwind::Error> { 43 43 Self::new_inner(ctx, FrameIter::new()) 44 44 } 45 45 ··· 53 53 /// 54 54 /// # Errors 55 55 /// 56 - /// Returns the underlying [`unwind2::Error`] if walking the stack fails. 56 + /// Returns the underlying [`k23_unwind::Error`] if walking the stack fails. 57 57 #[inline] 58 58 pub fn from_registers( 59 59 ctx: &'a SymbolizeContext<'data>, 60 - regs: unwind2::Registers, 60 + regs: k23_unwind::Registers, 61 61 ip: usize, 62 - ) -> Result<Self, unwind2::Error> { 62 + ) -> Result<Self, k23_unwind::Error> { 63 63 let iter = FrameIter::from_registers(regs, ip); 64 64 Self::new_inner(ctx, iter) 65 65 } ··· 67 67 fn new_inner( 68 68 ctx: &'a SymbolizeContext<'data>, 69 69 mut iter: FrameIter, 70 - ) -> Result<Self, unwind2::Error> { 70 + ) -> Result<Self, k23_unwind::Error> { 71 71 let mut frames = ArrayVec::new(); 72 72 let mut frames_omitted: usize = 0; 73 73
+4 -4
libs/kbacktrace/src/symbolize.rs libs/backtrace/src/symbolize.rs
··· 19 19 /// `addr2line`'s frame internally has all the nitty gritty details. 20 20 Frame { 21 21 addr: *mut c_void, 22 - location: Option<kaddr2line::Location<'a>>, 22 + location: Option<k23_addr2line::Location<'a>>, 23 23 name: Option<&'a str>, 24 24 }, 25 25 /// Couldn't find debug information, but we found it in the symbol table of ··· 126 126 addr: u64, 127 127 elf: &'ctx xmas_elf::ElfFile<'a>, 128 128 symtab: &'ctx [xmas_elf::symbol_table::Entry64], 129 - iter: kaddr2line::FrameIter<'ctx, EndianSlice<'a, NativeEndian>>, 129 + iter: k23_addr2line::FrameIter<'ctx, EndianSlice<'a, NativeEndian>>, 130 130 anything: bool, 131 131 } 132 132 ··· 174 174 175 175 /// Context necessary to resolve an address to its symbol name and source location. 176 176 pub struct SymbolizeContext<'a> { 177 - addr2line: kaddr2line::Context<EndianSlice<'a, NativeEndian>>, 177 + addr2line: k23_addr2line::Context<EndianSlice<'a, NativeEndian>>, 178 178 elf: xmas_elf::ElfFile<'a>, 179 179 adjust_vma: u64, 180 180 } ··· 191 191 }; 192 192 Ok(EndianSlice::new(data, NativeEndian)) 193 193 })?; 194 - let addr2line = kaddr2line::Context::from_dwarf(dwarf)?; 194 + let addr2line = k23_addr2line::Context::from_dwarf(dwarf)?; 195 195 196 196 Ok(Self { 197 197 addr2line,
+1 -1
libs/kfastrand/Cargo.toml libs/fastrand/Cargo.toml
··· 1 1 [package] 2 - name = "kfastrand" 2 + name = "k23-fastrand" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true
libs/kfastrand/README.md libs/fastrand/README.md
libs/kfastrand/benches/bench.rs libs/fastrand/benches/bench.rs
libs/kfastrand/src/lib.rs libs/fastrand/src/lib.rs
+5 -5
libs/kmem/Cargo.toml
··· 6 6 license.workspace = true 7 7 8 8 [dependencies] 9 - arrayvec.workspace = true 10 - riscv.workspace = true 11 - cpu-local = { workspace = true, optional = true } 12 - spin = { workspace = true, optional = true } 9 + k23-arrayvec.workspace = true 10 + k23-riscv.workspace = true 11 + k23-cpu-local = { workspace = true, optional = true } 12 + k23-spin = { workspace = true, optional = true } 13 13 proptest = { workspace = true, optional = true } 14 14 proptest-derive = { workspace = true, optional = true } 15 15 ··· 24 24 test-log = "0.2.19" 25 25 26 26 [features] 27 - test_utils = ["cpu-local", "spin", "proptest", "proptest-derive"] 27 + test_utils = ["k23-cpu-local", "k23-spin", "proptest", "proptest-derive"] 28 28 29 29 [lints] 30 30 workspace = true
+2 -2
libs/kmem/src/arch/riscv64.rs
··· 1 1 use core::ops::Range; 2 2 3 - use riscv::satp; 4 - use riscv::sbi::rfence::{sfence_vma, sfence_vma_asid}; 3 + use k23_riscv::satp; 4 + use k23_riscv::sbi::rfence::{sfence_vma, sfence_vma_asid}; 5 5 6 6 use crate::arch::PageTableLevel; 7 7 use crate::{
+2 -2
libs/kmem/src/bootstrap/frame_allocator.rs
··· 4 4 use core::ops::Range; 5 5 use core::{cmp, fmt, iter}; 6 6 7 - use arrayvec::ArrayVec; 7 + use k23_arrayvec::ArrayVec; 8 8 use lock_api::Mutex; 9 9 10 10 use crate::arch::Arch; ··· 479 479 480 480 enum Blocks<const MAX: usize> { 481 481 One(iter::Once<Range<PhysicalAddress>>), 482 - Multiple(arrayvec::IntoIter<Range<PhysicalAddress>, MAX>), 482 + Multiple(k23_arrayvec::IntoIter<Range<PhysicalAddress>, MAX>), 483 483 } 484 484 485 485 impl<const MAX: usize> Iterator for Blocks<MAX> {
+1 -1
libs/kmem/src/flush.rs
··· 1 1 use core::mem; 2 2 use core::ops::Range; 3 3 4 - use arrayvec::ArrayVec; 4 + use k23_arrayvec::ArrayVec; 5 5 6 6 use crate::VirtualAddress; 7 7 use crate::arch::Arch;
+1 -1
libs/kmem/src/table.rs
··· 1 1 use core::marker::PhantomData; 2 2 use core::ops::Range; 3 3 4 - use arrayvec::ArrayVec; 4 + use k23_arrayvec::ArrayVec; 5 5 6 6 use crate::arch::{Arch, PageTableEntry, PageTableLevel}; 7 7 use crate::physmap::PhysMap;
+2 -2
libs/kmem/src/test_utils/machine.rs
··· 5 5 use std::sync::Arc; 6 6 use std::{cmp, fmt}; 7 7 8 - use arrayvec::ArrayVec; 9 - use cpu_local::collection::CpuLocal; 8 + use k23_arrayvec::ArrayVec; 9 + use k23_cpu_local::collection::CpuLocal; 10 10 11 11 use crate::arch::{Arch, PageTableEntry, PageTableLevel}; 12 12 use crate::bootstrap::BootstrapAllocator;
+3 -6
libs/ksharded-slab/Cargo.toml libs/sharded-slab/Cargo.toml
··· 1 1 [package] 2 - name = "ksharded-slab" 2 + name = "k23-sharded-slab" 3 3 version = "0.1.7" 4 4 authors = ["Eliza Weisman <eliza@buoyant.io>"] 5 5 edition.workspace = true 6 - documentation = "https://docs.rs/sharded-slab/" 7 - homepage = "https://github.com/hawkw/sharded-slab" 8 - repository = "https://github.com/hawkw/sharded-slab" 9 6 license = "MIT" 10 7 keywords = ["slab", "allocator", "lock-free", "atomic"] 11 8 categories = ["memory-management", "data-structures", "concurrency"] ··· 15 12 16 13 [dependencies] 17 14 log.workspace = true 18 - spin.workspace = true 19 - cpu-local.workspace = true 15 + k23-spin.workspace = true 16 + k23-cpu-local.workspace = true 20 17 21 18 [features] 22 19 loom = []
-4
libs/ksharded-slab/README.md
··· 1 - # ksharded-slab 2 - 3 - This is a vendored copy of [hawkw/sharded-slab](https://github.com/hawkw/sharded-slab) made to be compatible with k23. 4 - You should not use this, it is strictly worse than the original.
libs/ksharded-slab/src/cfg.rs libs/sharded-slab/src/cfg.rs
+2 -2
libs/ksharded-slab/src/clear.rs libs/sharded-slab/src/clear.rs
··· 59 59 } 60 60 } 61 61 62 - impl<T: Clear> Clear for spin::Mutex<T> { 62 + impl<T: Clear> Clear for k23_spin::Mutex<T> { 63 63 #[inline] 64 64 fn clear(&mut self) { 65 65 self.get_mut().clear(); 66 66 } 67 67 } 68 68 69 - impl<T: Clear> Clear for spin::RwLock<T> { 69 + impl<T: Clear> Clear for k23_spin::RwLock<T> { 70 70 #[inline] 71 71 fn clear(&mut self) { 72 72 self.write().clear();
+2 -2
libs/ksharded-slab/src/implementation.rs libs/sharded-slab/src/implementation.rs
··· 1 1 // This module exists only to provide a separate page for the implementation 2 2 // documentation. 3 3 4 - //! Notes on `sharded-slab`'s implementation and design. 4 + //! Notes on `k23-sharded-slab`'s implementation and design. 5 5 //! 6 6 //! # Design 7 7 //! ··· 135 135 //! INITIAL_PAGE_SIZE.trailing_zeros() + 1; 136 136 //! ``` 137 137 //! 138 - //! [`MAX_THREADS`]: https://docs.rs/sharded-slab/latest/sharded_slab/trait.Config.html#associatedconstant.MAX_THREADS 138 + //! [`MAX_THREADS`]: https://docs.rs/k23-sharded-slab/latest/sharded_slab/trait.Config.html#associatedconstant.MAX_THREADS
libs/ksharded-slab/src/iter.rs libs/sharded-slab/src/iter.rs
+23 -23
libs/ksharded-slab/src/lib.rs libs/sharded-slab/src/lib.rs
··· 1 1 //! A lock-free concurrent slab. 2 2 //! 3 - //! "Forked" from [sharded-slab](https://github.com/hawkw/sharded-slab) (MIT licensed) with changes 3 + //! "Forked" from [k23-sharded-slab](https://github.com/hawkw/k23-sharded-slab) (MIT licensed) with changes 4 4 //! made to support the `no_std`-like environment of the kernel. 5 5 //! 6 6 //! Slabs provide pre-allocated storage for many instances of a single data ··· 16 16 //! First, add this to your `Cargo.toml`: 17 17 //! 18 18 //! ```toml 19 - //! sharded-slab = "0.1.1" 19 + //! k23-sharded-slab = "0.1.1" 20 20 //! ``` 21 21 //! 22 22 //! This crate provides two types, [`Slab`] and [`Pool`], which provide ··· 49 49 //! 50 50 //! Inserting an item into the slab, returning an index: 51 51 //! ```rust 52 - //! # use ksharded_slab::Slab; 52 + //! # use k23_sharded_slab::Slab; 53 53 //! let slab = Slab::new(); 54 54 //! 55 55 //! let key = slab.insert("hello world").unwrap(); ··· 58 58 //! 59 59 //! To share a slab across threads, it may be wrapped in an `Arc`: 60 60 //! ```rust 61 - //! # use ksharded_slab::Slab; 61 + //! # use k23_sharded_slab::Slab; 62 62 //! use alloc::sync::Arc; 63 63 //! let slab = Arc::new(Slab::new()); 64 64 //! ··· 83 83 //! each item, providing granular locking of items rather than of the slab: 84 84 //! 85 85 //! ```rust 86 - //! # use ksharded_slab::Slab; 86 + //! # use k23_sharded_slab::Slab; 87 87 //! use core::sync::{Arc, Mutex}; 88 88 //! let slab = Arc::new(Slab::new()); 89 89 //! ··· 133 133 //! multiple threads and locking is not required, this crate will likely offer 134 134 //! slightly worse performance. 135 135 //! 136 - //! In summary: `sharded-slab` offers significantly improved performance in 136 + //! In summary: `k23-sharded-slab` offers significantly improved performance in 137 137 //! concurrent use-cases, while `slab` should be preferred in single-threaded 138 138 //! use-cases. 139 139 //! ··· 192 192 //! a small constant-factor overhead, it offers significantly better 193 193 //! performance across concurrent accesses. 194 194 //! 195 - //! [benchmarks]: https://github.com/hawkw/sharded-slab/blob/master/benches/bench.rs 195 + //! [benchmarks]: https://github.com/hawkw/k23-sharded-slab/blob/master/benches/bench.rs 196 196 //! [`criterion`]: https://crates.io/crates/criterion 197 197 //! 198 198 //! # Implementation Notes ··· 263 263 /// # Examples 264 264 /// 265 265 /// ``` 266 - /// # use ksharded_slab::Slab; 266 + /// # use k23_sharded_slab::Slab; 267 267 /// let mut slab = Slab::new(); 268 268 /// 269 269 /// let hello = { ··· 299 299 /// # Examples 300 300 /// 301 301 /// ``` 302 - /// # use ksharded_slab::Slab; 302 + /// # use k23_sharded_slab::Slab; 303 303 /// # extern crate alloc; 304 304 /// use alloc::sync::Arc; 305 305 /// ··· 318 318 /// for the `'static` lifetime: 319 319 /// 320 320 /// ``` 321 - /// # use ksharded_slab::Slab; 321 + /// # use k23_sharded_slab::Slab; 322 322 /// # extern crate alloc; 323 - /// use ksharded_slab::OwnedEntry; 323 + /// use k23_sharded_slab::OwnedEntry; 324 324 /// use alloc::sync::Arc; 325 325 /// 326 326 /// pub struct MyStruct { ··· 352 352 /// `OwnedEntry`s may be sent between threads: 353 353 /// 354 354 /// ``` 355 - /// # use ksharded_slab::Slab; 355 + /// # use k23_sharded_slab::Slab; 356 356 /// use core::{thread, sync::Arc}; 357 357 /// 358 358 /// let slab: Arc<Slab<&'static str>> = Arc::new(Slab::new()); ··· 418 418 /// 419 419 /// # Examples 420 420 /// ```rust 421 - /// # use ksharded_slab::Slab; 421 + /// # use k23_sharded_slab::Slab; 422 422 /// let slab = Slab::new(); 423 423 /// 424 424 /// let key = slab.insert("hello world").unwrap(); ··· 445 445 /// # Examples 446 446 /// 447 447 /// ``` 448 - /// # use ksharded_slab::Slab; 448 + /// # use k23_sharded_slab::Slab; 449 449 /// let mut slab = Slab::new(); 450 450 /// 451 451 /// let hello = { ··· 484 484 /// # Examples 485 485 /// 486 486 /// ```rust 487 - /// let slab = ksharded_slab::Slab::new(); 487 + /// let slab = k23_sharded_slab::Slab::new(); 488 488 /// let key = slab.insert("hello world").unwrap(); 489 489 /// 490 490 /// // Remove the item from the slab. ··· 553 553 /// # Examples 554 554 /// 555 555 /// ```rust 556 - /// let slab = ksharded_slab::Slab::new(); 556 + /// let slab = k23_sharded_slab::Slab::new(); 557 557 /// let key = slab.insert("hello world").unwrap(); 558 558 /// 559 559 /// // Remove the item from the slab, returning it. ··· 608 608 /// # Examples 609 609 /// 610 610 /// ```rust 611 - /// let slab = ksharded_slab::Slab::new(); 611 + /// let slab = k23_sharded_slab::Slab::new(); 612 612 /// let key = slab.insert("hello world").unwrap(); 613 613 /// 614 614 /// assert_eq!(slab.get(key).unwrap(), "hello world"); ··· 648 648 /// # Examples 649 649 /// 650 650 /// ``` 651 - /// # use ksharded_slab::Slab; 651 + /// # use k23_sharded_slab::Slab; 652 652 /// # extern crate alloc; 653 653 /// use alloc::sync::Arc; 654 654 /// ··· 667 667 /// for the `'static` lifetime: 668 668 /// 669 669 /// ``` 670 - /// # use ksharded_slab::Slab; 670 + /// # use k23_sharded_slab::Slab; 671 671 /// # extern crate alloc; 672 - /// use ksharded_slab::OwnedEntry; 672 + /// use k23_sharded_slab::OwnedEntry; 673 673 /// use alloc::sync::Arc; 674 674 /// 675 675 /// pub struct MyStruct { ··· 726 726 /// # Examples 727 727 /// 728 728 /// ``` 729 - /// let slab = ksharded_slab::Slab::new(); 729 + /// let slab = k23_sharded_slab::Slab::new(); 730 730 /// 731 731 /// let key = slab.insert("hello world").unwrap(); 732 732 /// assert!(slab.contains(key)); ··· 863 863 /// # Examples 864 864 /// 865 865 /// ``` 866 - /// # use ksharded_slab::Slab; 866 + /// # use k23_sharded_slab::Slab; 867 867 /// let mut slab = Slab::new(); 868 868 /// 869 869 /// let hello = { ··· 905 905 /// # Examples 906 906 /// 907 907 /// ``` 908 - /// # use ksharded_slab::*; 908 + /// # use k23_sharded_slab::*; 909 909 /// let mut slab = Slab::new(); 910 910 /// 911 911 /// let hello = {
libs/ksharded-slab/src/page/mod.rs libs/sharded-slab/src/page/mod.rs
+1 -1
libs/ksharded-slab/src/page/slot.rs libs/sharded-slab/src/page/slot.rs
··· 3 3 use core::sync::atomic::{AtomicUsize, Ordering}; 4 4 use core::{fmt, mem, ptr}; 5 5 6 - use spin::Backoff; 6 + use k23_spin::Backoff; 7 7 8 8 use super::FreeList; 9 9 use crate::clear::Clear;
libs/ksharded-slab/src/page/stack.rs libs/sharded-slab/src/page/stack.rs
+2 -2
libs/ksharded-slab/src/pool.rs libs/sharded-slab/src/pool.rs
··· 949 949 shard.clear_after_release(self.key); 950 950 } else { 951 951 log::trace!("-> shard={:?} does not exist! THIS IS A BUG", shard_idx); 952 - // debug_assert!(panic_unwind::panicking(), "[internal error] tried to drop an `OwnedRef` to a slot on a shard that never existed!"); 952 + // debug_assert!(k23_panic_unwind::panicking(), "[internal error] tried to drop an `OwnedRef` to a slot on a shard that never existed!"); 953 953 } 954 954 } 955 955 } ··· 1077 1077 shard.clear_after_release(self.key); 1078 1078 } else { 1079 1079 log::trace!("-> shard does not exist! THIS IS A BUG"); 1080 - // debug_assert!(panic_unwind::panicking(), "[internal error] tried to drop an `OwnedRefMut` to a slot on a shard that never existed!"); 1080 + // debug_assert!(k23_panic_unwind::panicking(), "[internal error] tried to drop an `OwnedRefMut` to a slot on a shard that never existed!"); 1081 1081 } 1082 1082 } 1083 1083 }
libs/ksharded-slab/src/shard.rs libs/sharded-slab/src/shard.rs
+2 -2
libs/ksharded-slab/src/tid.rs libs/sharded-slab/src/tid.rs
··· 4 4 use core::marker::PhantomData; 5 5 use core::sync::atomic::{AtomicUsize, Ordering}; 6 6 7 - use cpu_local::cpu_local; 8 - use spin::{LazyLock, Mutex}; 7 + use k23_cpu_local::cpu_local; 8 + use k23_spin::{LazyLock, Mutex}; 9 9 10 10 use crate::cfg::{self, CfgPrivate}; 11 11 use crate::{Pack, page};
+6 -6
libs/panic-unwind2/Cargo.toml libs/panic-unwind/Cargo.toml
··· 1 1 [package] 2 - name = "panic-unwind2" 2 + name = "k23-panic-unwind" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true 6 6 license.workspace = true 7 7 8 8 [dependencies] 9 - spin.workspace = true 10 - cpu-local.workspace = true 11 - unwind2.workspace = true 12 - abort.workspace = true 9 + k23-spin.workspace = true 10 + k23-cpu-local.workspace = true 11 + k23-unwind.workspace = true 12 + k23-abort.workspace = true 13 13 14 14 # 3rd-party dependencies 15 15 tracing.workspace = true 16 16 #cfg-if.workspace = true 17 17 18 18 [target.'cfg(any(target_arch = "riscv64", target_arch = "riscv32"))'.dependencies] 19 - riscv.workspace = true 19 + k23-riscv.workspace = true 20 20 21 21 [lints] 22 22 workspace = true
+1 -1
libs/panic-unwind2/src/hook.rs libs/panic-unwind/src/hook.rs
··· 10 10 use core::panic::Location; 11 11 use core::{fmt, mem}; 12 12 13 - use spin::RwLock; 13 + use k23_spin::RwLock; 14 14 15 15 #[derive(Debug)] 16 16 pub struct PanicHookInfo<'a> {
+12 -8
libs/panic-unwind2/src/lib.rs libs/panic-unwind/src/lib.rs
··· 25 25 use core::panic::{PanicPayload, UnwindSafe}; 26 26 use core::{fmt, mem}; 27 27 28 - use abort::abort; 29 28 pub use hook::{set_hook, take_hook}; 29 + use k23_abort::abort; 30 30 31 31 use crate::hook::{HOOK, Hook, PanicHookInfo, default_hook}; 32 32 use crate::panic_count::MustAbort; ··· 46 46 where 47 47 F: FnOnce() -> R + UnwindSafe, 48 48 { 49 - unwind2::catch_unwind(f).inspect_err(|_| { 49 + k23_unwind::catch_unwind(f).inspect_err(|_| { 50 50 panic_count::decrease(); // decrease the panic count, since we caught it 51 51 }) 52 52 } ··· 54 54 /// Resume an unwind previously caught with [`catch_unwind`]. 55 55 pub fn resume_unwind(payload: Box<dyn Any + Send>) -> ! { 56 56 debug_assert!(panic_count::increase(false).is_none()); 57 - unwind2::with_context(|regs, pc| rust_panic(payload, regs.clone(), pc)) 57 + k23_unwind::with_context(|regs, pc| rust_panic(payload, regs.clone(), pc)) 58 58 } 59 59 60 60 /// Begin unwinding from an externally captured set of registers (such as from a trap handler). ··· 63 63 /// 64 64 /// This will start walking the stack and calling `Drop` implementations starting the the `pc` and 65 65 /// register set you provided. Be VERY careful that it is actually correctly captured. 66 - pub unsafe fn begin_unwind(payload: Box<dyn Any + Send>, regs: unwind2::Registers, pc: usize) -> ! { 66 + pub unsafe fn begin_unwind( 67 + payload: Box<dyn Any + Send>, 68 + regs: k23_unwind::Registers, 69 + pc: usize, 70 + ) -> ! { 67 71 debug_assert!(panic_count::increase(false).is_none()); 68 72 rust_panic(payload, regs, pc) 69 73 } ··· 104 108 abort(); 105 109 } 106 110 107 - unwind2::with_context(|regs, pc| rust_panic(payload, regs.clone(), pc)) 111 + k23_unwind::with_context(|regs, pc| rust_panic(payload, regs.clone(), pc)) 108 112 } 109 113 110 114 /// Mirroring std, this is an unmangled function on which to slap 111 115 /// yer breakpoints for backtracing panics. 112 116 #[inline(never)] 113 117 #[unsafe(no_mangle)] 114 - fn rust_panic(payload: Box<dyn Any + Send>, regs: unwind2::Registers, pc: usize) -> ! { 118 + fn rust_panic(payload: Box<dyn Any + Send>, regs: k23_unwind::Registers, pc: usize) -> ! { 115 119 // Safety: `begin_unwind` will either return an error or not return at all 116 - match unsafe { unwind2::begin_unwind_with(payload, regs, pc).unwrap_err_unchecked() } { 117 - unwind2::Error::EndOfStack => { 120 + match unsafe { k23_unwind::begin_unwind_with(payload, regs, pc).unwrap_err_unchecked() } { 121 + k23_unwind::Error::EndOfStack => { 118 122 tracing::error!( 119 123 "unwinding completed without finding a `catch_unwind` make sure there is at least a root level catch unwind wrapping the main function. aborting." 120 124 );
+1 -1
libs/panic-unwind2/src/panic_count.rs libs/panic-unwind/src/panic_count.rs
··· 8 8 use core::cell::Cell; 9 9 use core::sync::atomic::{AtomicUsize, Ordering}; 10 10 11 - use cpu_local::cpu_local; 11 + use k23_cpu_local::cpu_local; 12 12 13 13 /// A reason for forcing an immediate abort on panic. 14 14 #[derive(Debug)]
+2 -2
libs/riscv/Cargo.toml
··· 1 1 [package] 2 - name = "riscv" 2 + name = "k23-riscv" 3 3 description = "RISC-V architecture support crate" 4 4 version.workspace = true 5 5 edition.workspace = true ··· 10 10 workspace = true 11 11 12 12 [dependencies] 13 - spin.workspace = true 13 + k23-spin.workspace = true 14 14 trap.workspace = true 15 15 16 16 # 3rd-party dependencies
+1 -1
libs/riscv/src/hio.rs
··· 10 10 use core::fmt::{Error, Write}; 11 11 use core::{fmt, slice}; 12 12 13 - use spin::Mutex; 13 + use k23_spin::Mutex; 14 14 15 15 use super::semihosting::syscall; 16 16
+4
libs/sharded-slab/README.md
··· 1 + # k23-sharded-slab 2 + 3 + This is a vendored copy of [hawkw/k23-sharded-slab](https://github.com/hawkw/k23-sharded-slab) made to be compatible with k23. 4 + You should not use this, it is strictly worse than the original.
+2 -2
libs/spin/Cargo.toml
··· 1 1 [package] 2 - name = "spin" 2 + name = "k23-spin" 3 3 description = "Synchronization primitives for use in k23" 4 4 version.workspace = true 5 5 edition.workspace = true ··· 11 11 12 12 [dependencies] 13 13 cfg-if.workspace = true 14 - util.workspace = true 14 + k32-util.workspace = true 15 15 16 16 # 3rd-party dependencies 17 17 lock_api.workspace = true
+1 -1
libs/spin/src/barrier.rs
··· 5 5 // http://opensource.org/licenses/MIT>, at your option. This file may not be 6 6 // copied, modified, or distributed except according to those terms. 7 7 8 - use util::loom_const_fn; 8 + use k32_util::loom_const_fn; 9 9 10 10 use crate::{Backoff, Mutex}; 11 11
+1 -1
libs/spin/src/lazy_lock.rs
··· 10 10 use core::panic::{RefUnwindSafe, UnwindSafe}; 11 11 use core::{fmt, ptr}; 12 12 13 - use util::loom_const_fn; 13 + use k32_util::loom_const_fn; 14 14 15 15 use super::Once; 16 16 use super::once::ExclusiveState;
+1 -1
libs/spin/src/once.rs
··· 7 7 8 8 use core::mem; 9 9 10 - use util::loom_const_fn; 10 + use k32_util::loom_const_fn; 11 11 12 12 use crate::Backoff; 13 13 use crate::loom::sync::atomic::{AtomicU8, Ordering};
+1 -1
libs/spin/src/once_lock.rs
··· 9 9 use core::mem::MaybeUninit; 10 10 use core::panic::{RefUnwindSafe, UnwindSafe}; 11 11 12 - use util::loom_const_fn; 12 + use k32_util::loom_const_fn; 13 13 14 14 use super::Once; 15 15 use crate::loom::cell::UnsafeCell;
+1 -1
libs/uart-16550/Cargo.toml
··· 7 7 8 8 [dependencies] 9 9 bitflags.workspace = true 10 - spin.workspace = true 10 + k23-spin.workspace = true 11 11 12 12 [lints] 13 13 workspace = true
+1 -1
libs/uart-16550/src/lib.rs
··· 11 11 use core::sync::atomic::{AtomicPtr, Ordering}; 12 12 13 13 use bitflags::bitflags; 14 - use spin::Backoff; 14 + use k23_spin::Backoff; 15 15 16 16 macro_rules! wait_for { 17 17 ($cond:expr, $boff:expr) => {
+3 -3
libs/unwind2/Cargo.toml libs/unwind/Cargo.toml
··· 1 1 [package] 2 - name = "unwind2" 2 + name = "k23-unwind" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true ··· 11 11 [dependencies] 12 12 cfg-if.workspace = true 13 13 gimli = { workspace = true, features = ["read-core"] } 14 - spin.workspace = true 14 + k23-spin.workspace = true 15 15 fallible-iterator.workspace = true 16 - abort.workspace = true 16 + k23-abort.workspace = true 17 17 tracing.workspace = true
libs/unwind2/src/arch/aarch64.rs libs/unwind/src/arch/aarch64.rs
libs/unwind2/src/arch/mod.rs libs/unwind/src/arch/mod.rs
libs/unwind2/src/arch/riscv64.rs libs/unwind/src/arch/riscv64.rs
libs/unwind2/src/arch/x86_64.rs libs/unwind/src/arch/x86_64.rs
libs/unwind2/src/eh_action.rs libs/unwind/src/eh_action.rs
+1 -1
libs/unwind2/src/eh_info.rs libs/unwind/src/eh_info.rs
··· 9 9 BaseAddresses, EhFrame, EhFrameHdr, EndianSlice, FrameDescriptionEntry, NativeEndian, 10 10 ParsedEhFrameHdr, UnwindSection, 11 11 }; 12 - use spin::LazyLock; 12 + use k23_spin::LazyLock; 13 13 14 14 use super::utils::{deref_pointer, get_unlimited_slice}; 15 15
libs/unwind2/src/error.rs libs/unwind/src/error.rs
+1 -1
libs/unwind2/src/exception.rs libs/unwind/src/exception.rs
··· 10 10 use core::ffi::c_int; 11 11 use core::ptr; 12 12 13 - use abort::abort; 13 + use k23_abort::abort; 14 14 15 15 use crate::Error; 16 16
+4 -4
libs/unwind2/src/frame.rs libs/unwind/src/frame.rs
··· 275 275 276 276 /// An iterator over frames on the stack. 277 277 /// 278 - /// This is the primary means for walking the stack in `unwind2`. 278 + /// This is the primary means for walking the stack in `k23_unwind`. 279 279 /// 280 280 /// ```rust 281 - /// # use unwind2::FrameIter; 281 + /// # use k23_unwind::FrameIter; 282 282 /// use fallible_iterator::FallibleIterator; 283 283 /// 284 284 /// let mut frames = FrameIter::new(); // start the stack walking at the current frame ··· 291 291 /// You can also construct a `FrameIter` from the raw register context and instruction pointer: 292 292 /// 293 293 /// ```rust 294 - /// # use unwind2::FrameIter; 294 + /// # use k23_unwind::FrameIter; 295 295 /// use fallible_iterator::FallibleIterator; 296 296 /// 297 297 /// // in a real scenario you would obtain these values from e.g. a signal/trap handler 298 - /// let regs = unwind2::Registers {gp: [0; 32],fp: [0; 32]}; 298 + /// let regs = k23_unwind::Registers {gp: [0; 32],fp: [0; 32]}; 299 299 /// let ip = 0; 300 300 /// 301 301 /// let mut frames = FrameIter::from_registers(regs, ip);
+2 -2
libs/unwind2/src/lang_items.rs libs/unwind/src/lang_items.rs
··· 5 5 // http://opensource.org/licenses/MIT>, at your option. This file may not be 6 6 // copied, modified, or distributed except according to those terms. 7 7 8 - use abort::abort; 8 + use k23_abort::abort; 9 9 10 10 use crate::exception::Exception; 11 11 use crate::utils::with_context; ··· 13 13 14 14 /// In traditional unwinders the personality routine is responsible for determining the unwinders 15 15 /// behaviour for each frame (stop unwinding because a handler has been found, continue etc.) 16 - /// Since `unwind2` only cares about Rust code, the personality routine here is just a stub to make 16 + /// Since `k23_unwind` only cares about Rust code, the personality routine here is just a stub to make 17 17 /// the compiler happy and ensure we're not unwinding across language boundaries. The real unwinding 18 18 /// happens in [`raise_exception_phase2`]. 19 19 #[lang = "eh_personality"]
+4 -4
libs/unwind2/src/lib.rs libs/unwind/src/lib.rs
··· 28 28 use core::panic::UnwindSafe; 29 29 use core::ptr::addr_of_mut; 30 30 31 - use abort::abort; 32 31 pub use arch::Registers; 33 32 use eh_action::{EHAction, find_eh_action}; 34 33 pub use eh_info::EhInfo; ··· 36 35 use exception::Exception; 37 36 use fallible_iterator::FallibleIterator; 38 37 pub use frame::{Frame, FrameIter}; 38 + use k23_abort::abort; 39 39 use lang_items::ensure_rust_personality_routine; 40 40 pub use utils::with_context; 41 41 ··· 100 100 /// 101 101 /// Note that the traditional unwinding process has 2 phases, the first where the landing pad is discovered 102 102 /// and the second where the stack is actually unwound up to that landing pad. 103 - /// In `unwind2` we can get away with one phase because we bypass the language personality routine: 103 + /// In `k23_unwind` we can get away with one phase because we bypass the language personality routine: 104 104 /// Traditional unwinders call the personality routine on each frame to discover a landing pad, and 105 105 /// then during cleanup call the personality routine again to determine if control should actually be 106 106 /// transferred. This is done so that languages have maximum flexibility in how they treat exceptions. 107 107 /// 108 - /// `unwind2` - being Rust-only - doesn't need that flexibility since Rust landing pads are called 109 - /// unconditionally. Furthermore, `unwind2` never actually calls the personality routine, instead 108 + /// `k23_unwind` - being Rust-only - doesn't need that flexibility since Rust landing pads are called 109 + /// unconditionally. Furthermore, `k23_unwind` never actually calls the personality routine, instead 110 110 /// parsing the [`EHAction`] for each frame directly. 111 111 /// 112 112 /// The name `raise_exception_phase2` is kept though to make it easier to understand what this function
libs/unwind2/src/utils.rs libs/unwind/src/utils.rs
+1 -1
libs/util/Cargo.toml
··· 1 1 [package] 2 - name = "util" 2 + name = "k32-util" 3 3 version.workspace = true 4 4 edition.workspace = true 5 5 authors.workspace = true
+2 -2
libs/wast/Cargo.toml
··· 1 1 [package] 2 - name = "wast" 2 + name = "k23-wast" 3 3 version = "228.0.0" 4 4 authors = ["Alex Crichton <alex@alexcrichton.com>"] 5 5 edition.workspace = true ··· 26 26 unicode-width.workspace = true 27 27 memchr.workspace = true 28 28 bumpalo.workspace = true 29 - cpu-local.workspace = true 29 + k23-cpu-local.workspace = true 30 30 31 31 [dev-dependencies] 32 32 wat.workspace = true
+1 -1
libs/wast/src/gensym.rs
··· 1 1 use core::cell::Cell; 2 2 3 - use cpu_local::cpu_local; 3 + use k23_cpu_local::cpu_local; 4 4 5 5 use crate::token::{Id, Span}; 6 6
+5 -5
loader/Cargo.toml
··· 11 11 12 12 [dependencies] 13 13 loader-api.workspace = true 14 - spin.workspace = true 15 - fdt.workspace = true 16 - abort.workspace = true 14 + k23-spin.workspace = true 15 + k23-fdt.workspace = true 16 + k23-abort.workspace = true 17 17 kmem.workspace = true 18 18 19 19 # third-party dependencies ··· 21 21 cfg-if.workspace = true 22 22 rand_chacha.workspace = true 23 23 rand.workspace = true 24 - arrayvec.workspace = true 24 + k23-arrayvec.workspace = true 25 25 xmas-elf.workspace = true 26 26 fallible-iterator.workspace = true 27 27 bitflags.workspace = true 28 28 29 29 [target.'cfg(any(target_arch = "riscv64", target_arch = "riscv32"))'.dependencies] 30 - riscv.workspace = true 30 + k23-riscv.workspace = true 31 31 32 32 [lints] 33 33 workspace = true
+1 -1
loader/src/arch/mod.rs
··· 9 9 if #[cfg(target_arch = "riscv64")] { 10 10 mod riscv64; 11 11 pub use riscv64::*; 12 - pub use riscv::*; 12 + pub use k23_riscv::*; 13 13 } else { 14 14 compile_error!("Unsupported target architecture"); 15 15 }
+3 -3
loader/src/arch/riscv64.rs
··· 10 10 use core::ptr::NonNull; 11 11 12 12 use bitflags::bitflags; 13 + use k23_riscv::satp; 13 14 use kmem::{PhysicalAddress, VirtualAddress}; 14 - use riscv::satp; 15 15 16 16 use crate::GlobalInitResult; 17 17 use crate::error::Error; ··· 204 204 205 205 // Safety: inline assembly 206 206 unsafe { 207 - riscv::sstatus::set_sum(); 207 + k23_riscv::sstatus::set_sum(); 208 208 209 209 asm! { 210 210 "mv sp, {stack_top}", // Set the kernel stack ptr ··· 250 250 } 251 251 252 252 log::trace!("[{boot_hart}] starting hart {hartid}..."); 253 - riscv::sbi::hsm::hart_start( 253 + k23_riscv::sbi::hsm::hart_start( 254 254 hartid, 255 255 _start_secondary as usize, 256 256 minfo.fdt.as_ptr() as usize,
+4 -4
loader/src/error.rs
··· 12 12 /// Failed to convert number 13 13 TryFromInt(core::num::TryFromIntError), 14 14 /// Failed to parse device tree blob 15 - Fdt(fdt::Error), 15 + Fdt(k23_fdt::Error), 16 16 /// Failed to parse kernel elf 17 17 Elf(&'static str), 18 18 /// The system was not able to allocate memory needed for the operation. 19 19 NoMemory, 20 20 /// Failed to start secondary hart 21 21 #[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))] 22 - FailedToStartSecondaryHart(riscv::sbi::Error), 22 + FailedToStartSecondaryHart(k23_riscv::sbi::Error), 23 23 TryFromSlice(core::array::TryFromSliceError), 24 24 } 25 25 impl From<core::num::TryFromIntError> for Error { ··· 27 27 Error::TryFromInt(err) 28 28 } 29 29 } 30 - impl From<fdt::Error> for Error { 31 - fn from(err: fdt::Error) -> Self { 30 + impl From<k23_fdt::Error> for Error { 31 + fn from(err: k23_fdt::Error) -> Self { 32 32 Error::Fdt(err) 33 33 } 34 34 }
+1 -1
loader/src/logger.rs
··· 46 46 fn print(args: core::fmt::Arguments) { 47 47 cfg_if::cfg_if! { 48 48 if #[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))] { 49 - riscv::hio::_print(args); 49 + k23_riscv::hio::_print(args); 50 50 } else { 51 51 compile_error!("unsupported target architecture"); 52 52 }
+3 -3
loader/src/machine_info.rs
··· 12 12 use core::str::FromStr; 13 13 use core::{fmt, mem}; 14 14 15 - use arrayvec::ArrayVec; 16 15 use fallible_iterator::FallibleIterator; 17 - use fdt::{CellSizes, Fdt, PropertiesIter}; 16 + use k23_arrayvec::ArrayVec; 17 + use k23_fdt::{CellSizes, Fdt, PropertiesIter}; 18 18 use kmem::{AddressRangeExt, PhysicalAddress}; 19 19 20 20 use crate::arch::PAGE_SIZE; ··· 228 228 fn find_property<'dt>( 229 229 mut props: PropertiesIter<'dt>, 230 230 name: &str, 231 - ) -> crate::Result<Option<fdt::Property<'dt>>> { 231 + ) -> crate::Result<Option<k23_fdt::Property<'dt>>> { 232 232 props 233 233 .find_map(|prop| { 234 234 if prop.name == name {
+2 -2
loader/src/main.rs
··· 14 14 use core::mem; 15 15 use core::ops::Range; 16 16 17 - use arrayvec::ArrayVec; 17 + use k23_arrayvec::ArrayVec; 18 + use k23_spin::{Barrier, OnceLock}; 18 19 use kmem::{AddressRangeExt, PhysicalAddress, VirtualAddress}; 19 20 use rand::SeedableRng; 20 21 use rand_chacha::ChaCha20Rng; 21 - use spin::{Barrier, OnceLock}; 22 22 23 23 use crate::boot_info::prepare_boot_info; 24 24 use crate::error::Error;
+1 -1
loader/src/panic.rs
··· 5 5 // http://opensource.org/licenses/MIT>, at your option. This file may not be 6 6 // copied, modified, or distributed except according to those terms. 7 7 8 - use abort::abort; 8 + use k23_abort::abort; 9 9 10 10 use crate::arch; 11 11