From f8f347c3648d89f6ce6acb183e96b4e44ac2c25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=AF=E5=AE=87?= <2537738252@qq.com> Date: Fri, 28 Nov 2025 20:17:07 +0800 Subject: [PATCH 01/22] add riscv64 related files --- Cargo.lock | 1818 ++++++++------------- configs/board/qemu-riscv64.toml | 11 + kernel/src/hal/arch/riscv64/cache.rs | 5 + kernel/src/hal/arch/riscv64/mod.rs | 4 + platform/riscv64-qemu-virt/Cargo.toml | 27 + platform/riscv64-qemu-virt/axconfig.toml | 84 + platform/riscv64-qemu-virt/build.rs | 21 + platform/riscv64-qemu-virt/linker.lds.S | 99 ++ platform/riscv64-qemu-virt/src/boot.rs | 94 ++ platform/riscv64-qemu-virt/src/console.rs | 51 + platform/riscv64-qemu-virt/src/init.rs | 39 + platform/riscv64-qemu-virt/src/irq.rs | 196 +++ platform/riscv64-qemu-virt/src/lib.rs | 30 + platform/riscv64-qemu-virt/src/mem.rs | 58 + platform/riscv64-qemu-virt/src/power.rs | 35 + platform/riscv64-qemu-virt/src/time.rs | 75 + scripts/ostool/qemu-riscv64.toml | 23 + 17 files changed, 1554 insertions(+), 1116 deletions(-) create mode 100644 configs/board/qemu-riscv64.toml create mode 100644 kernel/src/hal/arch/riscv64/cache.rs create mode 100644 kernel/src/hal/arch/riscv64/mod.rs create mode 100644 platform/riscv64-qemu-virt/Cargo.toml create mode 100644 platform/riscv64-qemu-virt/axconfig.toml create mode 100644 platform/riscv64-qemu-virt/build.rs create mode 100644 platform/riscv64-qemu-virt/linker.lds.S create mode 100644 platform/riscv64-qemu-virt/src/boot.rs create mode 100644 platform/riscv64-qemu-virt/src/console.rs create mode 100644 platform/riscv64-qemu-virt/src/init.rs create mode 100644 platform/riscv64-qemu-virt/src/irq.rs create mode 100644 platform/riscv64-qemu-virt/src/lib.rs create mode 100644 platform/riscv64-qemu-virt/src/mem.rs create mode 100644 platform/riscv64-qemu-virt/src/power.rs create mode 100644 platform/riscv64-qemu-virt/src/time.rs create mode 100644 scripts/ostool/qemu-riscv64.toml diff --git a/Cargo.lock b/Cargo.lock index 0b7e56a3..b688ef12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,17 +27,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a2c929f5025d9b8a0f549b187c4d3a39671f44015ff6ccddd0b134c874b3c1a" -[[package]] -name = "abi-singleton" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbdf894742ece5360a74aa8278c42e0f305aa9f7c35d43ebc9cceca105f7e434" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "addr2line" version = "0.25.1" @@ -74,7 +63,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "version_check", - "zerocopy 0.8.31", + "zerocopy 0.8.27", ] [[package]] @@ -88,10 +77,9 @@ dependencies = [ [[package]] name = "allocator" -version = "0.1.2" -source = "git+https://github.com/arceos-org/allocator.git?tag=v0.1.2#922e72a7e4dfb7ffc4b67d242d38f8361ebd13ac" +version = "0.1.1" +source = "git+https://github.com/arceos-org/allocator.git?tag=v0.1.1#1d5b7a1b4fd8db4c9c9cea4e6012d15d42e2bf40" dependencies = [ - "axerrno 0.1.2", "bitmap-allocator", "cfg-if", "rlsf", @@ -112,15 +100,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_rgb" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a730095eb14ee842a0f1e68504b85c8d4a19b1ef2ac2a9b4debf0ed982f9b08a" -dependencies = [ - "rgb", -] - [[package]] name = "anstream" version = "0.6.21" @@ -153,22 +132,22 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.5" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.11" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -196,12 +175,12 @@ dependencies = [ [[package]] name = "arceos_api" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axalloc", "axconfig", "axdriver", - "axerrno 0.1.2", + "axerrno", "axfeat", "axfs", "axhal", @@ -214,30 +193,16 @@ dependencies = [ [[package]] name = "arm-gic-driver" -version = "0.14.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a886a953642fbf21eb5928c49a05f021fae007219ae8cb2dafbf403dfeba974a" -dependencies = [ - "aarch64-cpu", - "bitflags 2.10.0", - "enum_dispatch", - "log", - "rdif-intc 0.11.0", - "tock-registers 0.9.0", -] - -[[package]] -name = "arm-gic-driver" -version = "0.15.9" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5487b0a69ebddf2f8affd1e0d32a875fc6213b3a15e3315f9d7beb34b174d457" +checksum = "f251a1a74133f802b55eaf5e340107b0024457aa9b2ac3c72074501bfa8509a5" dependencies = [ "aarch64-cpu", "bitflags 2.10.0", "enum_dispatch", "log", "paste", - "rdif-intc 0.12.1", + "rdif-intc", "tock-registers 0.9.0", ] @@ -267,8 +232,8 @@ dependencies = [ "aarch64-cpu", "axaddrspace", "axdevice_base", - "axerrno 0.1.2", - "axvcpu", + "axerrno", + "axvcpu 0.1.2", "axvisor_api", "log", "numeric-enum-macro", @@ -286,11 +251,29 @@ dependencies = [ "aarch64_sysreg", "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno", + "axvisor_api", + "bitmaps", + "log", + "memory_addr", + "spin 0.9.8", + "tock-registers 0.10.1", +] + +[[package]] +name = "arm_vgic" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/arm_vgic.git#81338d6dd8a9dab04b91c9c0da3d6d84e7768be6" +dependencies = [ + "aarch64-cpu", + "aarch64_sysreg", + "axaddrspace", + "axdevice_base", + "axerrno", "axvisor_api", "bitmaps", "log", - "memory_addr 0.4.1", + "memory_addr", "spin 0.9.8", "tock-registers 0.10.1", ] @@ -315,7 +298,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -336,13 +319,13 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06b129114ab36be728ef11dd6540559c30deb6332378157d22bdc0aae6803a63" dependencies = [ - "axerrno 0.1.2", + "axerrno", "bit_field", "bitflags 2.10.0", "cfg-if", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "memory_set", "numeric-enum-macro", "page_table_entry", @@ -353,26 +336,14 @@ dependencies = [ [[package]] name = "axalloc" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "allocator", - "axerrno 0.1.2", + "axerrno", "cfg-if", "kspin", "log", - "memory_addr 0.4.1", - "strum 0.27.2", -] - -[[package]] -name = "axbacktrace" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf9566516f5d799b2f791a6ec5af57eec87d17624346f7c876fa006b922c99e6" -dependencies = [ - "cfg-if", - "log", - "spin 0.10.0", + "memory_addr", ] [[package]] @@ -401,22 +372,43 @@ dependencies = [ "axconfig-gen", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] name = "axcpu" -version = "0.3.0" -source = "git+https://github.com/arceos-org/axcpu.git?tag=dev-v03#72ef3859952b7340bae261c9a50c32705e602017" +version = "0.2.2" +dependencies = [ + "aarch64-cpu", + "cfg-if", + "lazyinit", + "linkme", + "log", + "loongArch64", + "memory_addr", + "page_table_entry", + "page_table_multiarch", + "percpu", + "riscv", + "static_assertions", + "tock-registers 0.9.0", + "x86", + "x86_64", +] + +[[package]] +name = "axcpu" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e09bc1235e3da45e942b50f47812f8397ad84cb490264bf914c65ac44e6f8b1d" dependencies = [ "aarch64-cpu", - "axbacktrace", "cfg-if", "lazyinit", "linkme", "log", "loongArch64", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "page_table_multiarch", "percpu", @@ -430,16 +422,16 @@ dependencies = [ [[package]] name = "axdevice" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axdevice.git#75d9db284fd4c9ee9607c2fd84967461eeaf5b07" +source = "git+https://github.com/arceos-hypervisor/axdevice.git#60558bb25214c2030651726beddae088d8a1cd8e" dependencies = [ - "arm_vgic", + "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno", "axvmconfig", "cfg-if", "log", - "memory_addr 0.4.1", + "memory_addr", "range-alloc", "spin 0.9.8", ] @@ -451,19 +443,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67c43baf33ed4790ffd3365c4ca027a1e3d1c2b6058f4605b67bca04cadf48d5" dependencies = [ "axaddrspace", - "axerrno 0.1.2", + "axerrno", "axvmconfig", "cfg-if", - "memory_addr 0.4.1", + "memory_addr", "serde", ] [[package]] name = "axdisplay" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axdriver", + "axdriver_display", "axsync", "lazyinit", "log", @@ -472,75 +465,60 @@ dependencies = [ [[package]] name = "axdriver" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ - "arm-gic-driver 0.15.9", + "arm-gic-driver", "axalloc", "axconfig", - "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", - "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", + "axdriver_base", + "axdriver_block", "axdriver_display", "axdriver_net", "axdriver_pci", "axdriver_virtio", - "axerrno 0.1.2", + "axerrno", "axhal", - "axklib", - "axmm", + "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1)", "cfg-if", "crate_interface", "dma-api 0.5.2", + "lazyinit", "log", - "memory_addr 0.4.1", - "rdif-block 0.6.2", - "rdif-intc 0.12.1", - "rdrive 0.18.11", - "smallvec", + "memory_addr", + "rdif-block", + "rdif-intc", + "rdrive", "spin 0.10.0", ] -[[package]] -name = "axdriver_base" -version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" - [[package]] name = "axdriver_base" version = "0.1.2" source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" -[[package]] -name = "axdriver_block" -version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" -dependencies = [ - "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", - "log", -] - [[package]] name = "axdriver_block" version = "0.1.2" source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" dependencies = [ - "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2)", + "axdriver_base", "log", ] [[package]] name = "axdriver_display" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" dependencies = [ - "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", + "axdriver_base", ] [[package]] name = "axdriver_net" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" dependencies = [ - "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", + "axdriver_base", "log", "spin 0.9.8", ] @@ -548,7 +526,7 @@ dependencies = [ [[package]] name = "axdriver_pci" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" dependencies = [ "virtio-drivers", ] @@ -556,44 +534,32 @@ dependencies = [ [[package]] name = "axdriver_virtio" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" dependencies = [ - "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", - "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", - "log", + "axdriver_base", + "axdriver_block", "virtio-drivers", ] [[package]] name = "axerrno" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a88b1fa2ce97a6ff4ce31ba9fda3065730ca4d77a1ba50dec000fc04f1fb686" -dependencies = [ - "axerrno 0.2.2", - "log", -] - -[[package]] -name = "axerrno" -version = "0.2.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f961d2868582a092fb1e71b90c16cc6f2cbbe7bb5fa7e4bd6fe61d882ce6bb34" +checksum = "66ccd41dd4ef364e2385901a5c2a3adea974a41eccb2529c1f24e4c8bc93d834" dependencies = [ "log", - "strum 0.27.2", ] [[package]] name = "axfeat" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axalloc", - "axbacktrace", "axdriver", "axfs", "axhal", + "axklib-impl", "axlog", "axruntime", "axsync", @@ -603,19 +569,33 @@ dependencies = [ [[package]] name = "axfs" -version = "0.1.0" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axdriver", - "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2)", - "axerrno 0.1.2", + "axdriver_block", + "axerrno", + "axfs_devfs", "axfs_ramfs", "axfs_vfs", "axio", + "axns", + "axsync", "cap_access", + "cfg-if", "fatfs", "lazyinit", "log", - "rsext4 0.1.0 (git+https://github.com/Dirinkbottle/rsext4.git?tag=dev-251222)", +] + +[[package]] +name = "axfs_devfs" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81b87ae981272ca8d5d8f106a4452c63f4b5ac36e17ee8f848ee1b250538b9f8" +dependencies = [ + "axfs_vfs", + "log", "spin 0.9.8", ] @@ -636,7 +616,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcba2006898d7879d456a9c34b9c9460cb536f5bf69d1d5d7d0e0f19f073368d" dependencies = [ - "axerrno 0.1.2", + "axerrno", "bitflags 2.10.0", "log", ] @@ -644,24 +624,25 @@ dependencies = [ [[package]] name = "axhal" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ + "aarch64-cpu", "axalloc", "axconfig", - "axcpu", - "axplat", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axlog", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "axplat-aarch64-qemu-virt", "axplat-loongarch64-qemu-virt", - "axplat-riscv64-qemu-virt", + "axplat-riscv64-qemu-virt 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "axplat-x86-pc", "cfg-if", - "fdt-parser", - "heapless 0.9.2", + "heapless 0.8.0", "kernel_guard", "lazyinit", "linkme", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_multiarch", "percpu", ] @@ -669,25 +650,25 @@ dependencies = [ [[package]] name = "axhvc" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axhvc.git#8b07150208803180bffc6187e6373b7ead013054" +source = "git+https://github.com/arceos-hypervisor/axhvc.git#e4ca6f919b9900f35e42b9b30863550a50432220" dependencies = [ - "axerrno 0.2.2", + "axerrno", "numeric-enum-macro", ] [[package]] name = "axio" -version = "0.2.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e797ff4cfd17460c7b8742222a2cadd72a2f4966f0057d36b5925fabf534f7" +checksum = "30aa258a37c25c5e9d3ff45ec80e728ff7c499586e3e40719daf7908f10fd5bd" dependencies = [ - "axerrno 0.1.2", + "axerrno", ] [[package]] name = "axipi" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axconfig", "axhal", @@ -700,17 +681,39 @@ dependencies = [ [[package]] name = "axklib" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axklib.git#7c0fc0588f978f7d75bb94f4e07477776ed37887" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ - "axerrno 0.1.2", - "memory_addr 0.4.1", + "axerrno", + "memory_addr", + "trait-ffi", +] + +[[package]] +name = "axklib" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axklib#44b5acacc4e2380a97ac9a231a024f4ee42adb06" +dependencies = [ + "axerrno", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memory_addr", + "trait-ffi", +] + +[[package]] +name = "axklib-impl" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +dependencies = [ + "axhal", + "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1)", + "axmm", "trait-ffi", ] [[package]] name = "axlog" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "cfg-if", "crate_interface", @@ -721,26 +724,26 @@ dependencies = [ [[package]] name = "axmm" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axalloc", - "axconfig", - "axerrno 0.1.2", + "axerrno", "axhal", "kspin", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "memory_set", ] [[package]] name = "axnet" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axdriver", - "axerrno 0.1.2", + "axdriver_net", + "axerrno", "axhal", "axio", "axsync", @@ -752,43 +755,93 @@ dependencies = [ "spin 0.10.0", ] +[[package]] +name = "axns" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +dependencies = [ + "crate_interface", + "lazyinit", +] + [[package]] name = "axplat" -version = "0.3.0" -source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4de04c54b63bf2ca1ff202733d2516da49d7779649cdb2f9c4ecf22909e6810" +dependencies = [ + "axplat-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 2.10.0", + "const-str", + "crate_interface", + "handler_table", + "kspin", + "memory_addr", +] + +[[package]] +name = "axplat" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" dependencies = [ - "axplat-macros", + "axplat-macros 0.1.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "bitflags 2.10.0", "const-str", "crate_interface", "handler_table", "kspin", - "memory_addr 0.4.1", + "memory_addr", +] + +[[package]] +name = "axplat-aarch64-dyn" +version = "0.3.0" +dependencies = [ + "aarch64-cpu", + "aarch64-cpu-ext", + "any-uart", + "arm-gic-driver", + "axconfig-macros", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "fdt-parser", + "heapless 0.8.0", + "lazyinit", + "log", + "memory_addr", + "page_table_entry", + "paste", "percpu", + "rdif-intc", + "rdrive", + "serde", + "somehal", + "spin 0.10.0", + "toml 0.8.23", ] [[package]] name = "axplat-aarch64-dyn" -version = "0.4.0" -source = "git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn.git?tag=v0.4.0#05d5acd43d925807496255a9b9e1aa2d272bb591" +version = "0.3.0" +source = "git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn?tag=v0.3.3#de5acd47da8540f46c81e1eef69af65965404dbd" dependencies = [ "aarch64-cpu", "aarch64-cpu-ext", "any-uart", - "arm-gic-driver 0.15.9", + "arm-gic-driver", "axconfig-macros", - "axcpu", - "axplat", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "fdt-parser", "heapless 0.8.0", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "paste", "percpu", - "rdif-intc 0.12.1", - "rdrive 0.18.11", + "rdif-intc", + "rdrive", "serde", "somehal", "spin 0.10.0", @@ -797,15 +850,15 @@ dependencies = [ [[package]] name = "axplat-aarch64-peripherals" -version = "0.3.0" -source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" dependencies = [ "aarch64-cpu", - "arm-gic-driver 0.15.9", + "arm-gic-driver", "arm_pl011", "arm_pl031", - "axcpu", - "axplat", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "int_ratio", "kspin", "lazyinit", @@ -816,12 +869,12 @@ dependencies = [ [[package]] name = "axplat-aarch64-qemu-virt" -version = "0.3.0" -source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" dependencies = [ "axconfig-macros", - "axcpu", - "axplat", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "axplat-aarch64-peripherals", "log", "page_table_entry", @@ -829,55 +882,75 @@ dependencies = [ [[package]] name = "axplat-loongarch64-qemu-virt" -version = "0.3.0" -source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" dependencies = [ "axconfig-macros", - "axcpu", - "axplat", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "kspin", "lazyinit", "log", "loongArch64", + "ns16550a", "page_table_entry", - "uart_16550", ] [[package]] name = "axplat-macros" version = "0.1.0" -source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90dfaee06a112fe4f810c60af1a86bc080af2172185b491cacc307b84dff748" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", +] + +[[package]] +name = "axplat-macros" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.110", ] [[package]] name = "axplat-riscv64-qemu-virt" -version = "0.3.0" -source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" +version = "0.2.0" dependencies = [ "axconfig-macros", - "axcpu", - "axplat", - "kspin", - "lazyinit", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "log", + "riscv", + "riscv_goldfish", + "sbi-rt", +] + +[[package]] +name = "axplat-riscv64-qemu-virt" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +dependencies = [ + "axconfig-macros", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "log", "riscv", - "riscv_plic", "sbi-rt", - "uart_16550", ] [[package]] name = "axplat-x86-pc" -version = "0.3.0" -source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" dependencies = [ "axconfig-macros", - "axcpu", - "axplat", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "bitflags 2.10.0", "heapless 0.9.2", "int_ratio", @@ -898,8 +971,8 @@ name = "axplat-x86-qemu-q35" version = "0.1.0" dependencies = [ "axconfig-macros", - "axcpu", - "axplat", + "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "bitflags 2.10.0", "heapless 0.9.2", "int_ratio", @@ -916,17 +989,6 @@ dependencies = [ "x86_rtc", ] -[[package]] -name = "axpoll" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06a0cf7cffe0e87c338f41d59bd0a05fa75cf9c4799b4107fa0fc6cf27d8d23" -dependencies = [ - "bitflags 2.10.0", - "linux-raw-sys 0.11.0", - "spin 0.10.0", -] - [[package]] name = "axruntime" version = "0.1.0" @@ -935,15 +997,15 @@ dependencies = [ "axconfig", "axdisplay", "axdriver", - "axerrno 0.1.2", + "axerrno", "axfs", "axhal", "axipi", "axlog", "axmm", "axnet", - "axplat", - "axplat-aarch64-dyn", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axplat-aarch64-dyn 0.3.0 (git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn?tag=v0.3.3)", "axplat-x86-qemu-q35", "axtask", "cfg-if", @@ -957,9 +1019,9 @@ dependencies = [ [[package]] name = "axsched" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad6b7b0b8d9ad1d52a834d8b7721114413da8cf3430af928b1c8651f911287a" +checksum = "44de469da35f912194e4104cc2f51bff63d6c184b65b6ebf8e90e2cd162b7f3c" dependencies = [ "linked_list_r4l", ] @@ -967,10 +1029,10 @@ dependencies = [ [[package]] name = "axstd" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "arceos_api", - "axerrno 0.1.2", + "axerrno", "axfeat", "axio", "kspin", @@ -980,10 +1042,9 @@ dependencies = [ [[package]] name = "axsync" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axtask", - "event-listener", "kspin", "lock_api", ] @@ -991,41 +1052,37 @@ dependencies = [ [[package]] name = "axtask" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" dependencies = [ "axconfig", - "axerrno 0.1.2", "axhal", - "axpoll", "axsched", "cfg-if", "cpumask", "crate_interface", - "event-listener", - "extern-trait", - "futures-util", "kernel_guard", "kspin", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "percpu", + "timer_list", ] [[package]] name = "axum" -version = "0.8.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" +checksum = "8a18ed336352031311f4e0b4dd2ff392d4fbb370777c9d18d7fc9d7359f73871" dependencies = [ "axum-core", "bytes", "form_urlencoded", "futures-util", - "http 1.4.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.8.0", "hyper-util", "itoa", "matchit", @@ -1053,7 +1110,7 @@ checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" dependencies = [ "bytes", "futures-core", - "http 1.4.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "mime", @@ -1064,15 +1121,26 @@ dependencies = [ "tracing", ] +[[package]] +name = "axvcpu" +version = "0.1.1" +dependencies = [ + "axaddrspace", + "axerrno", + "axvisor_api", + "memory_addr", + "percpu", +] + [[package]] name = "axvcpu" version = "0.1.2" source = "git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next#343ec3ccf99a86fb9c67a7b0372e9b7a745f0640" dependencies = [ "axaddrspace", - "axerrno 0.1.2", + "axerrno", "axvisor_api", - "memory_addr 0.4.1", + "memory_addr", "percpu", ] @@ -1082,43 +1150,42 @@ version = "0.0.0" dependencies = [ "aarch64-cpu-ext", "anyhow", - "arm-gic-driver 0.15.9", + "arm-gic-driver", "axaddrspace", "axconfig", "axdevice", "axdevice_base", - "axerrno 0.2.2", + "axerrno", "axhvc", "axruntime", "axstd", - "axvcpu", + "axvcpu 0.1.2", "axvisor_api", - "axvm", + "axvm 0.1.0 (git+https://github.com/arceos-hypervisor/axvm.git?branch=next)", "bitflags 2.10.0", "byte-unit", "cfg-if", "cpumask", "crate_interface", "driver", - "extern-trait", "fdt-parser", "kernel_guard", "kspin", "lazy_static", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "page_table_multiarch", "percpu", "prettyplease", "quote", - "rdif-intc 0.12.1", - "rdrive 0.18.11", + "rdif-intc", + "rdrive", "spin 0.9.8", - "syn 2.0.111", + "syn 2.0.110", "timer_list", - "toml 0.9.10+spec-1.1.0", + "toml 0.9.8", "vm-fdt 0.3.0 (git+https://github.com/bullhh/vm-fdt.git)", ] @@ -1131,7 +1198,7 @@ dependencies = [ "axaddrspace", "axvisor_api_proc", "crate_interface", - "memory_addr 0.4.1", + "memory_addr", ] [[package]] @@ -1143,30 +1210,54 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] name = "axvm" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=next#e161233e58c0ef0c6ec115ffa5b0d17dadd298be" dependencies = [ "arm_vcpu", - "arm_vgic", + "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "axaddrspace", "axdevice", "axdevice_base", - "axerrno 0.2.2", - "axvcpu", + "axerrno", + "axvcpu 0.1.2", "axvmconfig", "cfg-if", "cpumask", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "page_table_multiarch", "percpu", - "riscv_vcpu", + "riscv_vcpu 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.9.8", + "x86_vcpu", +] + +[[package]] +name = "axvm" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=next#0393f27dea948433e53285a400e356cdfd4c4fa3" +dependencies = [ + "arm_vcpu", + "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "axaddrspace", + "axdevice", + "axdevice_base", + "axerrno", + "axvcpu 0.1.2", + "axvmconfig", + "cfg-if", + "cpumask", + "log", + "memory_addr", + "page_table_entry", + "page_table_multiarch", + "percpu", + "riscv_vcpu 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.9.8", "x86_vcpu", ] @@ -1176,7 +1267,7 @@ name = "axvmconfig" version = "0.1.0" source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=next#5a8b64a47510b17da71e54cabbdf8c999ba2e2c9" dependencies = [ - "axerrno 0.1.2", + "axerrno", "clap", "enumerable", "env_logger", @@ -1184,7 +1275,7 @@ dependencies = [ "schemars", "serde", "serde_repr", - "toml 0.9.10+spec-1.1.0", + "toml 0.9.8", ] [[package]] @@ -1199,7 +1290,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -1208,19 +1299,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" -[[package]] -name = "bare-test" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7dfcf95987c500af4665d8a18adbc5e7d3177a2537964f48002b88e28fb055e" -dependencies = [ - "bare-test-macros", - "log", - "sparreal-kernel", - "sparreal-macros 0.9.3", - "sparreal-rt", -] - [[package]] name = "bare-test-macros" version = "0.2.0" @@ -1229,7 +1307,7 @@ checksum = "e585a01076fee271c5aabcf36212acb349fb3e638561d842fffa8ca013f4fdd8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -1251,37 +1329,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "bindeps-simple" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759b427caeff86cb964340e5fee96d7b26a58853941d3a8e051f46be7b1fada3" -dependencies = [ - "anyhow", - "cargo_metadata 0.20.0", - "flate2", - "rand 0.9.2", - "reqwest 0.12.26", - "tar", -] - -[[package]] -name = "bindgen" -version = "0.71.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" -dependencies = [ - "bitflags 2.10.0", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.111", +name = "bindeps-simple" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759b427caeff86cb964340e5fee96d7b26a58853941d3a8e051f46be7b1fada3" +dependencies = [ + "anyhow", + "cargo_metadata 0.20.0", + "flate2", + "rand 0.9.2", + "reqwest 0.12.24", + "tar", ] [[package]] @@ -1346,9 +1404,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.6.0" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" +checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" dependencies = [ "borsh-derive", "cfg_aliases", @@ -1356,40 +1414,30 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.6.0" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" +checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", -] - -[[package]] -name = "buddy_system_allocator" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0108968a3a2dab95b089c0fc3f1afa7759aa5ebe6f1d86d206d6f7ba726eb" -dependencies = [ - "spin 0.9.8", + "syn 2.0.110", ] [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byte-unit" -version = "5.2.0" +version = "5.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6d47a4e2961fb8721bcfc54feae6455f2f64e7054f9bc67e875f0e77f4c58d" +checksum = "e1cd29c3c585209b0cbc7309bfe3ed7efd8c84c21b7af29c8bfae908f8777174" dependencies = [ "rust_decimal", - "schemars", "serde", "utf8-width", ] @@ -1430,15 +1478,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "camino" -version = "1.2.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" +checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" dependencies = [ "serde_core", ] @@ -1463,12 +1511,11 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" +checksum = "122ec45a44b270afd1402f351b782c676b173e3c3fb28d86ff7ebfb4d86a4ee4" dependencies = [ "serde", - "serde_core", ] [[package]] @@ -1509,7 +1556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", - "cargo-platform 0.3.2", + "cargo-platform 0.3.1", "semver", "serde", "serde_json", @@ -1533,23 +1580,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.49" +version = "1.2.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" +checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" dependencies = [ "find-msvc-tools", "shlex", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.4" @@ -1572,25 +1610,14 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", + "windows-link 0.2.1", ] [[package]] name = "clap" -version = "4.5.53" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ "clap_builder", "clap_derive", @@ -1598,9 +1625,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.53" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" dependencies = [ "anstream", "anstyle", @@ -1617,7 +1644,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -1655,20 +1682,11 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "console" -version = "0.16.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" +checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" dependencies = [ "encode_unicode", "libc", @@ -1689,26 +1707,20 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451d0640545a0553814b4c646eb549343561618838e9b42495f466131fe3ad49" -[[package]] -name = "const_fn" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" - [[package]] name = "convert_case" -version = "0.8.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" dependencies = [ "unicode-segmentation", ] [[package]] name = "convert_case" -version = "0.10.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" dependencies = [ "unicode-segmentation", ] @@ -1765,14 +1777,14 @@ checksum = "70272a03a2cef15589bac05d3d15c023752f5f8f2da8be977d983a9d9e6250fb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] name = "crc" -version = "3.4.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" dependencies = [ "crc-catalog", ] @@ -1866,16 +1878,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cstr_core" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd98742e4fdca832d40cab219dc2e3048de17d873248f83f17df47c1bea70956" -dependencies = [ - "cty", - "memchr", -] - [[package]] name = "ctor_bare" version = "0.2.1" @@ -1893,15 +1895,9 @@ checksum = "9a49d5cd78b1c748184d41407b14a58af8403c13328ff2b9f49b0a418c24e3ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "cursive" version = "0.21.1" @@ -1984,7 +1980,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -1997,7 +1993,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2008,7 +2004,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2019,7 +2015,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2051,7 +2047,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2074,24 +2070,23 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.1.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.1.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ - "convert_case 0.10.0", + "convert_case 0.7.1", "proc-macro2", "quote", - "rustc_version", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2118,7 +2113,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2161,12 +2156,12 @@ dependencies = [ name = "driver" version = "0.1.0" dependencies = [ - "axklib", + "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/axklib)", "log", - "phytium-mci 0.1.0 (git+https://github.com/YanQD/phytium-mci.git?rev=99c9ee5)", - "rdif-block 0.6.2", + "phytium-mci", + "rdif-block", "rdif-clk", - "rdrive 0.18.11", + "rdrive", "rk3568_clk", "rk3588-clk", "rockchip-pm", @@ -2234,7 +2229,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2246,7 +2241,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2267,7 +2262,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2278,7 +2273,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2299,7 +2294,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2352,27 +2347,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "event-listener" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" -dependencies = [ - "concurrent-queue", - "pin-project-lite", -] - -[[package]] -name = "extern-trait" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba8f5038f5845165d06fe1453fe4130ad546d3314818bbda57e208e7b0cffe08" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "fastrand" version = "2.3.0" @@ -2382,7 +2356,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fatfs" version = "0.4.0" -source = "git+https://github.com/Josen-B/rust-fatfs.git?rev=41122ef#41122eff7d244cb030c9cfb9b5e14fc50b70dd24" +source = "git+https://github.com/rafalh/rust-fatfs?rev=4eccb50#4eccb50d011146fbed20e133d33b22f3c27292e7" dependencies = [ "bitflags 2.10.0", "log", @@ -2408,9 +2382,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" [[package]] name = "fitimage" @@ -2540,7 +2514,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -2616,12 +2590,6 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - [[package]] name = "h2" version = "0.3.27" @@ -2652,7 +2620,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.4.0", + "http 1.3.1", "indexmap", "slab", "tokio", @@ -2707,9 +2675,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "heapless" @@ -2756,11 +2724,12 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", + "fnv", "itoa", ] @@ -2782,7 +2751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.4.0", + "http 1.3.1", ] [[package]] @@ -2793,7 +2762,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.4.0", + "http 1.3.1", "http-body 1.0.1", "pin-project-lite", ] @@ -2842,16 +2811,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.8.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "1744436df46f0bde35af3eda22aeaba453aada65d8f1c171cd8a5f59030bd69f" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", "h2 0.4.12", - "http 1.4.0", + "http 1.3.1", "http-body 1.0.1", "httparse", "httpdate", @@ -2869,8 +2838,8 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.4.0", - "hyper 1.8.1", + "http 1.3.1", + "hyper 1.8.0", "hyper-util", "rustls", "rustls-pki-types", @@ -2901,7 +2870,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.8.1", + "hyper 1.8.0", "hyper-util", "native-tls", "tokio", @@ -2911,18 +2880,18 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.4.0", + "http 1.3.1", "http-body 1.0.1", - "hyper 1.8.1", + "hyper 1.8.0", "ipnet", "libc", "percent-encoding", @@ -3007,9 +2976,9 @@ checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" dependencies = [ "icu_collections", "icu_locale_core", @@ -3021,9 +2990,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" [[package]] name = "icu_provider" @@ -3069,12 +3038,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.16.0", ] [[package]] @@ -3101,15 +3070,15 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.10" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6778b0196eefee7df739db78758e5cf9b37412268bfa5650bfeed028aed20d9c" +checksum = "435d80800b936787d62688c927b6490e887c7ef5ff9ce922c6c6050fca75eb9a" dependencies = [ "darling 0.20.11", "indoc", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -3150,15 +3119,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -3195,7 +3155,7 @@ checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -3216,33 +3176,21 @@ dependencies = [ "serde_json", "thiserror 2.0.17", "tokio", - "toml 0.9.10+spec-1.1.0", + "toml 0.9.8", "tower", "tower-http", ] [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" dependencies = [ "once_cell", "wasm-bindgen", ] -[[package]] -name = "kasm-aarch64" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e484b7a4686e2750fae1b4c4b750e14f1522eb303288d9d2723a955c2a41b7d7" -dependencies = [ - "darling 0.20.11", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "kasm-aarch64" version = "0.2.0" @@ -3252,7 +3200,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -3264,14 +3212,14 @@ dependencies = [ "bitflags 2.10.0", "prettyplease", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] name = "kernel_guard" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d10c55bedf6789bc3748e0d8756ee639df1ae25144fd3525ed311044bd9a739f" +checksum = "307e6be468f3d6b6d895e191f63c11602e4e76575ecca68325d8c8dbebe2870e" dependencies = [ "cfg-if", "crate_interface", @@ -3333,29 +3281,19 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" - -[[package]] -name = "libloading" -version = "0.8.9" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libredox" -version = "0.1.11" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df15f6eac291ed1cf25865b1ee60399f57e7c227e7f51bdbd4c5270396a9ed50" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags 2.10.0", "libc", - "redox_syscall 0.6.0", + "redox_syscall", ] [[package]] @@ -3391,9 +3329,9 @@ dependencies = [ [[package]] name = "linked_list_r4l" -version = "0.3.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1730c4ce817dc3edb092739ca5c109fe551018e5ea5a8361a8ddaa13d79ac8ed" +checksum = "54c6e48d7df84e6414be8e53976ead35ba4d47a4ba561eaad5d1e2b1447b4c0a" [[package]] name = "linkme" @@ -3412,7 +3350,7 @@ checksum = "e5cec0ec4228b4853bb129c84dbf093a27e6c7a20526da046defc334a1b017f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -3450,9 +3388,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "loongArch64" @@ -3479,15 +3417,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" -[[package]] -name = "lwext4_rust" -version = "0.2.0" -dependencies = [ - "bindgen", - "log", - "printf-compat", -] - [[package]] name = "lzma-rs" version = "0.3.0" @@ -3548,24 +3477,17 @@ dependencies = [ [[package]] name = "memory_addr" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5438b8df0f13e16e1f46140de247695a95952a5a4479e47197a8711bf1063373" - -[[package]] -name = "memory_addr" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f0625c50adb5f6aaf47f05cae3c4dbc13a74c659241b06c4576f3d7e1da940" +checksum = "3d4054cba279515fa87761b101d857333ce06391dbe8f18a11347204a7111416" [[package]] name = "memory_set" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50a49ecd4114cf87f7e442ec5dd03bd590e7094541f987057310dbb32a6341ad" +checksum = "e7d47cbc25a4d00427f9070fd768eaf907f19c903fb72b547b19db2d56b9408e" dependencies = [ - "axerrno 0.1.2", - "memory_addr 0.4.1", + "memory_addr", ] [[package]] @@ -3584,12 +3506,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -3602,9 +3518,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" dependencies = [ "libc", "log", @@ -3646,9 +3562,9 @@ checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" [[package]] name = "network-interface" -version = "2.0.4" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e79101e6efcffacab279462884a7eebf65ea5f4ac2cc727b60c715a9aa04722" +checksum = "07709a6d4eba90ab10ec170a0530b3aafc81cb8a2d380e4423ae41fc55fe5745" dependencies = [ "cc", "libc", @@ -3667,20 +3583,16 @@ dependencies = [ "libc", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nop" version = "0.1.0" +[[package]] +name = "ns16550a" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3cd8abe9e54bce27659507b94f355c9334378ab15da332b6986b3583ebf7228" + [[package]] name = "num" version = "0.4.3" @@ -3815,7 +3727,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -3847,9 +3759,9 @@ dependencies = [ [[package]] name = "ostool" -version = "0.8.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9faa3c583310e624402b2c8ee736594bc1fc99c225a06e40a6e7073fba98f71" +checksum = "7b1f90223d51db91747d032ef49378e725a6e42a3d53da62c246abc73fe35cb7" dependencies = [ "anyhow", "byte-unit", @@ -3868,7 +3780,7 @@ dependencies = [ "object", "ratatui", "regex", - "reqwest 0.12.26", + "reqwest 0.12.24", "schemars", "serde", "serde_json", @@ -3877,33 +3789,11 @@ dependencies = [ "tar", "tftpd", "tokio", - "toml 0.9.10+spec-1.1.0", + "toml 0.9.8", "uboot-shell", "ureq", ] -[[package]] -name = "page-table-arm" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce2c42338660c47a35e7b2940dcccbe6612a4a0aa0485ecdf4e23aa8a2a1158" -dependencies = [ - "aarch64-cpu", - "bitflags 2.10.0", - "log", -] - -[[package]] -name = "page-table-generic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827063f64bbad7b7655092b0f98824ffbe85e89646388eb4dad1e3d797056a2f" -dependencies = [ - "bitflags 2.10.0", - "log", - "thiserror 2.0.17", -] - [[package]] name = "page-table-generic" version = "0.6.1" @@ -3918,24 +3808,25 @@ dependencies = [ [[package]] name = "page_table_entry" -version = "0.5.7" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda9891ec368fda90e4b2cc36592b4881073e25a339fe7e3eddd811f0cf6bf18" +checksum = "ba811ef8ca8fb33d776e128624cb4fe25c9804cab96f83b822d4322431e6dd5a" dependencies = [ "aarch64-cpu", "bitflags 2.10.0", - "memory_addr 0.4.1", + "memory_addr", "x86_64", ] [[package]] name = "page_table_multiarch" -version = "0.5.7" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa11a21844255e14aa6688ef0eafb058d7be19338633024fb59417f1bfb07f8" +checksum = "98cb76e21ce462270afd83b331599d5b83f876c2a98c0a70382b20d73e1da6be" dependencies = [ + "bitmaps", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "riscv", "x86", @@ -3959,9 +3850,9 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -3970,12 +3861,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pasts" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efcd36303871fb977a47dabc9af736c75c492bb32a92fa26262b2741531e97ce" - [[package]] name = "pci_types" version = "0.10.0" @@ -3986,19 +3871,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "pcie" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e45cda4b8ef9f2a8dae7cf5b58c11b41d35fbe62a4d9693fd2d143225fbf44" -dependencies = [ - "bit_field", - "bitflags 2.10.0", - "log", - "pci_types", - "sparreal-macros 0.0.5", -] - [[package]] name = "pcie" version = "0.4.5" @@ -4040,27 +3912,7 @@ checksum = "8a9f4cc54a2e471ff72f1499461ba381ad4eae9cbd60d29c258545b995e406e0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", -] - -[[package]] -name = "phytium-mci" -version = "0.1.0" -dependencies = [ - "bare-test", - "bare-test-macros", - "bitflags 2.10.0", - "byte-unit", - "bytemuck", - "dma-api 0.2.2", - "lazy_static", - "log", - "nb", - "pcie 0.2.7", - "rlsf", - "spin 0.10.0", - "spin_on", - "tock-registers 0.9.0", + "syn 2.0.110", ] [[package]] @@ -4081,66 +3933,15 @@ dependencies = [ ] [[package]] -name = "pie-boot" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524d0fc5cd834d2179d8a88cde327b0e168dd6aedf30ce1832467a924a35594f" -dependencies = [ - "aarch64-cpu", - "aarch64-cpu-ext", - "bindeps-simple", - "fdt-parser", - "heapless 0.8.0", - "kasm-aarch64 0.1.3", - "kdef-pgtable", - "pie-boot-if 0.6.0", - "pie-boot-loader-aarch64 0.1.27", - "pie-boot-macros", -] - -[[package]] -name = "pie-boot-if" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00af8d4efee0eee91ead95b34c50c067163dc4c90b874b1cc4caa671eb1d85b" -dependencies = [ - "heapless 0.8.0", -] - -[[package]] -name = "pie-boot-if" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d979b0d1208dd8a57c5adb7d3c4e07bf15cbea3840123e864f6bfcb655c5e05" -dependencies = [ - "heapless 0.8.0", -] - -[[package]] -name = "pie-boot-loader-aarch64" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ee18ed1de7f55f318f01803bf7dc353ef492db71a2005fa3af36f116f25d28" -dependencies = [ - "aarch64-cpu", - "aarch64-cpu-ext", - "any-uart", - "bitflags 2.10.0", - "fdt-parser", - "kasm-aarch64 0.1.3", - "kdef-pgtable", - "log", - "num-align", - "page-table-generic 0.6.1", - "pie-boot-if 0.6.0", - "prettyplease", - "quote", - "spin 0.10.0", - "syn 2.0.111", - "thiserror 2.0.17", -] - -[[package]] +name = "pie-boot-if" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d979b0d1208dd8a57c5adb7d3c4e07bf15cbea3840123e864f6bfcb655c5e05" +dependencies = [ + "heapless 0.8.0", +] + +[[package]] name = "pie-boot-loader-aarch64" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4151,16 +3952,16 @@ dependencies = [ "any-uart", "bitflags 2.10.0", "fdt-parser", - "kasm-aarch64 0.2.0", + "kasm-aarch64", "kdef-pgtable", "log", "num-align", - "page-table-generic 0.6.1", - "pie-boot-if 0.8.0", + "page-table-generic", + "pie-boot-if", "prettyplease", "quote", "spin 0.10.0", - "syn 2.0.111", + "syn 2.0.110", "thiserror 2.0.17", ] @@ -4173,7 +3974,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -4230,7 +4031,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.31", + "zerocopy 0.8.27", ] [[package]] @@ -4240,19 +4041,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.111", -] - -[[package]] -name = "printf-compat" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b002af28ffe3d3d67202ae717810a28125a494d5396debc43de01ee136ac404" -dependencies = [ - "bitflags 1.3.2", - "cstr_core", - "cty", - "itertools 0.9.0", + "syn 2.0.110", ] [[package]] @@ -4261,7 +4050,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "toml_edit 0.23.10+spec-1.0.0", + "toml_edit 0.23.7", ] [[package]] @@ -4283,7 +4072,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -4467,10 +4256,10 @@ dependencies = [ "crossterm 0.28.1", "indoc", "instability", - "itertools 0.13.0", + "itertools", "lru", "paste", - "strum 0.26.3", + "strum", "unicode-segmentation", "unicode-truncate", "unicode-width 0.2.0", @@ -4494,18 +4283,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "rdif-base" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6953f438bbbdf58e55513c31e70fa0f85daba2927e8a59130a04608141bb552" -dependencies = [ - "as-any", - "async-trait", - "rdif-def", - "thiserror 2.0.17", -] - [[package]] name = "rdif-base" version = "0.7.0" @@ -4519,16 +4296,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "rdif-block" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b8e19dc3cb6cd7241085a9560a91d4346edbc525bcbfc3c86e5eeb11559c19" -dependencies = [ - "cfg-if", - "rdif-base 0.6.0", -] - [[package]] name = "rdif-block" version = "0.6.2" @@ -4538,7 +4305,7 @@ dependencies = [ "cfg-if", "dma-api 0.5.2", "futures", - "rdif-base 0.7.0", + "rdif-base", "spin_on", "thiserror 2.0.17", ] @@ -4549,7 +4316,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9af012204e25d45735aa141b475c411b833b4f4bc580924905745d4afbbf606" dependencies = [ - "rdif-base 0.7.0", + "rdif-base", ] [[package]] @@ -4561,17 +4328,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "rdif-intc" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e7622f78dc9b40958500119553f3c15b9bb9829002d87d0f4b114ebe302a40" -dependencies = [ - "cfg-if", - "rdif-base 0.6.0", - "thiserror 2.0.17", -] - [[package]] name = "rdif-intc" version = "0.12.1" @@ -4579,7 +4335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "170ec813e6cf4d1e5fa53fa8fed0fadc7aaab96683d4f1d44c602a6109931eb4" dependencies = [ "cfg-if", - "rdif-base 0.7.0", + "rdif-base", "thiserror 2.0.17", ] @@ -4590,59 +4346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60c6e8dea6d432b2c03bc3f4238dc59a276aacac6f688a937351e7a313918738" dependencies = [ "pci_types", - "rdif-base 0.7.0", - "thiserror 2.0.17", -] - -[[package]] -name = "rdif-power" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b6eefca0d1b44a5bef1e934d8ab2c8e00e19dd3d9e071855c0933637ee17a0" -dependencies = [ - "rdif-base 0.7.0", -] - -[[package]] -name = "rdif-serial" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673854a0c554806da63f0836c95b34b08956a143ff15e327644cbd07a8e0df31" -dependencies = [ - "futures", - "rdif-base 0.7.0", - "spin_on", - "thiserror 2.0.17", -] - -[[package]] -name = "rdif-systick" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11da4f362ab6cdcdee9d8e795faabd0f15e04167cb17939fd3aca19c2ef3421" -dependencies = [ - "rdif-base 0.7.0", -] - -[[package]] -name = "rdrive" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ce47e5a3d10943dfdb8c31dcca7a91c353ea43f4ac2eb72c92462e83a2baa4" -dependencies = [ - "enum_dispatch", - "fdt-parser", - "log", - "paste", - "rdif-base 0.6.0", - "rdif-block 0.5.0", - "rdif-clk", - "rdif-intc 0.11.0", - "rdif-power", - "rdif-serial", - "rdif-systick", - "rdrive-macros", - "spin 0.10.0", + "rdif-base", "thiserror 2.0.17", ] @@ -4655,25 +4359,14 @@ dependencies = [ "fdt-parser", "log", "paste", - "pcie 0.4.5", - "rdif-base 0.7.0", + "pcie", + "rdif-base", "rdif-pcie", "rdrive-macros", "spin 0.10.0", "thiserror 2.0.17", ] -[[package]] -name = "rdrive-macro-utils" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977fcecf5b5fe8d7189d497d8754d27a4ffaedeac904cce1b7ea7bdfb5280934" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "rdrive-macros" version = "0.4.1" @@ -4682,7 +4375,7 @@ checksum = "eab3105c9af32e901a2adc7d920b39ff8b6ee0f6f0b7dfdeaf18f306ec12606f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -4694,15 +4387,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "redox_syscall" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96166dafa0886eb81fe1c0a388bece180fbef2135f97c1e2cf8302e74b43b5" -dependencies = [ - "bitflags 2.10.0", -] - [[package]] name = "ref-cast" version = "1.0.25" @@ -4720,7 +4404,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -4819,9 +4503,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.26" +version = "0.12.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b4c14b2d9afca6a60277086b0cc6a6ae0b568f6f7916c943a8cdc79f8be240f" +checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" dependencies = [ "base64 0.22.1", "bytes", @@ -4830,10 +4514,10 @@ dependencies = [ "futures-core", "futures-util", "h2 0.4.12", - "http 1.4.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.8.0", "hyper-rustls", "hyper-tls 0.6.0", "hyper-util", @@ -4863,15 +4547,6 @@ dependencies = [ "webpki-roots", ] -[[package]] -name = "rgb" -version = "0.8.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" -dependencies = [ - "bytemuck", -] - [[package]] name = "ring" version = "0.17.14" @@ -4926,7 +4601,7 @@ checksum = "e8c4aa1ea1af6dcc83a61be12e8189f9b293c3ba5a487778a4cd89fb060fdbbc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -4936,12 +4611,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436" [[package]] -name = "riscv_plic" -version = "0.2.0" +name = "riscv_goldfish" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e701d1c6ea06c35a19cb80d213fab87d264798f9bac0aed2730c0e86d297394a" +checksum = "07aac72f95e774476db82916d79f2d303191310393830573c1ab5c821b21660a" + +[[package]] +name = "riscv_vcpu" +version = "0.1.2" dependencies = [ - "tock-registers 0.10.1", + "axaddrspace", + "axerrno", + "axvcpu 0.1.2", + "axvisor_api", + "bit_field", + "bitflags 2.10.0", + "cfg-if", + "crate_interface", + "log", + "memoffset", + "memory_addr", + "page_table_entry", + "riscv", + "riscv-decode", + "riscv-h", + "rustsbi", + "sbi-rt", + "sbi-spec", + "tock-registers 0.9.0", ] [[package]] @@ -4951,8 +4648,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13f38f28fe6c02bb3ced43087c9667b23d18adf729becdc5adf1253f7df83904" dependencies = [ "axaddrspace", - "axerrno 0.1.2", - "axvcpu", + "axerrno", + "axvcpu 0.1.2", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -4960,7 +4657,7 @@ dependencies = [ "crate_interface", "log", "memoffset", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "riscv", "riscv-decode", @@ -4985,11 +4682,12 @@ dependencies = [ [[package]] name = "rk3588-clk" -version = "0.1.1" -source = "git+https://github.com/drivercraft/rk3588-clk#1476c44483e7800ff3c7cb53cdfaf01e72e320d4" +version = "0.1.0" +source = "git+https://github.com/drivercraft/rk3588-clk#2434106bb1838bc2af7c3f4de3ab6bbc15fdeb81" dependencies = [ "bare-test-macros", "log", + "mbarrier", "tock-registers 0.10.1", ] @@ -5036,36 +4734,17 @@ dependencies = [ [[package]] name = "rockchip-pm" -version = "0.4.0" -source = "git+https://github.com/drivercraft/rockchip-pm.git#5bb4dfbfcea41826e13115efb4023d670ef6b034" +version = "0.2.0" +source = "git+https://github.com/drivercraft/rockchip-pm.git#cb2afdf9f3cb5fd05f8e003e65de38e50d480cd5" dependencies = [ "bare-test-macros", "dma-api 0.5.2", "log", "mbarrier", - "rdif-base 0.7.0", + "rdif-base", "tock-registers 0.10.1", ] -[[package]] -name = "rsext4" -version = "0.1.0" -dependencies = [ - "bitflags 2.10.0", - "lazy_static", - "log", -] - -[[package]] -name = "rsext4" -version = "0.1.0" -source = "git+https://github.com/Dirinkbottle/rsext4.git?tag=dev-251222#376e253cc6b8767bc14ca5054fbc1ae49f7a8c8d" -dependencies = [ - "bitflags 2.10.0", - "lazy_static", - "log", -] - [[package]] name = "rust_decimal" version = "1.39.0" @@ -5094,15 +4773,6 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - [[package]] name = "rustix" version = "0.38.44" @@ -5155,9 +4825,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.2" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" dependencies = [ "web-time", "zeroize", @@ -5193,7 +4863,7 @@ checksum = "a71347da9582cc6b6f3652c7d2c06516c9555690b3738ecdff7e84297f4e17fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5263,7 +4933,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5287,7 +4957,7 @@ dependencies = [ "kspin", "log", "paste", - "smccc 0.2.2", + "smccc", "spin 0.10.0", ] @@ -5379,7 +5049,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5390,7 +5060,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5425,7 +5095,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5439,9 +5109,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" dependencies = [ "serde_core", ] @@ -5529,18 +5199,18 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.7" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] [[package]] name = "simd-adler32" -version = "0.3.8" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simdutf8" @@ -5560,12 +5230,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "smccc" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617d17f088ec733e5a6b86da6ce4cce1414e6e856d6061c16dda51cceae6f68c" - [[package]] name = "smccc" version = "0.2.2" @@ -5611,9 +5275,9 @@ dependencies = [ [[package]] name = "somehal" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b5f763b9ab0ce9efd2d8eba9e5b457f93f6426ede68435fe9567cf7681f29d" +checksum = "5a9b180e1abae1127bd99ecee566c3906d8c0f854cb1c442b945afe911e6eb71" dependencies = [ "aarch64-cpu", "aarch64-cpu-ext", @@ -5622,100 +5286,22 @@ dependencies = [ "fdt-parser", "futures", "heapless 0.8.0", - "kasm-aarch64 0.2.0", + "kasm-aarch64", "kdef-pgtable", "log", "num-align", - "page-table-generic 0.6.1", - "pie-boot-if 0.8.0", - "pie-boot-loader-aarch64 0.3.3", + "page-table-generic", + "pie-boot-if", + "pie-boot-loader-aarch64", "pie-boot-macros", "release-dep", "serde", - "smccc 0.2.2", + "smccc", "spin 0.10.0", - "toml 0.9.10+spec-1.1.0", + "toml 0.9.8", "url", ] -[[package]] -name = "sparreal-kernel" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b182a508314f1560ce8f94090f8c0990640bd849fab49e307ccafe2b51e67da9" -dependencies = [ - "ansi_rgb", - "anyhow", - "arrayvec", - "buddy_system_allocator", - "byte-unit", - "dma-api 0.3.1", - "fdt-parser", - "lazy_static", - "lock_api", - "log", - "memory_addr 0.3.2", - "page-table-generic 0.5.3", - "pasts", - "rdrive 0.15.3", - "rgb", - "sparreal-macros 0.9.3", - "spin 0.9.8", - "thiserror 2.0.17", -] - -[[package]] -name = "sparreal-macros" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f686073b67b2427c9243bddc10ea0a6a5300ab5354a8ee884d9126854b0abab7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "sparreal-macros" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c39b68430130f1c7587eb41f512dd1f6e48bc22a3e1dc11a69dc1b8294cdc90" -dependencies = [ - "abi-singleton", - "darling 0.20.11", - "proc-macro2", - "quote", - "rdrive-macro-utils", - "syn 2.0.111", -] - -[[package]] -name = "sparreal-rt" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9da6adb0285c99f180e9746ebbadcf4886b1b009904f6f9ab5be155ae1325a7" -dependencies = [ - "aarch64-cpu", - "aarch64-cpu-ext", - "ansi_rgb", - "any-uart", - "arm-gic-driver 0.14.9", - "arrayvec", - "buddy_system_allocator", - "fdt-parser", - "log", - "memory_addr 0.3.2", - "numeric-enum-macro", - "page-table-arm", - "page-table-generic 0.5.3", - "pie-boot", - "rgb", - "smccc 0.1.1", - "sparreal-kernel", - "sparreal-macros 0.9.3", - "spin 0.9.8", -] - [[package]] name = "spin" version = "0.9.8" @@ -5767,16 +5353,7 @@ version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.4", -] - -[[package]] -name = "strum" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" -dependencies = [ - "strum_macros 0.27.2", + "strum_macros", ] [[package]] @@ -5789,19 +5366,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.111", -] - -[[package]] -name = "strum_macros" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5836,9 +5401,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.111" +version = "2.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" dependencies = [ "proc-macro2", "quote", @@ -5868,7 +5433,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5945,9 +5510,9 @@ dependencies = [ [[package]] name = "tftpd" -version = "0.5.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee6f92408c23beea910b60784f6dc323b488c477bf6fa88aff8083675eda26c" +checksum = "abbee6dbf19d025600720ce174a82b10895e486179e0206b91f14b6fcf6cb4bf" [[package]] name = "thiserror" @@ -5975,7 +5540,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -5986,7 +5551,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -6096,7 +5661,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -6146,14 +5711,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.10+spec-1.1.0" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" +checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ "indexmap", "serde_core", - "serde_spanned 1.0.4", - "toml_datetime 0.7.5+spec-1.1.0", + "serde_spanned 1.0.3", + "toml_datetime 0.7.3", "toml_parser", "toml_writer", "winnow", @@ -6170,9 +5735,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" dependencies = [ "serde_core", ] @@ -6193,21 +5758,21 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.23.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" dependencies = [ "indexmap", - "toml_datetime 0.7.5+spec-1.1.0", + "toml_datetime 0.7.3", "toml_parser", "winnow", ] [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ "winnow", ] @@ -6220,9 +5785,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" [[package]] name = "tower" @@ -6242,15 +5807,15 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "bitflags 2.10.0", "bytes", "futures-core", "futures-util", - "http 1.4.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "http-range-header", @@ -6282,9 +5847,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.44" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -6293,9 +5858,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.36" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] @@ -6310,7 +5875,7 @@ dependencies = [ "lenient_semver", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -6360,9 +5925,9 @@ dependencies = [ [[package]] name = "unescaper" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4064ed685c487dbc25bd3f0e9548f2e34bab9d18cefc700f9ec2dba74ba1138e" +checksum = "c01d12e3a56a4432a8b436f293c25f4808bdf9e9f9f98f9260bba1f1bc5a1f26" dependencies = [ "thiserror 2.0.17", ] @@ -6391,7 +5956,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ - "itertools 0.13.0", + "itertools", "unicode-segmentation", "unicode-width 0.1.14", ] @@ -6416,9 +5981,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unit-prefix" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" +checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" [[package]] name = "untrusted" @@ -6445,12 +6010,12 @@ dependencies = [ [[package]] name = "ureq-proto" -version = "0.5.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" +checksum = "60b4531c118335662134346048ddb0e54cc86bd7e81866757873055f0e38f5d2" dependencies = [ "base64 0.22.1", - "http 1.4.0", + "http 1.3.1", "httparse", "log", ] @@ -6475,9 +6040,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8-width" -version = "0.1.8" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091" +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" [[package]] name = "utf8_iter" @@ -6493,9 +6058,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.19.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ "js-sys", "wasm-bindgen", @@ -6571,9 +6136,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" dependencies = [ "cfg-if", "once_cell", @@ -6584,9 +6149,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" dependencies = [ "cfg-if", "js-sys", @@ -6597,9 +6162,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6607,31 +6172,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" dependencies = [ "js-sys", "wasm-bindgen", @@ -6686,9 +6251,9 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", ] [[package]] @@ -6699,7 +6264,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -6710,9 +6275,15 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-link" version = "0.2.1" @@ -6721,13 +6292,22 @@ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-registry" -version = "0.6.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", ] [[package]] @@ -6736,7 +6316,16 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link", + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", ] [[package]] @@ -6745,7 +6334,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -6790,7 +6379,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -6830,7 +6419,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link", + "windows-link 0.2.1", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -6981,9 +6570,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.14" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -7045,13 +6634,12 @@ dependencies = [ [[package]] name = "x86_64" -version = "0.15.4" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7841fa0098ceb15c567d93d3fae292c49e10a7662b4936d5f6a9728594555ba" +checksum = "0f042214de98141e9c8706e8192b73f56494087cc55ebec28ce10f26c5c364ae" dependencies = [ "bit_field", "bitflags 2.10.0", - "const_fn", "rustversion", "volatile", ] @@ -7074,15 +6662,15 @@ checksum = "873e097d52e94c31be3f0175a9f8d6f2edbc77d7e2f8e6995427df9c08b30a2b" dependencies = [ "axaddrspace", "axdevice_base", - "axerrno 0.1.2", - "axvcpu", + "axerrno", + "axvcpu 0.1.2", "axvisor_api", "bit_field", "bitflags 2.10.0", "cfg-if", "crate_interface", "log", - "memory_addr 0.4.1", + "memory_addr", "numeric-enum-macro", "page_table_entry", "paste", @@ -7101,11 +6689,11 @@ checksum = "2556c62649a277ccf1c3c34c740be87bbde5f8dab0b20fcdcf4c2cd7bb6e7302" dependencies = [ "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno", "axvisor_api", "bit", "log", - "memory_addr 0.4.1", + "memory_addr", "paste", "tock-registers 0.10.1", ] @@ -7136,17 +6724,15 @@ dependencies = [ "chrono", "clap", "colored", - "flate2", "jkconfig", "ostool", - "reqwest 0.12.26", + "reqwest 0.12.24", "schemars", "serde", "serde_json", "sha2", - "tar", "tokio", - "toml 0.9.10+spec-1.1.0", + "toml 0.9.8", ] [[package]] @@ -7168,7 +6754,7 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", "synstructure", ] @@ -7184,11 +6770,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.31" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ - "zerocopy-derive 0.8.31", + "zerocopy-derive 0.8.27", ] [[package]] @@ -7199,18 +6785,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] name = "zerocopy-derive" -version = "0.8.31" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] [[package]] @@ -7230,7 +6816,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", "synstructure", ] @@ -7270,5 +6856,5 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.110", ] diff --git a/configs/board/qemu-riscv64.toml b/configs/board/qemu-riscv64.toml new file mode 100644 index 00000000..1cf8b3aa --- /dev/null +++ b/configs/board/qemu-riscv64.toml @@ -0,0 +1,11 @@ +cargo_args = [] +features = [ + "axstd/myplat", + "ept-level-4", + "axstd/bus-mmio", + # "fs", +] +log = "Info" +target = "riscv64gc-unknown-none-elf" +to_bin = true +vm_configs = [] \ No newline at end of file diff --git a/kernel/src/hal/arch/riscv64/cache.rs b/kernel/src/hal/arch/riscv64/cache.rs new file mode 100644 index 00000000..1a905a9d --- /dev/null +++ b/kernel/src/hal/arch/riscv64/cache.rs @@ -0,0 +1,5 @@ +use memory_addr::VirtAddr; + +use crate::hal::CacheOp; + +pub fn dcache_range(_op: CacheOp, _addr: VirtAddr, _size: usize) {} diff --git a/kernel/src/hal/arch/riscv64/mod.rs b/kernel/src/hal/arch/riscv64/mod.rs new file mode 100644 index 00000000..ab92f90b --- /dev/null +++ b/kernel/src/hal/arch/riscv64/mod.rs @@ -0,0 +1,4 @@ +pub mod cache; + +pub fn hardware_check() {} +pub fn inject_interrupt(_vector: u8) {} diff --git a/platform/riscv64-qemu-virt/Cargo.toml b/platform/riscv64-qemu-virt/Cargo.toml new file mode 100644 index 00000000..9cb0d717 --- /dev/null +++ b/platform/riscv64-qemu-virt/Cargo.toml @@ -0,0 +1,27 @@ +[package] +edition = "2024" +name = "axplat-riscv64-qemu-virt" +version = "0.2.0" + +[features] +default = [ + "irq", + "smp", +] +fp-simd = ["axcpu/fp-simd"] +irq = ["axplat/irq"] +rtc = ["riscv_goldfish"] +smp = ["axplat/smp"] + +[dependencies] +log = "0.4" +riscv = "0.14" +sbi-rt = { version = "0.0.3", features = ["legacy"] } +riscv_goldfish = { version = "0.1", optional = true } + +axconfig-macros = "0.2" +axcpu = "0.2" +axplat = { workspace = true } + +[package.metadata.docs.rs] +targets = ["riscv64gc-unknown-none-elf"] diff --git a/platform/riscv64-qemu-virt/axconfig.toml b/platform/riscv64-qemu-virt/axconfig.toml new file mode 100644 index 00000000..8997e188 --- /dev/null +++ b/platform/riscv64-qemu-virt/axconfig.toml @@ -0,0 +1,84 @@ +# Architecture identifier. +arch = "riscv64" # str +# Platform identifier. +platform = "riscv64-qemu-virt" # str +# Platform package. +package = "axplat-riscv64-qemu-virt" # str + +# +# Platform configs +# +[plat] +# Number of CPUs. +cpu-num = 1 # uint +# Base address of the whole physical memory. +phys-memory-base = 0x8000_0000 # uint +# Size of the whole physical memory. (128M) +phys-memory-size = 0x800_0000 # uint +# Base physical address of the kernel image. +kernel-base-paddr = 0x8020_0000 # uint +# Base virtual address of the kernel image. +kernel-base-vaddr = "0xffff_ffc0_8020_0000" # uint +# Linear mapping offset, for quick conversions between physical and virtual +# addresses. +phys-virt-offset = "0xffff_ffc0_0000_0000" # uint +# Offset of bus address and phys address. some boards, the bus address is +# different from the physical address. +phys-bus-offset = 0 # uint +# Kernel address space base. +kernel-aspace-base = "0xffff_ffc0_0000_0000" # uint +# Kernel address space size. +kernel-aspace-size = "0x0000_003f_ffff_f000" # uint +# Stack size on bootstrapping. (256K) +boot-stack-size = 0x40000 # uint + +# +# Device specifications +# +[devices] +# MMIO ranges with format (`base_paddr`, `size`). +mmio-ranges = [ + [0x0010_1000, 0x1000], # RTC + [0x0c00_0000, 0x21_0000], # PLIC + [0x1000_0000, 0x1000], # UART + [0x1000_1000, 0x8000], # VirtIO + [0x3000_0000, 0x1000_0000], # PCI config space + [0x4000_0000, 0x4000_0000], # PCI memory ranges (ranges 1: 32-bit MMIO space) +] # [(uint, uint)] +# VirtIO MMIO ranges with format (`base_paddr`, `size`). +virtio-mmio-ranges = [ + [0x1000_1000, 0x1000], + [0x1000_2000, 0x1000], + [0x1000_3000, 0x1000], + [0x1000_4000, 0x1000], + [0x1000_5000, 0x1000], + [0x1000_6000, 0x1000], + [0x1000_7000, 0x1000], + [0x1000_8000, 0x1000], +] # [(uint, uint)] +# Base physical address of the PCIe ECAM space. +pci-ecam-base = 0x3000_0000 # uint +# End PCI bus number (`bus-range` property in device tree). +pci-bus-end = 0xff # uint +# PCI device memory ranges (`ranges` property in device tree). +pci-ranges = [ + [0x0300_0000, 0x1_0000], # PIO space + [0x4000_0000, 0x4000_0000], # 32-bit MMIO space + [0x4_0000_0000, 0x4_0000_0000], # 64-bit MMIO space +] # [(uint, uint)] + +# Timer interrupt frequency in Hz. +timer-frequency = 10_000_000 # uint +# Timer interrupt num. +timer-irq = "0x8000_0000_0000_0005" # uint +# IPI interrupt num +ipi-irq = "0x8000_0000_0000_0001" # uint + +# rtc@101000 { +# interrupts = <0x0b>; +# interrupt-parent = <0x03>; +# reg = <0x00 0x101000 0x00 0x1000>; +# compatible = "google,goldfish-rtc"; +# }; +# RTC (goldfish) Address +rtc-paddr = 0x10_1000 # uint \ No newline at end of file diff --git a/platform/riscv64-qemu-virt/build.rs b/platform/riscv64-qemu-virt/build.rs new file mode 100644 index 00000000..86c6182a --- /dev/null +++ b/platform/riscv64-qemu-virt/build.rs @@ -0,0 +1,21 @@ +fn main() { + println!("cargo:rerun-if-env-changed=AXVISOR_SMP"); + println!("cargo:rerun-if-changed=linker.lds.S"); + + let mut smp = 1; + if let Ok(s) = std::env::var("AXVISOR_SMP") { + smp = s.parse::().unwrap_or(1); + } + + let ld_content = include_str!("linker.lds.S"); + let ld_content = ld_content.replace("%ARCH%", "riscv"); + let ld_content = + ld_content.replace("%KERNEL_BASE%", &format!("{:#x}", 0xffff_ffc0_8020_0000usize)); + let ld_content = ld_content.replace("%SMP%", &format!("{smp}",)); + + // target///build/axvisor-xxxx/out + let out_dir = std::env::var("OUT_DIR").unwrap(); + let out_path = std::path::Path::new(&out_dir).join("link.x"); + println!("cargo:rustc-link-search={out_dir}"); + std::fs::write(out_path, ld_content).unwrap(); +} diff --git a/platform/riscv64-qemu-virt/linker.lds.S b/platform/riscv64-qemu-virt/linker.lds.S new file mode 100644 index 00000000..439284c7 --- /dev/null +++ b/platform/riscv64-qemu-virt/linker.lds.S @@ -0,0 +1,99 @@ +OUTPUT_ARCH(%ARCH%) + +BASE_ADDRESS = %KERNEL_BASE%; +SMP = %SMP%; + +ENTRY(_start) +SECTIONS +{ + . = BASE_ADDRESS; + _skernel = .; + + .text : ALIGN(4K) { + _stext = .; + *(.text.boot) + *(.text .text.*) + . = ALIGN(4K); + _etext = .; + } + + .rodata : ALIGN(4K) { + _srodata = .; + *(.rodata .rodata.*) + *(.srodata .srodata.*) + *(.sdata2 .sdata2.*) + . = ALIGN(4K); + _erodata = .; + } + + .data : ALIGN(4K) { + _sdata = .; + *(.data.boot_page_table) + . = ALIGN(4K); + __sdriver_register = .; + KEEP(*(.driver.register*)) + __edriver_register = .; + + *(.data .data.*) + *(.sdata .sdata.*) + *(.got .got.*) + } + + .tdata : ALIGN(0x10) { + _stdata = .; + *(.tdata .tdata.*) + _etdata = .; + } + + .tbss : ALIGN(0x10) { + _stbss = .; + *(.tbss .tbss.*) + *(.tcommon) + _etbss = .; + } + + . = ALIGN(4K); + _percpu_start = .; + _percpu_end = _percpu_start + SIZEOF(.percpu); + .percpu 0x0 : AT(_percpu_start) { + _percpu_load_start = .; + *(.percpu .percpu.*) + _percpu_load_end = .; + . = _percpu_load_start + ALIGN(64) * SMP; + } + . = _percpu_end; + + . = ALIGN(4K); + _edata = .; + + .bss : ALIGN(4K) { + boot_stack = .; + *(.bss.stack) + . = ALIGN(4K); + boot_stack_top = .; + + _sbss = .; + *(.bss .bss.*) + *(.sbss .sbss.*) + *(COMMON) + . = ALIGN(4K); + _ebss = .; + } + + _ekernel = .; + + /DISCARD/ : { + *(.comment) *(.gnu*) *(.note*) *(.eh_frame*) + } +} + +SECTIONS { + linkme_IRQ : { *(linkme_IRQ) } + linkm2_IRQ : { *(linkm2_IRQ) } + linkme_PAGE_FAULT : { *(linkme_PAGE_FAULT) } + linkm2_PAGE_FAULT : { *(linkm2_PAGE_FAULT) } + linkme_SYSCALL : { *(linkme_SYSCALL) } + linkm2_SYSCALL : { *(linkm2_SYSCALL) } + axns_resource : { *(axns_resource) } +} +INSERT AFTER .tbss; diff --git a/platform/riscv64-qemu-virt/src/boot.rs b/platform/riscv64-qemu-virt/src/boot.rs new file mode 100644 index 00000000..6fd866a4 --- /dev/null +++ b/platform/riscv64-qemu-virt/src/boot.rs @@ -0,0 +1,94 @@ +use crate::config::plat::{BOOT_STACK_SIZE, PHYS_VIRT_OFFSET}; +use axplat::mem::{Aligned4K, pa}; + +#[unsafe(link_section = ".bss.stack")] +static mut BOOT_STACK: [u8; BOOT_STACK_SIZE] = [0; BOOT_STACK_SIZE]; + +#[unsafe(link_section = ".data")] +static mut BOOT_PT_SV39: Aligned4K<[u64; 512]> = Aligned4K::new([0; 512]); + +#[allow(clippy::identity_op)] // (0x0 << 10) here makes sense because it's an address +unsafe fn init_boot_page_table() { + unsafe { + // 0x0000_0000..0x4000_0000, VRWX_GAD, 1G block + BOOT_PT_SV39[0] = (0x0 << 10) | 0xef; + // 0x8000_0000..0xc000_0000, VRWX_GAD, 1G block + BOOT_PT_SV39[2] = (0x80000 << 10) | 0xef; + // 0xffff_ffc0_0000_0000..0xffff_ffc0_4000_0000, VRWX_GAD, 1G block + BOOT_PT_SV39[0x100] = (0x0 << 10) | 0xef; + // 0xffff_ffc0_8000_0000..0xffff_ffc0_c000_0000, VRWX_GAD, 1G block + BOOT_PT_SV39[0x102] = (0x80000 << 10) | 0xef; + } +} + +unsafe fn init_mmu() { + unsafe { + axcpu::asm::write_kernel_page_table(pa!(&raw const BOOT_PT_SV39 as usize)); + axcpu::asm::flush_tlb(None); + } +} + +/// The earliest entry point for the primary CPU. +#[unsafe(naked)] +#[unsafe(no_mangle)] +#[unsafe(link_section = ".text.boot")] +unsafe extern "C" fn _start() -> ! { + // PC = 0x8020_0000 + // a0 = hartid + // a1 = dtb + core::arch::naked_asm!(" + mv s0, a0 // save hartid + mv s1, a1 // save DTB pointer + la sp, {boot_stack} + li t0, {boot_stack_size} + add sp, sp, t0 // setup boot stack + + call {init_boot_page_table} + call {init_mmu} // setup boot page table and enabel MMU + + li s2, {phys_virt_offset} // fix up virtual high address + add sp, sp, s2 + + mv a0, s0 + mv a1, s1 + la a2, {entry} + add a2, a2, s2 + jalr a2 // call_main(cpu_id, dtb) + j .", + phys_virt_offset = const PHYS_VIRT_OFFSET, + boot_stack_size = const BOOT_STACK_SIZE, + boot_stack = sym BOOT_STACK, + init_boot_page_table = sym init_boot_page_table, + init_mmu = sym init_mmu, + entry = sym axplat::call_main, + ) +} + +/// The earliest entry point for secondary CPUs. +#[cfg(feature = "smp")] +#[unsafe(naked)] +#[unsafe(no_mangle)] +#[unsafe(link_section = ".text.boot")] +unsafe extern "C" fn _start_secondary() -> ! { + // a0 = hartid + // a1 = SP + core::arch::naked_asm!(" + mv s0, a0 // save hartid + mv sp, a1 // set SP + + call {init_mmu} // setup boot page table and enabel MMU + + li s1, {phys_virt_offset} // fix up virtual high address + add a1, a1, s1 + add sp, sp, s1 + + mv a0, s0 + la a1, {entry} + add a1, a1, s1 + jalr a1 // call_secondary_main(cpu_id) + j .", + phys_virt_offset = const PHYS_VIRT_OFFSET, + init_mmu = sym init_mmu, + entry = sym axplat::call_secondary_main, + ) +} diff --git a/platform/riscv64-qemu-virt/src/console.rs b/platform/riscv64-qemu-virt/src/console.rs new file mode 100644 index 00000000..7c305a8b --- /dev/null +++ b/platform/riscv64-qemu-virt/src/console.rs @@ -0,0 +1,51 @@ +use axplat::mem::{VirtAddr, virt_to_phys}; + +/// The maximum number of bytes that can be read at once. +const MAX_RW_SIZE: usize = 256; + +/// Tries to write bytes to the console from input u8 slice. +/// Returns the number of bytes written. +fn try_write_bytes(bytes: &[u8]) -> usize { + sbi_rt::console_write(sbi_rt::Physical::new( + // A maximum of 256 bytes can be written at a time + // to prevent SBI from disabling IRQs for too long. + bytes.len().min(MAX_RW_SIZE), + virt_to_phys(VirtAddr::from_ptr_of(bytes.as_ptr())).as_usize(), + 0, + )) + .value +} + +use axplat::console::ConsoleIf; + +struct ConsoleIfImpl; + +#[impl_plat_interface] +impl ConsoleIf for ConsoleIfImpl { + /// Writes bytes to the console from input u8 slice. + fn write_bytes(bytes: &[u8]) { + let mut write_len = 0; + let mut buf = [0; MAX_RW_SIZE]; + while write_len < bytes.len() { + let n = buf.len().min(bytes.len() - write_len); + if n == 0 { + break; + } + // `bytes` can be from user space, copy it into a kernel buffer + // to correctly use `virt_to_phys`. + buf[..n].copy_from_slice(&bytes[write_len..write_len + n]); + write_len += try_write_bytes(&buf[..n]); + } + } + + /// Reads bytes from the console into the given mutable slice. + /// Returns the number of bytes read. + fn read_bytes(bytes: &mut [u8]) -> usize { + sbi_rt::console_read(sbi_rt::Physical::new( + bytes.len().min(MAX_RW_SIZE), + virt_to_phys(VirtAddr::from_mut_ptr_of(bytes.as_mut_ptr())).as_usize(), + 0, + )) + .value + } +} diff --git a/platform/riscv64-qemu-virt/src/init.rs b/platform/riscv64-qemu-virt/src/init.rs new file mode 100644 index 00000000..7090f415 --- /dev/null +++ b/platform/riscv64-qemu-virt/src/init.rs @@ -0,0 +1,39 @@ +use axplat::init::InitIf; + +struct InitIfImpl; + +#[impl_plat_interface] +impl InitIf for InitIfImpl { + /// This function should be called immediately after the kernel has booted, + /// and performed earliest platform configuration and initialization (e.g., + /// early console, clocking). + fn init_early(_cpu_id: usize, _mbi: usize) { + axcpu::init::init_trap(); + crate::time::init_early(); + } + + /// Initializes the platform at the early stage for secondary cores. + #[cfg(feature = "smp")] + fn init_early_secondary(_cpu_id: usize) { + axcpu::init::init_trap(); + } + + /// Initializes the platform at the later stage for the primary core. + /// + /// This function should be called after the kernel has done part of its + /// initialization (e.g, logging, memory management), and finalized the rest of + /// platform configuration and initialization. + fn init_later(_cpu_id: usize, _arg: usize) { + #[cfg(feature = "irq")] + crate::irq::init_percpu(); + crate::time::init_percpu(); + } + + /// Initializes the platform at the later stage for secondary cores. + #[cfg(feature = "smp")] + fn init_later_secondary(_cpu_id: usize) { + #[cfg(feature = "irq")] + crate::irq::init_percpu(); + crate::time::init_percpu(); + } +} diff --git a/platform/riscv64-qemu-virt/src/irq.rs b/platform/riscv64-qemu-virt/src/irq.rs new file mode 100644 index 00000000..250c4c85 --- /dev/null +++ b/platform/riscv64-qemu-virt/src/irq.rs @@ -0,0 +1,196 @@ +//! TODO: PLIC + +use axplat::irq::{HandlerTable, IpiTarget, IrqHandler, IrqIf}; +use core::sync::atomic::{AtomicPtr, Ordering}; +use riscv::register::sie; +use sbi_rt::HartMask; + +/// `Interrupt` bit in `scause` +pub(super) const INTC_IRQ_BASE: usize = 1 << (usize::BITS - 1); + +/// Supervisor software interrupt in `scause` +#[allow(unused)] +pub(super) const S_SOFT: usize = INTC_IRQ_BASE + 1; + +/// Supervisor timer interrupt in `scause` +pub(super) const S_TIMER: usize = INTC_IRQ_BASE + 5; + +/// Supervisor external interrupt in `scause` +pub(super) const S_EXT: usize = INTC_IRQ_BASE + 9; + +static TIMER_HANDLER: AtomicPtr<()> = AtomicPtr::new(core::ptr::null_mut()); + +static IPI_HANDLER: AtomicPtr<()> = AtomicPtr::new(core::ptr::null_mut()); + +/// The maximum number of IRQs. +pub const MAX_IRQ_COUNT: usize = 1024; + +static IRQ_HANDLER_TABLE: HandlerTable = HandlerTable::new(); + +macro_rules! with_cause { + ($cause: expr, @S_TIMER => $timer_op: expr, @S_SOFT => $ipi_op: expr, @S_EXT => $ext_op: expr, @EX_IRQ => $plic_op: expr $(,)?) => { + match $cause { + S_TIMER => $timer_op, + S_SOFT => $ipi_op, + S_EXT => $ext_op, + other => { + if other & INTC_IRQ_BASE == 0 { + // Device-side interrupts read from PLIC + $plic_op + } else { + // Other CPU-side interrupts + panic!("Unknown IRQ cause: {}", other); + } + } + } + }; +} + +pub(super) fn init_percpu() { + // enable soft interrupts, timer interrupts, and external interrupts + unsafe { + sie::set_ssoft(); + sie::set_stimer(); + sie::set_sext(); + } +} + +struct IrqIfImpl; + +#[impl_plat_interface] +impl IrqIf for IrqIfImpl { + /// Enables or disables the given IRQ. + fn set_enable(irq: usize, _enabled: bool) { + // TODO: set enable in PLIC + warn!("set_enable is not implemented for IRQ {}", irq); + } + + /// Registers an IRQ handler for the given IRQ. + /// + /// It also enables the IRQ if the registration succeeds. It returns `false` if + /// the registration failed. + /// + /// The `irq` parameter has the following semantics + /// 1. If its highest bit is 1, it means it is an interrupt on the CPU side. Its + /// value comes from `scause`, where [`S_SOFT`] represents software interrupt + /// and [`S_TIMER`] represents timer interrupt. If its value is [`S_EXT`], it + /// means it is an external interrupt, and the real IRQ number needs to + /// be obtained from PLIC. + /// 2. If its highest bit is 0, it means it is an interrupt on the device side, + /// and its value is equal to the IRQ number provided by PLIC. + fn register(irq: usize, handler: IrqHandler) -> bool { + with_cause!( + irq, + @S_TIMER => TIMER_HANDLER.compare_exchange(core::ptr::null_mut(), handler as *mut _, Ordering::AcqRel, Ordering::Acquire).is_ok(), + @S_SOFT => IPI_HANDLER.compare_exchange(core::ptr::null_mut(), handler as *mut _, Ordering::AcqRel, Ordering::Acquire).is_ok(), + @S_EXT => { + warn!("External IRQ should be got from PLIC, not scause"); + false + }, + @EX_IRQ => { + if IRQ_HANDLER_TABLE.register_handler(irq, handler) { + Self::set_enable(irq, true); + true + } else { + warn!("register handler for External IRQ {} failed", irq); + false + } + } + ) + } + + /// Unregisters the IRQ handler for the given IRQ. + /// + /// It also disables the IRQ if the unregistration succeeds. It returns the + /// existing handler if it is registered, `None` otherwise. + fn unregister(irq: usize) -> Option { + with_cause!( + irq, + @S_TIMER => { + let handler = TIMER_HANDLER.swap(core::ptr::null_mut(), Ordering::AcqRel); + if !handler.is_null() { + Some(unsafe { core::mem::transmute::<*mut (), IrqHandler>(handler) }) + } else { + None + } + }, + @S_SOFT => { + let handler = IPI_HANDLER.swap(core::ptr::null_mut(), Ordering::AcqRel); + if !handler.is_null() { + Some(unsafe { core::mem::transmute::<*mut (), IrqHandler>(handler) }) + } else { + None + } + }, + @S_EXT => { + warn!("External IRQ should be got from PLIC, not scause"); + None + }, + @EX_IRQ => IRQ_HANDLER_TABLE.unregister_handler(irq) + ) + } + + /// Handles the IRQ. + /// + /// It is called by the common interrupt handler. It should look up in the + /// IRQ handler table and calls the corresponding handler. If necessary, it + /// also acknowledges the interrupt controller after handling. + fn handle(irq: usize) { + with_cause!( + irq, + @S_TIMER => { + trace!("IRQ: timer"); + let handler = TIMER_HANDLER.load(Ordering::Acquire); + if !handler.is_null() { + // SAFETY: The handler is guaranteed to be a valid function pointer. + unsafe { core::mem::transmute::<*mut (), IrqHandler>(handler)() }; + } + }, + @S_SOFT => { + trace!("IRQ: IPI"); + let handler = IPI_HANDLER.load(Ordering::Acquire); + if !handler.is_null() { + // SAFETY: The handler is guaranteed to be a valid function pointer. + unsafe { core::mem::transmute::<*mut (), IrqHandler>(handler)() }; + } + }, + @S_EXT => { + // TODO: get IRQ number from PLIC + if !IRQ_HANDLER_TABLE.handle(0) { + warn!("Unhandled IRQ {}", 0); + } + }, + @EX_IRQ => { + unreachable!("Device-side IRQs should be handled by triggering the External Interrupt."); + } + ) + } + + /// Sends an inter-processor interrupt (IPI) to the specified target CPU or all CPUs. + fn send_ipi(_irq_num: usize, target: IpiTarget) { + match target { + IpiTarget::Current { cpu_id } => { + let res = sbi_rt::send_ipi(HartMask::from_mask_base(1 << cpu_id, 0)); + if res.is_err() { + warn!("send_ipi failed: {:?}", res); + } + } + IpiTarget::Other { cpu_id } => { + let res = sbi_rt::send_ipi(HartMask::from_mask_base(1 << cpu_id, 0)); + if res.is_err() { + warn!("send_ipi failed: {:?}", res); + } + } + IpiTarget::AllExceptCurrent { cpu_id, cpu_num } => { + for i in 0..cpu_num { + if i != cpu_id { + let res = sbi_rt::send_ipi(HartMask::from_mask_base(1 << i, 0)); + if res.is_err() { + warn!("send_ipi_all_others failed: {:?}", res); + } + } + } + } + } + } +} diff --git a/platform/riscv64-qemu-virt/src/lib.rs b/platform/riscv64-qemu-virt/src/lib.rs new file mode 100644 index 00000000..e5939e04 --- /dev/null +++ b/platform/riscv64-qemu-virt/src/lib.rs @@ -0,0 +1,30 @@ +#![no_std] + +#[macro_use] +extern crate log; +#[macro_use] +extern crate axplat; + +mod boot; +mod console; +mod init; +#[cfg(feature = "irq")] +mod irq; +mod mem; +mod power; +mod time; + +pub mod config { + //! Platform configuration module. + //! + //! If the `AX_CONFIG_PATH` environment variable is set, it will load the configuration from the specified path. + //! Otherwise, it will fall back to the `axconfig.toml` file in the current directory and generate the default configuration. + //! + //! If the `PACKAGE` field in the configuration does not match the package name, it will panic with an error message. + axconfig_macros::include_configs!(path_env = "AX_CONFIG_PATH", fallback = "axconfig.toml"); + assert_str_eq!( + PACKAGE, + env!("CARGO_PKG_NAME"), + "`PACKAGE` field in the configuration does not match the Package name. Please check your configuration file." + ); +} diff --git a/platform/riscv64-qemu-virt/src/mem.rs b/platform/riscv64-qemu-virt/src/mem.rs new file mode 100644 index 00000000..13000df0 --- /dev/null +++ b/platform/riscv64-qemu-virt/src/mem.rs @@ -0,0 +1,58 @@ +use axplat::mem::{MemIf, PhysAddr, RawRange, VirtAddr, pa, va}; + +use crate::config::devices::MMIO_RANGES; +use crate::config::plat::{ + KERNEL_BASE_PADDR, PHYS_MEMORY_BASE, PHYS_MEMORY_SIZE, PHYS_VIRT_OFFSET, +}; + +struct MemIfImpl; + +#[impl_plat_interface] +impl MemIf for MemIfImpl { + /// Returns all physical memory (RAM) ranges on the platform. + /// + /// All memory ranges except reserved ranges (including the kernel loaded + /// range) are free for allocation. + fn phys_ram_ranges() -> &'static [RawRange] { + // TODO: paser dtb to get the available memory ranges + // We can't directly use `PHYS_MEMORY_BASE` here, because it may has been used by sbi. + &[( + KERNEL_BASE_PADDR, + PHYS_MEMORY_BASE + PHYS_MEMORY_SIZE - KERNEL_BASE_PADDR, + )] + } + + /// Returns all reserved physical memory ranges on the platform. + /// + /// Reserved memory can be contained in [`phys_ram_ranges`], they are not + /// allocatable but should be mapped to kernel's address space. + /// + /// Note that the ranges returned should not include the range where the + /// kernel is loaded. + fn reserved_phys_ram_ranges() -> &'static [RawRange] { + &[] + } + + /// Returns all device memory (MMIO) ranges on the platform. + fn mmio_ranges() -> &'static [RawRange] { + &MMIO_RANGES + } + + /// Translates a physical address to a virtual address. + fn phys_to_virt(paddr: PhysAddr) -> VirtAddr { + va!(paddr.as_usize() + PHYS_VIRT_OFFSET) + } + + /// Translates a virtual address to a physical address. + fn virt_to_phys(vaddr: VirtAddr) -> PhysAddr { + pa!(vaddr.as_usize() - PHYS_VIRT_OFFSET) + } + + /// Returns the kernel address space base virtual address and size. + fn kernel_aspace() -> (VirtAddr, usize) { + ( + va!(crate::config::plat::KERNEL_ASPACE_BASE), + crate::config::plat::KERNEL_ASPACE_SIZE, + ) + } +} diff --git a/platform/riscv64-qemu-virt/src/power.rs b/platform/riscv64-qemu-virt/src/power.rs new file mode 100644 index 00000000..c4a87924 --- /dev/null +++ b/platform/riscv64-qemu-virt/src/power.rs @@ -0,0 +1,35 @@ +use axplat::power::PowerIf; + +struct PowerImpl; + +#[impl_plat_interface] +impl PowerIf for PowerImpl { + /// Bootstraps the given CPU core with the given initial stack (in physical + /// address). + /// + /// Where `cpu_id` is the logical CPU ID (0, 1, ..., N-1, N is the number of + /// CPU cores on the platform). + #[cfg(feature = "smp")] + fn cpu_boot(cpu_id: usize, stack_top_paddr: usize) { + use axplat::mem::{va, virt_to_phys}; + unsafe extern "C" { + fn _start_secondary(); + } + if sbi_rt::probe_extension(sbi_rt::Hsm).is_unavailable() { + warn!("HSM SBI extension is not supported for current SEE."); + return; + } + let entry = virt_to_phys(va!(_start_secondary as usize)); + sbi_rt::hart_start(cpu_id, entry.as_usize(), stack_top_paddr); + } + + /// Shutdown the whole system. + fn system_off() -> ! { + info!("Shutting down..."); + sbi_rt::system_reset(sbi_rt::Shutdown, sbi_rt::NoReason); + warn!("It should shutdown!"); + loop { + axcpu::asm::halt(); + } + } +} diff --git a/platform/riscv64-qemu-virt/src/time.rs b/platform/riscv64-qemu-virt/src/time.rs new file mode 100644 index 00000000..a8c84e1d --- /dev/null +++ b/platform/riscv64-qemu-virt/src/time.rs @@ -0,0 +1,75 @@ +use riscv::register::time; + +use axplat::time::TimeIf; + +const NANOS_PER_SEC: u64 = 1_000_000_000; + +const NANOS_PER_TICK: u64 = NANOS_PER_SEC / crate::config::devices::TIMER_FREQUENCY as u64; +/// RTC wall time offset in nanoseconds at monotonic time base. +static mut RTC_EPOCHOFFSET_NANOS: u64 = 0; + +pub(super) fn init_early() { + #[cfg(feature = "rtc")] + use crate::config::devices::RTC_PADDR; + + #[cfg(feature = "rtc")] + if RTC_PADDR != 0 { + use axplat::mem::{PhysAddr, pa, phys_to_virt}; + + use riscv_goldfish::Rtc; + + const GOLDFISH_BASE: PhysAddr = pa!(RTC_PADDR); + // Get the current time in microseconds since the epoch (1970-01-01) from the riscv RTC. + // Subtract the timer ticks to get the actual time when ArceOS was booted. + let epoch_time_nanos = + Rtc::new(phys_to_virt(GOLDFISH_BASE).as_usize()).get_unix_timestamp() * 1_000_000_000; + + unsafe { + RTC_EPOCHOFFSET_NANOS = + epoch_time_nanos - TimeIfImpl::ticks_to_nanos(TimeIfImpl::current_ticks()); + } + } +} + +pub(super) fn init_percpu() { + #[cfg(feature = "irq")] + sbi_rt::set_timer(0); +} + +struct TimeIfImpl; + +#[impl_plat_interface] +impl TimeIf for TimeIfImpl { + /// Returns the IRQ number for the timer interrupt. + fn irq_num() -> usize { + crate::config::devices::TIMER_IRQ + } + + /// Returns the current clock time in hardware ticks. + fn current_ticks() -> u64 { + time::read() as u64 + } + + /// Converts hardware ticks to nanoseconds. + fn ticks_to_nanos(ticks: u64) -> u64 { + ticks * NANOS_PER_TICK + } + + /// Converts nanoseconds to hardware ticks. + fn nanos_to_ticks(nanos: u64) -> u64 { + nanos / NANOS_PER_TICK + } + + /// Return epoch offset in nanoseconds (wall time offset to monotonic clock start). + fn epochoffset_nanos() -> u64 { + unsafe { RTC_EPOCHOFFSET_NANOS } + } + + /// Set a one-shot timer. + /// + /// A timer interrupt will be triggered at the specified monotonic time deadline (in nanoseconds). + #[cfg(feature = "irq")] + fn set_oneshot_timer(deadline_ns: u64) { + sbi_rt::set_timer(Self::nanos_to_ticks(deadline_ns)); + } +} diff --git a/scripts/ostool/qemu-riscv64.toml b/scripts/ostool/qemu-riscv64.toml new file mode 100644 index 00000000..7106493d --- /dev/null +++ b/scripts/ostool/qemu-riscv64.toml @@ -0,0 +1,23 @@ +args = [ + "-nographic", + "-cpu", + "rv64", + "-machine", + "virt", + "-bios", + "default", + "-smp", + "4", + "-device", + "virtio-blk-device,drive=disk0", + "-drive", + "id=disk0,if=none,format=raw,file=${workspaceFolder}/tmp/rootfs.img", + "-append", + "root=/dev/vda rw init=/init", + "-m", + "8g", +] +fail_regex = [] +success_regex = [] +to_bin = true +uefi = false From 933c2858779a48f1a34614c1e30a1c702ed9f162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=AF=E5=AE=87?= <2537738252@qq.com> Date: Fri, 28 Nov 2025 20:33:21 +0800 Subject: [PATCH 02/22] riscv64: initial support --- .cargo/config.toml | 8 ++++++++ Cargo.lock | 1 + Cargo.toml | 1 + kernel/src/hal/mod.rs | 1 + modules/axruntime/Cargo.toml | 3 +++ modules/axruntime/src/lib.rs | 3 +++ xtask/src/cargo.rs | 5 ++++- 7 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 676b0e8a..ecc88a18 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,6 +5,14 @@ rustflags = [ "-Clink-args=-Tlink.x", ] +[target.riscv64gc-unknown-none-elf] +rustflags = [ + "-Clink-args=-no-pie", + "-Clink-args=-znostart-stop-gc", + "-Clink-args=-Tlink.x", +] + + [target.'cfg(target_os = "none")'] runner = "cargo osrun" diff --git a/Cargo.lock b/Cargo.lock index b688ef12..5343b3a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1006,6 +1006,7 @@ dependencies = [ "axnet", "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "axplat-aarch64-dyn 0.3.0 (git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn?tag=v0.3.3)", + "axplat-riscv64-qemu-virt 0.2.0", "axplat-x86-qemu-q35", "axtask", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index f06c0194..6686f9b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,7 @@ driver = {path = "modules/driver"} # platform axplat-x86-qemu-q35 = {path = "platform/x86-qemu-q35"} +axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"} axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} [patch.crates-io] diff --git a/kernel/src/hal/mod.rs b/kernel/src/hal/mod.rs index dc058723..3b357779 100644 --- a/kernel/src/hal/mod.rs +++ b/kernel/src/hal/mod.rs @@ -14,6 +14,7 @@ use axvm::{AxVMHal, AxVMPerCpu}; #[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/mod.rs")] #[cfg_attr(target_arch = "x86_64", path = "arch/x86_64/mod.rs")] +#[cfg_attr(target_arch = "riscv64", path = "arch/riscv64/mod.rs")] pub mod arch; use crate::{hal::arch::hardware_check, task::AsVCpuTask, vmm}; diff --git a/modules/axruntime/Cargo.toml b/modules/axruntime/Cargo.toml index c89c419e..a7e216b1 100644 --- a/modules/axruntime/Cargo.toml +++ b/modules/axruntime/Cargo.toml @@ -52,6 +52,9 @@ chrono = {version = "0.4.38", default-features = false} [target.'cfg(target_arch = "x86_64")'.dependencies] axplat-x86-qemu-q35 = {workspace = true} +[target.'cfg(target_arch = "riscv64")'.dependencies] +axplat-riscv64-qemu-virt = {workspace = true} + [target.'cfg(target_arch = "aarch64")'.dependencies] axplat-aarch64-dyn = {git = "https://github.com/arceos-hypervisor/axplat-aarch64-dyn.git", tag = "v0.4.0", features = ["irq", "smp", "hv"]} somehal = "0.4" \ No newline at end of file diff --git a/modules/axruntime/src/lib.rs b/modules/axruntime/src/lib.rs index 2586dfad..59c0cfec 100644 --- a/modules/axruntime/src/lib.rs +++ b/modules/axruntime/src/lib.rs @@ -25,6 +25,9 @@ extern crate axlog; #[cfg(target_arch = "x86_64")] extern crate axplat_x86_qemu_q35; +#[cfg(target_arch = "riscv64")] +extern crate axplat_riscv64_qemu_virt; + #[cfg(target_arch = "aarch64")] extern crate axplat_aarch64_dyn; diff --git a/xtask/src/cargo.rs b/xtask/src/cargo.rs index 0fe676f3..93cd532b 100644 --- a/xtask/src/cargo.rs +++ b/xtask/src/cargo.rs @@ -11,7 +11,9 @@ impl Context { Arch::Aarch64 } else if build_config.target.contains("x86_64") { Arch::X86_64 - } else { + } else if build_config.target.contains("riscv64") { + Arch::Riscv64 + }else { return Err(anyhow::anyhow!( "Unsupported target architecture: {}", build_config.target @@ -64,4 +66,5 @@ impl Context { enum Arch { Aarch64, X86_64, + Riscv64, } From 079cb8b447733301882518e35a35b12c7e20a0b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=AF=E5=AE=87?= <2537738252@qq.com> Date: Fri, 28 Nov 2025 21:04:46 +0800 Subject: [PATCH 03/22] update axvm dependency --- Cargo.lock | 23 +++++++++++------------ Cargo.toml | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5343b3a3..5c303fae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1160,9 +1160,9 @@ dependencies = [ "axhvc", "axruntime", "axstd", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvisor_api", - "axvm 0.1.0 (git+https://github.com/arceos-hypervisor/axvm.git?branch=next)", + "axvm 0.1.0 (git+https://github.com/liulog/axvm.git?branch=next)", "bitflags 2.10.0", "byte-unit", "cfg-if", @@ -1224,7 +1224,7 @@ dependencies = [ "axdevice", "axdevice_base", "axerrno", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvmconfig", "cfg-if", "cpumask", @@ -1233,7 +1233,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "riscv_vcpu 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "riscv_vcpu 0.1.2 (git+https://github.com/liulog/riscv_vcpu.git?branch=master)", "spin 0.9.8", "x86_vcpu", ] @@ -1241,7 +1241,7 @@ dependencies = [ [[package]] name = "axvm" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=next#0393f27dea948433e53285a400e356cdfd4c4fa3" +source = "git+https://github.com/liulog/axvm.git?branch=next#22ca8ff823b1433c6f2f15bc99810fe0b4a2ccac" dependencies = [ "arm_vcpu", "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1249,7 +1249,7 @@ dependencies = [ "axdevice", "axdevice_base", "axerrno", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvmconfig", "cfg-if", "cpumask", @@ -1258,7 +1258,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "riscv_vcpu 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "riscv_vcpu 0.1.2 (git+https://github.com/liulog/riscv_vcpu.git?branch=master)", "spin 0.9.8", "x86_vcpu", ] @@ -4623,7 +4623,7 @@ version = "0.1.2" dependencies = [ "axaddrspace", "axerrno", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -4645,12 +4645,11 @@ dependencies = [ [[package]] name = "riscv_vcpu" version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f38f28fe6c02bb3ced43087c9667b23d18adf729becdc5adf1253f7df83904" +source = "git+https://github.com/liulog/riscv_vcpu.git?branch=master#6a82b377ce526d927e48ffde90f245c6a558a841" dependencies = [ "axaddrspace", "axerrno", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -6664,7 +6663,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvisor_api", "bit_field", "bitflags 2.10.0", diff --git a/Cargo.toml b/Cargo.toml index 6686f9b6..5d03514b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ axklib = {git = "https://github.com/arceos-hypervisor/axklib.git"} axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} axvcpu = "0.1" -axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "next"} +axvm = {git = "https://github.com/liulog/axvm.git", branch = "next"} # System independent crates provided by ArceOS, these crates could be imported by remote url. axerrno = "0.2" @@ -90,7 +90,7 @@ axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"} axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} [patch.crates-io] -axvcpu = {git = "https://github.com/arceos-hypervisor/axvcpu.git", branch = "next"} +axvcpu = {path="crates/axvcpu"} axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} [patch."https://github.com/arceos-org/arceos"] From 076f79f2628108d6aca16f33dfa5a1a9b936fcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=AF=E5=AE=87?= <2537738252@qq.com> Date: Sat, 29 Nov 2025 22:03:01 +0800 Subject: [PATCH 04/22] riscv64: support smp=4 boot --- configs/board/qemu-riscv64.toml | 3 ++- kernel/src/hal/arch/riscv64/mod.rs | 7 ++++++- modules/axruntime/src/lib.rs | 2 ++ platform/riscv64-qemu-virt/axconfig.toml | 2 +- platform/riscv64-qemu-virt/src/lib.rs | 4 ++++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/configs/board/qemu-riscv64.toml b/configs/board/qemu-riscv64.toml index 1cf8b3aa..5e3d701b 100644 --- a/configs/board/qemu-riscv64.toml +++ b/configs/board/qemu-riscv64.toml @@ -8,4 +8,5 @@ features = [ log = "Info" target = "riscv64gc-unknown-none-elf" to_bin = true -vm_configs = [] \ No newline at end of file +vm_configs = [] +smp = 4 \ No newline at end of file diff --git a/kernel/src/hal/arch/riscv64/mod.rs b/kernel/src/hal/arch/riscv64/mod.rs index ab92f90b..64ff8cd9 100644 --- a/kernel/src/hal/arch/riscv64/mod.rs +++ b/kernel/src/hal/arch/riscv64/mod.rs @@ -1,4 +1,9 @@ pub mod cache; -pub fn hardware_check() {} +pub fn hardware_check() { + // TODO: implement hardware checks for RISC-V64 + // check page table level like aarch64 + +} + pub fn inject_interrupt(_vector: u8) {} diff --git a/modules/axruntime/src/lib.rs b/modules/axruntime/src/lib.rs index 59c0cfec..1c4b9096 100644 --- a/modules/axruntime/src/lib.rs +++ b/modules/axruntime/src/lib.rs @@ -327,6 +327,8 @@ pub fn cpu_count() -> usize { cpu_count = axplat_x86_qemu_q35::cpu_count() } else if #[cfg(target_arch = "aarch64")] { cpu_count = somehal::mem::cpu_id_list().count() + } else if #[cfg(all(target_arch = "riscv64", target_os = "none"))] { + cpu_count = axplat_riscv64_qemu_virt::cpu_count() } else { cpu_count = 1; } diff --git a/platform/riscv64-qemu-virt/axconfig.toml b/platform/riscv64-qemu-virt/axconfig.toml index 8997e188..662b0507 100644 --- a/platform/riscv64-qemu-virt/axconfig.toml +++ b/platform/riscv64-qemu-virt/axconfig.toml @@ -10,7 +10,7 @@ package = "axplat-riscv64-qemu-virt" # str # [plat] # Number of CPUs. -cpu-num = 1 # uint +cpu-num = 4 # uint # Base address of the whole physical memory. phys-memory-base = 0x8000_0000 # uint # Size of the whole physical memory. (128M) diff --git a/platform/riscv64-qemu-virt/src/lib.rs b/platform/riscv64-qemu-virt/src/lib.rs index e5939e04..66242ea6 100644 --- a/platform/riscv64-qemu-virt/src/lib.rs +++ b/platform/riscv64-qemu-virt/src/lib.rs @@ -28,3 +28,7 @@ pub mod config { "`PACKAGE` field in the configuration does not match the Package name. Please check your configuration file." ); } + +pub fn cpu_count() -> usize { + config::plat::CPU_NUM +} From 7ff53d29b649c5972c2d031e4b55b02468be5d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=AF=E5=AE=87?= <2537738252@qq.com> Date: Sun, 30 Nov 2025 20:23:50 +0800 Subject: [PATCH 05/22] riscv64: support arceos vm --- Cargo.lock | 42 ++++++++++--- configs/vms/arceos-riscv64-qemu-smp1.toml | 75 +++++++++++++++++++++++ platform/riscv64-qemu-virt/Cargo.toml | 2 +- platform/riscv64-qemu-virt/axconfig.toml | 4 +- platform/riscv64-qemu-virt/src/boot.rs | 8 ++- scripts/ostool/qemu-riscv64.toml | 2 +- 6 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 configs/vms/arceos-riscv64-qemu-smp1.toml diff --git a/Cargo.lock b/Cargo.lock index 5c303fae..6f2a2544 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -389,7 +389,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "riscv", + "riscv 0.14.0", "static_assertions", "tock-registers 0.9.0", "x86", @@ -412,7 +412,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "riscv", + "riscv 0.14.0", "static_assertions", "tock-registers 0.9.0", "x86", @@ -925,7 +925,7 @@ dependencies = [ "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "log", - "riscv", + "riscv 0.15.0", "riscv_goldfish", "sbi-rt", ] @@ -939,7 +939,7 @@ dependencies = [ "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "log", - "riscv", + "riscv 0.14.0", "sbi-rt", ] @@ -3829,7 +3829,7 @@ dependencies = [ "log", "memory_addr", "page_table_entry", - "riscv", + "riscv 0.14.0", "x86", ] @@ -4571,7 +4571,20 @@ dependencies = [ "critical-section", "embedded-hal", "paste", - "riscv-macros", + "riscv-macros 0.2.0", + "riscv-pac", +] + +[[package]] +name = "riscv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05cfa3f7b30c84536a9025150d44d26b8e1cc20ddf436448d74cd9591eefb25" +dependencies = [ + "critical-section", + "embedded-hal", + "paste", + "riscv-macros 0.3.0", "riscv-pac", ] @@ -4591,7 +4604,7 @@ dependencies = [ "bit_field", "bitflags 2.10.0", "log", - "riscv", + "riscv 0.14.0", ] [[package]] @@ -4605,6 +4618,17 @@ dependencies = [ "syn 2.0.110", ] +[[package]] +name = "riscv-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d323d13972c1b104aa036bc692cd08b822c8bbf23d79a27c526095856499799" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.110", +] + [[package]] name = "riscv-pac" version = "0.2.0" @@ -4633,7 +4657,7 @@ dependencies = [ "memoffset", "memory_addr", "page_table_entry", - "riscv", + "riscv 0.15.0", "riscv-decode", "riscv-h", "rustsbi", @@ -4659,7 +4683,7 @@ dependencies = [ "memoffset", "memory_addr", "page_table_entry", - "riscv", + "riscv 0.14.0", "riscv-decode", "riscv-h", "rustsbi", diff --git a/configs/vms/arceos-riscv64-qemu-smp1.toml b/configs/vms/arceos-riscv64-qemu-smp1.toml new file mode 100644 index 00000000..3c68c0d0 --- /dev/null +++ b/configs/vms/arceos-riscv64-qemu-smp1.toml @@ -0,0 +1,75 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "arceos-qemu" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 1 +# Guest vm physical cpu ids. +phys_cpu_ids = [0] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x8020_0000 +# The location of image: "memory" | "fs". +# load from memory. +image_location = "memory" +# The file path of the kernel image. +kernel_path = "path/arceos-riscv64-smp1.bin" +# The load address of the kernel image. +kernel_load_addr = 0x8020_0000 +# The file path of the device tree blob (DTB). +#dtb_path = "path/aarch64-qemu-gicv3.dtb" +# The load address of the device tree blob (DTB). +dtb_load_addr = 0x8220_0000 + +## The file path of the ramdisk image. +# ramdisk_path = "" +## The load address of the ramdisk image. +# ramdisk_load_addr = 0 +## The path of the disk image. +# disk_path = "disk.img" + +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x8000_0000, 0x4000_0000, 0x7, 1], # System RAM 1G MAP_ALLOC +] + +# +# Device specifications +# +[devices] +# Pass-through devices. +passthrough_devices = [ + ["/",], +] + +# Passthrough addresses. +# Base-GPA Length. +passthrough_addresses = [ + #[0x28041000, 0x100_0000] +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + ["/pci@30000000"], +] + +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [ + # ["gppt-gicd", 0x0800_0000, 0x1_0000, 0, 0x21, []], + # ["gppt-gicr", 0x080a_0000, 0x2_0000, 0, 0x20, [1, 0x2_0000, 0]], # 1 vcpu, stride 0x20000, starts with pcpu 0 + # ["gppt-gits", 0x0808_0000, 0x2_0000, 0, 0x22, [0x0808_0000]], # host_gits_base +] + +interrupt_mode = "passthrough" + diff --git a/platform/riscv64-qemu-virt/Cargo.toml b/platform/riscv64-qemu-virt/Cargo.toml index 9cb0d717..2b9b866c 100644 --- a/platform/riscv64-qemu-virt/Cargo.toml +++ b/platform/riscv64-qemu-virt/Cargo.toml @@ -15,7 +15,7 @@ smp = ["axplat/smp"] [dependencies] log = "0.4" -riscv = "0.14" +riscv = "0.15.0" sbi-rt = { version = "0.0.3", features = ["legacy"] } riscv_goldfish = { version = "0.1", optional = true } diff --git a/platform/riscv64-qemu-virt/axconfig.toml b/platform/riscv64-qemu-virt/axconfig.toml index 662b0507..ba0e4dbd 100644 --- a/platform/riscv64-qemu-virt/axconfig.toml +++ b/platform/riscv64-qemu-virt/axconfig.toml @@ -13,8 +13,8 @@ package = "axplat-riscv64-qemu-virt" # str cpu-num = 4 # uint # Base address of the whole physical memory. phys-memory-base = 0x8000_0000 # uint -# Size of the whole physical memory. (128M) -phys-memory-size = 0x800_0000 # uint +# Size of the whole physical memory. (4GB) +phys-memory-size = 0x1_0000_0000 # uint # Base physical address of the kernel image. kernel-base-paddr = 0x8020_0000 # uint # Base virtual address of the kernel image. diff --git a/platform/riscv64-qemu-virt/src/boot.rs b/platform/riscv64-qemu-virt/src/boot.rs index 6fd866a4..45bc437a 100644 --- a/platform/riscv64-qemu-virt/src/boot.rs +++ b/platform/riscv64-qemu-virt/src/boot.rs @@ -12,12 +12,18 @@ unsafe fn init_boot_page_table() { unsafe { // 0x0000_0000..0x4000_0000, VRWX_GAD, 1G block BOOT_PT_SV39[0] = (0x0 << 10) | 0xef; - // 0x8000_0000..0xc000_0000, VRWX_GAD, 1G block + // 0x8000_0000..0xc000_0000, VRWX_GAD, 4G block BOOT_PT_SV39[2] = (0x80000 << 10) | 0xef; + BOOT_PT_SV39[3] = (0xC0000 << 10) | 0xef; + BOOT_PT_SV39[4] = (0x100000 << 10) | 0xef; + BOOT_PT_SV39[5] = (0x140000 << 10) | 0xef; // 0xffff_ffc0_0000_0000..0xffff_ffc0_4000_0000, VRWX_GAD, 1G block BOOT_PT_SV39[0x100] = (0x0 << 10) | 0xef; // 0xffff_ffc0_8000_0000..0xffff_ffc0_c000_0000, VRWX_GAD, 1G block BOOT_PT_SV39[0x102] = (0x80000 << 10) | 0xef; + BOOT_PT_SV39[0x103] = (0xC0000 << 10) | 0xef; + BOOT_PT_SV39[0x104] = (0x100000 << 10) | 0xef; + BOOT_PT_SV39[0x105] = (0x140000 << 10) | 0xef; } } diff --git a/scripts/ostool/qemu-riscv64.toml b/scripts/ostool/qemu-riscv64.toml index 7106493d..5fcd6412 100644 --- a/scripts/ostool/qemu-riscv64.toml +++ b/scripts/ostool/qemu-riscv64.toml @@ -15,7 +15,7 @@ args = [ "-append", "root=/dev/vda rw init=/init", "-m", - "8g", + "4g", ] fail_regex = [] success_regex = [] From 57920b9a73ef38b796bd6d4be405c7c3b8eef7ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=AF=E5=AE=87?= <2537738252@qq.com> Date: Mon, 8 Dec 2025 13:24:58 +0800 Subject: [PATCH 06/22] riscv64: support linux with no irq --- Cargo.lock | 897 +++++++++++----------- Cargo.toml | 15 +- configs/vms/linux-riscv64-qemu-smp1.toml | 70 ++ kernel/src/vmm/images/mod.rs | 8 +- platform/riscv64-qemu-virt/Cargo.toml | 10 +- platform/riscv64-qemu-virt/axconfig.toml | 22 +- platform/riscv64-qemu-virt/src/boot.rs | 4 +- platform/riscv64-qemu-virt/src/console.rs | 69 +- platform/riscv64-qemu-virt/src/init.rs | 3 +- platform/riscv64-qemu-virt/src/irq.rs | 108 ++- platform/riscv64-qemu-virt/src/mem.rs | 2 +- platform/riscv64-qemu-virt/src/power.rs | 7 +- platform/riscv64-qemu-virt/src/time.rs | 24 +- 13 files changed, 702 insertions(+), 537 deletions(-) create mode 100644 configs/vms/linux-riscv64-qemu-smp1.toml diff --git a/Cargo.lock b/Cargo.lock index 6f2a2544..43ae86ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,7 +63,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "version_check", - "zerocopy 0.8.27", + "zerocopy 0.8.28", ] [[package]] @@ -77,9 +77,10 @@ dependencies = [ [[package]] name = "allocator" -version = "0.1.1" -source = "git+https://github.com/arceos-org/allocator.git?tag=v0.1.1#1d5b7a1b4fd8db4c9c9cea4e6012d15d42e2bf40" +version = "0.1.2" +source = "git+https://github.com/arceos-org/allocator.git?tag=v0.1.2#922e72a7e4dfb7ffc4b67d242d38f8361ebd13ac" dependencies = [ + "axerrno 0.1.2", "bitmap-allocator", "cfg-if", "rlsf", @@ -132,22 +133,22 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.10" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -175,12 +176,12 @@ dependencies = [ [[package]] name = "arceos_api" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axalloc", "axconfig", "axdriver", - "axerrno", + "axerrno 0.1.2", "axfeat", "axfs", "axhal", @@ -227,13 +228,12 @@ dependencies = [ [[package]] name = "arm_vcpu" version = "0.1.1" -source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=next#b24cc3635c049302ab8d58d3b54007bb5a053a96" dependencies = [ "aarch64-cpu", "axaddrspace", "axdevice_base", - "axerrno", - "axvcpu 0.1.2", + "axerrno 0.1.2", + "axvcpu", "axvisor_api", "log", "numeric-enum-macro", @@ -251,7 +251,7 @@ dependencies = [ "aarch64_sysreg", "axaddrspace", "axdevice_base", - "axerrno", + "axerrno 0.1.2", "axvisor_api", "bitmaps", "log", @@ -269,7 +269,7 @@ dependencies = [ "aarch64_sysreg", "axaddrspace", "axdevice_base", - "axerrno", + "axerrno 0.1.2", "axvisor_api", "bitmaps", "log", @@ -298,7 +298,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -319,7 +319,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06b129114ab36be728ef11dd6540559c30deb6332378157d22bdc0aae6803a63" dependencies = [ - "axerrno", + "axerrno 0.1.2", "bit_field", "bitflags 2.10.0", "cfg-if", @@ -336,14 +336,26 @@ dependencies = [ [[package]] name = "axalloc" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "allocator", - "axerrno", + "axerrno 0.1.2", "cfg-if", "kspin", "log", "memory_addr", + "strum 0.27.2", +] + +[[package]] +name = "axbacktrace" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf9566516f5d799b2f791a6ec5af57eec87d17624346f7c876fa006b922c99e6" +dependencies = [ + "cfg-if", + "log", + "spin 0.10.0", ] [[package]] @@ -372,12 +384,14 @@ dependencies = [ "axconfig-gen", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "axcpu" version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e09bc1235e3da45e942b50f47812f8397ad84cb490264bf914c65ac44e6f8b1d" dependencies = [ "aarch64-cpu", "cfg-if", @@ -398,11 +412,10 @@ dependencies = [ [[package]] name = "axcpu" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e09bc1235e3da45e942b50f47812f8397ad84cb490264bf914c65ac44e6f8b1d" +version = "0.3.0" dependencies = [ "aarch64-cpu", + "axbacktrace", "cfg-if", "lazyinit", "linkme", @@ -427,7 +440,7 @@ dependencies = [ "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", "axaddrspace", "axdevice_base", - "axerrno", + "axerrno 0.1.2", "axvmconfig", "cfg-if", "log", @@ -443,7 +456,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67c43baf33ed4790ffd3365c4ca027a1e3d1c2b6058f4605b67bca04cadf48d5" dependencies = [ "axaddrspace", - "axerrno", + "axerrno 0.1.2", "axvmconfig", "cfg-if", "memory_addr", @@ -453,10 +466,9 @@ dependencies = [ [[package]] name = "axdisplay" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axdriver", - "axdriver_display", "axsync", "lazyinit", "log", @@ -465,7 +477,7 @@ dependencies = [ [[package]] name = "axdriver" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "arm-gic-driver", "axalloc", @@ -476,30 +488,31 @@ dependencies = [ "axdriver_net", "axdriver_pci", "axdriver_virtio", - "axerrno", + "axerrno 0.1.2", "axhal", - "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1)", + "axklib", + "axmm", "cfg-if", "crate_interface", "dma-api 0.5.2", - "lazyinit", "log", "memory_addr", "rdif-block", "rdif-intc", "rdrive", + "smallvec", "spin 0.10.0", ] [[package]] name = "axdriver_base" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" [[package]] name = "axdriver_block" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" dependencies = [ "axdriver_base", "log", @@ -508,7 +521,7 @@ dependencies = [ [[package]] name = "axdriver_display" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" dependencies = [ "axdriver_base", ] @@ -516,7 +529,7 @@ dependencies = [ [[package]] name = "axdriver_net" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" dependencies = [ "axdriver_base", "log", @@ -526,7 +539,7 @@ dependencies = [ [[package]] name = "axdriver_pci" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" dependencies = [ "virtio-drivers", ] @@ -534,32 +547,44 @@ dependencies = [ [[package]] name = "axdriver_virtio" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" dependencies = [ "axdriver_base", "axdriver_block", + "log", "virtio-drivers", ] [[package]] name = "axerrno" -version = "0.1.0" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a88b1fa2ce97a6ff4ce31ba9fda3065730ca4d77a1ba50dec000fc04f1fb686" +dependencies = [ + "axerrno 0.2.2", + "log", +] + +[[package]] +name = "axerrno" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ccd41dd4ef364e2385901a5c2a3adea974a41eccb2529c1f24e4c8bc93d834" +checksum = "f961d2868582a092fb1e71b90c16cc6f2cbbe7bb5fa7e4bd6fe61d882ce6bb34" dependencies = [ "log", + "strum 0.27.2", ] [[package]] name = "axfeat" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axalloc", + "axbacktrace", "axdriver", "axfs", "axhal", - "axklib-impl", "axlog", "axruntime", "axsync", @@ -570,22 +595,22 @@ dependencies = [ [[package]] name = "axfs" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axdriver", "axdriver_block", - "axerrno", + "axerrno 0.1.2", "axfs_devfs", "axfs_ramfs", "axfs_vfs", "axio", - "axns", "axsync", "cap_access", "cfg-if", "fatfs", "lazyinit", "log", + "scope-local", ] [[package]] @@ -616,7 +641,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcba2006898d7879d456a9c34b9c9460cb536f5bf69d1d5d7d0e0f19f073368d" dependencies = [ - "axerrno", + "axerrno 0.1.2", "bitflags 2.10.0", "log", ] @@ -624,20 +649,18 @@ dependencies = [ [[package]] name = "axhal" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ - "aarch64-cpu", "axalloc", "axconfig", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axlog", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", "axplat-aarch64-qemu-virt", "axplat-loongarch64-qemu-virt", - "axplat-riscv64-qemu-virt 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axplat-riscv64-qemu-virt 0.3.0 (git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03)", "axplat-x86-pc", "cfg-if", - "heapless 0.8.0", + "heapless 0.9.2", "kernel_guard", "lazyinit", "linkme", @@ -650,9 +673,9 @@ dependencies = [ [[package]] name = "axhvc" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axhvc.git#e4ca6f919b9900f35e42b9b30863550a50432220" +source = "git+https://github.com/arceos-hypervisor/axhvc.git#8b07150208803180bffc6187e6373b7ead013054" dependencies = [ - "axerrno", + "axerrno 0.2.2", "numeric-enum-macro", ] @@ -662,13 +685,13 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30aa258a37c25c5e9d3ff45ec80e728ff7c499586e3e40719daf7908f10fd5bd" dependencies = [ - "axerrno", + "axerrno 0.1.2", ] [[package]] name = "axipi" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axconfig", "axhal", @@ -681,39 +704,17 @@ dependencies = [ [[package]] name = "axklib" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" -dependencies = [ - "axerrno", - "memory_addr", - "trait-ffi", -] - -[[package]] -name = "axklib" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axklib#44b5acacc4e2380a97ac9a231a024f4ee42adb06" +source = "git+https://github.com/arceos-hypervisor/axklib.git#7c0fc0588f978f7d75bb94f4e07477776ed37887" dependencies = [ - "axerrno", - "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "axerrno 0.1.2", "memory_addr", "trait-ffi", ] -[[package]] -name = "axklib-impl" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" -dependencies = [ - "axhal", - "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1)", - "axmm", - "trait-ffi", -] - [[package]] name = "axlog" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "cfg-if", "crate_interface", @@ -724,10 +725,11 @@ dependencies = [ [[package]] name = "axmm" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axalloc", - "axerrno", + "axconfig", + "axerrno 0.1.2", "axhal", "kspin", "lazyinit", @@ -739,11 +741,10 @@ dependencies = [ [[package]] name = "axnet" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axdriver", - "axdriver_net", - "axerrno", + "axerrno 0.1.2", "axhal", "axio", "axsync", @@ -755,22 +756,12 @@ dependencies = [ "spin 0.10.0", ] -[[package]] -name = "axns" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" -dependencies = [ - "crate_interface", - "lazyinit", -] - [[package]] name = "axplat" version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4de04c54b63bf2ca1ff202733d2516da49d7779649cdb2f9c4ecf22909e6810" +source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" dependencies = [ - "axplat-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat-macros 0.1.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", "bitflags 2.10.0", "const-str", "crate_interface", @@ -781,16 +772,17 @@ dependencies = [ [[package]] name = "axplat" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +version = "0.3.0" +source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ - "axplat-macros 0.1.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axplat-macros 0.1.0 (git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03)", "bitflags 2.10.0", "const-str", "crate_interface", "handler_table", "kspin", "memory_addr", + "percpu", ] [[package]] @@ -802,8 +794,8 @@ dependencies = [ "any-uart", "arm-gic-driver", "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.2.2", + "axplat 0.2.0", "fdt-parser", "heapless 0.8.0", "lazyinit", @@ -822,16 +814,16 @@ dependencies = [ [[package]] name = "axplat-aarch64-dyn" -version = "0.3.0" -source = "git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn?tag=v0.3.3#de5acd47da8540f46c81e1eef69af65965404dbd" +version = "0.4.0" +source = "git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn.git?tag=v0.4.0#05d5acd43d925807496255a9b9e1aa2d272bb591" dependencies = [ "aarch64-cpu", "aarch64-cpu-ext", "any-uart", "arm-gic-driver", "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", "fdt-parser", "heapless 0.8.0", "lazyinit", @@ -850,15 +842,15 @@ dependencies = [ [[package]] name = "axplat-aarch64-peripherals" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +version = "0.3.0" +source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "aarch64-cpu", "arm-gic-driver", "arm_pl011", "arm_pl031", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", "int_ratio", "kspin", "lazyinit", @@ -869,12 +861,12 @@ dependencies = [ [[package]] name = "axplat-aarch64-qemu-virt" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +version = "0.3.0" +source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", "axplat-aarch64-peripherals", "log", "page_table_entry", @@ -882,29 +874,28 @@ dependencies = [ [[package]] name = "axplat-loongarch64-qemu-virt" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +version = "0.3.0" +source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", "kspin", "lazyinit", "log", "loongArch64", - "ns16550a", "page_table_entry", + "uart_16550", ] [[package]] name = "axplat-macros" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90dfaee06a112fe4f810c60af1a86bc080af2172185b491cacc307b84dff748" +source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -914,43 +905,51 @@ source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0# dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "axplat-riscv64-qemu-virt" -version = "0.2.0" +version = "0.3.0" dependencies = [ "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", + "kspin", + "lazyinit", "log", "riscv 0.15.0", "riscv_goldfish", + "riscv_plic", "sbi-rt", + "uart_16550", ] [[package]] name = "axplat-riscv64-qemu-virt" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +version = "0.3.0" +source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", + "kspin", + "lazyinit", "log", "riscv 0.14.0", + "riscv_plic", "sbi-rt", + "uart_16550", ] [[package]] name = "axplat-x86-pc" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" +version = "0.3.0" +source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", "bitflags 2.10.0", "heapless 0.9.2", "int_ratio", @@ -971,8 +970,8 @@ name = "axplat-x86-qemu-q35" version = "0.1.0" dependencies = [ "axconfig-macros", - "axcpu 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", + "axcpu 0.3.0", + "axplat 0.3.0", "bitflags 2.10.0", "heapless 0.9.2", "int_ratio", @@ -989,6 +988,17 @@ dependencies = [ "x86_rtc", ] +[[package]] +name = "axpoll" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d06a0cf7cffe0e87c338f41d59bd0a05fa75cf9c4799b4107fa0fc6cf27d8d23" +dependencies = [ + "bitflags 2.10.0", + "linux-raw-sys 0.11.0", + "spin 0.10.0", +] + [[package]] name = "axruntime" version = "0.1.0" @@ -997,16 +1007,16 @@ dependencies = [ "axconfig", "axdisplay", "axdriver", - "axerrno", + "axerrno 0.1.2", "axfs", "axhal", "axipi", "axlog", "axmm", "axnet", - "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", - "axplat-aarch64-dyn 0.3.0 (git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn?tag=v0.3.3)", - "axplat-riscv64-qemu-virt 0.2.0", + "axplat 0.3.0", + "axplat-aarch64-dyn 0.4.0", + "axplat-riscv64-qemu-virt 0.3.0", "axplat-x86-qemu-q35", "axtask", "cfg-if", @@ -1030,10 +1040,10 @@ dependencies = [ [[package]] name = "axstd" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "arceos_api", - "axerrno", + "axerrno 0.1.2", "axfeat", "axio", "kspin", @@ -1043,9 +1053,10 @@ dependencies = [ [[package]] name = "axsync" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axtask", + "event-listener", "kspin", "lock_api", ] @@ -1053,37 +1064,41 @@ dependencies = [ [[package]] name = "axtask" version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.4.1#781fd8e99456c531568ccdc906312e7ef98d2fbf" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axconfig", + "axerrno 0.1.2", "axhal", + "axpoll", "axsched", "cfg-if", "cpumask", "crate_interface", + "event-listener", + "extern-trait", + "futures-util", "kernel_guard", "kspin", "lazyinit", "log", "memory_addr", "percpu", - "timer_list", ] [[package]] name = "axum" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18ed336352031311f4e0b4dd2ff392d4fbb370777c9d18d7fc9d7359f73871" +checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" dependencies = [ "axum-core", "bytes", "form_urlencoded", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.0", + "hyper 1.8.1", "hyper-util", "itoa", "matchit", @@ -1111,7 +1126,7 @@ checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" dependencies = [ "bytes", "futures-core", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", "mime", @@ -1122,24 +1137,12 @@ dependencies = [ "tracing", ] -[[package]] -name = "axvcpu" -version = "0.1.1" -dependencies = [ - "axaddrspace", - "axerrno", - "axvisor_api", - "memory_addr", - "percpu", -] - [[package]] name = "axvcpu" version = "0.1.2" -source = "git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next#343ec3ccf99a86fb9c67a7b0372e9b7a745f0640" dependencies = [ "axaddrspace", - "axerrno", + "axerrno 0.1.2", "axvisor_api", "memory_addr", "percpu", @@ -1156,19 +1159,20 @@ dependencies = [ "axconfig", "axdevice", "axdevice_base", - "axerrno", + "axerrno 0.2.2", "axhvc", "axruntime", "axstd", - "axvcpu 0.1.1", + "axvcpu", "axvisor_api", - "axvm 0.1.0 (git+https://github.com/liulog/axvm.git?branch=next)", + "axvm", "bitflags 2.10.0", "byte-unit", "cfg-if", "cpumask", "crate_interface", "driver", + "extern-trait", "fdt-parser", "kernel_guard", "kspin", @@ -1184,7 +1188,7 @@ dependencies = [ "rdif-intc", "rdrive", "spin 0.9.8", - "syn 2.0.110", + "syn 2.0.111", "timer_list", "toml 0.9.8", "vm-fdt 0.3.0 (git+https://github.com/bullhh/vm-fdt.git)", @@ -1211,45 +1215,20 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.110", -] - -[[package]] -name = "axvm" -version = "0.1.0" -dependencies = [ - "arm_vcpu", - "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "axaddrspace", - "axdevice", - "axdevice_base", - "axerrno", - "axvcpu 0.1.1", - "axvmconfig", - "cfg-if", - "cpumask", - "log", - "memory_addr", - "page_table_entry", - "page_table_multiarch", - "percpu", - "riscv_vcpu 0.1.2 (git+https://github.com/liulog/riscv_vcpu.git?branch=master)", - "spin 0.9.8", - "x86_vcpu", + "syn 2.0.111", ] [[package]] name = "axvm" version = "0.1.0" -source = "git+https://github.com/liulog/axvm.git?branch=next#22ca8ff823b1433c6f2f15bc99810fe0b4a2ccac" dependencies = [ "arm_vcpu", "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "axaddrspace", "axdevice", "axdevice_base", - "axerrno", - "axvcpu 0.1.1", + "axerrno 0.2.2", + "axvcpu", "axvmconfig", "cfg-if", "cpumask", @@ -1258,7 +1237,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "riscv_vcpu 0.1.2 (git+https://github.com/liulog/riscv_vcpu.git?branch=master)", + "riscv_vcpu", "spin 0.9.8", "x86_vcpu", ] @@ -1268,7 +1247,7 @@ name = "axvmconfig" version = "0.1.0" source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=next#5a8b64a47510b17da71e54cabbdf8c999ba2e2c9" dependencies = [ - "axerrno", + "axerrno 0.1.2", "clap", "enumerable", "env_logger", @@ -1291,7 +1270,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -1308,7 +1287,7 @@ checksum = "e585a01076fee271c5aabcf36212acb349fb3e638561d842fffa8ca013f4fdd8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1405,9 +1384,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" dependencies = [ "borsh-derive", "cfg_aliases", @@ -1415,15 +1394,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" +checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1434,11 +1413,12 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byte-unit" -version = "5.1.6" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cd29c3c585209b0cbc7309bfe3ed7efd8c84c21b7af29c8bfae908f8777174" +checksum = "8c6d47a4e2961fb8721bcfc54feae6455f2f64e7054f9bc67e875f0e77f4c58d" dependencies = [ "rust_decimal", + "schemars", "serde", "utf8-width", ] @@ -1479,9 +1459,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "camino" @@ -1581,9 +1561,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.45" +version = "1.2.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" +checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a" dependencies = [ "find-msvc-tools", "shlex", @@ -1611,14 +1591,14 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-link 0.2.1", + "windows-link", ] [[package]] name = "clap" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -1626,9 +1606,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -1645,7 +1625,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1683,6 +1663,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "console" version = "0.16.1" @@ -1708,6 +1697,12 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451d0640545a0553814b4c646eb549343561618838e9b42495f466131fe3ad49" +[[package]] +name = "const_fn" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" + [[package]] name = "convert_case" version = "0.7.1" @@ -1738,9 +1733,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", @@ -1778,14 +1773,14 @@ checksum = "70272a03a2cef15589bac05d3d15c023752f5f8f2da8be977d983a9d9e6250fb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "crc" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" dependencies = [ "crc-catalog", ] @@ -1896,7 +1891,7 @@ checksum = "9a49d5cd78b1c748184d41407b14a58af8403c13328ff2b9f49b0a418c24e3ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1981,7 +1976,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1994,7 +1989,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2005,7 +2000,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2016,7 +2011,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2048,7 +2043,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2087,7 +2082,7 @@ dependencies = [ "convert_case 0.7.1", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2114,7 +2109,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2157,7 +2152,7 @@ dependencies = [ name = "driver" version = "0.1.0" dependencies = [ - "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/axklib)", + "axklib", "log", "phytium-mci", "rdif-block", @@ -2230,7 +2225,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2242,7 +2237,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2263,7 +2258,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2274,7 +2269,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2295,7 +2290,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2348,6 +2343,27 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "pin-project-lite", +] + +[[package]] +name = "extern-trait" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba8f5038f5845165d06fe1453fe4130ad546d3314818bbda57e208e7b0cffe08" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -2383,9 +2399,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "fitimage" @@ -2515,7 +2531,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2621,7 +2637,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.3.1", + "http 1.4.0", "indexmap", "slab", "tokio", @@ -2676,9 +2692,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heapless" @@ -2725,12 +2741,11 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -2752,7 +2767,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.3.1", + "http 1.4.0", ] [[package]] @@ -2763,7 +2778,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "pin-project-lite", ] @@ -2812,16 +2827,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1744436df46f0bde35af3eda22aeaba453aada65d8f1c171cd8a5f59030bd69f" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", "h2 0.4.12", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "httparse", "httpdate", @@ -2839,8 +2854,8 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.3.1", - "hyper 1.8.0", + "http 1.4.0", + "hyper 1.8.1", "hyper-util", "rustls", "rustls-pki-types", @@ -2871,7 +2886,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.8.0", + "hyper 1.8.1", "hyper-util", "native-tls", "tokio", @@ -2881,18 +2896,18 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", - "hyper 1.8.0", + "hyper 1.8.1", "ipnet", "libc", "percent-encoding", @@ -3039,12 +3054,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", ] [[package]] @@ -3071,15 +3086,15 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435d80800b936787d62688c927b6490e887c7ef5ff9ce922c6c6050fca75eb9a" +checksum = "6778b0196eefee7df739db78758e5cf9b37412268bfa5650bfeed028aed20d9c" dependencies = [ "darling 0.20.11", "indoc", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3156,7 +3171,7 @@ checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3184,9 +3199,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.82" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", @@ -3201,7 +3216,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3213,7 +3228,7 @@ dependencies = [ "bitflags 2.10.0", "prettyplease", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3351,7 +3366,7 @@ checksum = "e5cec0ec4228b4853bb129c84dbf093a27e6c7a20526da046defc334a1b017f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3478,16 +3493,17 @@ dependencies = [ [[package]] name = "memory_addr" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d4054cba279515fa87761b101d857333ce06391dbe8f18a11347204a7111416" +checksum = "b1f0625c50adb5f6aaf47f05cae3c4dbc13a74c659241b06c4576f3d7e1da940" [[package]] name = "memory_set" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d47cbc25a4d00427f9070fd768eaf907f19c903fb72b547b19db2d56b9408e" +checksum = "50a49ecd4114cf87f7e442ec5dd03bd590e7094541f987057310dbb32a6341ad" dependencies = [ + "axerrno 0.1.2", "memory_addr", ] @@ -3588,12 +3604,6 @@ dependencies = [ name = "nop" version = "0.1.0" -[[package]] -name = "ns16550a" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3cd8abe9e54bce27659507b94f355c9334378ab15da332b6986b3583ebf7228" - [[package]] name = "num" version = "0.4.3" @@ -3728,7 +3738,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3760,9 +3770,9 @@ dependencies = [ [[package]] name = "ostool" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1f90223d51db91747d032ef49378e725a6e42a3d53da62c246abc73fe35cb7" +checksum = "e7c843408786c18af02d88ba7de7d25f4ff94a137b238a43ce1653c7eceb4b7b" dependencies = [ "anyhow", "byte-unit", @@ -3809,9 +3819,9 @@ dependencies = [ [[package]] name = "page_table_entry" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba811ef8ca8fb33d776e128624cb4fe25c9804cab96f83b822d4322431e6dd5a" +checksum = "dda9891ec368fda90e4b2cc36592b4881073e25a339fe7e3eddd811f0cf6bf18" dependencies = [ "aarch64-cpu", "bitflags 2.10.0", @@ -3821,11 +3831,10 @@ dependencies = [ [[package]] name = "page_table_multiarch" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cb76e21ce462270afd83b331599d5b83f876c2a98c0a70382b20d73e1da6be" +checksum = "9fa11a21844255e14aa6688ef0eafb058d7be19338633024fb59417f1bfb07f8" dependencies = [ - "bitmaps", "log", "memory_addr", "page_table_entry", @@ -3853,7 +3862,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -3913,7 +3922,7 @@ checksum = "8a9f4cc54a2e471ff72f1499461ba381ad4eae9cbd60d29c258545b995e406e0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3962,7 +3971,7 @@ dependencies = [ "prettyplease", "quote", "spin 0.10.0", - "syn 2.0.110", + "syn 2.0.111", "thiserror 2.0.17", ] @@ -3975,7 +3984,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4032,7 +4041,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.27", + "zerocopy 0.8.28", ] [[package]] @@ -4042,7 +4051,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4073,7 +4082,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4162,9 +4171,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -4260,7 +4269,7 @@ dependencies = [ "itertools", "lru", "paste", - "strum", + "strum 0.26.3", "unicode-segmentation", "unicode-truncate", "unicode-width 0.2.0", @@ -4376,7 +4385,7 @@ checksum = "eab3105c9af32e901a2adc7d920b39ff8b6ee0f6f0b7dfdeaf18f306ec12606f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4405,7 +4414,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4515,10 +4524,10 @@ dependencies = [ "futures-core", "futures-util", "h2 0.4.12", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.0", + "hyper 1.8.1", "hyper-rustls", "hyper-tls 0.6.0", "hyper-util", @@ -4572,20 +4581,19 @@ dependencies = [ "embedded-hal", "paste", "riscv-macros 0.2.0", - "riscv-pac", + "riscv-pac 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "riscv" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05cfa3f7b30c84536a9025150d44d26b8e1cc20ddf436448d74cd9591eefb25" +source = "git+https://github.com/liulog/riscv.git?branch=master#9722c430a2f624c35f4be64ba36c6a64e4f1096a" dependencies = [ "critical-section", "embedded-hal", "paste", "riscv-macros 0.3.0", - "riscv-pac", + "riscv-pac 0.2.0 (git+https://github.com/liulog/riscv.git?branch=master)", ] [[package]] @@ -4615,18 +4623,17 @@ checksum = "e8c4aa1ea1af6dcc83a61be12e8189f9b293c3ba5a487778a4cd89fb060fdbbc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "riscv-macros" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d323d13972c1b104aa036bc692cd08b822c8bbf23d79a27c526095856499799" +source = "git+https://github.com/liulog/riscv.git?branch=master#9722c430a2f624c35f4be64ba36c6a64e4f1096a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4635,6 +4642,11 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436" +[[package]] +name = "riscv-pac" +version = "0.2.0" +source = "git+https://github.com/liulog/riscv.git?branch=master#9722c430a2f624c35f4be64ba36c6a64e4f1096a" + [[package]] name = "riscv_goldfish" version = "0.1.1" @@ -4642,38 +4654,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07aac72f95e774476db82916d79f2d303191310393830573c1ab5c821b21660a" [[package]] -name = "riscv_vcpu" -version = "0.1.2" +name = "riscv_plic" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e701d1c6ea06c35a19cb80d213fab87d264798f9bac0aed2730c0e86d297394a" dependencies = [ - "axaddrspace", - "axerrno", - "axvcpu 0.1.1", - "axvisor_api", - "bit_field", - "bitflags 2.10.0", - "cfg-if", - "crate_interface", - "log", - "memoffset", - "memory_addr", - "page_table_entry", - "riscv 0.15.0", - "riscv-decode", - "riscv-h", - "rustsbi", - "sbi-rt", - "sbi-spec", - "tock-registers 0.9.0", + "tock-registers 0.10.1", ] [[package]] name = "riscv_vcpu" version = "0.1.2" -source = "git+https://github.com/liulog/riscv_vcpu.git?branch=master#6a82b377ce526d927e48ffde90f245c6a558a841" dependencies = [ "axaddrspace", - "axerrno", - "axvcpu 0.1.1", + "axerrno 0.1.2", + "axvcpu", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -4683,7 +4678,7 @@ dependencies = [ "memoffset", "memory_addr", "page_table_entry", - "riscv 0.14.0", + "riscv 0.15.0", "riscv-decode", "riscv-h", "rustsbi", @@ -4758,8 +4753,8 @@ dependencies = [ [[package]] name = "rockchip-pm" -version = "0.2.0" -source = "git+https://github.com/drivercraft/rockchip-pm.git#cb2afdf9f3cb5fd05f8e003e65de38e50d480cd5" +version = "0.4.0" +source = "git+https://github.com/drivercraft/rockchip-pm.git#5bb4dfbfcea41826e13115efb4023d670ef6b034" dependencies = [ "bare-test-macros", "dma-api 0.5.2", @@ -4849,9 +4844,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" +checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" dependencies = [ "web-time", "zeroize", @@ -4887,7 +4882,7 @@ checksum = "a71347da9582cc6b6f3652c7d2c06516c9555690b3738ecdff7e84297f4e17fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4957,7 +4952,17 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.110", + "syn 2.0.111", +] + +[[package]] +name = "scope-local" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "231e441739fbe668e91acf8440a0b1ac83c73faec7a6d984190ee25354c2ec9a" +dependencies = [ + "percpu", + "spin 0.9.8", ] [[package]] @@ -5073,7 +5078,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5084,7 +5089,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5119,7 +5124,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5154,22 +5159,21 @@ dependencies = [ [[package]] name = "serialport" -version = "4.8.1" +version = "4.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f60a586160667241d7702c420fc223939fb3c0bb8d3fac84f78768e8970dee" +checksum = "2acaf3f973e8616d7ceac415f53fc60e190b2a686fbcf8d27d0256c741c5007b" dependencies = [ "bitflags 2.10.0", "cfg-if", - "core-foundation 0.10.0", + "core-foundation 0.10.1", "core-foundation-sys", "io-kit-sys", "libudev", "mach2", "nix", - "quote", "scopeguard", "unescaper", - "windows-sys 0.52.0", + "winapi", ] [[package]] @@ -5223,9 +5227,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" dependencies = [ "libc", ] @@ -5299,9 +5303,9 @@ dependencies = [ [[package]] name = "somehal" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9b180e1abae1127bd99ecee566c3906d8c0f854cb1c442b945afe911e6eb71" +checksum = "13b5f763b9ab0ce9efd2d8eba9e5b457f93f6426ede68435fe9567cf7681f29d" dependencies = [ "aarch64-cpu", "aarch64-cpu-ext", @@ -5377,7 +5381,16 @@ version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros", + "strum_macros 0.26.4", +] + +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros 0.27.2", ] [[package]] @@ -5390,7 +5403,19 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.110", + "syn 2.0.111", +] + +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] @@ -5425,9 +5450,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.110" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -5457,7 +5482,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5534,9 +5559,9 @@ dependencies = [ [[package]] name = "tftpd" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbee6dbf19d025600720ce174a82b10895e486179e0206b91f14b6fcf6cb4bf" +checksum = "dee6f92408c23beea910b60784f6dc323b488c477bf6fa88aff8083675eda26c" [[package]] name = "thiserror" @@ -5564,7 +5589,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5575,7 +5600,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5685,7 +5710,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5831,15 +5856,15 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456" dependencies = [ "bitflags 2.10.0", "bytes", "futures-core", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", "http-range-header", @@ -5871,9 +5896,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" dependencies = [ "log", "pin-project-lite", @@ -5882,9 +5907,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" dependencies = [ "once_cell", ] @@ -5899,7 +5924,7 @@ dependencies = [ "lenient_semver", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6005,9 +6030,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unit-prefix" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" [[package]] name = "untrusted" @@ -6034,12 +6059,12 @@ dependencies = [ [[package]] name = "ureq-proto" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b4531c118335662134346048ddb0e54cc86bd7e81866757873055f0e38f5d2" +checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" dependencies = [ "base64 0.22.1", - "http 1.3.1", + "http 1.4.0", "httparse", "log", ] @@ -6064,9 +6089,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8-width" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091" [[package]] name = "utf8_iter" @@ -6160,9 +6185,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", @@ -6173,9 +6198,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.55" +version = "0.4.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" dependencies = [ "cfg-if", "js-sys", @@ -6186,9 +6211,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6196,31 +6221,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.82" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" dependencies = [ "js-sys", "wasm-bindgen", @@ -6275,9 +6300,9 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link 0.2.1", - "windows-result 0.4.1", - "windows-strings 0.5.1", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] @@ -6288,7 +6313,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6299,15 +6324,9 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - [[package]] name = "windows-link" version = "0.2.1" @@ -6316,22 +6335,13 @@ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-registry" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" -dependencies = [ - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-result" -version = "0.3.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ - "windows-link 0.1.3", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] @@ -6340,16 +6350,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link 0.2.1", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] @@ -6358,7 +6359,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -6403,7 +6404,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -6443,7 +6444,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.2.1", + "windows-link", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -6594,9 +6595,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] @@ -6658,12 +6659,13 @@ dependencies = [ [[package]] name = "x86_64" -version = "0.15.2" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f042214de98141e9c8706e8192b73f56494087cc55ebec28ce10f26c5c364ae" +checksum = "f7841fa0098ceb15c567d93d3fae292c49e10a7662b4936d5f6a9728594555ba" dependencies = [ "bit_field", "bitflags 2.10.0", + "const_fn", "rustversion", "volatile", ] @@ -6686,8 +6688,8 @@ checksum = "873e097d52e94c31be3f0175a9f8d6f2edbc77d7e2f8e6995427df9c08b30a2b" dependencies = [ "axaddrspace", "axdevice_base", - "axerrno", - "axvcpu 0.1.1", + "axerrno 0.1.2", + "axvcpu", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -6713,7 +6715,7 @@ checksum = "2556c62649a277ccf1c3c34c740be87bbde5f8dab0b20fcdcf4c2cd7bb6e7302" dependencies = [ "axaddrspace", "axdevice_base", - "axerrno", + "axerrno 0.1.2", "axvisor_api", "bit", "log", @@ -6748,6 +6750,7 @@ dependencies = [ "chrono", "clap", "colored", + "flate2", "jkconfig", "ostool", "reqwest 0.12.24", @@ -6755,8 +6758,10 @@ dependencies = [ "serde", "serde_json", "sha2", + "tar", "tokio", "toml 0.9.8", + "zerocopy 0.8.28", ] [[package]] @@ -6778,7 +6783,7 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "synstructure", ] @@ -6794,11 +6799,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "43fa6694ed34d6e57407afbccdeecfa268c470a7d2a5b0cf49ce9fcc345afb90" dependencies = [ - "zerocopy-derive 0.8.27", + "zerocopy-derive 0.8.28", ] [[package]] @@ -6809,18 +6814,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "c640b22cd9817fae95be82f0d2f90b11f7605f6c319d16705c459b27ac2cbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6840,7 +6845,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "synstructure", ] @@ -6880,5 +6885,5 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] diff --git a/Cargo.toml b/Cargo.toml index 5d03514b..8256b292 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ axklib = {git = "https://github.com/arceos-hypervisor/axklib.git"} axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} axvcpu = "0.1" -axvm = {git = "https://github.com/liulog/axvm.git", branch = "next"} +axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "next"} # System independent crates provided by ArceOS, these crates could be imported by remote url. axerrno = "0.2" @@ -92,8 +92,21 @@ axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branc [patch.crates-io] axvcpu = {path="crates/axvcpu"} axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} +riscv = {git = "https://github.com/liulog/riscv.git", branch = "master"} [patch."https://github.com/arceos-org/arceos"] axconfig = {path = "modules/axconfig"} axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} + +[patch."https://github.com/arceos-hypervisor/arm_vcpu.git"] +arm_vcpu = {path = "crates/arm_vcpu"} + +[patch."https://github.com/arceos-hypervisor/axvm.git"] +axvm = {path = "crates/axvm"} + +[patch."https://github.com/liulog/riscv_vcpu.git"] +riscv_vcpu = {path = "crates/riscv_vcpu"} + +[patch."https://github.com/arceos-org/axcpu.git"] +axcpu = {path = "crates/axcpu"} diff --git a/configs/vms/linux-riscv64-qemu-smp1.toml b/configs/vms/linux-riscv64-qemu-smp1.toml new file mode 100644 index 00000000..e849a54d --- /dev/null +++ b/configs/vms/linux-riscv64-qemu-smp1.toml @@ -0,0 +1,70 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "linux-qemu" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 1 +# Guest vm physical cpu sets. +phys_cpu_ids = [0] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x8020_0000 +# The location of image: "memory" | "fs". +# load from memory. +image_location = "memory" +# The file path of the kernel image. +# kernel_path = "linux-6.6.62.bin" +kernel_path = "tmp/Image" +# The load address of the kernel image. +kernel_load_addr = 0x8020_0000 +# The file path of the device tree blob (DTB). +#dtb_path = "tmp/linux-aarch64-qemu-smp1.dtb" +# The load address of the device tree blob (DTB). +dtb_load_addr = 0x8000_0000 + +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x8000_0000, 0x1000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] + +# +# Device specifications +# +[devices] +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Passthrough addresses. +# Base-GPA Length. +passthrough_addresses = [ + #[0x28041000, 0x100_0000] +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] + +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [ + # ["gppt-gicd", 0x0800_0000, 0x1_0000, 0, 0x21, []], + # ["gppt-gicr", 0x080a_0000, 0x2_0000, 0, 0x20, [1, 0x2_0000, 0]], # 1 vcpu, stride 0x20000, starts with pcpu 0 + # ["gppt-gits", 0x0808_0000, 0x2_0000, 0, 0x22, [0x0808_0000]], # host_gits_base +] + +interrupt_mode = "passthrough" diff --git a/kernel/src/vmm/images/mod.rs b/kernel/src/vmm/images/mod.rs index 23addd73..612871a0 100644 --- a/kernel/src/vmm/images/mod.rs +++ b/kernel/src/vmm/images/mod.rs @@ -111,7 +111,13 @@ impl ImageLoader { self.vm.clone(), ); } else { - info!("dtb_load_gpa not provided"); + if let Some(buffer) = vm_imags.dtb { + #[cfg(target_arch = "riscv64")] + load_vm_image_from_memory(buffer, self.dtb_load_gpa.unwrap(), self.vm.clone()) + .expect("Failed to load DTB images"); + } else { + info!("dtb_load_gpa not provided"); + } } // Load BIOS image diff --git a/platform/riscv64-qemu-virt/Cargo.toml b/platform/riscv64-qemu-virt/Cargo.toml index 2b9b866c..b1f33817 100644 --- a/platform/riscv64-qemu-virt/Cargo.toml +++ b/platform/riscv64-qemu-virt/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2024" name = "axplat-riscv64-qemu-virt" -version = "0.2.0" +version = "0.3.0" [features] default = [ @@ -14,13 +14,17 @@ rtc = ["riscv_goldfish"] smp = ["axplat/smp"] [dependencies] +kspin = "0.1" +lazyinit = "0.2" log = "0.4" riscv = "0.15.0" -sbi-rt = { version = "0.0.3", features = ["legacy"] } riscv_goldfish = { version = "0.1", optional = true } +riscv_plic = "0.2" +sbi-rt = { version = "0.0.3", features = ["legacy"] } +uart_16550 = "0.4.0" axconfig-macros = "0.2" -axcpu = "0.2" +axcpu = { workspace = true } axplat = { workspace = true } [package.metadata.docs.rs] diff --git a/platform/riscv64-qemu-virt/axconfig.toml b/platform/riscv64-qemu-virt/axconfig.toml index ba0e4dbd..f541767c 100644 --- a/platform/riscv64-qemu-virt/axconfig.toml +++ b/platform/riscv64-qemu-virt/axconfig.toml @@ -81,4 +81,24 @@ ipi-irq = "0x8000_0000_0000_0001" # uint # compatible = "google,goldfish-rtc"; # }; # RTC (goldfish) Address -rtc-paddr = 0x10_1000 # uint \ No newline at end of file +rtc-paddr = 0x10_1000 # uint + +# plic@c000000 { +# phandle = <0x03>; +# riscv,ndev = <0x5f>; +# reg = <0x00 0xc000000 0x00 0x600000>; +# interrupts-extended = <0x02 0x0b 0x02 0x09>; +# interrupt-controller; +# compatible = "sifive,plic-1.0.0\0riscv,plic0"; +# }; +plic-paddr = 0x0c00_0000 # uint + +# serial@10000000 { +# interrupts = <0x0a>; +# interrupt-parent = <0x03>; +# clock-frequency = "\08@"; +# reg = <0x00 0x10000000 0x00 0x100>; +# compatible = "ns16550a"; +# }; +uart-paddr = 0x1000_0000 # uint +uart-irq = 0x0a # uint \ No newline at end of file diff --git a/platform/riscv64-qemu-virt/src/boot.rs b/platform/riscv64-qemu-virt/src/boot.rs index 45bc437a..12a7fc47 100644 --- a/platform/riscv64-qemu-virt/src/boot.rs +++ b/platform/riscv64-qemu-virt/src/boot.rs @@ -73,9 +73,7 @@ unsafe extern "C" fn _start() -> ! { /// The earliest entry point for secondary CPUs. #[cfg(feature = "smp")] #[unsafe(naked)] -#[unsafe(no_mangle)] -#[unsafe(link_section = ".text.boot")] -unsafe extern "C" fn _start_secondary() -> ! { +pub(crate) unsafe extern "C" fn _start_secondary() -> ! { // a0 = hartid // a1 = SP core::arch::naked_asm!(" diff --git a/platform/riscv64-qemu-virt/src/console.rs b/platform/riscv64-qemu-virt/src/console.rs index 7c305a8b..63f4799a 100644 --- a/platform/riscv64-qemu-virt/src/console.rs +++ b/platform/riscv64-qemu-virt/src/console.rs @@ -1,22 +1,19 @@ -use axplat::mem::{VirtAddr, virt_to_phys}; +use axplat::console::ConsoleIf; +use kspin::SpinNoIrq; +use lazyinit::LazyInit; +use uart_16550::MmioSerialPort; -/// The maximum number of bytes that can be read at once. -const MAX_RW_SIZE: usize = 256; +use crate::config::{devices::UART_PADDR, plat::PHYS_VIRT_OFFSET}; -/// Tries to write bytes to the console from input u8 slice. -/// Returns the number of bytes written. -fn try_write_bytes(bytes: &[u8]) -> usize { - sbi_rt::console_write(sbi_rt::Physical::new( - // A maximum of 256 bytes can be written at a time - // to prevent SBI from disabling IRQs for too long. - bytes.len().min(MAX_RW_SIZE), - virt_to_phys(VirtAddr::from_ptr_of(bytes.as_ptr())).as_usize(), - 0, - )) - .value -} +static UART: LazyInit> = LazyInit::new(); -use axplat::console::ConsoleIf; +pub(crate) fn init_early() { + UART.init_once({ + let mut uart = unsafe { MmioSerialPort::new(UART_PADDR + PHYS_VIRT_OFFSET) }; + uart.init(); + SpinNoIrq::new(uart) + }); +} struct ConsoleIfImpl; @@ -24,28 +21,34 @@ struct ConsoleIfImpl; impl ConsoleIf for ConsoleIfImpl { /// Writes bytes to the console from input u8 slice. fn write_bytes(bytes: &[u8]) { - let mut write_len = 0; - let mut buf = [0; MAX_RW_SIZE]; - while write_len < bytes.len() { - let n = buf.len().min(bytes.len() - write_len); - if n == 0 { - break; + for &c in bytes { + let mut uart = UART.lock(); + match c { + b'\n' => { + uart.send_raw(b'\r'); + uart.send_raw(b'\n'); + } + c => uart.send_raw(c), } - // `bytes` can be from user space, copy it into a kernel buffer - // to correctly use `virt_to_phys`. - buf[..n].copy_from_slice(&bytes[write_len..write_len + n]); - write_len += try_write_bytes(&buf[..n]); } } /// Reads bytes from the console into the given mutable slice. /// Returns the number of bytes read. fn read_bytes(bytes: &mut [u8]) -> usize { - sbi_rt::console_read(sbi_rt::Physical::new( - bytes.len().min(MAX_RW_SIZE), - virt_to_phys(VirtAddr::from_mut_ptr_of(bytes.as_mut_ptr())).as_usize(), - 0, - )) - .value + let mut uart = UART.lock(); + for (i, byte) in bytes.iter_mut().enumerate() { + match uart.try_receive() { + Ok(c) => *byte = c, + Err(_) => return i, + } + } + bytes.len() } -} + + /// Returns the IRQ number for the console, if applicable. + #[cfg(feature = "irq")] + fn irq_num() -> Option { + Some(crate::config::devices::UART_IRQ) + } +} \ No newline at end of file diff --git a/platform/riscv64-qemu-virt/src/init.rs b/platform/riscv64-qemu-virt/src/init.rs index 7090f415..3f191049 100644 --- a/platform/riscv64-qemu-virt/src/init.rs +++ b/platform/riscv64-qemu-virt/src/init.rs @@ -9,6 +9,7 @@ impl InitIf for InitIfImpl { /// early console, clocking). fn init_early(_cpu_id: usize, _mbi: usize) { axcpu::init::init_trap(); + crate::console::init_early(); crate::time::init_early(); } @@ -36,4 +37,4 @@ impl InitIf for InitIfImpl { crate::irq::init_percpu(); crate::time::init_percpu(); } -} +} \ No newline at end of file diff --git a/platform/riscv64-qemu-virt/src/irq.rs b/platform/riscv64-qemu-virt/src/irq.rs index 250c4c85..9350f270 100644 --- a/platform/riscv64-qemu-virt/src/irq.rs +++ b/platform/riscv64-qemu-virt/src/irq.rs @@ -1,10 +1,20 @@ -//! TODO: PLIC - -use axplat::irq::{HandlerTable, IpiTarget, IrqHandler, IrqIf}; -use core::sync::atomic::{AtomicPtr, Ordering}; +use core::{ + num::NonZeroU32, + ptr::NonNull, + sync::atomic::{AtomicPtr, Ordering}, +}; + +use axplat::{ + irq::{HandlerTable, IpiTarget, IrqHandler, IrqIf}, + percpu::this_cpu_id, +}; +use kspin::SpinNoIrq; use riscv::register::sie; +use riscv_plic::Plic; use sbi_rt::HartMask; +use crate::config::{devices::PLIC_PADDR, plat::PHYS_VIRT_OFFSET}; + /// `Interrupt` bit in `scause` pub(super) const INTC_IRQ_BASE: usize = 1 << (usize::BITS - 1); @@ -27,6 +37,25 @@ pub const MAX_IRQ_COUNT: usize = 1024; static IRQ_HANDLER_TABLE: HandlerTable = HandlerTable::new(); +static PLIC: SpinNoIrq = SpinNoIrq::new(unsafe { + Plic::new(NonNull::new((PHYS_VIRT_OFFSET + PLIC_PADDR) as *mut _).unwrap()) +}); + +fn this_context() -> usize { + let hart_id = this_cpu_id(); + hart_id * 2 + 1 // supervisor context +} + +pub(super) fn init_percpu() { + // enable soft interrupts, timer interrupts, and external interrupts + unsafe { + sie::set_ssoft(); + sie::set_stimer(); + sie::set_sext(); + } + PLIC.lock().init_by_context(this_context()); +} + macro_rules! with_cause { ($cause: expr, @S_TIMER => $timer_op: expr, @S_SOFT => $ipi_op: expr, @S_EXT => $ext_op: expr, @EX_IRQ => $plic_op: expr $(,)?) => { match $cause { @@ -39,30 +68,46 @@ macro_rules! with_cause { $plic_op } else { // Other CPU-side interrupts - panic!("Unknown IRQ cause: {}", other); + panic!("Unknown IRQ cause: {other}"); } } } }; } -pub(super) fn init_percpu() { - // enable soft interrupts, timer interrupts, and external interrupts - unsafe { - sie::set_ssoft(); - sie::set_stimer(); - sie::set_sext(); - } -} - struct IrqIfImpl; #[impl_plat_interface] impl IrqIf for IrqIfImpl { /// Enables or disables the given IRQ. - fn set_enable(irq: usize, _enabled: bool) { - // TODO: set enable in PLIC - warn!("set_enable is not implemented for IRQ {}", irq); + fn set_enable(irq: usize, enabled: bool) { + with_cause!( + irq, + @S_TIMER => { + unsafe { + if enabled { + sie::set_stimer(); + } else { + sie::clear_stimer(); + } + } + }, + @S_SOFT => {}, + @S_EXT => {}, + @EX_IRQ => { + let Some(irq) = NonZeroU32::new(irq as _) else { + return; + }; + trace!("PLIC set enable: {irq} {enabled}"); + let mut plic = PLIC.lock(); + if enabled { + plic.set_priority(irq, 6); + plic.enable(irq, this_context()); + } else { + plic.disable(irq, this_context()); + } + } + ); } /// Registers an IRQ handler for the given IRQ. @@ -92,7 +137,7 @@ impl IrqIf for IrqIfImpl { Self::set_enable(irq, true); true } else { - warn!("register handler for External IRQ {} failed", irq); + warn!("register handler for External IRQ {irq} failed"); false } } @@ -126,7 +171,7 @@ impl IrqIf for IrqIfImpl { warn!("External IRQ should be got from PLIC, not scause"); None }, - @EX_IRQ => IRQ_HANDLER_TABLE.unregister_handler(irq) + @EX_IRQ => IRQ_HANDLER_TABLE.unregister_handler(irq).inspect(|_| Self::set_enable(irq, false)) ) } @@ -135,7 +180,7 @@ impl IrqIf for IrqIfImpl { /// It is called by the common interrupt handler. It should look up in the /// IRQ handler table and calls the corresponding handler. If necessary, it /// also acknowledges the interrupt controller after handling. - fn handle(irq: usize) { + fn handle(irq: usize) -> Option { with_cause!( irq, @S_TIMER => { @@ -145,6 +190,7 @@ impl IrqIf for IrqIfImpl { // SAFETY: The handler is guaranteed to be a valid function pointer. unsafe { core::mem::transmute::<*mut (), IrqHandler>(handler)() }; } + Some(irq) }, @S_SOFT => { trace!("IRQ: IPI"); @@ -153,12 +199,18 @@ impl IrqIf for IrqIfImpl { // SAFETY: The handler is guaranteed to be a valid function pointer. unsafe { core::mem::transmute::<*mut (), IrqHandler>(handler)() }; } + Some(irq) }, @S_EXT => { - // TODO: get IRQ number from PLIC - if !IRQ_HANDLER_TABLE.handle(0) { - warn!("Unhandled IRQ {}", 0); - } + let mut plic = PLIC.lock(); + let Some(irq) = plic.claim(this_context()) else { + debug!("Spurious external IRQ"); + return None; + }; + trace!("IRQ: external {irq}"); + IRQ_HANDLER_TABLE.handle(irq.get() as usize); + plic.complete(this_context(), irq); + Some(irq.get() as usize) }, @EX_IRQ => { unreachable!("Device-side IRQs should be handled by triggering the External Interrupt."); @@ -172,13 +224,13 @@ impl IrqIf for IrqIfImpl { IpiTarget::Current { cpu_id } => { let res = sbi_rt::send_ipi(HartMask::from_mask_base(1 << cpu_id, 0)); if res.is_err() { - warn!("send_ipi failed: {:?}", res); + warn!("send_ipi failed: {res:?}"); } } IpiTarget::Other { cpu_id } => { let res = sbi_rt::send_ipi(HartMask::from_mask_base(1 << cpu_id, 0)); if res.is_err() { - warn!("send_ipi failed: {:?}", res); + warn!("send_ipi failed: {res:?}"); } } IpiTarget::AllExceptCurrent { cpu_id, cpu_num } => { @@ -186,11 +238,11 @@ impl IrqIf for IrqIfImpl { if i != cpu_id { let res = sbi_rt::send_ipi(HartMask::from_mask_base(1 << i, 0)); if res.is_err() { - warn!("send_ipi_all_others failed: {:?}", res); + warn!("send_ipi_all_others failed: {res:?}"); } } } } } } -} +} \ No newline at end of file diff --git a/platform/riscv64-qemu-virt/src/mem.rs b/platform/riscv64-qemu-virt/src/mem.rs index 13000df0..09930ff1 100644 --- a/platform/riscv64-qemu-virt/src/mem.rs +++ b/platform/riscv64-qemu-virt/src/mem.rs @@ -55,4 +55,4 @@ impl MemIf for MemIfImpl { crate::config::plat::KERNEL_ASPACE_SIZE, ) } -} +} \ No newline at end of file diff --git a/platform/riscv64-qemu-virt/src/power.rs b/platform/riscv64-qemu-virt/src/power.rs index c4a87924..bf6c5aaf 100644 --- a/platform/riscv64-qemu-virt/src/power.rs +++ b/platform/riscv64-qemu-virt/src/power.rs @@ -12,14 +12,11 @@ impl PowerIf for PowerImpl { #[cfg(feature = "smp")] fn cpu_boot(cpu_id: usize, stack_top_paddr: usize) { use axplat::mem::{va, virt_to_phys}; - unsafe extern "C" { - fn _start_secondary(); - } if sbi_rt::probe_extension(sbi_rt::Hsm).is_unavailable() { warn!("HSM SBI extension is not supported for current SEE."); return; } - let entry = virt_to_phys(va!(_start_secondary as usize)); + let entry = virt_to_phys(va!(crate::boot::_start_secondary as *const () as usize)); sbi_rt::hart_start(cpu_id, entry.as_usize(), stack_top_paddr); } @@ -32,4 +29,4 @@ impl PowerIf for PowerImpl { axcpu::asm::halt(); } } -} +} \ No newline at end of file diff --git a/platform/riscv64-qemu-virt/src/time.rs b/platform/riscv64-qemu-virt/src/time.rs index a8c84e1d..121d1e54 100644 --- a/platform/riscv64-qemu-virt/src/time.rs +++ b/platform/riscv64-qemu-virt/src/time.rs @@ -1,8 +1,6 @@ use riscv::register::time; -use axplat::time::TimeIf; - -const NANOS_PER_SEC: u64 = 1_000_000_000; +use axplat::time::{NANOS_PER_SEC, TimeIf}; const NANOS_PER_TICK: u64 = NANOS_PER_SEC / crate::config::devices::TIMER_FREQUENCY as u64; /// RTC wall time offset in nanoseconds at monotonic time base. @@ -10,19 +8,16 @@ static mut RTC_EPOCHOFFSET_NANOS: u64 = 0; pub(super) fn init_early() { #[cfg(feature = "rtc")] - use crate::config::devices::RTC_PADDR; + use crate::config::{devices::RTC_PADDR, plat::PHYS_VIRT_OFFSET}; #[cfg(feature = "rtc")] if RTC_PADDR != 0 { - use axplat::mem::{PhysAddr, pa, phys_to_virt}; - use riscv_goldfish::Rtc; - const GOLDFISH_BASE: PhysAddr = pa!(RTC_PADDR); // Get the current time in microseconds since the epoch (1970-01-01) from the riscv RTC. // Subtract the timer ticks to get the actual time when ArceOS was booted. let epoch_time_nanos = - Rtc::new(phys_to_virt(GOLDFISH_BASE).as_usize()).get_unix_timestamp() * 1_000_000_000; + Rtc::new(RTC_PADDR + PHYS_VIRT_OFFSET).get_unix_timestamp() * 1_000_000_000; unsafe { RTC_EPOCHOFFSET_NANOS = @@ -40,11 +35,6 @@ struct TimeIfImpl; #[impl_plat_interface] impl TimeIf for TimeIfImpl { - /// Returns the IRQ number for the timer interrupt. - fn irq_num() -> usize { - crate::config::devices::TIMER_IRQ - } - /// Returns the current clock time in hardware ticks. fn current_ticks() -> u64 { time::read() as u64 @@ -65,6 +55,12 @@ impl TimeIf for TimeIfImpl { unsafe { RTC_EPOCHOFFSET_NANOS } } + /// Returns the IRQ number for the timer interrupt. + #[cfg(feature = "irq")] + fn irq_num() -> usize { + crate::config::devices::TIMER_IRQ + } + /// Set a one-shot timer. /// /// A timer interrupt will be triggered at the specified monotonic time deadline (in nanoseconds). @@ -72,4 +68,4 @@ impl TimeIf for TimeIfImpl { fn set_oneshot_timer(deadline_ns: u64) { sbi_rt::set_timer(Self::nanos_to_ticks(deadline_ns)); } -} +} \ No newline at end of file From 10cd9a5c056f119f8a1c3e458e8521037221004e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=AF=E5=AE=87?= <2537738252@qq.com> Date: Wed, 24 Dec 2025 18:42:28 +0800 Subject: [PATCH 07/22] support riscv64 --- Cargo.lock | 263 +++++++++++++++++--------- Cargo.toml | 24 ++- kernel/Cargo.toml | 4 + kernel/build.rs | 2 + kernel/src/hal/arch/riscv64/api.rs | 6 + kernel/src/hal/arch/riscv64/mod.rs | 21 +- kernel/src/vmm/vcpus.rs | 10 +- modules/axruntime/src/lib.rs | 5 + platform/riscv64-qemu-virt/Cargo.toml | 3 +- platform/riscv64-qemu-virt/src/irq.rs | 14 +- platform/riscv64-qemu-virt/src/lib.rs | 6 +- 11 files changed, 255 insertions(+), 103 deletions(-) create mode 100644 kernel/src/hal/arch/riscv64/api.rs diff --git a/Cargo.lock b/Cargo.lock index 43ae86ec..efbc0939 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -179,7 +179,7 @@ version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axalloc", - "axconfig", + "axconfig 0.1.0", "axdriver", "axerrno 0.1.2", "axfeat", @@ -188,8 +188,8 @@ dependencies = [ "axio", "axlog", "axruntime", - "axsync", - "axtask", + "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", ] [[package]] @@ -228,12 +228,13 @@ dependencies = [ [[package]] name = "arm_vcpu" version = "0.1.1" +source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=next#b24cc3635c049302ab8d58d3b54007bb5a053a96" dependencies = [ "aarch64-cpu", "axaddrspace", "axdevice_base", "axerrno 0.1.2", - "axvcpu", + "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", "axvisor_api", "log", "numeric-enum-macro", @@ -290,6 +291,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0f477b951e452a0b6b4a10b53ccd569042d1d01729b519e02074a9c0958a063" +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-trait" version = "0.1.89" @@ -316,13 +323,14 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axaddrspace" version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06b129114ab36be728ef11dd6540559c30deb6332378157d22bdc0aae6803a63" dependencies = [ + "assert_matches", "axerrno 0.1.2", + "axin", "bit_field", "bitflags 2.10.0", "cfg-if", + "lazy_static", "lazyinit", "log", "memory_addr", @@ -330,13 +338,13 @@ dependencies = [ "numeric-enum-macro", "page_table_entry", "page_table_multiarch", + "spin 0.10.0", "x86", ] [[package]] name = "axalloc" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "allocator", "axerrno 0.1.2", @@ -365,6 +373,13 @@ dependencies = [ "axconfig-macros", ] +[[package]] +name = "axconfig" +version = "0.2.0" +dependencies = [ + "axconfig-macros", +] + [[package]] name = "axconfig-gen" version = "0.2.0" @@ -403,7 +418,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "riscv 0.14.0", + "riscv", "static_assertions", "tock-registers 0.9.0", "x86", @@ -425,7 +440,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "riscv 0.14.0", + "riscv", "static_assertions", "tock-registers 0.9.0", "x86", @@ -435,7 +450,6 @@ dependencies = [ [[package]] name = "axdevice" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axdevice.git#60558bb25214c2030651726beddae088d8a1cd8e" dependencies = [ "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", "axaddrspace", @@ -446,6 +460,25 @@ dependencies = [ "log", "memory_addr", "range-alloc", + "riscv_vplic 0.1.0 (git+https://github.com/liulog/riscv_vplic.git)", + "spin 0.9.8", +] + +[[package]] +name = "axdevice" +version = "0.1.0" +source = "git+https://github.com/liulog/axdevice?branch=master#50ecc20e3d4fe82480b041c769bad18845ce80c5" +dependencies = [ + "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", + "axaddrspace", + "axdevice_base", + "axerrno 0.1.2", + "axvmconfig", + "cfg-if", + "log", + "memory_addr", + "range-alloc", + "riscv_vplic 0.1.0 (git+https://github.com/liulog/riscv_vplic.git)", "spin 0.9.8", ] @@ -469,7 +502,7 @@ version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axdriver", - "axsync", + "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", "lazyinit", "log", ] @@ -477,11 +510,10 @@ dependencies = [ [[package]] name = "axdriver" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "arm-gic-driver", "axalloc", - "axconfig", + "axconfig 0.2.0", "axdriver_base", "axdriver_block", "axdriver_display", @@ -491,7 +523,7 @@ dependencies = [ "axerrno 0.1.2", "axhal", "axklib", - "axmm", + "axmm 0.2.0", "cfg-if", "crate_interface", "dma-api 0.5.2", @@ -507,12 +539,12 @@ dependencies = [ [[package]] name = "axdriver_base" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" [[package]] name = "axdriver_block" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ "axdriver_base", "log", @@ -521,7 +553,7 @@ dependencies = [ [[package]] name = "axdriver_display" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ "axdriver_base", ] @@ -529,7 +561,7 @@ dependencies = [ [[package]] name = "axdriver_net" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ "axdriver_base", "log", @@ -539,7 +571,7 @@ dependencies = [ [[package]] name = "axdriver_pci" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ "virtio-drivers", ] @@ -547,7 +579,7 @@ dependencies = [ [[package]] name = "axdriver_virtio" version = "0.1.2" -source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#cada10715c1f4c08b63d5d60345d2bedbc39bcd8" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ "axdriver_base", "axdriver_block", @@ -587,15 +619,14 @@ dependencies = [ "axhal", "axlog", "axruntime", - "axsync", - "axtask", + "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", "kspin", ] [[package]] name = "axfs" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axdriver", "axdriver_block", @@ -604,7 +635,7 @@ dependencies = [ "axfs_ramfs", "axfs_vfs", "axio", - "axsync", + "axsync 0.2.0", "cap_access", "cfg-if", "fatfs", @@ -649,10 +680,9 @@ dependencies = [ [[package]] name = "axhal" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axalloc", - "axconfig", + "axconfig 0.2.0", "axcpu 0.3.0", "axplat 0.3.0", "axplat-aarch64-qemu-virt", @@ -679,6 +709,18 @@ dependencies = [ "numeric-enum-macro", ] +[[package]] +name = "axin" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db62cb7067e33d432df247b32ee450ae267cb16319c8c5de247381c3652a639" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "axio" version = "0.1.1" @@ -693,7 +735,7 @@ name = "axipi" version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ - "axconfig", + "axconfig 0.1.0", "axhal", "kspin", "lazyinit", @@ -722,13 +764,28 @@ dependencies = [ "log", ] +[[package]] +name = "axmm" +version = "0.2.0" +dependencies = [ + "axalloc", + "axconfig 0.2.0", + "axerrno 0.1.2", + "axhal", + "kspin", + "lazyinit", + "log", + "memory_addr", + "memory_set", +] + [[package]] name = "axmm" version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ "axalloc", - "axconfig", + "axconfig 0.1.0", "axerrno 0.1.2", "axhal", "kspin", @@ -747,8 +804,8 @@ dependencies = [ "axerrno 0.1.2", "axhal", "axio", - "axsync", - "axtask", + "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", "cfg-if", "lazyinit", "log", @@ -915,10 +972,11 @@ dependencies = [ "axconfig-macros", "axcpu 0.3.0", "axplat 0.3.0", + "axvisor_api", "kspin", "lazyinit", "log", - "riscv 0.15.0", + "riscv", "riscv_goldfish", "riscv_plic", "sbi-rt", @@ -936,7 +994,7 @@ dependencies = [ "kspin", "lazyinit", "log", - "riscv 0.14.0", + "riscv", "riscv_plic", "sbi-rt", "uart_16550", @@ -1004,7 +1062,7 @@ name = "axruntime" version = "0.1.0" dependencies = [ "axalloc", - "axconfig", + "axconfig 0.1.0", "axdisplay", "axdriver", "axerrno 0.1.2", @@ -1012,13 +1070,13 @@ dependencies = [ "axhal", "axipi", "axlog", - "axmm", + "axmm 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", "axnet", "axplat 0.3.0", "axplat-aarch64-dyn 0.4.0", "axplat-riscv64-qemu-virt 0.3.0", "axplat-x86-qemu-q35", - "axtask", + "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", "cfg-if", "chrono", "crate_interface", @@ -1050,23 +1108,43 @@ dependencies = [ "lock_api", ] +[[package]] +name = "axsync" +version = "0.2.0" +dependencies = [ + "axtask 0.2.0", + "event-listener", + "kspin", + "lock_api", +] + [[package]] name = "axsync" version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ - "axtask", + "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", "event-listener", "kspin", "lock_api", ] +[[package]] +name = "axtask" +version = "0.2.0" +dependencies = [ + "axerrno 0.1.2", + "axhal", + "cfg-if", + "log", +] + [[package]] name = "axtask" version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" dependencies = [ - "axconfig", + "axconfig 0.1.0", "axerrno 0.1.2", "axhal", "axpoll", @@ -1148,6 +1226,18 @@ dependencies = [ "percpu", ] +[[package]] +name = "axvcpu" +version = "0.1.2" +source = "git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next#343ec3ccf99a86fb9c67a7b0372e9b7a745f0640" +dependencies = [ + "axaddrspace", + "axerrno 0.1.2", + "axvisor_api", + "memory_addr", + "percpu", +] + [[package]] name = "axvisor" version = "0.0.0" @@ -1156,14 +1246,14 @@ dependencies = [ "anyhow", "arm-gic-driver", "axaddrspace", - "axconfig", - "axdevice", + "axconfig 0.1.0", + "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", "axdevice_base", "axerrno 0.2.2", "axhvc", "axruntime", "axstd", - "axvcpu", + "axvcpu 0.1.2", "axvisor_api", "axvm", "bitflags 2.10.0", @@ -1187,6 +1277,8 @@ dependencies = [ "quote", "rdif-intc", "rdrive", + "riscv_vcpu", + "riscv_vplic 0.1.0", "spin 0.9.8", "syn 2.0.111", "timer_list", @@ -1197,8 +1289,6 @@ dependencies = [ [[package]] name = "axvisor_api" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa7233b2a1338dc06a80e2779b572b4df02007ea128ef7b235b66fc3eeac0ca6" dependencies = [ "axaddrspace", "axvisor_api_proc", @@ -1209,8 +1299,6 @@ dependencies = [ [[package]] name = "axvisor_api_proc" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a64eb4410ae8357ac8c01c2fb201e57d7aeeb5436ed4d0f5774bfa11cc5902" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1225,10 +1313,10 @@ dependencies = [ "arm_vcpu", "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "axaddrspace", - "axdevice", + "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", "axdevice_base", "axerrno 0.2.2", - "axvcpu", + "axvcpu 0.1.2", "axvmconfig", "cfg-if", "cpumask", @@ -1245,7 +1333,6 @@ dependencies = [ [[package]] name = "axvmconfig" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=next#5a8b64a47510b17da71e54cabbdf8c999ba2e2c9" dependencies = [ "axerrno 0.1.2", "clap", @@ -2340,7 +2427,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3820,8 +3907,6 @@ dependencies = [ [[package]] name = "page_table_entry" version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda9891ec368fda90e4b2cc36592b4881073e25a339fe7e3eddd811f0cf6bf18" dependencies = [ "aarch64-cpu", "bitflags 2.10.0", @@ -3832,13 +3917,11 @@ dependencies = [ [[package]] name = "page_table_multiarch" version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa11a21844255e14aa6688ef0eafb058d7be19338633024fb59417f1bfb07f8" dependencies = [ "log", "memory_addr", "page_table_entry", - "riscv 0.14.0", + "riscv", "x86", ] @@ -4166,7 +4249,7 @@ dependencies = [ "once_cell", "socket2 0.6.1", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] @@ -4580,20 +4663,8 @@ dependencies = [ "critical-section", "embedded-hal", "paste", - "riscv-macros 0.2.0", - "riscv-pac 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "riscv" -version = "0.15.0" -source = "git+https://github.com/liulog/riscv.git?branch=master#9722c430a2f624c35f4be64ba36c6a64e4f1096a" -dependencies = [ - "critical-section", - "embedded-hal", - "paste", - "riscv-macros 0.3.0", - "riscv-pac 0.2.0 (git+https://github.com/liulog/riscv.git?branch=master)", + "riscv-macros", + "riscv-pac", ] [[package]] @@ -4612,7 +4683,7 @@ dependencies = [ "bit_field", "bitflags 2.10.0", "log", - "riscv 0.14.0", + "riscv", ] [[package]] @@ -4626,27 +4697,12 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "riscv-macros" -version = "0.3.0" -source = "git+https://github.com/liulog/riscv.git?branch=master#9722c430a2f624c35f4be64ba36c6a64e4f1096a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "riscv-pac" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436" -[[package]] -name = "riscv-pac" -version = "0.2.0" -source = "git+https://github.com/liulog/riscv.git?branch=master#9722c430a2f624c35f4be64ba36c6a64e4f1096a" - [[package]] name = "riscv_goldfish" version = "0.1.1" @@ -4668,7 +4724,7 @@ version = "0.1.2" dependencies = [ "axaddrspace", "axerrno 0.1.2", - "axvcpu", + "axvcpu 0.1.2", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -4678,7 +4734,7 @@ dependencies = [ "memoffset", "memory_addr", "page_table_entry", - "riscv 0.15.0", + "riscv", "riscv-decode", "riscv-h", "rustsbi", @@ -4687,6 +4743,35 @@ dependencies = [ "tock-registers 0.9.0", ] +[[package]] +name = "riscv_vplic" +version = "0.1.0" +dependencies = [ + "axaddrspace", + "axdevice_base", + "axerrno 0.1.2", + "axvisor_api", + "bitmaps", + "log", + "riscv-h", + "spin 0.9.8", +] + +[[package]] +name = "riscv_vplic" +version = "0.1.0" +source = "git+https://github.com/liulog/riscv_vplic.git#5ed1fb6bb06d85675ba8f60813d32744b512b23d" +dependencies = [ + "axaddrspace", + "axdevice_base", + "axerrno 0.1.2", + "axvisor_api", + "bitmaps", + "log", + "riscv-h", + "spin 0.9.8", +] + [[package]] name = "rk3568_clk" version = "0.1.0" @@ -4815,7 +4900,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5554,7 +5639,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.2", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6689,7 +6774,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno 0.1.2", - "axvcpu", + "axvcpu 0.1.2", "axvisor_api", "bit_field", "bitflags 2.10.0", diff --git a/Cargo.toml b/Cargo.toml index 8256b292..83702541 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,16 +91,24 @@ axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branc [patch.crates-io] axvcpu = {path="crates/axvcpu"} -axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} -riscv = {git = "https://github.com/liulog/riscv.git", branch = "master"} +axvmconfig = {path = "crates/axvmconfig"} +# riscv = {git = "https://github.com/liulog/riscv.git", branch = "master"} +axcpu = {path = "crates/axcpu"} +axvisor_api = {path = "../axvisor_api"} +page_table_entry = { path = "../page_table_multiarch/page_table_entry" } +page_table_multiarch = { path = "../page_table_multiarch/page_table_multiarch", features = ["stage-2"]} +axaddrspace = {path = "crates/axaddrspace"} + +[patch."https://github.com/arceos-hypervisor/axvmconfig.git"] +axvmconfig = {path = "crates/axvmconfig"} [patch."https://github.com/arceos-org/arceos"] axconfig = {path = "modules/axconfig"} axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} - -[patch."https://github.com/arceos-hypervisor/arm_vcpu.git"] -arm_vcpu = {path = "crates/arm_vcpu"} +axhal = {path = "../arceos/modules/axhal"} +axalloc = {path = "../arceos/modules/axalloc"} +axdriver = {path = "../arceos/modules/axdriver"} [patch."https://github.com/arceos-hypervisor/axvm.git"] axvm = {path = "crates/axvm"} @@ -110,3 +118,9 @@ riscv_vcpu = {path = "crates/riscv_vcpu"} [patch."https://github.com/arceos-org/axcpu.git"] axcpu = {path = "crates/axcpu"} + +[patch."https://github.com/arceos-hypervisor/arm_vcpu.git"] +arm_vcpu = {path = "crates/arm_vcpu"} + +[patch."https://github.com/arceos-hypervisor/axdevice.git"] +axdevice = {git = "https://github.com/liulog/axdevice", branch = "master"} diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index ea99ff32..066feae1 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -62,6 +62,10 @@ driver.workspace = true aarch64-cpu-ext = "0.1" arm-gic-driver = {version = "0.15.5", features = ["rdif"]} +[target.'cfg(target_arch = "riscv64")'.dependencies] +riscv_vplic = { path="../crates/riscv_vplic" } +riscv_vcpu = { git = "https://github.com/liulog/riscv_vcpu.git", branch = "master" } + [build-dependencies] axconfig.workspace = true prettyplease = "0.2" diff --git a/kernel/build.rs b/kernel/build.rs index 711c372e..b5561025 100644 --- a/kernel/build.rs +++ b/kernel/build.rs @@ -246,6 +246,8 @@ fn main() -> anyhow::Result<()> { "aarch64-generic".to_string() } else if arch == "x86_64" { "x86-qemu-q35".to_string() + } else if arch == "riscv64" { + "riscv64-qemu-virt".to_string() } else { "dummy".to_string() }; diff --git a/kernel/src/hal/arch/riscv64/api.rs b/kernel/src/hal/arch/riscv64/api.rs new file mode 100644 index 00000000..34779dc7 --- /dev/null +++ b/kernel/src/hal/arch/riscv64/api.rs @@ -0,0 +1,6 @@ +#[axvisor_api::api_mod_impl(axvisor_api::arch)] +mod arch_api_impl { + extern fn inject_virtual_interrupt(irq: usize) { + crate::hal::arch::inject_interrupt(irq); + } +} diff --git a/kernel/src/hal/arch/riscv64/mod.rs b/kernel/src/hal/arch/riscv64/mod.rs index 64ff8cd9..ff1f7589 100644 --- a/kernel/src/hal/arch/riscv64/mod.rs +++ b/kernel/src/hal/arch/riscv64/mod.rs @@ -1,9 +1,28 @@ +mod api; pub mod cache; +use crate::vmm::vm_list::get_vm_by_id; +use axaddrspace::{GuestPhysAddr, device::AccessWidth}; +use axvisor_api::vmm::current_vm_id; + pub fn hardware_check() { // TODO: implement hardware checks for RISC-V64 // check page table level like aarch64 } -pub fn inject_interrupt(_vector: u8) {} +pub fn inject_interrupt(irq_id: usize) { + debug!("injecting interrupt id: {}", irq_id); + + // Get the instance of the vplic, and then inject virtual interrupt. + let vplic = get_vm_by_id(current_vm_id()).unwrap().get_devices().find_mmio_dev(GuestPhysAddr::from_usize(axruntime::plic_base())).unwrap(); + + // Calulate the pending register offset and value. + let reg_offset = riscv_vplic::PLIC_PENDING_OFFSET + (irq_id / 32) * 4; + let addr = GuestPhysAddr::from_usize(axruntime::plic_base() + reg_offset); + let width = AccessWidth::Dword; + let val: u32 = 1 << (irq_id % 32); + + // Use a trick write to set the pending bit. + let _ = vplic.handle_write(addr, width, val as _); +} diff --git a/kernel/src/vmm/vcpus.rs b/kernel/src/vmm/vcpus.rs index 22cb47fe..57e862c4 100644 --- a/kernel/src/vmm/vcpus.rs +++ b/kernel/src/vmm/vcpus.rs @@ -309,16 +309,17 @@ fn vcpu_on(vm: VMRef, vcpu_id: usize, entry_point: GuestPhysAddr, arg: usize) { vcpu.set_entry(entry_point) .expect("vcpu_on: set_entry failed"); + #[cfg(not(target_arch = "riscv64"))] vcpu.set_gpr(0, arg); #[cfg(target_arch = "riscv64")] { - debug!( + info!( "vcpu_on: vcpu[{}] entry={:x} opaque={:x}", vcpu_id, entry_point, arg ); - vcpu.set_gpr(0, vcpu_id); - vcpu.set_gpr(1, arg); + vcpu.set_gpr(riscv_vcpu::GprIndex::A0 as usize, vcpu_id); + vcpu.set_gpr(riscv_vcpu::GprIndex::A1 as usize, arg); } let vcpu_task = alloc_vcpu_task(&vm, vcpu); @@ -507,7 +508,10 @@ fn vcpu_run() { }); vcpu_on(vm.clone(), target_vcpu_id, entry_point, arg as _); + #[cfg(not(target_arch = "riscv64"))] vcpu.set_gpr(0, 0); + #[cfg(target_arch = "riscv64")] + vcpu.set_gpr(riscv_vcpu::GprIndex::A0 as usize, 0); } AxVCpuExitReason::SystemDown => { warn!("VM[{vm_id}] run VCpu[{vcpu_id}] SystemDown"); diff --git a/modules/axruntime/src/lib.rs b/modules/axruntime/src/lib.rs index 1c4b9096..4d483fe9 100644 --- a/modules/axruntime/src/lib.rs +++ b/modules/axruntime/src/lib.rs @@ -340,3 +340,8 @@ pub fn cpu_count() -> usize { cpu_count } + +#[cfg(target_arch = "riscv64")] +pub fn plic_base() -> usize { + axplat_riscv64_qemu_virt::plic_base() +} diff --git a/platform/riscv64-qemu-virt/Cargo.toml b/platform/riscv64-qemu-virt/Cargo.toml index b1f33817..9d07de9e 100644 --- a/platform/riscv64-qemu-virt/Cargo.toml +++ b/platform/riscv64-qemu-virt/Cargo.toml @@ -17,7 +17,7 @@ smp = ["axplat/smp"] kspin = "0.1" lazyinit = "0.2" log = "0.4" -riscv = "0.15.0" +riscv = "0.14.0" riscv_goldfish = { version = "0.1", optional = true } riscv_plic = "0.2" sbi-rt = { version = "0.0.3", features = ["legacy"] } @@ -26,6 +26,7 @@ uart_16550 = "0.4.0" axconfig-macros = "0.2" axcpu = { workspace = true } axplat = { workspace = true } +axvisor_api = { workspace = true } [package.metadata.docs.rs] targets = ["riscv64gc-unknown-none-elf"] diff --git a/platform/riscv64-qemu-virt/src/irq.rs b/platform/riscv64-qemu-virt/src/irq.rs index 9350f270..a05f2358 100644 --- a/platform/riscv64-qemu-virt/src/irq.rs +++ b/platform/riscv64-qemu-virt/src/irq.rs @@ -202,14 +202,22 @@ impl IrqIf for IrqIfImpl { Some(irq) }, @S_EXT => { + // TODO: judge irq's ownership before handling (axvisor or any vm). + // Maybe later it will be done by registering all irqs IQR_HANDLER_TABLE. + let mut plic = PLIC.lock(); let Some(irq) = plic.claim(this_context()) else { debug!("Spurious external IRQ"); return None; }; - trace!("IRQ: external {irq}"); - IRQ_HANDLER_TABLE.handle(irq.get() as usize); - plic.complete(this_context(), irq); + drop(plic); + // Inject the virtual interrupt to the guest VM + axvisor_api::arch::inject_virtual_interrupt(irq.get() as usize); + + // trace!("IRQ: external {irq}"); + // IRQ_HANDLER_TABLE.handle(irq.get() as usize); + // Only for irqs that belong to axvisor, complete the IRQ. + // plic.complete(this_context(), irq); Some(irq.get() as usize) }, @EX_IRQ => { diff --git a/platform/riscv64-qemu-virt/src/lib.rs b/platform/riscv64-qemu-virt/src/lib.rs index 66242ea6..067407bb 100644 --- a/platform/riscv64-qemu-virt/src/lib.rs +++ b/platform/riscv64-qemu-virt/src/lib.rs @@ -29,6 +29,10 @@ pub mod config { ); } -pub fn cpu_count() -> usize { +pub const fn cpu_count() -> usize { config::plat::CPU_NUM } + +pub const fn plic_base() -> usize { + config::devices::PLIC_PADDR +} From 9a393d914cc55d48333d1cadaca8f9e5c11e6ad0 Mon Sep 17 00:00:00 2001 From: YanLien Date: Tue, 6 Jan 2026 17:19:16 +0800 Subject: [PATCH 08/22] Refactor Cargo.toml and module configurations --- .github/workflows/qemu-riscv64.toml | 23 + Cargo.lock | 894 +++++++++++----------- Cargo.toml | 28 +- configs/vms/arceos-riscv64-qemu-smp1.toml | 4 +- configs/vms/linux-riscv64-qemu-smp1.dts | 132 ++++ configs/vms/linux-riscv64-qemu-smp1.toml | 6 +- kernel/Cargo.toml | 2 +- modules/axconfig/src/lib.rs | 2 +- modules/axruntime/Cargo.toml | 2 +- platform/riscv64-qemu-virt/axconfig.toml | 4 +- xtask/src/image.rs | 2 +- 11 files changed, 615 insertions(+), 484 deletions(-) create mode 100644 .github/workflows/qemu-riscv64.toml create mode 100644 configs/vms/linux-riscv64-qemu-smp1.dts diff --git a/.github/workflows/qemu-riscv64.toml b/.github/workflows/qemu-riscv64.toml new file mode 100644 index 00000000..f201c236 --- /dev/null +++ b/.github/workflows/qemu-riscv64.toml @@ -0,0 +1,23 @@ +args = [ + "-nographic", + "-cpu", + "rv64", + "-machine", + "virt", + "-bios", + "default", + "-smp", + "4", + "-device", + "virtio-blk-device,drive=disk0", + "-drive", + "id=disk0,if=none,format=raw,file=${workspaceFolder}/tmp/rootfs.img", + "-append", + "root=/dev/vda rw init=/init", + "-m", + "8g", +] +fail_regex = [] +success_regex = ["test pass!"] +to_bin = true +uefi = false \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index efbc0939..f3ab8b48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,7 +63,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "version_check", - "zerocopy 0.8.28", + "zerocopy 0.8.31", ] [[package]] @@ -176,27 +176,27 @@ dependencies = [ [[package]] name = "arceos_api" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "axalloc", - "axconfig 0.1.0", + "axconfig", "axdriver", "axerrno 0.1.2", "axfeat", - "axfs", + "axfs 0.2.0", "axhal", "axio", "axlog", "axruntime", - "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", - "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axsync", + "axtask", ] [[package]] name = "arm-gic-driver" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f251a1a74133f802b55eaf5e340107b0024457aa9b2ac3c72074501bfa8509a5" +checksum = "ad71090ed958939b87f6c99e0acd3c476b3a0dbd54f2e2d9aa1ca1f40dc4417e" dependencies = [ "aarch64-cpu", "bitflags 2.10.0", @@ -234,7 +234,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno 0.1.2", - "axvcpu 0.1.2 (git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next)", + "axvcpu 0.1.2", "axvisor_api", "log", "numeric-enum-macro", @@ -291,12 +291,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0f477b951e452a0b6b4a10b53ccd569042d1d01729b519e02074a9c0958a063" -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - [[package]] name = "async-trait" version = "0.1.89" @@ -305,7 +299,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -323,14 +317,13 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axaddrspace" version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06b129114ab36be728ef11dd6540559c30deb6332378157d22bdc0aae6803a63" dependencies = [ - "assert_matches", "axerrno 0.1.2", - "axin", "bit_field", "bitflags 2.10.0", "cfg-if", - "lazy_static", "lazyinit", "log", "memory_addr", @@ -338,13 +331,13 @@ dependencies = [ "numeric-enum-macro", "page_table_entry", "page_table_multiarch", - "spin 0.10.0", "x86", ] [[package]] name = "axalloc" version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "allocator", "axerrno 0.1.2", @@ -373,13 +366,6 @@ dependencies = [ "axconfig-macros", ] -[[package]] -name = "axconfig" -version = "0.2.0" -dependencies = [ - "axconfig-macros", -] - [[package]] name = "axconfig-gen" version = "0.2.0" @@ -399,35 +385,13 @@ dependencies = [ "axconfig-gen", "proc-macro2", "quote", - "syn 2.0.111", -] - -[[package]] -name = "axcpu" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e09bc1235e3da45e942b50f47812f8397ad84cb490264bf914c65ac44e6f8b1d" -dependencies = [ - "aarch64-cpu", - "cfg-if", - "lazyinit", - "linkme", - "log", - "loongArch64", - "memory_addr", - "page_table_entry", - "page_table_multiarch", - "percpu", - "riscv", - "static_assertions", - "tock-registers 0.9.0", - "x86", - "x86_64", + "syn 2.0.113", ] [[package]] name = "axcpu" version = "0.3.0" +source = "git+https://github.com/arceos-org/axcpu.git?tag=dev-v03#72ef3859952b7340bae261c9a50c32705e602017" dependencies = [ "aarch64-cpu", "axbacktrace", @@ -460,7 +424,7 @@ dependencies = [ "log", "memory_addr", "range-alloc", - "riscv_vplic 0.1.0 (git+https://github.com/liulog/riscv_vplic.git)", + "riscv_vplic 0.1.0 (git+https://github.com/arceos-hypervisor/riscv_vplic.git?rev=8bc5213)", "spin 0.9.8", ] @@ -499,10 +463,10 @@ dependencies = [ [[package]] name = "axdisplay" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "axdriver", - "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axsync", "lazyinit", "log", ] @@ -510,12 +474,13 @@ dependencies = [ [[package]] name = "axdriver" version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "arm-gic-driver", "axalloc", - "axconfig 0.2.0", - "axdriver_base", - "axdriver_block", + "axconfig", + "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", + "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", "axdriver_display", "axdriver_net", "axdriver_pci", @@ -523,7 +488,7 @@ dependencies = [ "axerrno 0.1.2", "axhal", "axklib", - "axmm 0.2.0", + "axmm", "cfg-if", "crate_interface", "dma-api 0.5.2", @@ -541,12 +506,26 @@ name = "axdriver_base" version = "0.1.2" source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" +[[package]] +name = "axdriver_base" +version = "0.1.2" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" + [[package]] name = "axdriver_block" version = "0.1.2" source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ - "axdriver_base", + "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", + "log", +] + +[[package]] +name = "axdriver_block" +version = "0.1.2" +source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2#84eb2170f865e6fa29b78995a86f4fcdcede63df" +dependencies = [ + "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2)", "log", ] @@ -555,7 +534,7 @@ name = "axdriver_display" version = "0.1.2" source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ - "axdriver_base", + "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", ] [[package]] @@ -563,7 +542,7 @@ name = "axdriver_net" version = "0.1.2" source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ - "axdriver_base", + "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", "log", "spin 0.9.8", ] @@ -581,8 +560,8 @@ name = "axdriver_virtio" version = "0.1.2" source = "git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01#16f1ae864e1317f67d4e22a645fcb7399ae86596" dependencies = [ - "axdriver_base", - "axdriver_block", + "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", + "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", "log", "virtio-drivers", ] @@ -610,35 +589,54 @@ dependencies = [ [[package]] name = "axfeat" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "axalloc", "axbacktrace", "axdriver", - "axfs", + "axfs 0.2.0", "axhal", "axlog", "axruntime", - "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", - "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axsync", + "axtask", "kspin", ] +[[package]] +name = "axfs" +version = "0.1.0" +dependencies = [ + "axdriver", + "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=v0.1.2)", + "axerrno 0.1.2", + "axfs_ramfs", + "axfs_vfs", + "axio", + "cap_access", + "fatfs 0.4.0 (git+https://github.com/Josen-B/rust-fatfs.git?rev=41122ef)", + "lazyinit", + "log", + "rsext4", + "spin 0.9.8", +] + [[package]] name = "axfs" version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "axdriver", - "axdriver_block", + "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", "axerrno 0.1.2", "axfs_devfs", "axfs_ramfs", "axfs_vfs", "axio", - "axsync 0.2.0", + "axsync", "cap_access", "cfg-if", - "fatfs", + "fatfs 0.4.0 (git+https://github.com/rafalh/rust-fatfs?rev=4eccb50)", "lazyinit", "log", "scope-local", @@ -680,16 +678,18 @@ dependencies = [ [[package]] name = "axhal" version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "axalloc", - "axconfig 0.2.0", - "axcpu 0.3.0", - "axplat 0.3.0", + "axconfig", + "axcpu", + "axplat", "axplat-aarch64-qemu-virt", "axplat-loongarch64-qemu-virt", "axplat-riscv64-qemu-virt 0.3.0 (git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03)", "axplat-x86-pc", "cfg-if", + "fdt-parser", "heapless 0.9.2", "kernel_guard", "lazyinit", @@ -709,33 +709,22 @@ dependencies = [ "numeric-enum-macro", ] -[[package]] -name = "axin" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db62cb7067e33d432df247b32ee450ae267cb16319c8c5de247381c3652a639" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "axio" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30aa258a37c25c5e9d3ff45ec80e728ff7c499586e3e40719daf7908f10fd5bd" +checksum = "92a675c98dc5af5cca52cfdd1044ae960816909853cd13870737d55cb23f5d4e" dependencies = [ + "autocfg", "axerrno 0.1.2", ] [[package]] name = "axipi" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ - "axconfig 0.1.0", + "axconfig", "axhal", "kspin", "lazyinit", @@ -756,7 +745,7 @@ dependencies = [ [[package]] name = "axlog" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "cfg-if", "crate_interface", @@ -767,25 +756,10 @@ dependencies = [ [[package]] name = "axmm" version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "axalloc", - "axconfig 0.2.0", - "axerrno 0.1.2", - "axhal", - "kspin", - "lazyinit", - "log", - "memory_addr", - "memory_set", -] - -[[package]] -name = "axmm" -version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" -dependencies = [ - "axalloc", - "axconfig 0.1.0", + "axconfig", "axerrno 0.1.2", "axhal", "kspin", @@ -798,14 +772,14 @@ dependencies = [ [[package]] name = "axnet" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "axdriver", "axerrno 0.1.2", "axhal", "axio", - "axsync 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", - "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axsync", + "axtask", "cfg-if", "lazyinit", "log", @@ -813,26 +787,12 @@ dependencies = [ "spin 0.10.0", ] -[[package]] -name = "axplat" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" -dependencies = [ - "axplat-macros 0.1.0 (git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0)", - "bitflags 2.10.0", - "const-str", - "crate_interface", - "handler_table", - "kspin", - "memory_addr", -] - [[package]] name = "axplat" version = "0.3.0" source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ - "axplat-macros 0.1.0 (git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03)", + "axplat-macros", "bitflags 2.10.0", "const-str", "crate_interface", @@ -842,33 +802,6 @@ dependencies = [ "percpu", ] -[[package]] -name = "axplat-aarch64-dyn" -version = "0.3.0" -dependencies = [ - "aarch64-cpu", - "aarch64-cpu-ext", - "any-uart", - "arm-gic-driver", - "axconfig-macros", - "axcpu 0.2.2", - "axplat 0.2.0", - "fdt-parser", - "heapless 0.8.0", - "lazyinit", - "log", - "memory_addr", - "page_table_entry", - "paste", - "percpu", - "rdif-intc", - "rdrive", - "serde", - "somehal", - "spin 0.10.0", - "toml 0.8.23", -] - [[package]] name = "axplat-aarch64-dyn" version = "0.4.0" @@ -879,8 +812,8 @@ dependencies = [ "any-uart", "arm-gic-driver", "axconfig-macros", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "fdt-parser", "heapless 0.8.0", "lazyinit", @@ -906,8 +839,8 @@ dependencies = [ "arm-gic-driver", "arm_pl011", "arm_pl031", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "int_ratio", "kspin", "lazyinit", @@ -922,8 +855,8 @@ version = "0.3.0" source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "axplat-aarch64-peripherals", "log", "page_table_entry", @@ -935,8 +868,8 @@ version = "0.3.0" source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "kspin", "lazyinit", "log", @@ -952,17 +885,7 @@ source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df071 dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", -] - -[[package]] -name = "axplat-macros" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axplat_crates?tag=vmm-v0.3.0#3345f58f3da5ef2eafcfa1fcf1ac32e5e80e1a7d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -970,8 +893,8 @@ name = "axplat-riscv64-qemu-virt" version = "0.3.0" dependencies = [ "axconfig-macros", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "axvisor_api", "kspin", "lazyinit", @@ -989,8 +912,8 @@ version = "0.3.0" source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "kspin", "lazyinit", "log", @@ -1006,8 +929,8 @@ version = "0.3.0" source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ "axconfig-macros", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "bitflags 2.10.0", "heapless 0.9.2", "int_ratio", @@ -1028,8 +951,8 @@ name = "axplat-x86-qemu-q35" version = "0.1.0" dependencies = [ "axconfig-macros", - "axcpu 0.3.0", - "axplat 0.3.0", + "axcpu", + "axplat", "bitflags 2.10.0", "heapless 0.9.2", "int_ratio", @@ -1062,21 +985,21 @@ name = "axruntime" version = "0.1.0" dependencies = [ "axalloc", - "axconfig 0.1.0", + "axconfig", "axdisplay", "axdriver", - "axerrno 0.1.2", - "axfs", + "axerrno 0.2.2", + "axfs 0.1.0", "axhal", "axipi", "axlog", - "axmm 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axmm", "axnet", - "axplat 0.3.0", - "axplat-aarch64-dyn 0.4.0", + "axplat", + "axplat-aarch64-dyn", "axplat-riscv64-qemu-virt 0.3.0", "axplat-x86-qemu-q35", - "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axtask", "cfg-if", "chrono", "crate_interface", @@ -1088,9 +1011,9 @@ dependencies = [ [[package]] name = "axsched" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44de469da35f912194e4104cc2f51bff63d6c184b65b6ebf8e90e2cd162b7f3c" +checksum = "cad6b7b0b8d9ad1d52a834d8b7721114413da8cf3430af928b1c8651f911287a" dependencies = [ "linked_list_r4l", ] @@ -1098,7 +1021,7 @@ dependencies = [ [[package]] name = "axstd" version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "arceos_api", "axerrno 0.1.2", @@ -1111,19 +1034,9 @@ dependencies = [ [[package]] name = "axsync" version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ - "axtask 0.2.0", - "event-listener", - "kspin", - "lock_api", -] - -[[package]] -name = "axsync" -version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" -dependencies = [ - "axtask 0.2.0 (git+https://github.com/arceos-org/arceos.git?tag=dev-251202)", + "axtask", "event-listener", "kspin", "lock_api", @@ -1132,19 +1045,9 @@ dependencies = [ [[package]] name = "axtask" version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ - "axerrno 0.1.2", - "axhal", - "cfg-if", - "log", -] - -[[package]] -name = "axtask" -version = "0.2.0" -source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251202#fe9bf0f2ac3825ecc580b7ef149ff093cfc6aaca" -dependencies = [ - "axconfig 0.1.0", + "axconfig", "axerrno 0.1.2", "axhal", "axpoll", @@ -1165,9 +1068,9 @@ dependencies = [ [[package]] name = "axum" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" +checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" dependencies = [ "axum-core", "bytes", @@ -1198,9 +1101,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", @@ -1217,7 +1120,9 @@ dependencies = [ [[package]] name = "axvcpu" -version = "0.1.2" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefe761786c0c69a7c0eaf45602c460f721bce9d8b8decc4f733b488e9da657f" dependencies = [ "axaddrspace", "axerrno 0.1.2", @@ -1246,14 +1151,14 @@ dependencies = [ "anyhow", "arm-gic-driver", "axaddrspace", - "axconfig 0.1.0", + "axconfig", "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", "axdevice_base", "axerrno 0.2.2", "axhvc", "axruntime", "axstd", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvisor_api", "axvm", "bitflags 2.10.0", @@ -1278,11 +1183,11 @@ dependencies = [ "rdif-intc", "rdrive", "riscv_vcpu", - "riscv_vplic 0.1.0", + "riscv_vplic 0.1.0 (git+https://github.com/arceos-hypervisor/riscv_vplic.git?rev=8bc5213)", "spin 0.9.8", - "syn 2.0.111", + "syn 2.0.113", "timer_list", - "toml 0.9.8", + "toml 0.9.10+spec-1.1.0", "vm-fdt 0.3.0 (git+https://github.com/bullhh/vm-fdt.git)", ] @@ -1303,7 +1208,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -1316,7 +1221,7 @@ dependencies = [ "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", "axdevice_base", "axerrno 0.2.2", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvmconfig", "cfg-if", "cpumask", @@ -1342,7 +1247,7 @@ dependencies = [ "schemars", "serde", "serde_repr", - "toml 0.9.8", + "toml 0.9.10+spec-1.1.0", ] [[package]] @@ -1374,7 +1279,7 @@ checksum = "e585a01076fee271c5aabcf36212acb349fb3e638561d842fffa8ca013f4fdd8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -1405,7 +1310,7 @@ dependencies = [ "cargo_metadata 0.20.0", "flate2", "rand 0.9.2", - "reqwest 0.12.24", + "reqwest 0.12.28", "tar", ] @@ -1489,14 +1394,14 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "byte-unit" @@ -1552,9 +1457,9 @@ checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "camino" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" dependencies = [ "serde_core", ] @@ -1579,11 +1484,12 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122ec45a44b270afd1402f351b782c676b173e3c3fb28d86ff7ebfb4d86a4ee4" +checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" dependencies = [ "serde", + "serde_core", ] [[package]] @@ -1624,7 +1530,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", - "cargo-platform 0.3.1", + "cargo-platform 0.3.2", "semver", "serde", "serde_json", @@ -1648,9 +1554,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.48" +version = "1.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a" +checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" dependencies = [ "find-msvc-tools", "shlex", @@ -1683,9 +1589,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.53" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" +checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" dependencies = [ "clap_builder", "clap_derive", @@ -1693,9 +1599,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.53" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" +checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" dependencies = [ "anstream", "anstyle", @@ -1712,7 +1618,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -1761,9 +1667,9 @@ dependencies = [ [[package]] name = "console" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" dependencies = [ "encode_unicode", "libc", @@ -1792,18 +1698,18 @@ checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" [[package]] name = "convert_case" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" dependencies = [ "unicode-segmentation", ] [[package]] name = "convert_case" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] @@ -1820,9 +1726,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.10.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" dependencies = [ "core-foundation-sys", "libc", @@ -1860,7 +1766,7 @@ checksum = "70272a03a2cef15589bac05d3d15c023752f5f8f2da8be977d983a9d9e6250fb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -1936,7 +1842,7 @@ dependencies = [ "document-features", "mio", "parking_lot", - "rustix 1.1.2", + "rustix 1.1.3", "signal-hook", "signal-hook-mio", "winapi", @@ -1978,7 +1884,7 @@ checksum = "9a49d5cd78b1c748184d41407b14a58af8403c13328ff2b9f49b0a418c24e3ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2052,6 +1958,16 @@ dependencies = [ "darling_macro 0.21.3", ] +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", +] + [[package]] name = "darling_core" version = "0.20.11" @@ -2063,7 +1979,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2076,7 +1992,20 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.113", ] [[package]] @@ -2087,7 +2016,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2098,7 +2027,18 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.111", + "syn 2.0.113", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", + "quote", + "syn 2.0.113", ] [[package]] @@ -2130,7 +2070,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2153,23 +2093,24 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "convert_case 0.7.1", + "convert_case 0.10.0", "proc-macro2", "quote", - "syn 2.0.111", + "rustc_version", + "syn 2.0.113", ] [[package]] @@ -2196,7 +2137,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2312,7 +2253,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2324,7 +2265,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2345,7 +2286,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2356,7 +2297,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2377,7 +2318,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2427,7 +2368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2448,7 +2389,7 @@ checksum = "ba8f5038f5845165d06fe1453fe4130ad546d3314818bbda57e208e7b0cffe08" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2457,6 +2398,15 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "fatfs" +version = "0.4.0" +source = "git+https://github.com/Josen-B/rust-fatfs.git?rev=41122ef#41122eff7d244cb030c9cfb9b5e14fc50b70dd24" +dependencies = [ + "bitflags 2.10.0", + "log", +] + [[package]] name = "fatfs" version = "0.4.0" @@ -2486,9 +2436,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" +checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" [[package]] name = "fitimage" @@ -2618,7 +2568,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -2715,9 +2665,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" dependencies = [ "atomic-waker", "bytes", @@ -2922,7 +2872,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.12", + "h2 0.4.13", "http 1.4.0", "http-body 1.0.1", "httparse", @@ -2983,9 +2933,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ "base64 0.22.1", "bytes", @@ -3079,9 +3029,9 @@ checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -3093,9 +3043,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" @@ -3173,15 +3123,15 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6778b0196eefee7df739db78758e5cf9b37412268bfa5650bfeed028aed20d9c" +checksum = "357b7205c6cd18dd2c86ed312d1e70add149aea98e7ef72b9fdf0270e555c11d" dependencies = [ - "darling 0.20.11", + "darling 0.23.0", "indoc", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -3208,9 +3158,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" dependencies = [ "memchr", "serde", @@ -3233,15 +3183,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jiff" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" +checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50" dependencies = [ "jiff-static", "log", @@ -3252,13 +3202,13 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" +checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -3279,7 +3229,7 @@ dependencies = [ "serde_json", "thiserror 2.0.17", "tokio", - "toml 0.9.8", + "toml 0.9.10+spec-1.1.0", "tower", "tower-http", ] @@ -3303,7 +3253,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -3315,14 +3265,14 @@ dependencies = [ "bitflags 2.10.0", "prettyplease", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] name = "kernel_guard" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307e6be468f3d6b6d895e191f63c11602e4e76575ecca68325d8c8dbebe2870e" +checksum = "d10c55bedf6789bc3748e0d8756ee639df1ae25144fd3525ed311044bd9a739f" dependencies = [ "cfg-if", "crate_interface", @@ -3384,19 +3334,19 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.177" +version = "0.2.179" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f" [[package]] name = "libredox" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags 2.10.0", "libc", - "redox_syscall", + "redox_syscall 0.7.0", ] [[package]] @@ -3432,9 +3382,9 @@ dependencies = [ [[package]] name = "linked_list_r4l" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c6e48d7df84e6414be8e53976ead35ba4d47a4ba561eaad5d1e2b1447b4c0a" +checksum = "1730c4ce817dc3edb092739ca5c109fe551018e5ea5a8361a8ddaa13d79ac8ed" [[package]] name = "linkme" @@ -3453,7 +3403,7 @@ checksum = "e5cec0ec4228b4853bb129c84dbf093a27e6c7a20526da046defc334a1b017f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -3491,9 +3441,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "loongArch64" @@ -3622,9 +3572,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "log", @@ -3666,9 +3616,9 @@ checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" [[package]] name = "network-interface" -version = "2.0.3" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07709a6d4eba90ab10ec170a0530b3aafc81cb8a2d380e4423ae41fc55fe5745" +checksum = "4ddcb8865ad3d9950f22f42ffa0ef0aecbfbf191867b3122413602b0a360b2a6" dependencies = [ "cc", "libc", @@ -3825,7 +3775,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -3857,9 +3807,9 @@ dependencies = [ [[package]] name = "ostool" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c843408786c18af02d88ba7de7d25f4ff94a137b238a43ce1653c7eceb4b7b" +checksum = "1b4a86102814395817cfeb8ec82a6e6cf5c65c09c36c90dc7a609eaa831a7d3e" dependencies = [ "anyhow", "byte-unit", @@ -3878,7 +3828,7 @@ dependencies = [ "object", "ratatui", "regex", - "reqwest 0.12.24", + "reqwest 0.12.28", "schemars", "serde", "serde_json", @@ -3887,7 +3837,7 @@ dependencies = [ "tar", "tftpd", "tokio", - "toml 0.9.8", + "toml 0.9.10+spec-1.1.0", "uboot-shell", "ureq", ] @@ -3907,6 +3857,8 @@ dependencies = [ [[package]] name = "page_table_entry" version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dda9891ec368fda90e4b2cc36592b4881073e25a339fe7e3eddd811f0cf6bf18" dependencies = [ "aarch64-cpu", "bitflags 2.10.0", @@ -3917,6 +3869,8 @@ dependencies = [ [[package]] name = "page_table_multiarch" version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa11a21844255e14aa6688ef0eafb058d7be19338633024fb59417f1bfb07f8" dependencies = [ "log", "memory_addr", @@ -3943,7 +3897,7 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.18", "smallvec", "windows-link", ] @@ -3987,9 +3941,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "percpu" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e56c0c558952222967b592899f98765b48590e7bd7403bfd7075f73afc6ed6" +checksum = "54ca06381bdd16a5397e23cf61d347b539c765e2c20b2ecc5cb36df88695c1f7" dependencies = [ "cfg-if", "percpu_macros", @@ -3999,13 +3953,14 @@ dependencies = [ [[package]] name = "percpu_macros" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9f4cc54a2e471ff72f1499461ba381ad4eae9cbd60d29c258545b995e406e0" +checksum = "a933d46113c0171aee86623311a9367f2ec3a86dab0a96aba1d5bc627473617e" dependencies = [ + "cfg-if", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -4054,7 +4009,7 @@ dependencies = [ "prettyplease", "quote", "spin 0.10.0", - "syn 2.0.111", + "syn 2.0.113", "thiserror 2.0.17", ] @@ -4067,7 +4022,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -4090,9 +4045,9 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" [[package]] name = "portable-atomic-util" @@ -4124,7 +4079,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.28", + "zerocopy 0.8.31", ] [[package]] @@ -4134,7 +4089,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -4143,7 +4098,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "toml_edit 0.23.7", + "toml_edit 0.23.10+spec-1.0.0", ] [[package]] @@ -4165,14 +4120,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" dependencies = [ "unicode-ident", ] @@ -4249,14 +4204,14 @@ dependencies = [ "once_cell", "socket2 0.6.1", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.42" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -4468,7 +4423,7 @@ checksum = "eab3105c9af32e901a2adc7d920b39ff8b6ee0f6f0b7dfdeaf18f306ec12606f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -4480,6 +4435,15 @@ dependencies = [ "bitflags 2.10.0", ] +[[package]] +name = "redox_syscall" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +dependencies = [ + "bitflags 2.10.0", +] + [[package]] name = "ref-cast" version = "1.0.25" @@ -4497,7 +4461,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -4596,9 +4560,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.24" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", @@ -4606,7 +4570,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.4.12", + "h2 0.4.13", "http 1.4.0", "http-body 1.0.1", "http-body-util", @@ -4694,7 +4658,7 @@ checksum = "e8c4aa1ea1af6dcc83a61be12e8189f9b293c3ba5a487778a4cd89fb060fdbbc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -4724,7 +4688,7 @@ version = "0.1.2" dependencies = [ "axaddrspace", "axerrno 0.1.2", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -4746,6 +4710,7 @@ dependencies = [ [[package]] name = "riscv_vplic" version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/riscv_vplic.git?rev=8bc5213#8bc5213c77139755e1106b49133248392fcb4f58" dependencies = [ "axaddrspace", "axdevice_base", @@ -4786,20 +4751,19 @@ dependencies = [ [[package]] name = "rk3588-clk" -version = "0.1.0" -source = "git+https://github.com/drivercraft/rk3588-clk#2434106bb1838bc2af7c3f4de3ab6bbc15fdeb81" +version = "0.1.1" +source = "git+https://github.com/drivercraft/rk3588-clk#1476c44483e7800ff3c7cb53cdfaf01e72e320d4" dependencies = [ "bare-test-macros", "log", - "mbarrier", "tock-registers 0.10.1", ] [[package]] name = "rkyv" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +checksum = "2297bf9c81a3f0dc96bc9521370b88f054168c29826a75e89c55ff196e7ed6a1" dependencies = [ "bitvec", "bytecheck", @@ -4815,9 +4779,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +checksum = "84d7b42d4b8d06048d3ac8db0eb31bcb942cbeb709f0b5f2b2ebde398d3038f5" dependencies = [ "proc-macro2", "quote", @@ -4849,6 +4813,16 @@ dependencies = [ "tock-registers 0.10.1", ] +[[package]] +name = "rsext4" +version = "0.1.0" +source = "git+https://github.com/Dirinkbottle/rsext4.git?tag=dev-251222#376e253cc6b8767bc14ca5054fbc1ae49f7a8c8d" +dependencies = [ + "bitflags 2.10.0", + "lazy_static", + "log", +] + [[package]] name = "rust_decimal" version = "1.39.0" @@ -4877,6 +4851,15 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.38.44" @@ -4892,22 +4875,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags 2.10.0", "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] name = "rustls" -version = "0.23.35" +version = "0.23.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ "log", "once_cell", @@ -4929,9 +4912,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" dependencies = [ "web-time", "zeroize", @@ -4967,7 +4950,7 @@ checksum = "a71347da9582cc6b6f3652c7d2c06516c9555690b3738ecdff7e84297f4e17fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -4987,9 +4970,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "sbi-rt" @@ -5017,9 +5000,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289" +checksum = "54e910108742c57a770f492731f99be216a52fadd361b06c8fb59d74ccc267d2" dependencies = [ "dyn-clone", "ref-cast", @@ -5030,24 +5013,24 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301858a4023d78debd2353c7426dc486001bddc91ae31a76fb1f55132f7e2633" +checksum = "4908ad288c5035a8eb12cfdf0d49270def0a268ee162b75eeee0f85d155a7c45" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] name = "scope-local" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "231e441739fbe668e91acf8440a0b1ac83c73faec7a6d984190ee25354c2ec9a" +checksum = "4a7d5ed5013e6436fcd78f2bcd3892a6286ef9ce6c9b61504d4c4a08d6a40eab" dependencies = [ "percpu", - "spin 0.9.8", + "spin 0.10.0", ] [[package]] @@ -5163,7 +5146,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5174,20 +5157,20 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -5209,7 +5192,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5223,9 +5206,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ "serde_core", ] @@ -5244,21 +5227,22 @@ dependencies = [ [[package]] name = "serialport" -version = "4.7.3" +version = "4.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acaf3f973e8616d7ceac415f53fc60e190b2a686fbcf8d27d0256c741c5007b" +checksum = "21f60a586160667241d7702c420fc223939fb3c0bb8d3fac84f78768e8970dee" dependencies = [ "bitflags 2.10.0", "cfg-if", - "core-foundation 0.10.1", + "core-foundation 0.10.0", "core-foundation-sys", "io-kit-sys", "libudev", "mach2", "nix", + "quote", "scopeguard", "unescaper", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -5312,18 +5296,19 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.7" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "simdutf8" @@ -5411,7 +5396,7 @@ dependencies = [ "serde", "smccc", "spin 0.10.0", - "toml 0.9.8", + "toml 0.9.10+spec-1.1.0", "url", ] @@ -5488,7 +5473,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5500,7 +5485,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5535,9 +5520,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.111" +version = "2.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +checksum = "678faa00651c9eb72dd2020cbdf275d92eccb2400d568e419efdd64838145cb4" dependencies = [ "proc-macro2", "quote", @@ -5567,7 +5552,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5631,15 +5616,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.23.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ "fastrand", "getrandom 0.3.4", "once_cell", - "rustix 1.1.2", - "windows-sys 0.59.0", + "rustix 1.1.3", + "windows-sys 0.61.2", ] [[package]] @@ -5674,7 +5659,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5685,7 +5670,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5772,9 +5757,9 @@ checksum = "8d2d250f87fb3fb6f225c907cf54381509f47b40b74b1d1f12d2dccbc915bdfe" [[package]] name = "tokio" -version = "1.48.0" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ "bytes", "libc", @@ -5795,7 +5780,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -5820,9 +5805,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.17" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -5845,14 +5830,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.8" +version = "0.9.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" +checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" dependencies = [ "indexmap", "serde_core", - "serde_spanned 1.0.3", - "toml_datetime 0.7.3", + "serde_spanned 1.0.4", + "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "toml_writer", "winnow", @@ -5869,9 +5854,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] @@ -5892,21 +5877,21 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.23.7" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ "indexmap", - "toml_datetime 0.7.3", + "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "winnow", ] [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] @@ -5919,9 +5904,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "toml_writer" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "tower" @@ -5941,9 +5926,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "bitflags 2.10.0", "bytes", @@ -5981,9 +5966,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -5992,9 +5977,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.35" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", ] @@ -6009,7 +5994,7 @@ dependencies = [ "lenient_semver", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -6059,9 +6044,9 @@ dependencies = [ [[package]] name = "unescaper" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c01d12e3a56a4432a8b436f293c25f4808bdf9e9f9f98f9260bba1f1bc5a1f26" +checksum = "4064ed685c487dbc25bd3f0e9548f2e34bab9d18cefc700f9ec2dba74ba1138e" dependencies = [ "thiserror 2.0.17", ] @@ -6156,9 +6141,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.7" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", @@ -6192,9 +6177,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.18.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" dependencies = [ "js-sys", "wasm-bindgen", @@ -6313,7 +6298,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", "wasm-bindgen-shared", ] @@ -6348,9 +6333,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" +checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" dependencies = [ "rustls-pki-types", ] @@ -6398,7 +6383,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -6409,7 +6394,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -6774,7 +6759,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno 0.1.2", - "axvcpu 0.1.2", + "axvcpu 0.1.1", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -6816,7 +6801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", - "rustix 1.1.2", + "rustix 1.1.3", ] [[package]] @@ -6838,15 +6823,14 @@ dependencies = [ "flate2", "jkconfig", "ostool", - "reqwest 0.12.24", + "reqwest 0.12.28", "schemars", "serde", "serde_json", "sha2", "tar", "tokio", - "toml 0.9.8", - "zerocopy 0.8.28", + "toml 0.9.10+spec-1.1.0", ] [[package]] @@ -6868,7 +6852,7 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", "synstructure", ] @@ -6884,11 +6868,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.28" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43fa6694ed34d6e57407afbccdeecfa268c470a7d2a5b0cf49ce9fcc345afb90" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" dependencies = [ - "zerocopy-derive 0.8.28", + "zerocopy-derive 0.8.31", ] [[package]] @@ -6899,18 +6883,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] name = "zerocopy-derive" -version = "0.8.28" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c640b22cd9817fae95be82f0d2f90b11f7605f6c319d16705c459b27ac2cbc26" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] [[package]] @@ -6930,7 +6914,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", "synstructure", ] @@ -6970,5 +6954,11 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.113", ] + +[[package]] +name = "zmij" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" diff --git a/Cargo.toml b/Cargo.toml index 83702541..4e8d655b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,37 +90,23 @@ axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"} axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} [patch.crates-io] -axvcpu = {path="crates/axvcpu"} -axvmconfig = {path = "crates/axvmconfig"} -# riscv = {git = "https://github.com/liulog/riscv.git", branch = "master"} -axcpu = {path = "crates/axcpu"} +axvmconfig = { path = "crates/axvmconfig" } axvisor_api = {path = "../axvisor_api"} -page_table_entry = { path = "../page_table_multiarch/page_table_entry" } -page_table_multiarch = { path = "../page_table_multiarch/page_table_multiarch", features = ["stage-2"]} -axaddrspace = {path = "crates/axaddrspace"} +# page_table_entry = { path = "../page_table_multiarch/page_table_entry" } +# page_table_multiarch = { path = "../page_table_multiarch/page_table_multiarch", features = ["stage-2"]} [patch."https://github.com/arceos-hypervisor/axvmconfig.git"] axvmconfig = {path = "crates/axvmconfig"} -[patch."https://github.com/arceos-org/arceos"] -axconfig = {path = "modules/axconfig"} -axruntime = {path = "modules/axruntime"} -axfs = {path = "modules/axfs"} -axhal = {path = "../arceos/modules/axhal"} -axalloc = {path = "../arceos/modules/axalloc"} -axdriver = {path = "../arceos/modules/axdriver"} +[patch."https://github.com/arceos-org/arceos.git"] +axconfig = { path = "modules/axconfig" } +axruntime = { path = "modules/axruntime" } [patch."https://github.com/arceos-hypervisor/axvm.git"] axvm = {path = "crates/axvm"} [patch."https://github.com/liulog/riscv_vcpu.git"] -riscv_vcpu = {path = "crates/riscv_vcpu"} - -[patch."https://github.com/arceos-org/axcpu.git"] -axcpu = {path = "crates/axcpu"} - -[patch."https://github.com/arceos-hypervisor/arm_vcpu.git"] -arm_vcpu = {path = "crates/arm_vcpu"} +riscv_vcpu = { path = "crates/riscv_vcpu" } [patch."https://github.com/arceos-hypervisor/axdevice.git"] axdevice = {git = "https://github.com/liulog/axdevice", branch = "master"} diff --git a/configs/vms/arceos-riscv64-qemu-smp1.toml b/configs/vms/arceos-riscv64-qemu-smp1.toml index 3c68c0d0..3ec1f67c 100644 --- a/configs/vms/arceos-riscv64-qemu-smp1.toml +++ b/configs/vms/arceos-riscv64-qemu-smp1.toml @@ -20,9 +20,9 @@ phys_cpu_ids = [0] entry_point = 0x8020_0000 # The location of image: "memory" | "fs". # load from memory. -image_location = "memory" +image_location = "fs" # The file path of the kernel image. -kernel_path = "path/arceos-riscv64-smp1.bin" +kernel_path = "/guest/helloworld_riscv64-qemu-virt.bin" # The load address of the kernel image. kernel_load_addr = 0x8020_0000 # The file path of the device tree blob (DTB). diff --git a/configs/vms/linux-riscv64-qemu-smp1.dts b/configs/vms/linux-riscv64-qemu-smp1.dts new file mode 100644 index 00000000..7a09d097 --- /dev/null +++ b/configs/vms/linux-riscv64-qemu-smp1.dts @@ -0,0 +1,132 @@ +/dts-v1/; + +/ { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "riscv-virtio"; + model = "riscv-virtio,qemu"; + + memory@90000000 { + device_type = "memory"; + reg = <0x00 0x90000000 0x00 0x40000000>; + }; + + cpus { + #address-cells = <0x01>; + #size-cells = <0x00>; + timebase-frequency = <0x989680>; + + cpu@0 { + phandle = <0x07>; + device_type = "cpu"; + reg = <0x00>; + status = "okay"; + compatible = "riscv"; + riscv,cbop-block-size = <0x40>; + riscv,cboz-block-size = <0x40>; + riscv,cbom-block-size = <0x40>; + riscv,isa-extensions = "i\0m\0a\0f\0d\0c"; + riscv,isa-base = "rv64i"; + riscv,isa = "rv64imafdc"; + mmu-type = "riscv,sv39"; + + interrupt-controller { + #interrupt-cells = <0x01>; + interrupt-controller; + compatible = "riscv,cpu-intc"; + phandle = <0x08>; + }; + }; + }; + + aliases { + serial0 = "/soc/serial@10000000"; + }; + + chosen { + bootargs = "earlycon=sbi console=ttyS0,115200 init=/init root=/dev/vda rw"; + stdout-path = "/soc/serial@10000000"; + }; + + soc { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "simple-bus"; + ranges; + + serial@10000000 { + interrupts = <0x0a>; + interrupt-parent = <0x09>; + clock-frequency = "\08@"; + reg = <0x00 0x10000000 0x00 0x100>; + compatible = "ns16550a"; + }; + + plic@c000000 { + phandle = <0x09>; + riscv,ndev = <0x5f>; + reg = <0x00 0xc000000 0x00 0x600000>; + interrupts-extended = <0x08 0x0b 0x08 0x09>; + interrupt-controller; + compatible = "sifive,plic-1.0.0\0riscv,plic0"; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + }; + + virtio_mmio@10008000 { + interrupts = <0x08>; + interrupt-parent = <0x09>; + reg = <0x00 0x10008000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@10007000 { + interrupts = <0x07>; + interrupt-parent = <0x09>; + reg = <0x00 0x10007000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@10006000 { + interrupts = <0x06>; + interrupt-parent = <0x09>; + reg = <0x00 0x10006000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@10005000 { + interrupts = <0x05>; + interrupt-parent = <0x09>; + reg = <0x00 0x10005000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@10004000 { + interrupts = <0x04>; + interrupt-parent = <0x09>; + reg = <0x00 0x10004000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@10003000 { + interrupts = <0x03>; + interrupt-parent = <0x09>; + reg = <0x00 0x10003000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@10002000 { + interrupts = <0x02>; + interrupt-parent = <0x09>; + reg = <0x00 0x10002000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + + virtio_mmio@10001000 { + interrupts = <0x01>; + interrupt-parent = <0x09>; + reg = <0x00 0x10001000 0x00 0x1000>; + compatible = "virtio,mmio"; + }; + }; +}; diff --git a/configs/vms/linux-riscv64-qemu-smp1.toml b/configs/vms/linux-riscv64-qemu-smp1.toml index e849a54d..dbc6799b 100644 --- a/configs/vms/linux-riscv64-qemu-smp1.toml +++ b/configs/vms/linux-riscv64-qemu-smp1.toml @@ -20,14 +20,14 @@ phys_cpu_ids = [0] entry_point = 0x8020_0000 # The location of image: "memory" | "fs". # load from memory. -image_location = "memory" +image_location = "fs" # The file path of the kernel image. # kernel_path = "linux-6.6.62.bin" -kernel_path = "tmp/Image" +kernel_path = "/guest/qemu-riscv64" # The load address of the kernel image. kernel_load_addr = 0x8020_0000 # The file path of the device tree blob (DTB). -#dtb_path = "tmp/linux-aarch64-qemu-smp1.dtb" +dtb_path = "/guest/linux-aarch64-qemu-smp1.dtb" # The load address of the device tree blob (DTB). dtb_load_addr = 0x8000_0000 diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 066feae1..691e845f 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -63,7 +63,7 @@ aarch64-cpu-ext = "0.1" arm-gic-driver = {version = "0.15.5", features = ["rdif"]} [target.'cfg(target_arch = "riscv64")'.dependencies] -riscv_vplic = { path="../crates/riscv_vplic" } +riscv_vplic = { git = "https://github.com/arceos-hypervisor/riscv_vplic.git", rev = "8bc5213" } riscv_vcpu = { git = "https://github.com/liulog/riscv_vcpu.git", branch = "master" } [build-dependencies] diff --git a/modules/axconfig/src/lib.rs b/modules/axconfig/src/lib.rs index 82d22f6a..b9010f32 100644 --- a/modules/axconfig/src/lib.rs +++ b/modules/axconfig/src/lib.rs @@ -40,7 +40,7 @@ pub mod devices { #[doc = " Timer interrupt num (PPI, physical timer)."] pub const TIMER_IRQ: usize = 0xf0; #[doc = " VirtIO MMIO regions with format (`base_paddr`, `size`)."] - pub const VIRTIO_MMIO_REGIONS: &[(usize, usize)] = &[]; + pub const VIRTIO_MMIO_RANGES: &[(usize, usize)] = &[]; } #[doc = ""] #[doc = " Platform configs"] diff --git a/modules/axruntime/Cargo.toml b/modules/axruntime/Cargo.toml index a7e216b1..6d42a51e 100644 --- a/modules/axruntime/Cargo.toml +++ b/modules/axruntime/Cargo.toml @@ -30,7 +30,7 @@ axalloc = {workspace = true, optional = true} axconfig = {workspace = true} axdisplay = {workspace = true, optional = true} axdriver = {workspace = true, optional = true} -axerrno = "0.1" +axerrno = {workspace = true} axfs = {workspace = true, optional = true} axhal = {workspace = true} axipi = {workspace = true, optional = true} diff --git a/platform/riscv64-qemu-virt/axconfig.toml b/platform/riscv64-qemu-virt/axconfig.toml index f541767c..ddcb024e 100644 --- a/platform/riscv64-qemu-virt/axconfig.toml +++ b/platform/riscv64-qemu-virt/axconfig.toml @@ -13,8 +13,8 @@ package = "axplat-riscv64-qemu-virt" # str cpu-num = 4 # uint # Base address of the whole physical memory. phys-memory-base = 0x8000_0000 # uint -# Size of the whole physical memory. (4GB) -phys-memory-size = 0x1_0000_0000 # uint +# Size of the whole physical memory. (8GB) +phys-memory-size = 0x2_0000_0000 # uint # Base physical address of the kernel image. kernel-base-paddr = 0x8020_0000 # uint # Base virtual address of the kernel image. diff --git a/xtask/src/image.rs b/xtask/src/image.rs index dcde79bf..4d9eb76b 100644 --- a/xtask/src/image.rs +++ b/xtask/src/image.rs @@ -32,7 +32,7 @@ use tokio::io::{AsyncWriteExt, BufWriter}; /// Base URL for downloading images const IMAGE_URL_BASE: &str = - "https://github.com/arceos-hypervisor/axvisor-guest/releases/download/v0.0.20/"; + "https://github.com/arceos-hypervisor/axvisor-guest/releases/download/v0.0.22/"; /// Image management command line arguments. #[derive(Parser)] From cce31218ba07d270249e686f8c00c3269e0dcabc Mon Sep 17 00:00:00 2001 From: YanLien Date: Wed, 7 Jan 2026 15:30:08 +0800 Subject: [PATCH 09/22] Update Cargo.toml and configuration files for ArceOS support; adjust dependencies and paths for modules --- Cargo.lock | 28 ++++++++++++++++------- Cargo.toml | 3 +-- configs/vms/arceos-riscv64-qemu-smp1.toml | 8 +++---- configs/vms/linux-riscv64-qemu-smp1.toml | 25 +++++++++----------- kernel/Cargo.toml | 2 +- modules/axconfig/src/lib.rs | 11 ++++++++- modules/axruntime/src/lib.rs | 1 - platform/riscv64-qemu-virt/axconfig.toml | 3 ++- 8 files changed, 48 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f3ab8b48..8d1b4cfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1118,6 +1118,17 @@ dependencies = [ "tracing", ] +[[package]] +name = "axvcpu" +version = "0.1.1" +dependencies = [ + "axaddrspace", + "axerrno 0.1.2", + "axvisor_api", + "memory_addr", + "percpu", +] + [[package]] name = "axvcpu" version = "0.1.1" @@ -1154,11 +1165,12 @@ dependencies = [ "axconfig", "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", "axdevice_base", + "axdriver", "axerrno 0.2.2", "axhvc", "axruntime", "axstd", - "axvcpu 0.1.1", + "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "axvisor_api", "axvm", "bitflags 2.10.0", @@ -1221,7 +1233,7 @@ dependencies = [ "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", "axdevice_base", "axerrno 0.2.2", - "axvcpu 0.1.1", + "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "axvmconfig", "cfg-if", "cpumask", @@ -2368,7 +2380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4204,7 +4216,7 @@ dependencies = [ "once_cell", "socket2 0.6.1", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] @@ -4688,7 +4700,7 @@ version = "0.1.2" dependencies = [ "axaddrspace", "axerrno 0.1.2", - "axvcpu 0.1.1", + "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -4883,7 +4895,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5624,7 +5636,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.3", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6759,7 +6771,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno 0.1.2", - "axvcpu 0.1.1", + "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "axvisor_api", "bit_field", "bitflags 2.10.0", diff --git a/Cargo.toml b/Cargo.toml index 4e8d655b..35820b0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,8 +92,7 @@ axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branc [patch.crates-io] axvmconfig = { path = "crates/axvmconfig" } axvisor_api = {path = "../axvisor_api"} -# page_table_entry = { path = "../page_table_multiarch/page_table_entry" } -# page_table_multiarch = { path = "../page_table_multiarch/page_table_multiarch", features = ["stage-2"]} +# axvcpu = { path = "./crates/axvcpu" } [patch."https://github.com/arceos-hypervisor/axvmconfig.git"] axvmconfig = {path = "crates/axvmconfig"} diff --git a/configs/vms/arceos-riscv64-qemu-smp1.toml b/configs/vms/arceos-riscv64-qemu-smp1.toml index 3ec1f67c..c80c906d 100644 --- a/configs/vms/arceos-riscv64-qemu-smp1.toml +++ b/configs/vms/arceos-riscv64-qemu-smp1.toml @@ -20,9 +20,9 @@ phys_cpu_ids = [0] entry_point = 0x8020_0000 # The location of image: "memory" | "fs". # load from memory. -image_location = "fs" +image_location = "memory" # The file path of the kernel image. -kernel_path = "/guest/helloworld_riscv64-qemu-virt.bin" +kernel_path = "/path/tmp/images/helloworld_riscv64-qemu-virt.bin" # The load address of the kernel image. kernel_load_addr = 0x8020_0000 # The file path of the device tree blob (DTB). @@ -40,7 +40,7 @@ dtb_load_addr = 0x8220_0000 # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x8000_0000, 0x4000_0000, 0x7, 1], # System RAM 1G MAP_ALLOC + [0x8000_0000, 0x800_0000, 0x7, 0], # System RAM 1G MAP_ALLOC ] # @@ -49,7 +49,6 @@ memory_regions = [ [devices] # Pass-through devices. passthrough_devices = [ - ["/",], ] # Passthrough addresses. @@ -60,7 +59,6 @@ passthrough_addresses = [ # Devices that are not desired to be passed through to the guest excluded_devices = [ - ["/pci@30000000"], ] # Emu_devices. diff --git a/configs/vms/linux-riscv64-qemu-smp1.toml b/configs/vms/linux-riscv64-qemu-smp1.toml index dbc6799b..cf7ee30a 100644 --- a/configs/vms/linux-riscv64-qemu-smp1.toml +++ b/configs/vms/linux-riscv64-qemu-smp1.toml @@ -17,24 +17,24 @@ phys_cpu_ids = [0] # [kernel] # The entry point of the kernel image. -entry_point = 0x8020_0000 +entry_point = 0x9000_0000 # The location of image: "memory" | "fs". # load from memory. -image_location = "fs" +image_location = "memory" # The file path of the kernel image. # kernel_path = "linux-6.6.62.bin" -kernel_path = "/guest/qemu-riscv64" +kernel_path = "/path/tmp/images/qemu_riscv64_linux/qemu-riscv64" # The load address of the kernel image. -kernel_load_addr = 0x8020_0000 +kernel_load_addr = 0x9000_0000 # The file path of the device tree blob (DTB). -dtb_path = "/guest/linux-aarch64-qemu-smp1.dtb" +dtb_path = "/path/tmp/configs/linux-riscv64-qemu-smp1.dtb" # The load address of the device tree blob (DTB). -dtb_load_addr = 0x8000_0000 +dtb_load_addr = 0x9200_0000 # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x8000_0000, 0x1000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL + [0x9000_0000, 0x4000_0000, 0x7, 2], # System RAM 1G MAP_IDENTICAL ] # @@ -44,27 +44,24 @@ memory_regions = [ # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ - ["/"], - #["/timer"], + # ["/soc/serial@10000000", 0x1000_0000, 0x1000_0000, 0x1000, 33], ] # Passthrough addresses. # Base-GPA Length. passthrough_addresses = [ - #[0x28041000, 0x100_0000] + [0x1000_0000, 0x1000], # uart + [0x1000_1000, 0x8000], # virtio-mmio ] # Devices that are not desired to be passed through to the guest excluded_devices = [ - # ["/gic-v3"], ] # Emu_devices. # Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. emu_devices = [ - # ["gppt-gicd", 0x0800_0000, 0x1_0000, 0, 0x21, []], - # ["gppt-gicr", 0x080a_0000, 0x2_0000, 0, 0x20, [1, 0x2_0000, 0]], # 1 vcpu, stride 0x20000, starts with pcpu 0 - # ["gppt-gits", 0x0808_0000, 0x2_0000, 0, 0x22, [0x0808_0000]], # host_gits_base + ["plic", 0x0c00_0000, 0x60_0000, 0, 0x30, [2]], # [context_num] ] interrupt_mode = "passthrough" diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 691e845f..3a778720 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -36,6 +36,7 @@ axhvc.workspace = true axruntime = {workspace = true, features = ["alloc", "irq", "paging", "smp", "multitask"]} axvcpu.workspace = true axvm.workspace = true +axdriver.workspace = true # System independent crates provided by ArceOS, these crates could be imported by remote url. axerrno.workspace = true @@ -57,7 +58,6 @@ axdevice_base = "0.1" axvisor_api = "0.1" driver.workspace = true - [target.'cfg(target_arch = "aarch64")'.dependencies] aarch64-cpu-ext = "0.1" arm-gic-driver = {version = "0.15.5", features = ["rdif"]} diff --git a/modules/axconfig/src/lib.rs b/modules/axconfig/src/lib.rs index b9010f32..554efd0d 100644 --- a/modules/axconfig/src/lib.rs +++ b/modules/axconfig/src/lib.rs @@ -40,7 +40,16 @@ pub mod devices { #[doc = " Timer interrupt num (PPI, physical timer)."] pub const TIMER_IRQ: usize = 0xf0; #[doc = " VirtIO MMIO regions with format (`base_paddr`, `size`)."] - pub const VIRTIO_MMIO_RANGES: &[(usize, usize)] = &[]; + pub const VIRTIO_MMIO_RANGES: &[(usize, usize)] = &[ + (0x1000_1000, 0x1000), + (0x1000_2000, 0x1000), + (0x1000_3000, 0x1000), + (0x1000_4000, 0x1000), + (0x1000_5000, 0x1000), + (0x1000_6000, 0x1000), + (0x1000_7000, 0x1000), + (0x1000_8000, 0x1000), + ]; } #[doc = ""] #[doc = " Platform configs"] diff --git a/modules/axruntime/src/lib.rs b/modules/axruntime/src/lib.rs index 4d483fe9..41e9a3d3 100644 --- a/modules/axruntime/src/lib.rs +++ b/modules/axruntime/src/lib.rs @@ -128,7 +128,6 @@ pub fn rust_main(cpu_id: usize, arg: usize) -> ! { // build_mode = {}\n\ // smp = {}\n\ // ", - // ); #[cfg(feature = "rtc")] ax_println!( diff --git a/platform/riscv64-qemu-virt/axconfig.toml b/platform/riscv64-qemu-virt/axconfig.toml index ddcb024e..581a4a74 100644 --- a/platform/riscv64-qemu-virt/axconfig.toml +++ b/platform/riscv64-qemu-virt/axconfig.toml @@ -14,7 +14,7 @@ cpu-num = 4 # uint # Base address of the whole physical memory. phys-memory-base = 0x8000_0000 # uint # Size of the whole physical memory. (8GB) -phys-memory-size = 0x2_0000_0000 # uint +phys-memory-size = 0x1_0000_0000 # uint # Base physical address of the kernel image. kernel-base-paddr = 0x8020_0000 # uint # Base virtual address of the kernel image. @@ -44,6 +44,7 @@ mmio-ranges = [ [0x1000_1000, 0x8000], # VirtIO [0x3000_0000, 0x1000_0000], # PCI config space [0x4000_0000, 0x4000_0000], # PCI memory ranges (ranges 1: 32-bit MMIO space) + [0x2_7fe0_0000, 0x1000_0000] ] # [(uint, uint)] # VirtIO MMIO ranges with format (`base_paddr`, `size`). virtio-mmio-ranges = [ From 8406c5c0df9ef0e14ce238fd62c9ab372e09adf8 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Wed, 21 Jan 2026 21:37:45 +0800 Subject: [PATCH 10/22] adopt `aar-master` branch, remove `HalImpl`s --- Cargo.lock | 754 +++--------------- Cargo.toml | 26 +- kernel/Cargo.toml | 6 +- kernel/src/hal/impl_host.rs | 11 + kernel/src/hal/impl_memory.rs | 53 ++ kernel/src/hal/impl_time.rs | 33 + kernel/src/hal/impl_vmm.rs | 75 ++ kernel/src/hal/mod.rs | 195 +---- kernel/src/vmm/mod.rs | 11 +- modules/axconfig/src/lib.rs | 2 +- modules/axfs/src/fs/fatfs.rs | 2 +- modules/axfs/src/lib.rs | 2 +- modules/axfs/src/partition.rs | 4 +- .../driver/src/soc/rockchip/clk/rk3568-clk.rs | 2 +- platform/x86-qemu-q35/Cargo.toml | 2 +- platform/x86-qemu-q35/src/mp.rs | 4 +- xtask/src/cargo.rs | 2 +- xtask/src/image.rs | 18 +- xtask/src/main.rs | 18 +- xtask/src/menuconfig.rs | 5 +- 20 files changed, 382 insertions(+), 843 deletions(-) create mode 100644 kernel/src/hal/impl_host.rs create mode 100644 kernel/src/hal/impl_memory.rs create mode 100644 kernel/src/hal/impl_time.rs create mode 100644 kernel/src/hal/impl_vmm.rs diff --git a/Cargo.lock b/Cargo.lock index 0b7e56a3..2d197ed4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,13 +11,22 @@ dependencies = [ "tock-registers 0.9.0", ] +[[package]] +name = "aarch64-cpu" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44171e22925ec72b63d86747bc3655c7849a5b8d865c980222128839f45ac034" +dependencies = [ + "tock-registers 0.10.1", +] + [[package]] name = "aarch64-cpu-ext" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52dad5cf7342926ce1c375ec680834e56dd3cdbe8b7adf8a6f99b2854cc52c17" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "tock-registers 0.10.1", ] @@ -27,17 +36,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a2c929f5025d9b8a0f549b187c4d3a39671f44015ff6ccddd0b134c874b3c1a" -[[package]] -name = "abi-singleton" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbdf894742ece5360a74aa8278c42e0f305aa9f7c35d43ebc9cceca105f7e434" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "addr2line" version = "0.25.1" @@ -112,15 +110,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_rgb" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a730095eb14ee842a0f1e68504b85c8d4a19b1ef2ac2a9b4debf0ed982f9b08a" -dependencies = [ - "rgb", -] - [[package]] name = "anstream" version = "0.6.21" @@ -212,32 +201,18 @@ dependencies = [ "axtask", ] -[[package]] -name = "arm-gic-driver" -version = "0.14.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a886a953642fbf21eb5928c49a05f021fae007219ae8cb2dafbf403dfeba974a" -dependencies = [ - "aarch64-cpu", - "bitflags 2.10.0", - "enum_dispatch", - "log", - "rdif-intc 0.11.0", - "tock-registers 0.9.0", -] - [[package]] name = "arm-gic-driver" version = "0.15.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5487b0a69ebddf2f8affd1e0d32a875fc6213b3a15e3315f9d7beb34b174d457" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "bitflags 2.10.0", "enum_dispatch", "log", "paste", - "rdif-intc 0.12.1", + "rdif-intc", "tock-registers 0.9.0", ] @@ -262,12 +237,12 @@ dependencies = [ [[package]] name = "arm_vcpu" version = "0.1.1" -source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=next#b24cc3635c049302ab8d58d3b54007bb5a053a96" +source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=aar-master#3170912a4ff784385691f1ca169e4f87d687e3bf" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 11.2.0", "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvcpu", "axvisor_api", "log", @@ -279,19 +254,18 @@ dependencies = [ [[package]] name = "arm_vgic" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f576b11b486e2ca12373c8205c4a06473a85cf7a664845e5961c47948910c3" +source = "git+https://github.com/arceos-hypervisor/arm_vgic?branch=aar-master#1b145dc767a8d3e0c6f677f26474959de10e6ccf" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 11.2.0", "aarch64_sysreg", "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvisor_api", "bitmaps", "log", - "memory_addr 0.4.1", - "spin 0.9.8", + "memory_addr", + "spin 0.10.0", "tock-registers 0.10.1", ] @@ -332,17 +306,16 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axaddrspace" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06b129114ab36be728ef11dd6540559c30deb6332378157d22bdc0aae6803a63" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axaddrspace?branch=aar-master#16163ef4a4516fa2d5b51c8b08f5940d1ff31f04" dependencies = [ - "axerrno 0.1.2", + "axerrno 0.2.2", "bit_field", "bitflags 2.10.0", "cfg-if", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "memory_set", "numeric-enum-macro", "page_table_entry", @@ -360,7 +333,7 @@ dependencies = [ "cfg-if", "kspin", "log", - "memory_addr 0.4.1", + "memory_addr", "strum 0.27.2", ] @@ -409,14 +382,14 @@ name = "axcpu" version = "0.3.0" source = "git+https://github.com/arceos-org/axcpu.git?tag=dev-v03#72ef3859952b7340bae261c9a50c32705e602017" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "axbacktrace", "cfg-if", "lazyinit", "linkme", "log", "loongArch64", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "page_table_multiarch", "percpu", @@ -430,31 +403,30 @@ dependencies = [ [[package]] name = "axdevice" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axdevice.git#75d9db284fd4c9ee9607c2fd84967461eeaf5b07" +source = "git+https://github.com/arceos-hypervisor/axdevice.git?branch=aar-master#9e35b2f6bb8d80eeff134dc0f9e80a8085e261d8" dependencies = [ "arm_vgic", "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvmconfig", "cfg-if", "log", - "memory_addr 0.4.1", + "memory_addr", "range-alloc", - "spin 0.9.8", + "spin 0.10.0", ] [[package]] name = "axdevice_base" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c43baf33ed4790ffd3365c4ca027a1e3d1c2b6058f4605b67bca04cadf48d5" +source = "git+https://github.com/arceos-hypervisor/axdevice_crates?branch=aar-master#f5d6ebe2a1a65f5872f75799cfbc2fd85fa13b85" dependencies = [ "axaddrspace", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvmconfig", "cfg-if", - "memory_addr 0.4.1", + "memory_addr", "serde", ] @@ -474,7 +446,7 @@ name = "axdriver" version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ - "arm-gic-driver 0.15.9", + "arm-gic-driver", "axalloc", "axconfig", "axdriver_base 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", @@ -488,13 +460,13 @@ dependencies = [ "axklib", "axmm", "cfg-if", - "crate_interface", + "crate_interface 0.1.4", "dma-api 0.5.2", "log", - "memory_addr 0.4.1", - "rdif-block 0.6.2", - "rdif-intc 0.12.1", - "rdrive 0.18.11", + "memory_addr", + "rdif-block", + "rdif-intc", + "rdrive", "smallvec", "spin 0.10.0", ] @@ -615,7 +587,7 @@ dependencies = [ "fatfs", "lazyinit", "log", - "rsext4 0.1.0 (git+https://github.com/Dirinkbottle/rsext4.git?tag=dev-251222)", + "rsext4", "spin 0.9.8", ] @@ -661,7 +633,7 @@ dependencies = [ "lazyinit", "linkme", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_multiarch", "percpu", ] @@ -703,7 +675,7 @@ version = "0.2.0" source = "git+https://github.com/arceos-hypervisor/axklib.git#7c0fc0588f978f7d75bb94f4e07477776ed37887" dependencies = [ "axerrno 0.1.2", - "memory_addr 0.4.1", + "memory_addr", "trait-ffi", ] @@ -713,7 +685,7 @@ version = "0.2.0" source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" dependencies = [ "cfg-if", - "crate_interface", + "crate_interface 0.1.4", "kspin", "log", ] @@ -730,7 +702,7 @@ dependencies = [ "kspin", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "memory_set", ] @@ -760,10 +732,10 @@ dependencies = [ "axplat-macros", "bitflags 2.10.0", "const-str", - "crate_interface", + "crate_interface 0.1.4", "handler_table", "kspin", - "memory_addr 0.4.1", + "memory_addr", "percpu", ] @@ -772,10 +744,10 @@ name = "axplat-aarch64-dyn" version = "0.4.0" source = "git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn.git?tag=v0.4.0#05d5acd43d925807496255a9b9e1aa2d272bb591" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "aarch64-cpu-ext", "any-uart", - "arm-gic-driver 0.15.9", + "arm-gic-driver", "axconfig-macros", "axcpu", "axplat", @@ -783,12 +755,12 @@ dependencies = [ "heapless 0.8.0", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "paste", "percpu", - "rdif-intc 0.12.1", - "rdrive 0.18.11", + "rdif-intc", + "rdrive", "serde", "somehal", "spin 0.10.0", @@ -800,8 +772,8 @@ name = "axplat-aarch64-peripherals" version = "0.3.0" source = "git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03#0df0713b1c20eafaeebdc6b0e194b2985e857949" dependencies = [ - "aarch64-cpu", - "arm-gic-driver 0.15.9", + "aarch64-cpu 10.0.0", + "arm-gic-driver", "arm_pl011", "arm_pl031", "axcpu", @@ -948,7 +920,7 @@ dependencies = [ "axtask", "cfg-if", "chrono", - "crate_interface", + "crate_interface 0.1.4", "ctor_bare", "log", "percpu", @@ -1000,7 +972,7 @@ dependencies = [ "axsched", "cfg-if", "cpumask", - "crate_interface", + "crate_interface 0.1.4", "event-listener", "extern-trait", "futures-util", @@ -1008,7 +980,7 @@ dependencies = [ "kspin", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "percpu", ] @@ -1067,12 +1039,12 @@ dependencies = [ [[package]] name = "axvcpu" version = "0.1.2" -source = "git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next#343ec3ccf99a86fb9c67a7b0372e9b7a745f0640" +source = "git+https://github.com/arceos-hypervisor/axvcpu?branch=aar-master#62425896e4fb112efd414c0a49290086bfec6b5c" dependencies = [ "axaddrspace", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvisor_api", - "memory_addr 0.4.1", + "memory_addr", "percpu", ] @@ -1082,7 +1054,7 @@ version = "0.0.0" dependencies = [ "aarch64-cpu-ext", "anyhow", - "arm-gic-driver 0.15.9", + "arm-gic-driver", "axaddrspace", "axconfig", "axdevice", @@ -1098,7 +1070,7 @@ dependencies = [ "byte-unit", "cfg-if", "cpumask", - "crate_interface", + "crate_interface 0.2.0", "driver", "extern-trait", "fdt-parser", @@ -1107,15 +1079,15 @@ dependencies = [ "lazy_static", "lazyinit", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "page_table_multiarch", "percpu", "prettyplease", "quote", - "rdif-intc 0.12.1", - "rdrive 0.18.11", - "spin 0.9.8", + "rdif-intc", + "rdrive", + "spin 0.10.0", "syn 2.0.111", "timer_list", "toml 0.9.10+spec-1.1.0", @@ -1124,21 +1096,20 @@ dependencies = [ [[package]] name = "axvisor_api" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa7233b2a1338dc06a80e2779b572b4df02007ea128ef7b235b66fc3eeac0ca6" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axvisor_api?branch=aar-master#657ef629e46738f8b32987cf1de7a5950c1ba904" dependencies = [ "axaddrspace", "axvisor_api_proc", - "crate_interface", - "memory_addr 0.4.1", + "cpumask", + "crate_interface 0.2.0", + "memory_addr", ] [[package]] name = "axvisor_api_proc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a64eb4410ae8357ac8c01c2fb201e57d7aeeb5436ed4d0f5774bfa11cc5902" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axvisor_api?branch=aar-master#657ef629e46738f8b32987cf1de7a5950c1ba904" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1149,7 +1120,7 @@ dependencies = [ [[package]] name = "axvm" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=next#e161233e58c0ef0c6ec115ffa5b0d17dadd298be" +source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=aar-master#7185c2fdd3b372fab96c82f42f7d81b24e0c99f0" dependencies = [ "arm_vcpu", "arm_vgic", @@ -1158,25 +1129,26 @@ dependencies = [ "axdevice_base", "axerrno 0.2.2", "axvcpu", + "axvisor_api", "axvmconfig", "cfg-if", "cpumask", "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "page_table_multiarch", "percpu", "riscv_vcpu", - "spin 0.9.8", + "spin 0.10.0", "x86_vcpu", ] [[package]] name = "axvmconfig" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=next#5a8b64a47510b17da71e54cabbdf8c999ba2e2c9" +source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=aar-master#494b8d6d56fe9b7e155837801fcc75a4990f06b8" dependencies = [ - "axerrno 0.1.2", + "axerrno 0.2.2", "clap", "enumerable", "env_logger", @@ -1208,19 +1180,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" -[[package]] -name = "bare-test" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7dfcf95987c500af4665d8a18adbc5e7d3177a2537964f48002b88e28fb055e" -dependencies = [ - "bare-test-macros", - "log", - "sparreal-kernel", - "sparreal-macros 0.9.3", - "sparreal-rt", -] - [[package]] name = "bare-test-macros" version = "0.2.0" @@ -1264,26 +1223,6 @@ dependencies = [ "tar", ] -[[package]] -name = "bindgen" -version = "0.71.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" -dependencies = [ - "bitflags 2.10.0", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.111", -] - [[package]] name = "bit" version = "0.1.1" @@ -1367,15 +1306,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "buddy_system_allocator" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0108968a3a2dab95b089c0fc3f1afa7759aa5ebe6f1d86d206d6f7ba726eb" -dependencies = [ - "spin 0.9.8", -] - [[package]] name = "bumpalo" version = "3.19.1" @@ -1541,15 +1471,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.4" @@ -1575,17 +1496,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.5.53" @@ -1768,6 +1678,17 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "crate_interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15627e437dc14b22c0a7b8cfc7143fbab68aa6d740df2d695152b1dca58cdf17" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "crc" version = "3.4.0" @@ -1866,16 +1787,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "cstr_core" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd98742e4fdca832d40cab219dc2e3048de17d873248f83f17df47c1bea70956" -dependencies = [ - "cty", - "memchr", -] - [[package]] name = "ctor_bare" version = "0.2.1" @@ -1896,12 +1807,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "cursive" version = "0.21.1" @@ -2163,15 +2068,15 @@ version = "0.1.0" dependencies = [ "axklib", "log", - "phytium-mci 0.1.0 (git+https://github.com/YanQD/phytium-mci.git?rev=99c9ee5)", - "rdif-block 0.6.2", + "phytium-mci", + "rdif-block", "rdif-clk", - "rdrive 0.18.11", + "rdrive", "rk3568_clk", "rk3588-clk", "rockchip-pm", "sdmmc", - "spin 0.9.8", + "spin 0.10.0", ] [[package]] @@ -2616,12 +2521,6 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - [[package]] name = "h2" version = "0.3.27" @@ -3150,15 +3049,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -3231,18 +3121,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kasm-aarch64" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e484b7a4686e2750fae1b4c4b750e14f1522eb303288d9d2723a955c2a41b7d7" -dependencies = [ - "darling 0.20.11", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "kasm-aarch64" version = "0.2.0" @@ -3274,7 +3152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d10c55bedf6789bc3748e0d8756ee639df1ae25144fd3525ed311044bd9a739f" dependencies = [ "cfg-if", - "crate_interface", + "crate_interface 0.1.4", ] [[package]] @@ -3337,16 +3215,6 @@ version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" -[[package]] -name = "libloading" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] - [[package]] name = "libredox" version = "0.1.11" @@ -3479,15 +3347,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" -[[package]] -name = "lwext4_rust" -version = "0.2.0" -dependencies = [ - "bindgen", - "log", - "printf-compat", -] - [[package]] name = "lzma-rs" version = "0.3.0" @@ -3546,12 +3405,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memory_addr" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5438b8df0f13e16e1f46140de247695a95952a5a4479e47197a8711bf1063373" - [[package]] name = "memory_addr" version = "0.4.1" @@ -3565,7 +3418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50a49ecd4114cf87f7e442ec5dd03bd590e7094541f987057310dbb32a6341ad" dependencies = [ "axerrno 0.1.2", - "memory_addr 0.4.1", + "memory_addr", ] [[package]] @@ -3584,12 +3437,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -3667,16 +3514,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nop" version = "0.1.0" @@ -3882,28 +3719,6 @@ dependencies = [ "ureq", ] -[[package]] -name = "page-table-arm" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce2c42338660c47a35e7b2940dcccbe6612a4a0aa0485ecdf4e23aa8a2a1158" -dependencies = [ - "aarch64-cpu", - "bitflags 2.10.0", - "log", -] - -[[package]] -name = "page-table-generic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827063f64bbad7b7655092b0f98824ffbe85e89646388eb4dad1e3d797056a2f" -dependencies = [ - "bitflags 2.10.0", - "log", - "thiserror 2.0.17", -] - [[package]] name = "page-table-generic" version = "0.6.1" @@ -3922,9 +3737,9 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dda9891ec368fda90e4b2cc36592b4881073e25a339fe7e3eddd811f0cf6bf18" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "bitflags 2.10.0", - "memory_addr 0.4.1", + "memory_addr", "x86_64", ] @@ -3935,7 +3750,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa11a21844255e14aa6688ef0eafb058d7be19338633024fb59417f1bfb07f8" dependencies = [ "log", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "riscv", "x86", @@ -3970,12 +3785,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pasts" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efcd36303871fb977a47dabc9af736c75c492bb32a92fa26262b2741531e97ce" - [[package]] name = "pci_types" version = "0.10.0" @@ -3986,19 +3795,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "pcie" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e45cda4b8ef9f2a8dae7cf5b58c11b41d35fbe62a4d9693fd2d143225fbf44" -dependencies = [ - "bit_field", - "bitflags 2.10.0", - "log", - "pci_types", - "sparreal-macros 0.0.5", -] - [[package]] name = "pcie" version = "0.4.5" @@ -4043,26 +3839,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "phytium-mci" -version = "0.1.0" -dependencies = [ - "bare-test", - "bare-test-macros", - "bitflags 2.10.0", - "byte-unit", - "bytemuck", - "dma-api 0.2.2", - "lazy_static", - "log", - "nb", - "pcie 0.2.7", - "rlsf", - "spin 0.10.0", - "spin_on", - "tock-registers 0.9.0", -] - [[package]] name = "phytium-mci" version = "0.1.0" @@ -4080,33 +3856,6 @@ dependencies = [ "tock-registers 0.9.0", ] -[[package]] -name = "pie-boot" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524d0fc5cd834d2179d8a88cde327b0e168dd6aedf30ce1832467a924a35594f" -dependencies = [ - "aarch64-cpu", - "aarch64-cpu-ext", - "bindeps-simple", - "fdt-parser", - "heapless 0.8.0", - "kasm-aarch64 0.1.3", - "kdef-pgtable", - "pie-boot-if 0.6.0", - "pie-boot-loader-aarch64 0.1.27", - "pie-boot-macros", -] - -[[package]] -name = "pie-boot-if" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00af8d4efee0eee91ead95b34c50c067163dc4c90b874b1cc4caa671eb1d85b" -dependencies = [ - "heapless 0.8.0", -] - [[package]] name = "pie-boot-if" version = "0.8.0" @@ -4116,47 +3865,23 @@ dependencies = [ "heapless 0.8.0", ] -[[package]] -name = "pie-boot-loader-aarch64" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ee18ed1de7f55f318f01803bf7dc353ef492db71a2005fa3af36f116f25d28" -dependencies = [ - "aarch64-cpu", - "aarch64-cpu-ext", - "any-uart", - "bitflags 2.10.0", - "fdt-parser", - "kasm-aarch64 0.1.3", - "kdef-pgtable", - "log", - "num-align", - "page-table-generic 0.6.1", - "pie-boot-if 0.6.0", - "prettyplease", - "quote", - "spin 0.10.0", - "syn 2.0.111", - "thiserror 2.0.17", -] - [[package]] name = "pie-boot-loader-aarch64" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de8836eb8759cd65e70c73dc0f519345d8a734284e8e4cfc5889a6e445af9f09" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "aarch64-cpu-ext", "any-uart", "bitflags 2.10.0", "fdt-parser", - "kasm-aarch64 0.2.0", + "kasm-aarch64", "kdef-pgtable", "log", "num-align", - "page-table-generic 0.6.1", - "pie-boot-if 0.8.0", + "page-table-generic", + "pie-boot-if", "prettyplease", "quote", "spin 0.10.0", @@ -4243,18 +3968,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "printf-compat" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b002af28ffe3d3d67202ae717810a28125a494d5396debc43de01ee136ac404" -dependencies = [ - "bitflags 1.3.2", - "cstr_core", - "cty", - "itertools 0.9.0", -] - [[package]] name = "proc-macro-crate" version = "3.4.0" @@ -4467,7 +4180,7 @@ dependencies = [ "crossterm 0.28.1", "indoc", "instability", - "itertools 0.13.0", + "itertools", "lru", "paste", "strum 0.26.3", @@ -4494,18 +4207,6 @@ dependencies = [ "bitflags 2.10.0", ] -[[package]] -name = "rdif-base" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6953f438bbbdf58e55513c31e70fa0f85daba2927e8a59130a04608141bb552" -dependencies = [ - "as-any", - "async-trait", - "rdif-def", - "thiserror 2.0.17", -] - [[package]] name = "rdif-base" version = "0.7.0" @@ -4519,16 +4220,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "rdif-block" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b8e19dc3cb6cd7241085a9560a91d4346edbc525bcbfc3c86e5eeb11559c19" -dependencies = [ - "cfg-if", - "rdif-base 0.6.0", -] - [[package]] name = "rdif-block" version = "0.6.2" @@ -4538,7 +4229,7 @@ dependencies = [ "cfg-if", "dma-api 0.5.2", "futures", - "rdif-base 0.7.0", + "rdif-base", "spin_on", "thiserror 2.0.17", ] @@ -4549,7 +4240,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9af012204e25d45735aa141b475c411b833b4f4bc580924905745d4afbbf606" dependencies = [ - "rdif-base 0.7.0", + "rdif-base", ] [[package]] @@ -4561,17 +4252,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "rdif-intc" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e7622f78dc9b40958500119553f3c15b9bb9829002d87d0f4b114ebe302a40" -dependencies = [ - "cfg-if", - "rdif-base 0.6.0", - "thiserror 2.0.17", -] - [[package]] name = "rdif-intc" version = "0.12.1" @@ -4579,7 +4259,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "170ec813e6cf4d1e5fa53fa8fed0fadc7aaab96683d4f1d44c602a6109931eb4" dependencies = [ "cfg-if", - "rdif-base 0.7.0", + "rdif-base", "thiserror 2.0.17", ] @@ -4590,59 +4270,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60c6e8dea6d432b2c03bc3f4238dc59a276aacac6f688a937351e7a313918738" dependencies = [ "pci_types", - "rdif-base 0.7.0", - "thiserror 2.0.17", -] - -[[package]] -name = "rdif-power" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7b6eefca0d1b44a5bef1e934d8ab2c8e00e19dd3d9e071855c0933637ee17a0" -dependencies = [ - "rdif-base 0.7.0", -] - -[[package]] -name = "rdif-serial" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673854a0c554806da63f0836c95b34b08956a143ff15e327644cbd07a8e0df31" -dependencies = [ - "futures", - "rdif-base 0.7.0", - "spin_on", - "thiserror 2.0.17", -] - -[[package]] -name = "rdif-systick" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11da4f362ab6cdcdee9d8e795faabd0f15e04167cb17939fd3aca19c2ef3421" -dependencies = [ - "rdif-base 0.7.0", -] - -[[package]] -name = "rdrive" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ce47e5a3d10943dfdb8c31dcca7a91c353ea43f4ac2eb72c92462e83a2baa4" -dependencies = [ - "enum_dispatch", - "fdt-parser", - "log", - "paste", - "rdif-base 0.6.0", - "rdif-block 0.5.0", - "rdif-clk", - "rdif-intc 0.11.0", - "rdif-power", - "rdif-serial", - "rdif-systick", - "rdrive-macros", - "spin 0.10.0", + "rdif-base", "thiserror 2.0.17", ] @@ -4655,25 +4283,14 @@ dependencies = [ "fdt-parser", "log", "paste", - "pcie 0.4.5", - "rdif-base 0.7.0", + "pcie", + "rdif-base", "rdif-pcie", "rdrive-macros", "spin 0.10.0", "thiserror 2.0.17", ] -[[package]] -name = "rdrive-macro-utils" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977fcecf5b5fe8d7189d497d8754d27a4ffaedeac904cce1b7ea7bdfb5280934" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "rdrive-macros" version = "0.4.1" @@ -4863,15 +4480,6 @@ dependencies = [ "webpki-roots", ] -[[package]] -name = "rgb" -version = "0.8.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" -dependencies = [ - "bytemuck", -] - [[package]] name = "ring" version = "0.17.14" @@ -4947,20 +4555,19 @@ dependencies = [ [[package]] name = "riscv_vcpu" version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f38f28fe6c02bb3ced43087c9667b23d18adf729becdc5adf1253f7df83904" +source = "git+https://github.com/arceos-hypervisor/riscv_vcpu?branch=aar-master#4cad20373c85d150e509821c3551fefb16084a7a" dependencies = [ "axaddrspace", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvcpu", "axvisor_api", "bit_field", "bitflags 2.10.0", "cfg-if", - "crate_interface", + "crate_interface 0.2.0", "log", "memoffset", - "memory_addr 0.4.1", + "memory_addr", "page_table_entry", "riscv", "riscv-decode", @@ -4968,7 +4575,7 @@ dependencies = [ "rustsbi", "sbi-rt", "sbi-spec", - "tock-registers 0.9.0", + "tock-registers 0.10.1", ] [[package]] @@ -4976,7 +4583,7 @@ name = "rk3568_clk" version = "0.1.0" source = "git+https://github.com/drivercraft/rk3568-clk.git#2b63818f9f9f576d99988fafa70de41112524e00" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "bare-test-macros", "fdt-parser", "kspin", @@ -5043,19 +4650,10 @@ dependencies = [ "dma-api 0.5.2", "log", "mbarrier", - "rdif-base 0.7.0", + "rdif-base", "tock-registers 0.10.1", ] -[[package]] -name = "rsext4" -version = "0.1.0" -dependencies = [ - "bitflags 2.10.0", - "lazy_static", - "log", -] - [[package]] name = "rsext4" version = "0.1.0" @@ -5277,7 +4875,7 @@ name = "sdmmc" version = "0.1.0" source = "git+https://github.com/drivercraft/sdmmc.git#cc6ae8e4ecb10b69d1e2fee5502f28198a057bba" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "arm_pl011", "bare-test-macros", "bitflags 2.10.0", @@ -5287,7 +4885,7 @@ dependencies = [ "kspin", "log", "paste", - "smccc 0.2.2", + "smccc", "spin 0.10.0", ] @@ -5560,12 +5158,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "smccc" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617d17f088ec733e5a6b86da6ce4cce1414e6e856d6061c16dda51cceae6f68c" - [[package]] name = "smccc" version = "0.2.2" @@ -5615,107 +5207,29 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b5f763b9ab0ce9efd2d8eba9e5b457f93f6426ede68435fe9567cf7681f29d" dependencies = [ - "aarch64-cpu", + "aarch64-cpu 10.0.0", "aarch64-cpu-ext", "any-uart", "bindeps-simple", "fdt-parser", "futures", "heapless 0.8.0", - "kasm-aarch64 0.2.0", + "kasm-aarch64", "kdef-pgtable", "log", "num-align", - "page-table-generic 0.6.1", - "pie-boot-if 0.8.0", - "pie-boot-loader-aarch64 0.3.3", + "page-table-generic", + "pie-boot-if", + "pie-boot-loader-aarch64", "pie-boot-macros", "release-dep", "serde", - "smccc 0.2.2", + "smccc", "spin 0.10.0", "toml 0.9.10+spec-1.1.0", "url", ] -[[package]] -name = "sparreal-kernel" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b182a508314f1560ce8f94090f8c0990640bd849fab49e307ccafe2b51e67da9" -dependencies = [ - "ansi_rgb", - "anyhow", - "arrayvec", - "buddy_system_allocator", - "byte-unit", - "dma-api 0.3.1", - "fdt-parser", - "lazy_static", - "lock_api", - "log", - "memory_addr 0.3.2", - "page-table-generic 0.5.3", - "pasts", - "rdrive 0.15.3", - "rgb", - "sparreal-macros 0.9.3", - "spin 0.9.8", - "thiserror 2.0.17", -] - -[[package]] -name = "sparreal-macros" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f686073b67b2427c9243bddc10ea0a6a5300ab5354a8ee884d9126854b0abab7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "sparreal-macros" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c39b68430130f1c7587eb41f512dd1f6e48bc22a3e1dc11a69dc1b8294cdc90" -dependencies = [ - "abi-singleton", - "darling 0.20.11", - "proc-macro2", - "quote", - "rdrive-macro-utils", - "syn 2.0.111", -] - -[[package]] -name = "sparreal-rt" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9da6adb0285c99f180e9746ebbadcf4886b1b009904f6f9ab5be155ae1325a7" -dependencies = [ - "aarch64-cpu", - "aarch64-cpu-ext", - "ansi_rgb", - "any-uart", - "arm-gic-driver 0.14.9", - "arrayvec", - "buddy_system_allocator", - "fdt-parser", - "log", - "memory_addr 0.3.2", - "numeric-enum-macro", - "page-table-arm", - "page-table-generic 0.5.3", - "pie-boot", - "rgb", - "smccc 0.1.1", - "sparreal-kernel", - "sparreal-macros 0.9.3", - "spin 0.9.8", -] - [[package]] name = "spin" version = "0.9.8" @@ -6391,7 +5905,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ - "itertools 0.13.0", + "itertools", "unicode-segmentation", "unicode-width 0.1.14", ] @@ -7069,20 +6583,19 @@ dependencies = [ [[package]] name = "x86_vcpu" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873e097d52e94c31be3f0175a9f8d6f2edbc77d7e2f8e6995427df9c08b30a2b" +source = "git+https://github.com/arceos-hypervisor/x86_vcpu?branch=aar-master#24fce09b11af95077f7efc03ff6634bf78ffa187" dependencies = [ "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvcpu", "axvisor_api", "bit_field", "bitflags 2.10.0", "cfg-if", - "crate_interface", + "crate_interface 0.2.0", "log", - "memory_addr 0.4.1", + "memory_addr", "numeric-enum-macro", "page_table_entry", "paste", @@ -7096,16 +6609,15 @@ dependencies = [ [[package]] name = "x86_vlapic" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2556c62649a277ccf1c3c34c740be87bbde5f8dab0b20fcdcf4c2cd7bb6e7302" +source = "git+https://github.com/arceos-hypervisor/x86_vlapic?branch=aar-master#207fb0dfa10ff549b46a77f2d767483fad0c29f6" dependencies = [ "axaddrspace", "axdevice_base", - "axerrno 0.1.2", + "axerrno 0.2.2", "axvisor_api", "bit", "log", - "memory_addr 0.4.1", + "memory_addr", "paste", "tock-registers 0.10.1", ] diff --git a/Cargo.toml b/Cargo.toml index f06c0194..19092f92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ kspin = "0.1" lazy_static = {version = "1.5", default-features = false, features = ["spin_no_std"]} lazyinit = "0.2" log = "0.4" -spin = "0.9" +spin = "0.10" timer_list = "0.1" toml = "0.9" @@ -57,18 +57,18 @@ axcpu = {git = "https://github.com/arceos-org/axcpu.git", tag = "dev-v03"} axplat = {git = "https://github.com/arceos-org/axplat_crates.git", tag = "dev-v03"} # System dependent modules provided by ArceOS-Hypervisor. -axaddrspace = "0.1.1" +axaddrspace = "0.2" axhvc = {git = "https://github.com/arceos-hypervisor/axhvc.git"} axklib = {git = "https://github.com/arceos-hypervisor/axklib.git"} axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} axvcpu = "0.1" -axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "next"} +axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "aar-master"} # System independent crates provided by ArceOS, these crates could be imported by remote url. axerrno = "0.2" byte-unit = {version = "5", default-features = false, features = ["byte"]} -crate_interface = "0.1" +crate_interface = "0.2" fdt-parser = "0.4" memory_addr = "0.4" page_table_entry = {version = "0.5", features = ["arm-el2"]} @@ -79,18 +79,26 @@ rdrive = "0.18" vm-fdt = {git = "https://github.com/bullhh/vm-fdt.git", default-features = false, features = ["alloc"]} -axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git"} +axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git",branch = "aar-master"} axdevice_base = "0.1" -axvisor_api = "0.1" +axvisor_api = "0.2" driver = {path = "modules/driver"} # platform axplat-x86-qemu-q35 = {path = "platform/x86-qemu-q35"} -axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} +axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-master"} [patch.crates-io] -axvcpu = {git = "https://github.com/arceos-hypervisor/axvcpu.git", branch = "next"} -axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} +axvcpu = { git = "https://github.com/arceos-hypervisor/axvcpu", branch = "aar-master" } +axvisor_api = { git = "https://github.com/arceos-hypervisor/axvisor_api", branch = "aar-master" } +axaddrspace = { git = "https://github.com/arceos-hypervisor/axaddrspace", branch = "aar-master" } +axdevice_base = { git = "https://github.com/arceos-hypervisor/axdevice_crates", branch = "aar-master"} +x86_vlapic = { git = "https://github.com/arceos-hypervisor/x86_vlapic", branch = "aar-master"} +arm_vgic = { git = "https://github.com/arceos-hypervisor/arm_vgic", branch = "aar-master"} +x86_vcpu = { git = "https://github.com/arceos-hypervisor/x86_vcpu", branch = "aar-master"} +arm_vcpu = { git = "https://github.com/arceos-hypervisor/arm_vcpu", branch = "aar-master"} +riscv_vcpu = { git = "https://github.com/arceos-hypervisor/riscv_vcpu", branch = "aar-master"} +axvmconfig = { git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-master" } [patch."https://github.com/arceos-org/arceos"] axconfig = {path = "modules/axconfig"} diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index ea99ff32..bd55b7a6 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -5,7 +5,7 @@ license.workspace = true name = "axvisor" [features] -ept-level-4 = ["axaddrspace/4-level-ept"] +ept-level-4 = [] fs = ["axstd/fs", "axruntime/fs"] dyn-plat = ["axstd/myplat", "axstd/driver-dyn", "axruntime/driver-dyn"] @@ -18,7 +18,7 @@ kspin = "0.1" lazy_static = {version = "1.5", default-features = false, features = ["spin_no_std"]} lazyinit = "0.2" log = "0.4" -spin = "0.9" +spin = "0.10" timer_list = "0.1.0" # System dependent modules provided by ArceOS. @@ -54,7 +54,7 @@ vm-fdt = {workspace = true, default-features = false, features = ["alloc"]} axdevice.workspace = true axdevice_base = "0.1" -axvisor_api = "0.1" +axvisor_api = "0.2" driver.workspace = true diff --git a/kernel/src/hal/impl_host.rs b/kernel/src/hal/impl_host.rs new file mode 100644 index 00000000..0643e3ad --- /dev/null +++ b/kernel/src/hal/impl_host.rs @@ -0,0 +1,11 @@ +use axvisor_api::host::HostIf; + +struct HostImpl; + +#[axvisor_api::api_impl] +impl HostIf for HostImpl { + fn get_host_cpu_num() -> usize { + // std::os::arceos::modules::axconfig::plat::CPU_NUM + axruntime::cpu_count() + } +} diff --git a/kernel/src/hal/impl_memory.rs b/kernel/src/hal/impl_memory.rs new file mode 100644 index 00000000..1479255f --- /dev/null +++ b/kernel/src/hal/impl_memory.rs @@ -0,0 +1,53 @@ +use core::{alloc::Layout, ptr::NonNull}; + +use std::os::arceos; + +use axaddrspace::{AxMmHal, HostPhysAddr, HostVirtAddr}; +use axvisor_api::memory::MemoryIf; +use memory_addr::PAGE_SIZE_4K; + +use crate::hal::AxMmHalImpl; + +struct MemoryImpl; + +#[axvisor_api::api_impl] +impl MemoryIf for MemoryImpl { + fn alloc_frame() -> Option { + ::alloc_frame() + } + + fn alloc_contiguous_frames(num_frames: usize, frame_align_pow2: usize) -> Option { + arceos::modules::axalloc::global_allocator() + .alloc( + Layout::from_size_align( + num_frames * PAGE_SIZE_4K, + PAGE_SIZE_4K << frame_align_pow2, + ) + .unwrap(), + ) + // .alloc_pages(num_frames, PAGE_SIZE_4K << frame_align_pow2) + // .map(|vaddr| ::virt_to_phys(vaddr.into())) + .map(|vaddr| HostPhysAddr::from(vaddr.as_ptr() as usize)) + .ok() + } + + fn dealloc_frame(paddr: HostPhysAddr) { + ::dealloc_frame(paddr) + } + + fn dealloc_contiguous_frames(paddr: HostPhysAddr, num_frames: usize) { + // arceos::modules::axalloc::global_allocator().dealloc_pages(paddr.as_usize(), num_frames); + arceos::modules::axalloc::global_allocator().dealloc( + unsafe { NonNull::new_unchecked(paddr.as_usize() as _) }, + Layout::from_size_align(num_frames * PAGE_SIZE_4K, PAGE_SIZE_4K).unwrap(), + ); + } + + fn phys_to_virt(paddr: HostPhysAddr) -> HostVirtAddr { + ::phys_to_virt(paddr) + } + + fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr { + ::virt_to_phys(vaddr) + } +} diff --git a/kernel/src/hal/impl_time.rs b/kernel/src/hal/impl_time.rs new file mode 100644 index 00000000..2c275899 --- /dev/null +++ b/kernel/src/hal/impl_time.rs @@ -0,0 +1,33 @@ +use std::os::arceos::modules::axhal; + +use axvisor_api::time::{CancelToken, Nanos, Ticks, TimeIf, TimeValue}; + +use crate::vmm; + +struct TimeImpl; + +#[axvisor_api::api_impl] +impl TimeIf for TimeImpl { + fn current_ticks() -> Ticks { + axhal::time::current_ticks() + } + + fn ticks_to_nanos(ticks: Ticks) -> Nanos { + axhal::time::ticks_to_nanos(ticks) + } + + fn nanos_to_ticks(nanos: Nanos) -> Ticks { + axhal::time::nanos_to_ticks(nanos) + } + + fn register_timer( + deadline: TimeValue, + handler: alloc::boxed::Box, + ) -> CancelToken { + vmm::timer::register_timer(deadline.as_nanos() as u64, handler) + } + + fn cancel_timer(token: CancelToken) { + vmm::timer::cancel_timer(token) + } +} diff --git a/kernel/src/hal/impl_vmm.rs b/kernel/src/hal/impl_vmm.rs new file mode 100644 index 00000000..c42462cd --- /dev/null +++ b/kernel/src/hal/impl_vmm.rs @@ -0,0 +1,75 @@ +use std::os::arceos::modules::{axhal, axtask}; + +use axaddrspace::{HostPhysAddr, HostVirtAddr}; +use axerrno::{AxResult, ax_err_type}; +use axvisor_api::vmm::{InterruptVector, VCpuId, VCpuSet, VMId, VmmIf}; +use axvm::AxVMHal; + +use crate::{task::AsVCpuTask, vmm}; + +struct VmmImpl; + +fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr { + axhal::mem::virt_to_phys(vaddr) +} + +fn current_time_nanos() -> u64 { + axhal::time::monotonic_time_nanos() +} + +fn current_vm_id() -> usize { + axtask::current().as_vcpu_task().vm().id() +} + +fn current_vcpu_id() -> usize { + axtask::current().as_vcpu_task().vcpu.id() +} + +fn current_pcpu_id() -> usize { + axhal::percpu::this_cpu_id() +} + +fn vcpu_resides_on(vm_id: usize, vcpu_id: usize) -> AxResult { + vmm::with_vcpu_task(vm_id, vcpu_id, |task| task.cpu_id() as usize) + .ok_or_else(|| ax_err_type!(NotFound)) +} + +fn inject_irq_to_vcpu(vm_id: usize, vcpu_id: usize, irq: usize) -> AxResult { + vmm::with_vm_and_vcpu_on_pcpu(vm_id, vcpu_id, move |_, vcpu| { + vcpu.inject_interrupt(irq).unwrap(); + }) +} + +#[axvisor_api::api_impl] +impl VmmIf for VmmImpl { + fn current_vm_id() -> usize { + axtask::current().as_vcpu_task().vm().id() + } + + fn current_vcpu_id() -> usize { + axtask::current().as_vcpu_task().vcpu.id() + } + + fn vcpu_num(vm_id: VMId) -> Option { + vmm::with_vm(vm_id, |vm| vm.vcpu_num()) + } + + fn active_vcpus(_vm_id: VMId) -> Option { + todo!("active_vcpus") + } + + fn inject_interrupt(vm_id: VMId, vcpu_id: VCpuId, vector: InterruptVector) { + let _ = vmm::with_vm_and_vcpu_on_pcpu(vm_id, vcpu_id, move |_, vcpu| { + vcpu.inject_interrupt(vector as usize).unwrap(); + }); + } + + fn inject_interrupt_to_cpus(_vm_id: VMId, _vcpu_set: VCpuSet, _vector: InterruptVector) { + todo!("inject_interrupt_to_cpus") + } + + fn notify_vcpu_timer_expired(_vm_id: VMId, _vcpu_id: VCpuId) { + todo!("notify_vcpu_timer_expired") + // vmm::timer::notify_timer_expired(vm_id, vcpu_id); + } +} diff --git a/kernel/src/hal/mod.rs b/kernel/src/hal/mod.rs index dc058723..78b22909 100644 --- a/kernel/src/hal/mod.rs +++ b/kernel/src/hal/mod.rs @@ -1,22 +1,15 @@ -use std::os::arceos::{ - self, - modules::{axhal::percpu::this_cpu_id, axtask}, -}; - -use axerrno::{AxResult, ax_err_type}; -use memory_addr::PAGE_SIZE_4K; -use page_table_multiarch::PagingHandler; +use std::os::arceos::{self, modules::axhal::percpu::this_cpu_id}; use arceos::modules::axhal; use axaddrspace::{AxMmHal, HostPhysAddr, HostVirtAddr}; -use axvcpu::AxVCpuHal; -use axvm::{AxVMHal, AxVMPerCpu}; +use axvm::AxVMPerCpu; +use page_table_multiarch::PagingHandler; #[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/mod.rs")] #[cfg_attr(target_arch = "x86_64", path = "arch/x86_64/mod.rs")] pub mod arch; -use crate::{hal::arch::hardware_check, task::AsVCpuTask, vmm}; +use crate::{hal::arch::hardware_check, vmm}; #[allow(unused)] #[repr(C)] @@ -30,58 +23,20 @@ pub enum CacheOp { CleanAndInvalidate, } -/// Implementation for `AxVMHal` trait. -pub struct AxVMHalImpl; - -impl AxVMHal for AxVMHalImpl { - type PagingHandler = axhal::paging::PagingHandlerImpl; - - fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr { - axhal::mem::virt_to_phys(vaddr) - } - - fn current_time_nanos() -> u64 { - axhal::time::monotonic_time_nanos() - } - - fn current_vm_id() -> usize { - axtask::current().as_vcpu_task().vm().id() - } - - fn current_vcpu_id() -> usize { - axtask::current().as_vcpu_task().vcpu.id() - } - - fn current_pcpu_id() -> usize { - axhal::percpu::this_cpu_id() - } - - fn vcpu_resides_on(vm_id: usize, vcpu_id: usize) -> AxResult { - vmm::with_vcpu_task(vm_id, vcpu_id, |task| task.cpu_id() as usize) - .ok_or_else(|| ax_err_type!(NotFound)) - } - - fn inject_irq_to_vcpu(vm_id: usize, vcpu_id: usize, irq: usize) -> AxResult { - vmm::with_vm_and_vcpu_on_pcpu(vm_id, vcpu_id, move |_, vcpu| { - vcpu.inject_interrupt(irq).unwrap(); - }) - } -} - pub struct AxMmHalImpl; impl AxMmHal for AxMmHalImpl { fn alloc_frame() -> Option { - ::PagingHandler::alloc_frame() + ::alloc_frame() } fn dealloc_frame(paddr: HostPhysAddr) { - ::PagingHandler::dealloc_frame(paddr) + ::dealloc_frame(paddr) } #[inline] fn phys_to_virt(paddr: HostPhysAddr) -> HostVirtAddr { - ::PagingHandler::phys_to_virt(paddr) + ::phys_to_virt(paddr) } fn virt_to_phys(vaddr: axaddrspace::HostVirtAddr) -> axaddrspace::HostPhysAddr { @@ -89,18 +44,18 @@ impl AxMmHal for AxMmHalImpl { } } -pub struct AxVCpuHalImpl; +// pub struct AxVCpuHalImpl; -impl AxVCpuHal for AxVCpuHalImpl { - type MmHal = AxMmHalImpl; +// impl AxVCpuHal for AxVCpuHalImpl { +// type MmHal = AxMmHalImpl; - fn irq_hanlder() { - axhal::irq::irq_handler(0); - } -} +// fn irq_hanlder() { +// axhal::irq::irq_handler(0); +// } +// } #[percpu::def_percpu] -static mut AXVM_PER_CPU: AxVMPerCpu = AxVMPerCpu::::new_uninit(); +static mut AXVM_PER_CPU: AxVMPerCpu = AxVMPerCpu::new_uninit(); /// Init hardware virtualization support in each core. pub(crate) fn enable_virtualization() { @@ -157,119 +112,7 @@ pub(crate) fn enable_virtualization() { info!("All cores have enabled hardware virtualization support."); } -#[axvisor_api::api_mod_impl(axvisor_api::memory)] -mod memory_api_impl { - use core::{alloc::Layout, ptr::NonNull}; - - use super::*; - - extern fn alloc_frame() -> Option { - ::alloc_frame() - } - - extern fn alloc_contiguous_frames( - num_frames: usize, - frame_align_pow2: usize, - ) -> Option { - arceos::modules::axalloc::global_allocator() - .alloc( - Layout::from_size_align( - num_frames * PAGE_SIZE_4K, - PAGE_SIZE_4K << frame_align_pow2, - ) - .unwrap(), - ) - // .alloc_pages(num_frames, PAGE_SIZE_4K << frame_align_pow2) - // .map(|vaddr| ::virt_to_phys(vaddr.into())) - .map(|vaddr| HostPhysAddr::from(vaddr.as_ptr() as usize)) - .ok() - } - - extern fn dealloc_frame(paddr: HostPhysAddr) { - ::dealloc_frame(paddr) - } - - extern fn dealloc_contiguous_frames(paddr: HostPhysAddr, num_frames: usize) { - // arceos::modules::axalloc::global_allocator().dealloc_pages(paddr.as_usize(), num_frames); - arceos::modules::axalloc::global_allocator().dealloc( - unsafe { NonNull::new_unchecked(paddr.as_usize() as _) }, - Layout::from_size_align(num_frames * PAGE_SIZE_4K, PAGE_SIZE_4K).unwrap(), - ); - } - - extern fn phys_to_virt(paddr: HostPhysAddr) -> HostVirtAddr { - ::phys_to_virt(paddr) - } - - extern fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr { - ::virt_to_phys(vaddr) - } -} - -#[axvisor_api::api_mod_impl(axvisor_api::time)] -mod time_api_impl { - use super::*; - use axvisor_api::time::{CancelToken, Nanos, Ticks, TimeValue}; - - extern fn current_ticks() -> Ticks { - axhal::time::current_ticks() - } - - extern fn ticks_to_nanos(ticks: Ticks) -> Nanos { - axhal::time::ticks_to_nanos(ticks) - } - - extern fn nanos_to_ticks(nanos: Nanos) -> Ticks { - axhal::time::nanos_to_ticks(nanos) - } - - extern fn register_timer( - deadline: TimeValue, - handler: alloc::boxed::Box, - ) -> CancelToken { - vmm::timer::register_timer(deadline.as_nanos() as u64, handler) - } - - extern fn cancel_timer(token: CancelToken) { - vmm::timer::cancel_timer(token) - } -} - -#[axvisor_api::api_mod_impl(axvisor_api::vmm)] -mod vmm_api_impl { - use super::*; - use axvisor_api::vmm::{InterruptVector, VCpuId, VMId}; - - extern fn current_vm_id() -> usize { - ::current_vm_id() - } - - extern fn current_vcpu_id() -> usize { - ::current_vcpu_id() - } - - extern fn vcpu_num(vm_id: VMId) -> Option { - vmm::with_vm(vm_id, |vm| vm.vcpu_num()) - } - - extern fn active_vcpus(_vm_id: VMId) -> Option { - todo!("active_vcpus") - } - - extern fn inject_interrupt(vm_id: VMId, vcpu_id: VCpuId, vector: InterruptVector) { - ::inject_irq_to_vcpu(vm_id, vcpu_id, vector as usize).unwrap(); - } - - extern fn notify_vcpu_timer_expired(_vm_id: VMId, _vcpu_id: VCpuId) { - todo!("notify_vcpu_timer_expired") - // vmm::timer::notify_timer_expired(vm_id, vcpu_id); - } -} - -#[axvisor_api::api_mod_impl(axvisor_api::host)] -mod host_api_impl { - extern fn get_host_cpu_num() -> usize { - // std::os::arceos::modules::axconfig::plat::CPU_NUM - axruntime::cpu_count() - } -} +mod impl_host; +mod impl_memory; +mod impl_time; +mod impl_vmm; diff --git a/kernel/src/vmm/mod.rs b/kernel/src/vmm/mod.rs index 5beecbce..f1c53615 100644 --- a/kernel/src/vmm/mod.rs +++ b/kernel/src/vmm/mod.rs @@ -18,18 +18,15 @@ use std::os::arceos::{ use axerrno::{AxResult, ax_err_type}; -use crate::{ - hal::{AxVCpuHalImpl, AxVMHalImpl}, - task::AsVCpuTask, -}; +use crate::task::AsVCpuTask; pub use timer::init_percpu as init_timer_percpu; /// The instantiated VM type. -pub type VM = axvm::AxVM; +pub type VM = axvm::AxVM; /// The instantiated VM ref type (by `Arc`). -pub type VMRef = axvm::AxVMRef; +pub type VMRef = axvm::AxVMRef; /// The instantiated VCpu ref type (by `Arc`). -pub type VCpuRef = axvm::AxVCpuRef; +pub type VCpuRef = axvm::AxVCpuRef; static VMM: AxWaitQueueHandle = AxWaitQueueHandle::new(); diff --git a/modules/axconfig/src/lib.rs b/modules/axconfig/src/lib.rs index 82d22f6a..c5e0c7ec 100644 --- a/modules/axconfig/src/lib.rs +++ b/modules/axconfig/src/lib.rs @@ -47,7 +47,7 @@ pub mod devices { #[doc = ""] pub mod plat { #[doc = " Number of CPUs."] - pub const CPU_NUM: usize = 16; + pub const CPU_NUM: usize = 1; #[doc = " Platform family (deprecated)."] pub const FAMILY: &str = ""; #[doc = " Kernel address space base."] diff --git a/modules/axfs/src/fs/fatfs.rs b/modules/axfs/src/fs/fatfs.rs index da0b6f11..b62d25cb 100644 --- a/modules/axfs/src/fs/fatfs.rs +++ b/modules/axfs/src/fs/fatfs.rs @@ -4,8 +4,8 @@ use core::cell::OnceCell; use axfs_vfs::{VfsDirEntry, VfsError, VfsNodePerm, VfsResult}; use axfs_vfs::{VfsNodeAttr, VfsNodeOps, VfsNodeRef, VfsNodeType, VfsOps}; -use spin::Mutex; use fatfs::{Dir, File, LossyOemCpConverter, NullTimeProvider, Read, Seek, SeekFrom, Write}; +use spin::Mutex; use crate::dev::{Disk, Partition}; diff --git a/modules/axfs/src/lib.rs b/modules/axfs/src/lib.rs index 11692a02..697b21b5 100644 --- a/modules/axfs/src/lib.rs +++ b/modules/axfs/src/lib.rs @@ -19,7 +19,7 @@ use alloc::{ sync::Arc, vec::Vec, }; -use axdriver::{prelude::*, AxDeviceContainer}; +use axdriver::{AxDeviceContainer, prelude::*}; /// Initializes filesystems by block devices. pub fn init_filesystems(mut blk_devs: AxDeviceContainer, bootargs: Option<&str>) { diff --git a/modules/axfs/src/partition.rs b/modules/axfs/src/partition.rs index 05f0d3a8..f6487ea1 100644 --- a/modules/axfs/src/partition.rs +++ b/modules/axfs/src/partition.rs @@ -225,7 +225,7 @@ fn parse_gpt_partitions(disk: &mut Disk) -> AxResult> { for j in 0..36 { name_utf16[j] = entry.partition_name[j]; } - + // Find the null terminator let mut name_len = 36; for j in 0..36 { @@ -234,7 +234,7 @@ fn parse_gpt_partitions(disk: &mut Disk) -> AxResult> { break; } } - + // Convert only the valid portion let name_slice = &name_utf16[..name_len]; let name_str = String::from_utf16_lossy(name_slice); diff --git a/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs b/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs index 6607dd92..efa3b1ca 100644 --- a/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs +++ b/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs @@ -125,4 +125,4 @@ fn probe(info: FdtInfo<'_>, plat_dev: PlatformDevice) -> Result<(), OnProbeError plat_dev.register(clk); Ok(()) -} \ No newline at end of file +} diff --git a/platform/x86-qemu-q35/Cargo.toml b/platform/x86-qemu-q35/Cargo.toml index 69c24bad..880e3c18 100644 --- a/platform/x86-qemu-q35/Cargo.toml +++ b/platform/x86-qemu-q35/Cargo.toml @@ -7,7 +7,7 @@ version = "0.1.0" default = [ "irq", "smp", - "reboot-on-system-off", + # "reboot-on-system-off", ] fp-simd = [] irq = ["axplat/irq"] diff --git a/platform/x86-qemu-q35/src/mp.rs b/platform/x86-qemu-q35/src/mp.rs index 14e8e671..86674444 100644 --- a/platform/x86-qemu-q35/src/mp.rs +++ b/platform/x86-qemu-q35/src/mp.rs @@ -25,11 +25,11 @@ unsafe fn setup_startup_page(stack_top: PhysAddr) { core::ptr::copy_nonoverlapping( ap_start as *const u64, start_page_ptr, - (ap_end as usize - ap_start as usize) / 8, + (ap_end as *const () as usize - ap_start as *const () as usize) / 8, ); } start_page[U64_PER_PAGE - 2] = stack_top.as_usize() as u64; // stack_top - start_page[U64_PER_PAGE - 1] = ap_entry32 as usize as _; // entry + start_page[U64_PER_PAGE - 1] = ap_entry32 as *const () as usize as _; // entry } /// Starts the given secondary CPU with its boot stack. diff --git a/xtask/src/cargo.rs b/xtask/src/cargo.rs index 0fe676f3..a821bdf5 100644 --- a/xtask/src/cargo.rs +++ b/xtask/src/cargo.rs @@ -1,5 +1,5 @@ -use std::{fs, path::PathBuf}; use ostool::build::CargoRunnerKind; +use std::{fs, path::PathBuf}; use crate::ctx::Context; diff --git a/xtask/src/image.rs b/xtask/src/image.rs index dcde79bf..c54e2eb2 100644 --- a/xtask/src/image.rs +++ b/xtask/src/image.rs @@ -46,25 +46,25 @@ pub struct ImageArgs { pub enum ImageCommands { /// List all available images Ls, - + /// Download the specified image and automatically extract it Download { /// Name of the image to download image_name: String, - + /// Output directory for the downloaded image #[arg(short, long)] output_dir: Option, - + /// Do not extract after download #[arg(long, help = "Do not extract after download")] no_extract: bool, }, - + /// Remove the specified image from temp directory Rm { /// Name of the image to remove - image_name: String + image_name: String, }, } @@ -433,12 +433,16 @@ async fn image_download(image_name: &str, output_dir: Option, extract: b Ok(false) => { // Remove the invalid downloaded file let _ = fs::remove_file(&output_path); - return Err(anyhow!("Download completed but file SHA256 verification failed")); + return Err(anyhow!( + "Download completed but file SHA256 verification failed" + )); } Err(e) => { // Remove the potentially corrupted downloaded file let _ = fs::remove_file(&output_path); - return Err(anyhow!("Download completed but error verifying downloaded file: {e}")); + return Err(anyhow!( + "Download completed but error verifying downloaded file: {e}" + )); } } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 68390dc7..f5fdb5ef 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -55,11 +55,11 @@ struct QemuArgs { /// Path to custom build configuration file (TOML format) #[arg(long)] build_config: Option, - + /// Path to custom QEMU configuration file #[arg(long)] qemu_config: Option, - + /// Comma-separated list of VM configuration files #[arg(long)] vmconfigs: Vec, @@ -73,23 +73,23 @@ struct ClippyArgs { /// Only check specific packages (comma separated) #[arg(long)] packages: Option, - + /// Only check specific targets (comma separated) #[arg(long)] targets: Option, - + /// Continue on error instead of exiting immediately #[arg(long)] continue_on_error: bool, - + /// Dry run - show what would be checked without running clippy #[arg(long)] dry_run: bool, - + /// Automatically fix clippy warnings where possible #[arg(long)] fix: bool, - + /// Allow fixing when the working directory is dirty (has uncommitted changes) #[arg(long)] allow_dirty: bool, @@ -100,11 +100,11 @@ struct UbootArgs { /// Path to custom build configuration file (TOML format) #[arg(long)] build_config: Option, - + /// Path to custom U-Boot configuration file #[arg(long)] uboot_config: Option, - + /// Comma-separated list of VM configuration files #[arg(long)] vmconfigs: Vec, diff --git a/xtask/src/menuconfig.rs b/xtask/src/menuconfig.rs index 199b440f..0460dc47 100644 --- a/xtask/src/menuconfig.rs +++ b/xtask/src/menuconfig.rs @@ -10,7 +10,10 @@ impl Context { let config_path = self.ctx.paths.workspace.join(".build.toml"); if config_path.exists() { - println!("\nCurrent .build.toml configuration file: {}", config_path.display()); + println!( + "\nCurrent .build.toml configuration file: {}", + config_path.display() + ); } else { println!("\nNo .build.toml configuration file found, will use default configuration"); } From bffeb94a157e0eb11535598bf63e674ad23f3507 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Fri, 30 Jan 2026 21:35:23 +0800 Subject: [PATCH 11/22] passthrough gic to launch aarch64 --- configs/vms/nimbos-aarch64-qemu-smp1.toml | 1 + kernel/src/hal/arch/aarch64/api.rs | 38 +++++++++++++++++------ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/configs/vms/nimbos-aarch64-qemu-smp1.toml b/configs/vms/nimbos-aarch64-qemu-smp1.toml index 17dac0d4..e280c206 100644 --- a/configs/vms/nimbos-aarch64-qemu-smp1.toml +++ b/configs/vms/nimbos-aarch64-qemu-smp1.toml @@ -73,6 +73,7 @@ passthrough_devices = [ # Base-GPA Length. passthrough_addresses = [ #[0x28041000, 0x100_0000] + [0x0800_0000, 0x100_0000] ] # Devices that are not desired to be passed through to the guest diff --git a/kernel/src/hal/arch/aarch64/api.rs b/kernel/src/hal/arch/aarch64/api.rs index 5071517d..c2db97eb 100644 --- a/kernel/src/hal/arch/aarch64/api.rs +++ b/kernel/src/hal/arch/aarch64/api.rs @@ -1,14 +1,15 @@ -#[axvisor_api::api_mod_impl(axvisor_api::arch)] -mod arch_api_impl { - use core::panic; +use axvisor_api::arch::ArchIf; +use std::os::arceos::modules::axhal::{self, mem::virt_to_phys}; - use axvisor_api::memory::virt_to_phys; +struct ArchImpl; - extern fn hardware_inject_virtual_interrupt(irq: axvisor_api::vmm::InterruptVector) { +#[axvisor_api::api_impl] +impl ArchIf for ArchImpl { + fn hardware_inject_virtual_interrupt(irq: axvisor_api::vmm::InterruptVector) { crate::hal::arch::inject_interrupt(irq as _); } - extern fn read_vgicd_typer() -> u32 { + fn read_vgicd_typer() -> u32 { let mut gic = rdrive::get_one::() .expect("Failed to get GIC driver") .lock() @@ -24,7 +25,7 @@ mod arch_api_impl { panic!("No GIC driver found"); } - extern fn read_vgicd_iidr() -> u32 { + fn read_vgicd_iidr() -> u32 { // use axstd::os::arceos::modules::axhal::irq::MyVgic; // MyVgic::get_gicd().lock().get_iidr() let mut gic = rdrive::get_one::() @@ -43,7 +44,7 @@ mod arch_api_impl { panic!("No GIC driver found"); } - extern fn get_host_gicd_base() -> memory_addr::PhysAddr { + fn get_host_gicd_base() -> memory_addr::PhysAddr { let mut gic = rdrive::get_one::() .expect("Failed to get GIC driver") .lock() @@ -61,7 +62,7 @@ mod arch_api_impl { panic!("No GIC driver found"); } - extern fn get_host_gicr_base() -> memory_addr::PhysAddr { + fn get_host_gicr_base() -> memory_addr::PhysAddr { let mut gic = rdrive::get_one::() .expect("Failed to get GIC driver") .lock() @@ -72,4 +73,23 @@ mod arch_api_impl { } panic!("No GICv3 driver found"); } + + fn fetch_irq() -> u64 { + /// TODO: better implementation + let mut gic = rdrive::get_one::() + .expect("Failed to get GIC driver") + .lock() + .unwrap(); + if let Some(gic) = gic.typed_mut::() { + return u32::from(gic.cpu_interface().ack()) as _ + } + if let Some(gic) = gic.typed_mut::() { + return gic.cpu_interface().ack1().to_u32() as _ + } + panic!("No GIC driver found"); + } + + fn handle_irq() { + axhal::irq::irq_handler(0); + } } From b8e4cf625644759ed5f50d5d886fc445c2c48101 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Fri, 30 Jan 2026 21:43:22 +0800 Subject: [PATCH 12/22] preparing for riscv64 --- .cargo/config.toml | 13 ++++++++++--- configs/board/qemu-riscv64.toml | 10 ++++++++++ kernel/src/hal/arch/riscv64/cache.rs | 5 +++++ kernel/src/hal/arch/riscv64/mod.rs | 4 ++++ kernel/src/hal/mod.rs | 1 + scripts/ostool/qemu-riscv64.toml | 19 +++++++++++++++++++ xtask/src/cargo.rs | 3 +++ 7 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 configs/board/qemu-riscv64.toml create mode 100644 kernel/src/hal/arch/riscv64/cache.rs create mode 100644 kernel/src/hal/arch/riscv64/mod.rs create mode 100644 scripts/ostool/qemu-riscv64.toml diff --git a/.cargo/config.toml b/.cargo/config.toml index 676b0e8a..e2ab5276 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,9 +5,6 @@ rustflags = [ "-Clink-args=-Tlink.x", ] -[target.'cfg(target_os = "none")'] -runner = "cargo osrun" - [target.x86_64-unknown-none] rustflags = [ "-Clink-args=-no-pie", @@ -15,6 +12,16 @@ rustflags = [ "-Clink-args=-Tlink.x", ] +[target.riscv64gc-unknown-none-elf] +rustflags = [ + "-Clink-args=-no-pie", + "-Clink-args=-znostart-stop-gc", + # "-Clink-args=-Tlinker.lds.S", +] + +[target.'cfg(target_os = "none")'] +runner = "cargo osrun" + [alias] xtask = "run --package xtask --" diff --git a/configs/board/qemu-riscv64.toml b/configs/board/qemu-riscv64.toml new file mode 100644 index 00000000..2e2f1858 --- /dev/null +++ b/configs/board/qemu-riscv64.toml @@ -0,0 +1,10 @@ +cargo_args = [] +features = [ + # "axstd/myplat", + "ept-level-4", + "fs", +] +log = "Info" +target = "riscv64gc-unknown-none-elf" +to_bin = false +vm_configs = [] \ No newline at end of file diff --git a/kernel/src/hal/arch/riscv64/cache.rs b/kernel/src/hal/arch/riscv64/cache.rs new file mode 100644 index 00000000..1a905a9d --- /dev/null +++ b/kernel/src/hal/arch/riscv64/cache.rs @@ -0,0 +1,5 @@ +use memory_addr::VirtAddr; + +use crate::hal::CacheOp; + +pub fn dcache_range(_op: CacheOp, _addr: VirtAddr, _size: usize) {} diff --git a/kernel/src/hal/arch/riscv64/mod.rs b/kernel/src/hal/arch/riscv64/mod.rs new file mode 100644 index 00000000..ab92f90b --- /dev/null +++ b/kernel/src/hal/arch/riscv64/mod.rs @@ -0,0 +1,4 @@ +pub mod cache; + +pub fn hardware_check() {} +pub fn inject_interrupt(_vector: u8) {} diff --git a/kernel/src/hal/mod.rs b/kernel/src/hal/mod.rs index 78b22909..7575fde5 100644 --- a/kernel/src/hal/mod.rs +++ b/kernel/src/hal/mod.rs @@ -7,6 +7,7 @@ use page_table_multiarch::PagingHandler; #[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/mod.rs")] #[cfg_attr(target_arch = "x86_64", path = "arch/x86_64/mod.rs")] +#[cfg_attr(target_arch = "riscv64", path = "arch/riscv64/mod.rs")] pub mod arch; use crate::{hal::arch::hardware_check, vmm}; diff --git a/scripts/ostool/qemu-riscv64.toml b/scripts/ostool/qemu-riscv64.toml new file mode 100644 index 00000000..f30276ef --- /dev/null +++ b/scripts/ostool/qemu-riscv64.toml @@ -0,0 +1,19 @@ +args = [ + "-nographic", + "-machine", + "virt", + "-smp", + "1", + "-bios", + "default", + "-device", + "virtio-blk-device,drive=disk0", + "-drive", + "id=disk0,if=none,format=raw,file=${workspaceFolder}/tmp/rootfs.img", + "-m", + "4G", +] +fail_regex = [] +success_regex = [] +to_bin = true +uefi = false diff --git a/xtask/src/cargo.rs b/xtask/src/cargo.rs index a821bdf5..3b8c8488 100644 --- a/xtask/src/cargo.rs +++ b/xtask/src/cargo.rs @@ -11,6 +11,8 @@ impl Context { Arch::Aarch64 } else if build_config.target.contains("x86_64") { Arch::X86_64 + } else if build_config.target.contains("riscv64") { + Arch::Riscv64 } else { return Err(anyhow::anyhow!( "Unsupported target architecture: {}", @@ -64,4 +66,5 @@ impl Context { enum Arch { Aarch64, X86_64, + Riscv64, } From 209816228217e76277aa0bcfeed13f50660c63fb Mon Sep 17 00:00:00 2001 From: YanLien Date: Mon, 2 Feb 2026 17:13:01 +0800 Subject: [PATCH 13/22] refactor(riscv): update dependencies and restructure interrupt injection Major changes: - Update dependencies to use official arceos-hypervisor repositories (next branch) - axdevice, axvmconfig, riscv_vcpu, riscv_vplic, arm_vgic - Replace range-alloc with range-alloc-arceos - Update axvisor_api and axvisor_api_proc to crates.io versions - Refactor RISC-V interrupt injection mechanism - Replace axvisor_api::api_mod_impl with crate_interface - Define InjectIrqIf trait in platform layer - Implement trait in kernel layer for better separation of concerns - Platform-specific improvements - Adjust DTB load address for linux-riscv64 (0x9200_0000 -> 0x9300_0000) - Remove ept-level-4 feature from qemu-riscv64 config - Add success regex pattern "Hello, world!" for CI tests - Code quality improvements - Fix formatting and remove trailing whitespace - Reorganize imports for consistency - Update image SHA256 checksums - Build system updates - Add axplat-riscv64-qemu-virt dependency to kernel - Update xtask formatting and structure --- .github/workflows/qemu-riscv64.toml | 7 +- Cargo.lock | 109 +++++------------- Cargo.toml | 20 +--- configs/board/qemu-riscv64.toml | 1 - configs/vms/arceos-riscv64-qemu-smp1.toml | 1 - configs/vms/linux-riscv64-qemu-smp1.toml | 2 +- kernel/Cargo.toml | 3 +- kernel/src/hal/arch/riscv64/api.rs | 8 +- kernel/src/hal/arch/riscv64/mod.rs | 9 +- modules/axfs/src/fs/fatfs.rs | 2 +- modules/axfs/src/lib.rs | 2 +- modules/axfs/src/partition.rs | 4 +- .../driver/src/soc/rockchip/clk/rk3568-clk.rs | 2 +- platform/riscv64-qemu-virt/Cargo.toml | 1 + platform/riscv64-qemu-virt/build.rs | 6 +- platform/riscv64-qemu-virt/src/boot.rs | 2 +- platform/riscv64-qemu-virt/src/console.rs | 2 +- platform/riscv64-qemu-virt/src/init.rs | 2 +- platform/riscv64-qemu-virt/src/irq.rs | 14 ++- platform/riscv64-qemu-virt/src/lib.rs | 5 +- platform/riscv64-qemu-virt/src/mem.rs | 2 +- platform/riscv64-qemu-virt/src/power.rs | 2 +- platform/riscv64-qemu-virt/src/time.rs | 2 +- xtask/src/cargo.rs | 4 +- xtask/src/image.rs | 60 +++++----- xtask/src/main.rs | 10 -- xtask/src/menuconfig.rs | 5 +- 27 files changed, 120 insertions(+), 167 deletions(-) diff --git a/.github/workflows/qemu-riscv64.toml b/.github/workflows/qemu-riscv64.toml index f201c236..b228b6f1 100644 --- a/.github/workflows/qemu-riscv64.toml +++ b/.github/workflows/qemu-riscv64.toml @@ -12,12 +12,13 @@ args = [ "virtio-blk-device,drive=disk0", "-drive", "id=disk0,if=none,format=raw,file=${workspaceFolder}/tmp/rootfs.img", - "-append", - "root=/dev/vda rw init=/init", "-m", "8g", ] fail_regex = [] -success_regex = ["test pass!"] +success_regex = [ + "Hello, world!", + "test pass!", +] to_bin = true uefi = false \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 8d1b4cfe..88694ba4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -261,24 +261,6 @@ dependencies = [ "tock-registers 0.10.1", ] -[[package]] -name = "arm_vgic" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arm_vgic.git#81338d6dd8a9dab04b91c9c0da3d6d84e7768be6" -dependencies = [ - "aarch64-cpu", - "aarch64_sysreg", - "axaddrspace", - "axdevice_base", - "axerrno 0.1.2", - "axvisor_api", - "bitmaps", - "log", - "memory_addr", - "spin 0.9.8", - "tock-registers 0.10.1", -] - [[package]] name = "arrayvec" version = "0.7.6" @@ -414,8 +396,9 @@ dependencies = [ [[package]] name = "axdevice" version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/axdevice.git?branch=next#c83350ee95d08b64225600f77102b682539010bf" dependencies = [ - "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", + "arm_vgic", "axaddrspace", "axdevice_base", "axerrno 0.1.2", @@ -423,26 +406,8 @@ dependencies = [ "cfg-if", "log", "memory_addr", - "range-alloc", - "riscv_vplic 0.1.0 (git+https://github.com/arceos-hypervisor/riscv_vplic.git?rev=8bc5213)", - "spin 0.9.8", -] - -[[package]] -name = "axdevice" -version = "0.1.0" -source = "git+https://github.com/liulog/axdevice?branch=master#50ecc20e3d4fe82480b041c769bad18845ce80c5" -dependencies = [ - "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", - "axaddrspace", - "axdevice_base", - "axerrno 0.1.2", - "axvmconfig", - "cfg-if", - "log", - "memory_addr", - "range-alloc", - "riscv_vplic 0.1.0 (git+https://github.com/liulog/riscv_vplic.git)", + "range-alloc-arceos", + "riscv_vplic", "spin 0.9.8", ] @@ -896,6 +861,7 @@ dependencies = [ "axcpu", "axplat", "axvisor_api", + "crate_interface", "kspin", "lazyinit", "log", @@ -1118,17 +1084,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axvcpu" -version = "0.1.1" -dependencies = [ - "axaddrspace", - "axerrno 0.1.2", - "axvisor_api", - "memory_addr", - "percpu", -] - [[package]] name = "axvcpu" version = "0.1.1" @@ -1163,14 +1118,15 @@ dependencies = [ "arm-gic-driver", "axaddrspace", "axconfig", - "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", + "axdevice", "axdevice_base", "axdriver", "axerrno 0.2.2", "axhvc", + "axplat-riscv64-qemu-virt 0.3.0", "axruntime", "axstd", - "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "axvcpu 0.1.1", "axvisor_api", "axvm", "bitflags 2.10.0", @@ -1195,7 +1151,7 @@ dependencies = [ "rdif-intc", "rdrive", "riscv_vcpu", - "riscv_vplic 0.1.0 (git+https://github.com/arceos-hypervisor/riscv_vplic.git?rev=8bc5213)", + "riscv_vplic", "spin 0.9.8", "syn 2.0.113", "timer_list", @@ -1206,6 +1162,8 @@ dependencies = [ [[package]] name = "axvisor_api" version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa7233b2a1338dc06a80e2779b572b4df02007ea128ef7b235b66fc3eeac0ca6" dependencies = [ "axaddrspace", "axvisor_api_proc", @@ -1216,6 +1174,8 @@ dependencies = [ [[package]] name = "axvisor_api_proc" version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a64eb4410ae8357ac8c01c2fb201e57d7aeeb5436ed4d0f5774bfa11cc5902" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1226,14 +1186,15 @@ dependencies = [ [[package]] name = "axvm" version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=next#31ff86e4704a045cc85ded4613b4296c6ea183cb" dependencies = [ "arm_vcpu", - "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arm_vgic", "axaddrspace", - "axdevice 0.1.0 (git+https://github.com/liulog/axdevice?branch=master)", + "axdevice", "axdevice_base", "axerrno 0.2.2", - "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "axvcpu 0.1.1", "axvmconfig", "cfg-if", "cpumask", @@ -1250,6 +1211,7 @@ dependencies = [ [[package]] name = "axvmconfig" version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=next#75e7ae893bcca452fd006ae4c17b21715c95e4e0" dependencies = [ "axerrno 0.1.2", "clap", @@ -2380,7 +2342,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4216,7 +4178,7 @@ dependencies = [ "once_cell", "socket2 0.6.1", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -4300,9 +4262,10 @@ dependencies = [ ] [[package]] -name = "range-alloc" -version = "0.1.4" -source = "git+https://github.com/arceos-hypervisor/range-alloc.git#fc826e54dab9072be5358a1b0e7fc34503d6630d" +name = "range-alloc-arceos" +version = "0.1.4-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63358c741a7a22b7b99bc27dcdf5b79339b132bd4380920fed7f7219ece58dd" [[package]] name = "ratatui" @@ -4697,10 +4660,11 @@ dependencies = [ [[package]] name = "riscv_vcpu" version = "0.1.2" +source = "git+https://github.com/arceos-hypervisor/riscv_vcpu.git?branch=master#dda3b4a82255fd06c343051b6cc0d8854a2df2b0" dependencies = [ "axaddrspace", "axerrno 0.1.2", - "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "axvcpu 0.1.1", "axvisor_api", "bit_field", "bitflags 2.10.0", @@ -4734,21 +4698,6 @@ dependencies = [ "spin 0.9.8", ] -[[package]] -name = "riscv_vplic" -version = "0.1.0" -source = "git+https://github.com/liulog/riscv_vplic.git#5ed1fb6bb06d85675ba8f60813d32744b512b23d" -dependencies = [ - "axaddrspace", - "axdevice_base", - "axerrno 0.1.2", - "axvisor_api", - "bitmaps", - "log", - "riscv-h", - "spin 0.9.8", -] - [[package]] name = "rk3568_clk" version = "0.1.0" @@ -4895,7 +4844,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -5636,7 +5585,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.3", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -6771,7 +6720,7 @@ dependencies = [ "axaddrspace", "axdevice_base", "axerrno 0.1.2", - "axvcpu 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "axvcpu 0.1.1", "axvisor_api", "bit_field", "bitflags 2.10.0", diff --git a/Cargo.toml b/Cargo.toml index 35820b0d..90d751f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,7 +79,7 @@ rdrive = "0.18" vm-fdt = {git = "https://github.com/bullhh/vm-fdt.git", default-features = false, features = ["alloc"]} -axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git"} +axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git", branch = "next"} axdevice_base = "0.1" axvisor_api = "0.1" driver = {path = "modules/driver"} @@ -89,23 +89,9 @@ axplat-x86-qemu-q35 = {path = "platform/x86-qemu-q35"} axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"} axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} -[patch.crates-io] -axvmconfig = { path = "crates/axvmconfig" } -axvisor_api = {path = "../axvisor_api"} -# axvcpu = { path = "./crates/axvcpu" } - -[patch."https://github.com/arceos-hypervisor/axvmconfig.git"] -axvmconfig = {path = "crates/axvmconfig"} - [patch."https://github.com/arceos-org/arceos.git"] axconfig = { path = "modules/axconfig" } axruntime = { path = "modules/axruntime" } -[patch."https://github.com/arceos-hypervisor/axvm.git"] -axvm = {path = "crates/axvm"} - -[patch."https://github.com/liulog/riscv_vcpu.git"] -riscv_vcpu = { path = "crates/riscv_vcpu" } - -[patch."https://github.com/arceos-hypervisor/axdevice.git"] -axdevice = {git = "https://github.com/liulog/axdevice", branch = "master"} +[patch.crates-io] +axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next"} diff --git a/configs/board/qemu-riscv64.toml b/configs/board/qemu-riscv64.toml index 5e3d701b..fbd1ac35 100644 --- a/configs/board/qemu-riscv64.toml +++ b/configs/board/qemu-riscv64.toml @@ -1,7 +1,6 @@ cargo_args = [] features = [ "axstd/myplat", - "ept-level-4", "axstd/bus-mmio", # "fs", ] diff --git a/configs/vms/arceos-riscv64-qemu-smp1.toml b/configs/vms/arceos-riscv64-qemu-smp1.toml index c80c906d..ff4a5ca1 100644 --- a/configs/vms/arceos-riscv64-qemu-smp1.toml +++ b/configs/vms/arceos-riscv64-qemu-smp1.toml @@ -70,4 +70,3 @@ emu_devices = [ ] interrupt_mode = "passthrough" - diff --git a/configs/vms/linux-riscv64-qemu-smp1.toml b/configs/vms/linux-riscv64-qemu-smp1.toml index cf7ee30a..7aeacebb 100644 --- a/configs/vms/linux-riscv64-qemu-smp1.toml +++ b/configs/vms/linux-riscv64-qemu-smp1.toml @@ -29,7 +29,7 @@ kernel_load_addr = 0x9000_0000 # The file path of the device tree blob (DTB). dtb_path = "/path/tmp/configs/linux-riscv64-qemu-smp1.dtb" # The load address of the device tree blob (DTB). -dtb_load_addr = 0x9200_0000 +dtb_load_addr = 0x9300_0000 # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 3a778720..a94c0f7d 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -63,8 +63,9 @@ aarch64-cpu-ext = "0.1" arm-gic-driver = {version = "0.15.5", features = ["rdif"]} [target.'cfg(target_arch = "riscv64")'.dependencies] +axplat-riscv64-qemu-virt.workspace = true riscv_vplic = { git = "https://github.com/arceos-hypervisor/riscv_vplic.git", rev = "8bc5213" } -riscv_vcpu = { git = "https://github.com/liulog/riscv_vcpu.git", branch = "master" } +riscv_vcpu = { git = "https://github.com/arceos-hypervisor/riscv_vcpu.git", branch = "master" } [build-dependencies] axconfig.workspace = true diff --git a/kernel/src/hal/arch/riscv64/api.rs b/kernel/src/hal/arch/riscv64/api.rs index 34779dc7..e45c5704 100644 --- a/kernel/src/hal/arch/riscv64/api.rs +++ b/kernel/src/hal/arch/riscv64/api.rs @@ -1,6 +1,8 @@ -#[axvisor_api::api_mod_impl(axvisor_api::arch)] -mod arch_api_impl { - extern fn inject_virtual_interrupt(irq: usize) { +struct VmInterruptIfImpl; + +#[crate_interface::impl_interface] +impl axplat_riscv64_qemu_virt::irq::InjectIrqIf for VmInterruptIfImpl { + fn inject_virtual_interrupt(irq: usize) { crate::hal::arch::inject_interrupt(irq); } } diff --git a/kernel/src/hal/arch/riscv64/mod.rs b/kernel/src/hal/arch/riscv64/mod.rs index ff1f7589..2c14c015 100644 --- a/kernel/src/hal/arch/riscv64/mod.rs +++ b/kernel/src/hal/arch/riscv64/mod.rs @@ -8,15 +8,18 @@ use axvisor_api::vmm::current_vm_id; pub fn hardware_check() { // TODO: implement hardware checks for RISC-V64 // check page table level like aarch64 - } pub fn inject_interrupt(irq_id: usize) { debug!("injecting interrupt id: {}", irq_id); // Get the instance of the vplic, and then inject virtual interrupt. - let vplic = get_vm_by_id(current_vm_id()).unwrap().get_devices().find_mmio_dev(GuestPhysAddr::from_usize(axruntime::plic_base())).unwrap(); - + let vplic = get_vm_by_id(current_vm_id()) + .unwrap() + .get_devices() + .find_mmio_dev(GuestPhysAddr::from_usize(axruntime::plic_base())) + .unwrap(); + // Calulate the pending register offset and value. let reg_offset = riscv_vplic::PLIC_PENDING_OFFSET + (irq_id / 32) * 4; let addr = GuestPhysAddr::from_usize(axruntime::plic_base() + reg_offset); diff --git a/modules/axfs/src/fs/fatfs.rs b/modules/axfs/src/fs/fatfs.rs index da0b6f11..b62d25cb 100644 --- a/modules/axfs/src/fs/fatfs.rs +++ b/modules/axfs/src/fs/fatfs.rs @@ -4,8 +4,8 @@ use core::cell::OnceCell; use axfs_vfs::{VfsDirEntry, VfsError, VfsNodePerm, VfsResult}; use axfs_vfs::{VfsNodeAttr, VfsNodeOps, VfsNodeRef, VfsNodeType, VfsOps}; -use spin::Mutex; use fatfs::{Dir, File, LossyOemCpConverter, NullTimeProvider, Read, Seek, SeekFrom, Write}; +use spin::Mutex; use crate::dev::{Disk, Partition}; diff --git a/modules/axfs/src/lib.rs b/modules/axfs/src/lib.rs index 11692a02..697b21b5 100644 --- a/modules/axfs/src/lib.rs +++ b/modules/axfs/src/lib.rs @@ -19,7 +19,7 @@ use alloc::{ sync::Arc, vec::Vec, }; -use axdriver::{prelude::*, AxDeviceContainer}; +use axdriver::{AxDeviceContainer, prelude::*}; /// Initializes filesystems by block devices. pub fn init_filesystems(mut blk_devs: AxDeviceContainer, bootargs: Option<&str>) { diff --git a/modules/axfs/src/partition.rs b/modules/axfs/src/partition.rs index 05f0d3a8..f6487ea1 100644 --- a/modules/axfs/src/partition.rs +++ b/modules/axfs/src/partition.rs @@ -225,7 +225,7 @@ fn parse_gpt_partitions(disk: &mut Disk) -> AxResult> { for j in 0..36 { name_utf16[j] = entry.partition_name[j]; } - + // Find the null terminator let mut name_len = 36; for j in 0..36 { @@ -234,7 +234,7 @@ fn parse_gpt_partitions(disk: &mut Disk) -> AxResult> { break; } } - + // Convert only the valid portion let name_slice = &name_utf16[..name_len]; let name_str = String::from_utf16_lossy(name_slice); diff --git a/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs b/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs index 6607dd92..efa3b1ca 100644 --- a/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs +++ b/modules/driver/src/soc/rockchip/clk/rk3568-clk.rs @@ -125,4 +125,4 @@ fn probe(info: FdtInfo<'_>, plat_dev: PlatformDevice) -> Result<(), OnProbeError plat_dev.register(clk); Ok(()) -} \ No newline at end of file +} diff --git a/platform/riscv64-qemu-virt/Cargo.toml b/platform/riscv64-qemu-virt/Cargo.toml index 9d07de9e..8bfe9dc1 100644 --- a/platform/riscv64-qemu-virt/Cargo.toml +++ b/platform/riscv64-qemu-virt/Cargo.toml @@ -27,6 +27,7 @@ axconfig-macros = "0.2" axcpu = { workspace = true } axplat = { workspace = true } axvisor_api = { workspace = true } +crate_interface = { workspace = true } [package.metadata.docs.rs] targets = ["riscv64gc-unknown-none-elf"] diff --git a/platform/riscv64-qemu-virt/build.rs b/platform/riscv64-qemu-virt/build.rs index 86c6182a..80a4c120 100644 --- a/platform/riscv64-qemu-virt/build.rs +++ b/platform/riscv64-qemu-virt/build.rs @@ -9,8 +9,10 @@ fn main() { let ld_content = include_str!("linker.lds.S"); let ld_content = ld_content.replace("%ARCH%", "riscv"); - let ld_content = - ld_content.replace("%KERNEL_BASE%", &format!("{:#x}", 0xffff_ffc0_8020_0000usize)); + let ld_content = ld_content.replace( + "%KERNEL_BASE%", + &format!("{:#x}", 0xffff_ffc0_8020_0000usize), + ); let ld_content = ld_content.replace("%SMP%", &format!("{smp}",)); // target///build/axvisor-xxxx/out diff --git a/platform/riscv64-qemu-virt/src/boot.rs b/platform/riscv64-qemu-virt/src/boot.rs index 12a7fc47..e3a690a8 100644 --- a/platform/riscv64-qemu-virt/src/boot.rs +++ b/platform/riscv64-qemu-virt/src/boot.rs @@ -73,7 +73,7 @@ unsafe extern "C" fn _start() -> ! { /// The earliest entry point for secondary CPUs. #[cfg(feature = "smp")] #[unsafe(naked)] -pub(crate) unsafe extern "C" fn _start_secondary() -> ! { +pub(crate) unsafe extern fn _start_secondary() -> ! { // a0 = hartid // a1 = SP core::arch::naked_asm!(" diff --git a/platform/riscv64-qemu-virt/src/console.rs b/platform/riscv64-qemu-virt/src/console.rs index 63f4799a..037f5cc6 100644 --- a/platform/riscv64-qemu-virt/src/console.rs +++ b/platform/riscv64-qemu-virt/src/console.rs @@ -51,4 +51,4 @@ impl ConsoleIf for ConsoleIfImpl { fn irq_num() -> Option { Some(crate::config::devices::UART_IRQ) } -} \ No newline at end of file +} diff --git a/platform/riscv64-qemu-virt/src/init.rs b/platform/riscv64-qemu-virt/src/init.rs index 3f191049..f90db4e9 100644 --- a/platform/riscv64-qemu-virt/src/init.rs +++ b/platform/riscv64-qemu-virt/src/init.rs @@ -37,4 +37,4 @@ impl InitIf for InitIfImpl { crate::irq::init_percpu(); crate::time::init_percpu(); } -} \ No newline at end of file +} diff --git a/platform/riscv64-qemu-virt/src/irq.rs b/platform/riscv64-qemu-virt/src/irq.rs index a05f2358..6e06037d 100644 --- a/platform/riscv64-qemu-virt/src/irq.rs +++ b/platform/riscv64-qemu-virt/src/irq.rs @@ -15,6 +15,14 @@ use sbi_rt::HartMask; use crate::config::{devices::PLIC_PADDR, plat::PHYS_VIRT_OFFSET}; +/// Use call_interface with the trait path as known to crate_interface +/// Interface for injecting virtual interrupts to guest VMs. +/// This trait is defined and implemented in the kernel (axvisor). +#[crate_interface::def_interface] +pub trait InjectIrqIf { + fn inject_virtual_interrupt(irq: usize); +} + /// `Interrupt` bit in `scause` pub(super) const INTC_IRQ_BASE: usize = 1 << (usize::BITS - 1); @@ -212,10 +220,10 @@ impl IrqIf for IrqIfImpl { }; drop(plic); // Inject the virtual interrupt to the guest VM - axvisor_api::arch::inject_virtual_interrupt(irq.get() as usize); + crate_interface::call_interface!(InjectIrqIf::inject_virtual_interrupt, irq.get() as usize); // trace!("IRQ: external {irq}"); - // IRQ_HANDLER_TABLE.handle(irq.get() as usize); + // IRQ_HANDLER_TABLE.handle(irq.get() as usize); // Only for irqs that belong to axvisor, complete the IRQ. // plic.complete(this_context(), irq); Some(irq.get() as usize) @@ -253,4 +261,4 @@ impl IrqIf for IrqIfImpl { } } } -} \ No newline at end of file +} diff --git a/platform/riscv64-qemu-virt/src/lib.rs b/platform/riscv64-qemu-virt/src/lib.rs index 067407bb..32d53817 100644 --- a/platform/riscv64-qemu-virt/src/lib.rs +++ b/platform/riscv64-qemu-virt/src/lib.rs @@ -5,11 +5,12 @@ extern crate log; #[macro_use] extern crate axplat; +#[cfg(feature = "irq")] +pub mod irq; + mod boot; mod console; mod init; -#[cfg(feature = "irq")] -mod irq; mod mem; mod power; mod time; diff --git a/platform/riscv64-qemu-virt/src/mem.rs b/platform/riscv64-qemu-virt/src/mem.rs index 09930ff1..13000df0 100644 --- a/platform/riscv64-qemu-virt/src/mem.rs +++ b/platform/riscv64-qemu-virt/src/mem.rs @@ -55,4 +55,4 @@ impl MemIf for MemIfImpl { crate::config::plat::KERNEL_ASPACE_SIZE, ) } -} \ No newline at end of file +} diff --git a/platform/riscv64-qemu-virt/src/power.rs b/platform/riscv64-qemu-virt/src/power.rs index bf6c5aaf..db9e2e0c 100644 --- a/platform/riscv64-qemu-virt/src/power.rs +++ b/platform/riscv64-qemu-virt/src/power.rs @@ -29,4 +29,4 @@ impl PowerIf for PowerImpl { axcpu::asm::halt(); } } -} \ No newline at end of file +} diff --git a/platform/riscv64-qemu-virt/src/time.rs b/platform/riscv64-qemu-virt/src/time.rs index 121d1e54..5448f73e 100644 --- a/platform/riscv64-qemu-virt/src/time.rs +++ b/platform/riscv64-qemu-virt/src/time.rs @@ -68,4 +68,4 @@ impl TimeIf for TimeIfImpl { fn set_oneshot_timer(deadline_ns: u64) { sbi_rt::set_timer(Self::nanos_to_ticks(deadline_ns)); } -} \ No newline at end of file +} diff --git a/xtask/src/cargo.rs b/xtask/src/cargo.rs index 93cd532b..3b8c8488 100644 --- a/xtask/src/cargo.rs +++ b/xtask/src/cargo.rs @@ -1,5 +1,5 @@ -use std::{fs, path::PathBuf}; use ostool::build::CargoRunnerKind; +use std::{fs, path::PathBuf}; use crate::ctx::Context; @@ -13,7 +13,7 @@ impl Context { Arch::X86_64 } else if build_config.target.contains("riscv64") { Arch::Riscv64 - }else { + } else { return Err(anyhow::anyhow!( "Unsupported target architecture: {}", build_config.target diff --git a/xtask/src/image.rs b/xtask/src/image.rs index 4d9eb76b..044350d1 100644 --- a/xtask/src/image.rs +++ b/xtask/src/image.rs @@ -46,25 +46,21 @@ pub struct ImageArgs { pub enum ImageCommands { /// List all available images Ls, - /// Download the specified image and automatically extract it Download { /// Name of the image to download image_name: String, - /// Output directory for the downloaded image #[arg(short, long)] output_dir: Option, - /// Do not extract after download #[arg(long, help = "Do not extract after download")] no_extract: bool, }, - /// Remove the specified image from temp directory Rm { /// Name of the image to remove - image_name: String + image_name: String, }, } @@ -82,133 +78,140 @@ impl Image { pub const EVM3588_ARCEOS: Self = Self { name: "evm3588_arceos", description: "ArceOS for EVM3588 development board", - sha256: "c9f197408f14f2cd9d3b9d2e077a9e91d233479713cb24d5280f7dc5562ae800", + sha256: "b1627aa216a98ffa56ce2295252e4d293125184ca394d5e409a1c711bd9a8eff", arch: "aarch64", }; pub const EVM3588_LINUX: Self = Self { name: "evm3588_linux", description: "Linux for EVM3588 development board", - sha256: "cc12be121e75b0eb6588a774106582ee7c7b279895d73558f31ce34712a8fea3", + sha256: "bce8a1a0ed22215f6d98456574009ad4678c6dfda7c5fe8dfcdf15d59f858ef1", arch: "aarch64", }; pub const ORANGEPI_ARCEOS: Self = Self { name: "orangepi_arceos", description: "ArceOS for Orange Pi development board", - sha256: "2a95477e1e18d9ca95f666de93cd8ba53ffafb3f285fbdf4fde1e0cdfb0d8f1d", + sha256: "cdef0112156bf1d630f8d46d1fd60f45790f99cb8a656a8b716a9efe7958dbc1", arch: "aarch64", }; pub const ORANGEPI_LINUX: Self = Self { name: "orangepi_linux", description: "Linux for Orange Pi development board", - sha256: "7a1fd69f10dd223988c436ea461bed15ddae4351fc7a47fb7b3fee9792afac86", + sha256: "f50a6eaf730a5e962f0ded5474b32cc0b6905e1ee796ac77a1cf83d0576ffbb9", arch: "aarch64", }; pub const PHYTIUMPI_ARCEOS: Self = Self { name: "phytiumpi_arceos", description: "ArceOS for Phytium Pi development board", - sha256: "c774824e36319f2f20575e488861a61c6ef7a5d2e5f219edd03a2c3c29ca3d05", + sha256: "8b7b76d60f2868eeaf6b5d28c067bef6307372f31b56b11bbc7999c635d614e5", arch: "aarch64", }; pub const PHYTIUMPI_LINUX: Self = Self { name: "phytiumpi_linux", description: "Linux for Phytium Pi development board", - sha256: "78a27021b76b6d20a5420938473cf92ac59dc4674d528295b75ecfabdf9bea69", + sha256: "792d5a6645f773226f6758133b2be4887eceaf713321dcfec7fdffe4412bc46d", + arch: "aarch64", + }; + + pub const PHYTIUMPI_RTTHREAD: Self = Self { + name: "phytiumpi_rtthread", + description: "RT-Thread for Phytium Pi development board", + sha256: "96ec4bfce212a183b0ca3c6330a815c9e273b393da753d871498672c38815dd8", arch: "aarch64", }; pub const QEMU_AARCH64_ARCEOS: Self = Self { name: "qemu_aarch64_arceos", description: "ArceOS for QEMU aarch64 virtualization", - sha256: "56c1f517444dcd6668f0d4bc280543d6f236728c4ec5b81e7e5b5a06cf012690", + sha256: "f2422b89de216e595256b1d18b9305cc1f6d1f3b4d3e50016c50ac9126bf804b", arch: "aarch64", }; pub const QEMU_AARCH64_LINUX: Self = Self { name: "qemu_aarch64_linux", description: "Linux for QEMU aarch64 virtualization", - sha256: "ffccd4f89ee84def89ab66e23249d30723fd4a9af7896d7ef4d6f6d75d34225b", + sha256: "9e2a19e00a72962c4aac53ad8d6172ca473a93d321e3bb3f49a979264754e397", arch: "aarch64", }; pub const QEMU_AARCH64_NIMBOS: Self = Self { name: "qemu_aarch64_nimbos", description: "NIMBOS for QEMU aarch64 virtualization", - sha256: "283681356af35e141bcf050dd56aa698966477289c21ac49941bb68d9a9ad1b8", + sha256: "77d50bc1b5df282e31ed3780dd2d09691026836144c0ce6f46ef99301f5aaea8", arch: "aarch64", }; pub const QEMU_RISCV64_ARCEOS: Self = Self { name: "qemu_riscv64_arceos", description: "ArceOS for QEMU riscv64 virtualization", - sha256: "19248561c242a06a893a6a4debfc05ba5ca3e438347814c10351eecef88e54be", + sha256: "1c6a63c1ff1713aa7aaac61a07c2c43e94cace404a8f9e5808275d5335526b0b", arch: "riscv64", }; pub const QEMU_RISCV64_LINUX: Self = Self { name: "qemu_riscv64_linux", description: "Linux for QEMU riscv64 virtualization", - sha256: "34a355907bf3b05ea3949207fd98aad05d91c21d3b724d345f54576ef6e12eba", + sha256: "86ec223dcdd0cd39210e961d1d6cac0179f03c9a179b6514cd787410bf766d61", arch: "riscv64", }; pub const QEMU_RISCV64_NIMBOS: Self = Self { name: "qemu_riscv64_nimbos", description: "NIMBOS for QEMU riscv64 virtualization", - sha256: "064f75df290905687221b2554dd4e4efc077a6a95cafcbf7f98e2181441c24e3", + sha256: "ce75be7bb5dc6ca1df3a23a055100adbd309da0cc65e0dc669a35f81e369249f", arch: "riscv64", }; pub const QEMU_X86_64_ARCEOS: Self = Self { name: "qemu_x86_64_arceos", description: "ArceOS for QEMU x86_64 virtualization", - sha256: "ee9bdd4f6ae3ef2ee807ac712b82318329eeb6d1cffdf737f98a393ad730b5d9", + sha256: "64538c2330e7658a381902af448cda72e14d9b7971995eb6c4ec5cf8bcaa622b", arch: "x86_64", }; pub const QEMU_X86_64_LINUX: Self = Self { name: "qemu_x86_64_linux", description: "Linux for QEMU x86_64 virtualization", - sha256: "1a27da24b02f836b259462d5c73dc550553ea708d24af299378137beedc46c51", + sha256: "8a04e36174dd0b0ea386c261d1fee59d47cfbd2e5f0f2a48c53f99c4deead0a5", arch: "x86_64", }; pub const QEMU_X86_64_NIMBOS: Self = Self { name: "qemu_x86_64_nimbos", description: "NIMBOS for QEMU x86_64 virtualization", - sha256: "55d73898f9f98fca80e15387b1e5149ba6bbf74d3631281ea1ece75de3529078", + sha256: "dddfa6067af453d49f2925fe75514779549041ba78bb390a54aab1c836ed6c63", arch: "x86_64", }; pub const ROC_RK3568_PC_ARCEOS: Self = Self { name: "roc-rk3568-pc_arceos", description: "ArceOS for ROC-RK3568-PC development board", - sha256: "4dd2f727c2a46ff1e64632616c308c9504ef5ddb4b519acf3f69c928e4475ca7", + sha256: "5ec4721d449d302ce6e00ec6efeb8e5284e1ed2051e4a417229a1464d991469c", arch: "aarch64", }; pub const ROC_RK3568_PC_LINUX: Self = Self { name: "roc-rk3568-pc_linux", description: "Linux for ROC-RK3568-PC development board", - sha256: "73feb8b84473603252dbadc4c81446f9a68098bd899fd524ec26f68761a35cf8", + sha256: "1c47b0fa63f47c6e02450a4c4bac59d74c486a55f72b032c1cf5f4a432e2973e", arch: "aarch64", }; pub const TAC_E400_PLC_ARCEOS: Self = Self { name: "tac-e400-plc_arceos", description: "ArceOS for TAC-E400-PLC industrial control board", - sha256: "a2504506c81871c84ba421a94f77028f067c5589886f37c0c389a545d7e57aeb", + sha256: "0b249ff8daeb1070b4518f09ef46b05266322594907afd0ed2b21b83810ca6ab", arch: "aarch64", }; pub const TAC_E400_PLC_LINUX: Self = Self { name: "tac-e400-plc_linux", description: "Linux for TAC-E400-PLC industrial control board", - sha256: "920743161a73da228e714d71f55d8ba77b91ed37092d4f80e774f4e809b34403", + sha256: "a639c5bdb2d1ed07907085e2d181be2d5f2f5433f7fe64bcae8d8d86ddf657f7", arch: "aarch64", }; @@ -221,6 +224,7 @@ impl Image { Self::ORANGEPI_LINUX, Self::PHYTIUMPI_ARCEOS, Self::PHYTIUMPI_LINUX, + Self::PHYTIUMPI_RTTHREAD, Self::QEMU_AARCH64_ARCEOS, Self::QEMU_RISCV64_ARCEOS, Self::QEMU_X86_64_ARCEOS, @@ -433,12 +437,16 @@ async fn image_download(image_name: &str, output_dir: Option, extract: b Ok(false) => { // Remove the invalid downloaded file let _ = fs::remove_file(&output_path); - return Err(anyhow!("Download completed but file SHA256 verification failed")); + return Err(anyhow!( + "Download completed but file SHA256 verification failed" + )); } Err(e) => { // Remove the potentially corrupted downloaded file let _ = fs::remove_file(&output_path); - return Err(anyhow!("Download completed but error verifying downloaded file: {e}")); + return Err(anyhow!( + "Download completed but error verifying downloaded file: {e}" + )); } } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 68390dc7..3c5631ab 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -55,15 +55,12 @@ struct QemuArgs { /// Path to custom build configuration file (TOML format) #[arg(long)] build_config: Option, - /// Path to custom QEMU configuration file #[arg(long)] qemu_config: Option, - /// Comma-separated list of VM configuration files #[arg(long)] vmconfigs: Vec, - #[command(flatten)] build: BuildArgs, } @@ -73,23 +70,18 @@ struct ClippyArgs { /// Only check specific packages (comma separated) #[arg(long)] packages: Option, - /// Only check specific targets (comma separated) #[arg(long)] targets: Option, - /// Continue on error instead of exiting immediately #[arg(long)] continue_on_error: bool, - /// Dry run - show what would be checked without running clippy #[arg(long)] dry_run: bool, - /// Automatically fix clippy warnings where possible #[arg(long)] fix: bool, - /// Allow fixing when the working directory is dirty (has uncommitted changes) #[arg(long)] allow_dirty: bool, @@ -100,11 +92,9 @@ struct UbootArgs { /// Path to custom build configuration file (TOML format) #[arg(long)] build_config: Option, - /// Path to custom U-Boot configuration file #[arg(long)] uboot_config: Option, - /// Comma-separated list of VM configuration files #[arg(long)] vmconfigs: Vec, diff --git a/xtask/src/menuconfig.rs b/xtask/src/menuconfig.rs index 199b440f..0460dc47 100644 --- a/xtask/src/menuconfig.rs +++ b/xtask/src/menuconfig.rs @@ -10,7 +10,10 @@ impl Context { let config_path = self.ctx.paths.workspace.join(".build.toml"); if config_path.exists() { - println!("\nCurrent .build.toml configuration file: {}", config_path.display()); + println!( + "\nCurrent .build.toml configuration file: {}", + config_path.display() + ); } else { println!("\nNo .build.toml configuration file found, will use default configuration"); } From 3ef464a7f497ab95a161f6b02f18fc4850f6c325 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Thu, 5 Mar 2026 02:22:05 +0800 Subject: [PATCH 14/22] Use local path for merged lower-level components (axvm, axdevice, axvmconfig) --- Cargo.toml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 55d15dab..b493c720 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,8 @@ axklib = {git = "https://github.com/arceos-hypervisor/axklib.git"} axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} axvcpu = "0.1" -axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "aar-master"} +# axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "aar-next"} +axvm = { path = "../axvm" } # System independent crates provided by ArceOS, these crates could be imported by remote url. axerrno = "0.2" @@ -79,7 +80,8 @@ rdrive = "0.18" vm-fdt = {git = "https://github.com/bullhh/vm-fdt.git", default-features = false, features = ["alloc"]} -axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git", branch = "aar-master"} +# axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git", branch = "aar-next"} +axdevice = { path = "../axdevice" } axdevice_base = "0.1" axvisor_api = "0.2" driver = {path = "modules/driver"} @@ -87,7 +89,8 @@ driver = {path = "modules/driver"} # platform axplat-x86-qemu-q35 = {path = "platform/x86-qemu-q35"} axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"} -axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-master"} +# axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-next"} +axvmconfig = { path = "../axvmconfig" } [patch."https://github.com/arceos-org/arceos.git"] axconfig = { path = "modules/axconfig" } @@ -103,7 +106,8 @@ arm_vgic = { git = "https://github.com/arceos-hypervisor/arm_vgic", branch = "aa x86_vcpu = { git = "https://github.com/arceos-hypervisor/x86_vcpu", branch = "aar-master"} arm_vcpu = { git = "https://github.com/arceos-hypervisor/arm_vcpu", branch = "aar-master"} riscv_vcpu = { git = "https://github.com/arceos-hypervisor/riscv_vcpu", branch = "aar-master"} -axvmconfig = { git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-master" } +# axvmconfig = { git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-next" } +axvmconfig = { path = "../axvmconfig" } [patch."https://github.com/arceos-org/arceos"] axconfig = {path = "modules/axconfig"} From c8ec53cac562a67c29bb32fb3f1f500fb6a947e3 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Fri, 6 Mar 2026 15:34:02 +0800 Subject: [PATCH 15/22] update dependencies --- Cargo.lock | 551 +++++++++++++++++++++++++++++++++++++++------- Cargo.toml | 40 +--- kernel/Cargo.toml | 12 +- 3 files changed, 482 insertions(+), 121 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2d197ed4..77c961f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -192,7 +192,7 @@ dependencies = [ "axdriver", "axerrno 0.1.2", "axfeat", - "axfs", + "axfs 0.2.0", "axhal", "axio", "axlog", @@ -236,15 +236,16 @@ dependencies = [ [[package]] name = "arm_vcpu" -version = "0.1.1" -source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=aar-master#3170912a4ff784385691f1ca169e4f87d687e3bf" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "979230a9de461189f361c5a41a01006b4e943dcf9ebbac1c1444fb6c29fdbae2" dependencies = [ "aarch64-cpu 11.2.0", - "axaddrspace", - "axdevice_base", + "axaddrspace 0.3.0", + "axdevice_base 0.2.2", "axerrno 0.2.2", - "axvcpu", - "axvisor_api", + "axvcpu 0.3.0", + "axvisor_api 0.3.0", "log", "numeric-enum-macro", "percpu", @@ -253,15 +254,16 @@ dependencies = [ [[package]] name = "arm_vgic" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arm_vgic?branch=aar-master#1b145dc767a8d3e0c6f677f26474959de10e6ccf" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49c287b9ceddf2a9f36662df520a85e2fca93a194d303d98d50727c4b19647fa" dependencies = [ "aarch64-cpu 11.2.0", "aarch64_sysreg", - "axaddrspace", - "axdevice_base", + "axaddrspace 0.3.0", + "axdevice_base 0.2.2", "axerrno 0.2.2", - "axvisor_api", + "axvisor_api 0.3.0", "bitmaps", "log", "memory_addr", @@ -304,6 +306,26 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +[[package]] +name = "axaddrspace" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91962ea80ef137c2986b6802d664900e73aa7a014272c13dd9172cc948d5c94e" +dependencies = [ + "axerrno 0.1.2", + "bit_field", + "bitflags 2.10.0", + "cfg-if", + "lazyinit", + "log", + "memory_addr", + "memory_set", + "numeric-enum-macro", + "page_table_entry 0.6.1", + "page_table_multiarch 0.6.1", + "x86", +] + [[package]] name = "axaddrspace" version = "0.2.0" @@ -318,8 +340,28 @@ dependencies = [ "memory_addr", "memory_set", "numeric-enum-macro", - "page_table_entry", - "page_table_multiarch", + "page_table_entry 0.5.7", + "page_table_multiarch 0.5.7", + "x86", +] + +[[package]] +name = "axaddrspace" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2dffa605d03eb184604fb7fcc15f2e641cf21b7a17b8f71e23b22f5c04b7be" +dependencies = [ + "axerrno 0.2.2", + "bit_field", + "bitflags 2.10.0", + "cfg-if", + "lazyinit", + "log", + "memory_addr", + "memory_set", + "numeric-enum-macro", + "page_table_entry 0.6.1", + "page_table_multiarch 0.6.1", "x86", ] @@ -390,10 +432,10 @@ dependencies = [ "log", "loongArch64", "memory_addr", - "page_table_entry", - "page_table_multiarch", + "page_table_entry 0.5.7", + "page_table_multiarch 0.5.7", "percpu", - "riscv", + "riscv 0.14.0", "static_assertions", "tock-registers 0.9.0", "x86", @@ -402,18 +444,37 @@ dependencies = [ [[package]] name = "axdevice" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axdevice.git?branch=aar-master#9e35b2f6bb8d80eeff134dc0f9e80a8085e261d8" +version = "0.2.2" +dependencies = [ + "arm_vgic", + "axaddrspace 0.3.0", + "axdevice_base 0.2.2", + "axerrno 0.2.2", + "axvmconfig 0.2.2", + "cfg-if", + "log", + "memory_addr", + "range-alloc-arceos", + "riscv_vplic 0.2.2", + "spin 0.10.0", +] + +[[package]] +name = "axdevice" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55bcbe9825eecc55421eb205511a0d359f0c83141a4df53f9d3c2824b515fbba" dependencies = [ "arm_vgic", - "axaddrspace", - "axdevice_base", + "axaddrspace 0.3.0", + "axdevice_base 0.2.2", "axerrno 0.2.2", - "axvmconfig", + "axvmconfig 0.2.2", "cfg-if", "log", "memory_addr", - "range-alloc", + "range-alloc-arceos", + "riscv_vplic 0.2.2", "spin 0.10.0", ] @@ -422,14 +483,26 @@ name = "axdevice_base" version = "0.1.0" source = "git+https://github.com/arceos-hypervisor/axdevice_crates?branch=aar-master#f5d6ebe2a1a65f5872f75799cfbc2fd85fa13b85" dependencies = [ - "axaddrspace", + "axaddrspace 0.2.0", "axerrno 0.2.2", - "axvmconfig", + "axvmconfig 0.1.0", "cfg-if", "memory_addr", "serde", ] +[[package]] +name = "axdevice_base" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f466dbb1dcf24f0ad76f737b9b65425a1bdaef30daeff938c9d69d808eb1805" +dependencies = [ + "axaddrspace 0.3.0", + "axerrno 0.2.2", + "axvmconfig 0.2.2", + "serde", +] + [[package]] name = "axdisplay" version = "0.2.0" @@ -564,7 +637,7 @@ dependencies = [ "axalloc", "axbacktrace", "axdriver", - "axfs", + "axfs 0.2.0", "axhal", "axlog", "axruntime", @@ -584,13 +657,45 @@ dependencies = [ "axfs_vfs", "axio", "cap_access", - "fatfs", + "fatfs 0.4.0 (git+https://github.com/Josen-B/rust-fatfs.git?rev=41122ef)", "lazyinit", "log", "rsext4", "spin 0.9.8", ] +[[package]] +name = "axfs" +version = "0.2.0" +source = "git+https://github.com/arceos-org/arceos.git?tag=dev-251216#16096568f5ae6ad2d687eff2927a4cb69cef8133" +dependencies = [ + "axdriver", + "axdriver_block 0.1.2 (git+https://github.com/arceos-org/axdriver_crates.git?tag=dev-v01)", + "axerrno 0.1.2", + "axfs_devfs", + "axfs_ramfs", + "axfs_vfs", + "axio", + "axsync", + "cap_access", + "cfg-if", + "fatfs 0.4.0 (git+https://github.com/rafalh/rust-fatfs?rev=4eccb50)", + "lazyinit", + "log", + "scope-local", +] + +[[package]] +name = "axfs_devfs" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81b87ae981272ca8d5d8f106a4452c63f4b5ac36e17ee8f848ee1b250538b9f8" +dependencies = [ + "axfs_vfs", + "log", + "spin 0.9.8", +] + [[package]] name = "axfs_ramfs" version = "0.1.2" @@ -624,7 +729,7 @@ dependencies = [ "axplat", "axplat-aarch64-qemu-virt", "axplat-loongarch64-qemu-virt", - "axplat-riscv64-qemu-virt", + "axplat-riscv64-qemu-virt 0.3.0 (git+https://github.com/arceos-org/axplat_crates.git?tag=dev-v03)", "axplat-x86-pc", "cfg-if", "fdt-parser", @@ -634,7 +739,7 @@ dependencies = [ "linkme", "log", "memory_addr", - "page_table_multiarch", + "page_table_multiarch 0.5.7", "percpu", ] @@ -756,7 +861,7 @@ dependencies = [ "lazyinit", "log", "memory_addr", - "page_table_entry", + "page_table_entry 0.5.7", "paste", "percpu", "rdif-intc", @@ -782,7 +887,7 @@ dependencies = [ "kspin", "lazyinit", "log", - "page_table_entry", + "page_table_entry 0.5.7", "spin 0.10.0", ] @@ -796,7 +901,7 @@ dependencies = [ "axplat", "axplat-aarch64-peripherals", "log", - "page_table_entry", + "page_table_entry 0.5.7", ] [[package]] @@ -811,7 +916,7 @@ dependencies = [ "lazyinit", "log", "loongArch64", - "page_table_entry", + "page_table_entry 0.5.7", "uart_16550", ] @@ -825,6 +930,25 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "axplat-riscv64-qemu-virt" +version = "0.3.0" +dependencies = [ + "axconfig-macros", + "axcpu", + "axplat", + "axvisor_api 0.2.0", + "crate_interface 0.2.0", + "kspin", + "lazyinit", + "log", + "riscv 0.14.0", + "riscv_goldfish", + "riscv_plic", + "sbi-rt", + "uart_16550", +] + [[package]] name = "axplat-riscv64-qemu-virt" version = "0.3.0" @@ -836,7 +960,7 @@ dependencies = [ "kspin", "lazyinit", "log", - "riscv", + "riscv 0.14.0", "riscv_plic", "sbi-rt", "uart_16550", @@ -907,8 +1031,8 @@ dependencies = [ "axconfig", "axdisplay", "axdriver", - "axerrno 0.1.2", - "axfs", + "axerrno 0.2.2", + "axfs 0.1.0", "axhal", "axipi", "axlog", @@ -916,6 +1040,7 @@ dependencies = [ "axnet", "axplat", "axplat-aarch64-dyn", + "axplat-riscv64-qemu-virt 0.3.0", "axplat-x86-qemu-q35", "axtask", "cfg-if", @@ -1041,9 +1166,22 @@ name = "axvcpu" version = "0.1.2" source = "git+https://github.com/arceos-hypervisor/axvcpu?branch=aar-master#62425896e4fb112efd414c0a49290086bfec6b5c" dependencies = [ - "axaddrspace", + "axaddrspace 0.2.0", + "axerrno 0.2.2", + "axvisor_api 0.2.0", + "memory_addr", + "percpu", +] + +[[package]] +name = "axvcpu" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "506c3ab0ce353e76d3279927b88a43ee0effd4368ce86e8bc72a0ee9430e0709" +dependencies = [ + "axaddrspace 0.3.0", "axerrno 0.2.2", - "axvisor_api", + "axvisor_api 0.3.0", "memory_addr", "percpu", ] @@ -1055,16 +1193,18 @@ dependencies = [ "aarch64-cpu-ext", "anyhow", "arm-gic-driver", - "axaddrspace", + "axaddrspace 0.3.0", "axconfig", - "axdevice", - "axdevice_base", + "axdevice 0.2.2", + "axdevice_base 0.1.0", + "axdriver", "axerrno 0.2.2", "axhvc", + "axplat-riscv64-qemu-virt 0.3.0", "axruntime", "axstd", - "axvcpu", - "axvisor_api", + "axvcpu 0.3.0", + "axvisor_api 0.2.0", "axvm", "bitflags 2.10.0", "byte-unit", @@ -1080,13 +1220,15 @@ dependencies = [ "lazyinit", "log", "memory_addr", - "page_table_entry", - "page_table_multiarch", + "page_table_entry 0.5.7", + "page_table_multiarch 0.5.7", "percpu", "prettyplease", "quote", "rdif-intc", "rdrive", + "riscv_vcpu 0.1.2", + "riscv_vplic 0.1.0", "spin 0.10.0", "syn 2.0.111", "timer_list", @@ -1094,18 +1236,55 @@ dependencies = [ "vm-fdt 0.3.0 (git+https://github.com/bullhh/vm-fdt.git)", ] +[[package]] +name = "axvisor_api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa7233b2a1338dc06a80e2779b572b4df02007ea128ef7b235b66fc3eeac0ca6" +dependencies = [ + "axaddrspace 0.1.5", + "axvisor_api_proc 0.1.0", + "crate_interface 0.1.4", + "memory_addr", +] + [[package]] name = "axvisor_api" version = "0.2.0" source = "git+https://github.com/arceos-hypervisor/axvisor_api?branch=aar-master#657ef629e46738f8b32987cf1de7a5950c1ba904" dependencies = [ - "axaddrspace", - "axvisor_api_proc", + "axaddrspace 0.2.0", + "axvisor_api_proc 0.2.0", "cpumask", "crate_interface 0.2.0", "memory_addr", ] +[[package]] +name = "axvisor_api" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7959b2dd8afbac2a0cda189986df6ceb753a92e985c28ce2c279cf432cbe2dfc" +dependencies = [ + "axaddrspace 0.3.0", + "axvisor_api_proc 0.3.0", + "cpumask", + "crate_interface 0.3.0", + "memory_addr", +] + +[[package]] +name = "axvisor_api_proc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a64eb4410ae8357ac8c01c2fb201e57d7aeeb5436ed4d0f5774bfa11cc5902" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "axvisor_api_proc" version = "0.2.0" @@ -1117,28 +1296,39 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "axvisor_api_proc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5351791fec23f5545518f88d4d8a134c564085a6f37ed6953bbd4f35d4f32c7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "axvm" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=aar-master#7185c2fdd3b372fab96c82f42f7d81b24e0c99f0" +version = "0.3.0" dependencies = [ "arm_vcpu", "arm_vgic", - "axaddrspace", - "axdevice", - "axdevice_base", + "axaddrspace 0.3.0", + "axdevice 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "axdevice_base 0.2.2", "axerrno 0.2.2", - "axvcpu", - "axvisor_api", - "axvmconfig", + "axvcpu 0.3.0", + "axvisor_api 0.3.0", + "axvmconfig 0.2.2", "cfg-if", "cpumask", "log", "memory_addr", - "page_table_entry", - "page_table_multiarch", + "page_table_entry 0.6.1", + "page_table_multiarch 0.6.1", "percpu", - "riscv_vcpu", + "riscv_vcpu 0.3.0", "spin 0.10.0", "x86_vcpu", ] @@ -1146,7 +1336,20 @@ dependencies = [ [[package]] name = "axvmconfig" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=aar-master#494b8d6d56fe9b7e155837801fcc75a4990f06b8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3618f2ebd9b25027b70f423c48a8482dc2883ca17f76d2a8d1fdac377e762f02" +dependencies = [ + "axerrno 0.1.2", + "enumerable", + "log", + "serde", + "serde_repr", + "toml 0.9.10+spec-1.1.0", +] + +[[package]] +name = "axvmconfig" +version = "0.2.2" dependencies = [ "axerrno 0.2.2", "clap", @@ -1689,6 +1892,17 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "crate_interface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51e5c7109dea31fc91ab584e99752baa997f76d46e49bab0a17b5e9679248df7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "crc" version = "3.4.0" @@ -2293,6 +2507,15 @@ dependencies = [ "log", ] +[[package]] +name = "fatfs" +version = "0.4.0" +source = "git+https://github.com/rafalh/rust-fatfs?rev=4eccb50#4eccb50d011146fbed20e133d33b22f3c27292e7" +dependencies = [ + "bitflags 2.10.0", + "log", +] + [[package]] name = "fdt-parser" version = "0.4.18" @@ -3743,6 +3966,18 @@ dependencies = [ "x86_64", ] +[[package]] +name = "page_table_entry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9a63b9b86d32f64c3874a90936939281d045ef1751d0aca3d82d5e4e06b2ef" +dependencies = [ + "aarch64-cpu 11.2.0", + "bitflags 2.10.0", + "memory_addr", + "x86_64", +] + [[package]] name = "page_table_multiarch" version = "0.5.7" @@ -3751,8 +3986,22 @@ checksum = "9fa11a21844255e14aa6688ef0eafb058d7be19338633024fb59417f1bfb07f8" dependencies = [ "log", "memory_addr", - "page_table_entry", - "riscv", + "page_table_entry 0.5.7", + "riscv 0.14.0", + "x86", +] + +[[package]] +name = "page_table_multiarch" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42c5b75d5d9bdbee44c827b0dd2766fa3d478a76b9c6735419228089d1b24536" +dependencies = [ + "arrayvec", + "log", + "memory_addr", + "page_table_entry 0.6.1", + "riscv 0.16.0", "x86", ] @@ -4164,9 +4413,10 @@ dependencies = [ ] [[package]] -name = "range-alloc" +name = "range-alloc-arceos" version = "0.1.4" -source = "git+https://github.com/arceos-hypervisor/range-alloc.git#fc826e54dab9072be5358a1b0e7fc34503d6630d" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "187083342c080f6150a1e8e6e6a687b49239df195aaf866ff4ed535961ab860e" [[package]] name = "ratatui" @@ -4507,6 +4757,18 @@ dependencies = [ "riscv-pac", ] +[[package]] +name = "riscv" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9251433e48c39d2133cbaff3ae7809ce6a1ecbc8225ca7da33d96d10cf360582" +dependencies = [ + "critical-section", + "embedded-hal", + "paste", + "riscv-types", +] + [[package]] name = "riscv-decode" version = "0.2.3" @@ -4523,7 +4785,20 @@ dependencies = [ "bit_field", "bitflags 2.10.0", "log", - "riscv", + "riscv 0.14.0", +] + +[[package]] +name = "riscv-h" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bf93901d1af87f984c7be7a348cd27571e1f6f29293b8f3b3193f4c40d4d40" +dependencies = [ + "bare-metal", + "bit_field", + "bitflags 2.10.0", + "log", + "riscv 0.14.0", ] [[package]] @@ -4543,6 +4818,18 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436" +[[package]] +name = "riscv-types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3f2ad9f15a07f4a0e1677124f9120ce7e83ab7e1ca7186af0ca9da529b62e80" + +[[package]] +name = "riscv_goldfish" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07aac72f95e774476db82916d79f2d303191310393830573c1ab5c821b21660a" + [[package]] name = "riscv_plic" version = "0.2.0" @@ -4557,10 +4844,10 @@ name = "riscv_vcpu" version = "0.1.2" source = "git+https://github.com/arceos-hypervisor/riscv_vcpu?branch=aar-master#4cad20373c85d150e509821c3551fefb16084a7a" dependencies = [ - "axaddrspace", + "axaddrspace 0.2.0", "axerrno 0.2.2", - "axvcpu", - "axvisor_api", + "axvcpu 0.1.2", + "axvisor_api 0.2.0", "bit_field", "bitflags 2.10.0", "cfg-if", @@ -4568,16 +4855,74 @@ dependencies = [ "log", "memoffset", "memory_addr", - "page_table_entry", - "riscv", + "page_table_entry 0.5.7", + "riscv 0.14.0", + "riscv-decode", + "riscv-h 0.1.0", + "rustsbi", + "sbi-rt", + "sbi-spec", + "tock-registers 0.10.1", +] + +[[package]] +name = "riscv_vcpu" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f7d192465c7a3e2f674c56d3e49cfeb00f84d0616137cbecb8aacb250e40c53" +dependencies = [ + "axaddrspace 0.3.0", + "axerrno 0.2.2", + "axvcpu 0.3.0", + "axvisor_api 0.3.0", + "bit_field", + "bitflags 2.10.0", + "cfg-if", + "crate_interface 0.3.0", + "log", + "memoffset", + "memory_addr", + "page_table_entry 0.6.1", + "riscv 0.14.0", "riscv-decode", - "riscv-h", + "riscv-h 0.2.0", "rustsbi", "sbi-rt", "sbi-spec", "tock-registers 0.10.1", ] +[[package]] +name = "riscv_vplic" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/riscv_vplic?rev=8bc5213#8bc5213c77139755e1106b49133248392fcb4f58" +dependencies = [ + "axaddrspace 0.1.5", + "axdevice_base 0.1.0", + "axerrno 0.1.2", + "axvisor_api 0.1.0", + "bitmaps", + "log", + "riscv-h 0.1.0", + "spin 0.9.8", +] + +[[package]] +name = "riscv_vplic" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec84bba7d814f072afdd11a61c64ad55bedaeb17937a78bb6b9cec44b63a70fb" +dependencies = [ + "axaddrspace 0.3.0", + "axdevice_base 0.2.2", + "axerrno 0.2.2", + "axvisor_api 0.3.0", + "bitmaps", + "log", + "riscv-h 0.2.0", + "spin 0.10.0", +] + [[package]] name = "rk3568_clk" version = "0.1.0" @@ -4864,6 +5209,16 @@ dependencies = [ "syn 2.0.111", ] +[[package]] +name = "scope-local" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a7d5ed5013e6436fcd78f2bcd3892a6286ef9ce6c9b61504d4c4a08d6a40eab" +dependencies = [ + "percpu", + "spin 0.10.0", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -6582,25 +6937,26 @@ dependencies = [ [[package]] name = "x86_vcpu" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/x86_vcpu?branch=aar-master#24fce09b11af95077f7efc03ff6634bf78ffa187" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "906f6ead2156dde21b712f0eb654b620d1c2652e62b6b0731a7807a565454692" dependencies = [ - "axaddrspace", - "axdevice_base", + "axaddrspace 0.3.0", + "axdevice_base 0.2.2", "axerrno 0.2.2", - "axvcpu", - "axvisor_api", + "axvcpu 0.3.0", + "axvisor_api 0.3.0", "bit_field", "bitflags 2.10.0", "cfg-if", - "crate_interface 0.2.0", + "crate_interface 0.3.0", "log", "memory_addr", "numeric-enum-macro", - "page_table_entry", + "page_table_entry 0.6.1", "paste", "raw-cpuid 11.6.0", - "spin 0.9.8", + "spin 0.10.0", "x86", "x86_64", "x86_vlapic", @@ -6608,13 +6964,14 @@ dependencies = [ [[package]] name = "x86_vlapic" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/x86_vlapic?branch=aar-master#207fb0dfa10ff549b46a77f2d767483fad0c29f6" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73364dacf1435c64e3395567405311456c3087f7bb4852904332e0fa1379eb65" dependencies = [ - "axaddrspace", - "axdevice_base", + "axaddrspace 0.3.0", + "axdevice_base 0.2.2", "axerrno 0.2.2", - "axvisor_api", + "axvisor_api 0.3.0", "bit", "log", "memory_addr", @@ -6643,7 +7000,7 @@ name = "xtask" version = "0.1.0" dependencies = [ "anyhow", - "axvmconfig", + "axvmconfig 0.2.2", "cargo_metadata 0.23.1", "chrono", "clap", @@ -6784,3 +7141,27 @@ dependencies = [ "quote", "syn 2.0.111", ] + +[[patch.unused]] +name = "arm_vcpu" +version = "0.1.1" +source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=aar-master#3170912a4ff784385691f1ca169e4f87d687e3bf" + +[[patch.unused]] +name = "arm_vgic" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/arm_vgic?branch=aar-master#1b145dc767a8d3e0c6f677f26474959de10e6ccf" + +[[patch.unused]] +name = "x86_vcpu" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/x86_vcpu?branch=aar-master#24fce09b11af95077f7efc03ff6634bf78ffa187" + +[[patch.unused]] +name = "x86_vlapic" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/x86_vlapic?branch=aar-master#207fb0dfa10ff549b46a77f2d767483fad0c29f6" + +[[patch.unused]] +name = "riscv_vplic" +version = "0.2.2" diff --git a/Cargo.toml b/Cargo.toml index b493c720..b9b2462c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,59 +57,39 @@ axcpu = {git = "https://github.com/arceos-org/axcpu.git", tag = "dev-v03"} axplat = {git = "https://github.com/arceos-org/axplat_crates.git", tag = "dev-v03"} # System dependent modules provided by ArceOS-Hypervisor. -axaddrspace = "0.2" +axaddrspace = "0.3" axhvc = {git = "https://github.com/arceos-hypervisor/axhvc.git"} axklib = {git = "https://github.com/arceos-hypervisor/axklib.git"} axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} -axvcpu = "0.1" -# axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "aar-next"} -axvm = { path = "../axvm" } +axvcpu = "0.3" +axvm = "0.3" # System independent crates provided by ArceOS, these crates could be imported by remote url. axerrno = "0.2" byte-unit = {version = "5", default-features = false, features = ["byte"]} -crate_interface = "0.2" +crate_interface = "0.3" fdt-parser = "0.4" memory_addr = "0.4" -page_table_entry = {version = "0.5", features = ["arm-el2"]} -page_table_multiarch = "0.5" +page_table_entry = {version = "0.6", features = ["arm-el2"]} +page_table_multiarch = "0.6" percpu = {version = "0.2", features = ["arm-el2"]} rdif-intc = "0.12" rdrive = "0.18" vm-fdt = {git = "https://github.com/bullhh/vm-fdt.git", default-features = false, features = ["alloc"]} -# axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git", branch = "aar-next"} -axdevice = { path = "../axdevice" } -axdevice_base = "0.1" -axvisor_api = "0.2" +axdevice = "0.2.2" +axdevice_base = "0.2.2" +axvisor_api = "0.3" +axvmconfig = { version = "0.2.2", default-features = false } driver = {path = "modules/driver"} # platform axplat-x86-qemu-q35 = {path = "platform/x86-qemu-q35"} axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"} -# axvmconfig = {git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-next"} -axvmconfig = { path = "../axvmconfig" } [patch."https://github.com/arceos-org/arceos.git"] axconfig = { path = "modules/axconfig" } axruntime = { path = "modules/axruntime" } - -[patch.crates-io] -axvcpu = { git = "https://github.com/arceos-hypervisor/axvcpu", branch = "aar-master" } -axvisor_api = { git = "https://github.com/arceos-hypervisor/axvisor_api", branch = "aar-master" } -axaddrspace = { git = "https://github.com/arceos-hypervisor/axaddrspace", branch = "aar-master" } -axdevice_base = { git = "https://github.com/arceos-hypervisor/axdevice_crates", branch = "aar-master"} -x86_vlapic = { git = "https://github.com/arceos-hypervisor/x86_vlapic", branch = "aar-master"} -arm_vgic = { git = "https://github.com/arceos-hypervisor/arm_vgic", branch = "aar-master"} -x86_vcpu = { git = "https://github.com/arceos-hypervisor/x86_vcpu", branch = "aar-master"} -arm_vcpu = { git = "https://github.com/arceos-hypervisor/arm_vcpu", branch = "aar-master"} -riscv_vcpu = { git = "https://github.com/arceos-hypervisor/riscv_vcpu", branch = "aar-master"} -# axvmconfig = { git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "aar-next" } -axvmconfig = { path = "../axvmconfig" } - -[patch."https://github.com/arceos-org/arceos"] -axconfig = {path = "modules/axconfig"} -axruntime = {path = "modules/axruntime"} axfs = {path = "modules/axfs"} diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index b70676dd..ce57a49e 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -45,8 +45,8 @@ crate_interface.workspace = true extern-trait = "0.2" fdt-parser = "0.4" memory_addr.workspace = true -page_table_entry = {version = "0.5", features = ["arm-el2"]} -page_table_multiarch = "0.5" +page_table_entry.workspace = true +page_table_multiarch.workspace = true percpu = {version = "0.2", features = ["arm-el2"]} rdif-intc = "0.12" rdrive = "0.18" @@ -54,8 +54,8 @@ rdrive = "0.18" vm-fdt = {workspace = true, default-features = false, features = ["alloc"]} axdevice.workspace = true -axdevice_base = "0.1" -axvisor_api = "0.2" +axdevice_base.workspace = true +axvisor_api.workspace = true driver.workspace = true [target.'cfg(target_arch = "aarch64")'.dependencies] @@ -64,8 +64,8 @@ arm-gic-driver = {version = "0.15.5", features = ["rdif"]} [target.'cfg(target_arch = "riscv64")'.dependencies] axplat-riscv64-qemu-virt.workspace = true -riscv_vplic = { git = "https://github.com/arceos-hypervisor/riscv_vplic.git", rev = "8bc5213" } -riscv_vcpu = { git = "https://github.com/arceos-hypervisor/riscv_vcpu.git", branch = "master" } +riscv_vplic.workspace = true +riscv_vcpu.workspace = true [build-dependencies] axconfig.workspace = true From 06d18d7ed167b627dc1dea2367b7ae5c45a5fbea Mon Sep 17 00:00:00 2001 From: aarkegz Date: Fri, 6 Mar 2026 15:46:57 +0800 Subject: [PATCH 16/22] fixes after merge --- Cargo.lock | 369 ++++++++++-------------------------------- kernel/Cargo.toml | 4 +- kernel/src/hal/mod.rs | 6 +- 3 files changed, 87 insertions(+), 292 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56c0f8e3..13df05b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -241,11 +241,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "979230a9de461189f361c5a41a01006b4e943dcf9ebbac1c1444fb6c29fdbae2" dependencies = [ "aarch64-cpu 11.2.0", - "axaddrspace 0.3.0", - "axdevice_base 0.2.2", + "axaddrspace", + "axdevice_base", "axerrno 0.2.2", - "axvcpu 0.3.0", - "axvisor_api 0.3.0", + "axvcpu", + "axvisor_api", "log", "numeric-enum-macro", "percpu", @@ -260,10 +260,10 @@ checksum = "49c287b9ceddf2a9f36662df520a85e2fca93a194d303d98d50727c4b19647fa" dependencies = [ "aarch64-cpu 11.2.0", "aarch64_sysreg", - "axaddrspace 0.3.0", - "axdevice_base 0.2.2", + "axaddrspace", + "axdevice_base", "axerrno 0.2.2", - "axvisor_api 0.3.0", + "axvisor_api", "bitmaps", "log", "memory_addr", @@ -328,45 +328,6 @@ dependencies = [ "fs_extra", ] -[[package]] -name = "axaddrspace" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91962ea80ef137c2986b6802d664900e73aa7a014272c13dd9172cc948d5c94e" -dependencies = [ - "axerrno 0.1.2", - "bit_field", - "bitflags 2.10.0", - "cfg-if", - "lazyinit", - "log", - "memory_addr", - "memory_set", - "numeric-enum-macro", - "page_table_entry 0.6.1", - "page_table_multiarch 0.6.1", - "x86", -] - -[[package]] -name = "axaddrspace" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axaddrspace?branch=aar-master#16163ef4a4516fa2d5b51c8b08f5940d1ff31f04" -dependencies = [ - "axerrno 0.2.2", - "bit_field", - "bitflags 2.10.0", - "cfg-if", - "lazyinit", - "log", - "memory_addr", - "memory_set", - "numeric-enum-macro", - "page_table_entry 0.5.7", - "page_table_multiarch 0.5.7", - "x86", -] - [[package]] name = "axaddrspace" version = "0.3.0" @@ -464,23 +425,6 @@ dependencies = [ "x86_64", ] -[[package]] -name = "axdevice" -version = "0.2.2" -dependencies = [ - "arm_vgic", - "axaddrspace 0.3.0", - "axdevice_base 0.2.2", - "axerrno 0.2.2", - "axvmconfig 0.2.2", - "cfg-if", - "log", - "memory_addr", - "range-alloc-arceos", - "riscv_vplic 0.2.2", - "spin 0.10.0", -] - [[package]] name = "axdevice" version = "0.2.2" @@ -488,40 +432,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55bcbe9825eecc55421eb205511a0d359f0c83141a4df53f9d3c2824b515fbba" dependencies = [ "arm_vgic", - "axaddrspace 0.3.0", - "axdevice_base 0.2.2", + "axaddrspace", + "axdevice_base", "axerrno 0.2.2", - "axvmconfig 0.2.2", + "axvmconfig", "cfg-if", "log", "memory_addr", "range-alloc-arceos", - "riscv_vplic 0.2.2", + "riscv_vplic", "spin 0.10.0", ] -[[package]] -name = "axdevice_base" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axdevice_crates?branch=aar-master#f5d6ebe2a1a65f5872f75799cfbc2fd85fa13b85" -dependencies = [ - "axaddrspace 0.2.0", - "axerrno 0.2.2", - "axvmconfig 0.1.0", - "cfg-if", - "memory_addr", - "serde", -] - [[package]] name = "axdevice_base" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f466dbb1dcf24f0ad76f737b9b65425a1bdaef30daeff938c9d69d808eb1805" dependencies = [ - "axaddrspace 0.3.0", + "axaddrspace", "axerrno 0.2.2", - "axvmconfig 0.2.2", + "axvmconfig", "serde", ] @@ -959,8 +890,8 @@ dependencies = [ "axconfig-macros", "axcpu", "axplat", - "axvisor_api 0.2.0", - "crate_interface 0.2.0", + "axvisor_api", + "crate_interface 0.3.0", "kspin", "lazyinit", "log", @@ -1183,27 +1114,15 @@ dependencies = [ "tracing", ] -[[package]] -name = "axvcpu" -version = "0.1.2" -source = "git+https://github.com/arceos-hypervisor/axvcpu?branch=aar-master#62425896e4fb112efd414c0a49290086bfec6b5c" -dependencies = [ - "axaddrspace 0.2.0", - "axerrno 0.2.2", - "axvisor_api 0.2.0", - "memory_addr", - "percpu", -] - [[package]] name = "axvcpu" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "506c3ab0ce353e76d3279927b88a43ee0effd4368ce86e8bc72a0ee9430e0709" dependencies = [ - "axaddrspace 0.3.0", + "axaddrspace", "axerrno 0.2.2", - "axvisor_api 0.3.0", + "axvisor_api", "memory_addr", "percpu", ] @@ -1215,24 +1134,24 @@ dependencies = [ "aarch64-cpu-ext", "anyhow", "arm-gic-driver", - "axaddrspace 0.3.0", + "axaddrspace", "axconfig", - "axdevice 0.2.2", - "axdevice_base 0.1.0", + "axdevice", + "axdevice_base", "axdriver", "axerrno 0.2.2", "axhvc", "axplat-riscv64-qemu-virt 0.3.0", "axruntime", "axstd", - "axvcpu 0.3.0", - "axvisor_api 0.2.0", + "axvcpu", + "axvisor_api", "axvm", "bitflags 2.10.0", "byte-unit", "cfg-if", "cpumask", - "crate_interface 0.2.0", + "crate_interface 0.3.0", "driver", "extern-trait", "fdt-parser", @@ -1242,15 +1161,15 @@ dependencies = [ "lazyinit", "log", "memory_addr", - "page_table_entry 0.5.7", - "page_table_multiarch 0.5.7", + "page_table_entry 0.6.1", + "page_table_multiarch 0.6.1", "percpu", "prettyplease", "quote", "rdif-intc", "rdrive", - "riscv_vcpu 0.1.2", - "riscv_vplic 0.1.0", + "riscv_vcpu", + "riscv_vplic", "spin 0.10.0", "syn 2.0.111", "timer_list", @@ -1258,66 +1177,19 @@ dependencies = [ "vm-fdt 0.3.0 (git+https://github.com/bullhh/vm-fdt.git)", ] -[[package]] -name = "axvisor_api" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa7233b2a1338dc06a80e2779b572b4df02007ea128ef7b235b66fc3eeac0ca6" -dependencies = [ - "axaddrspace 0.1.5", - "axvisor_api_proc 0.1.0", - "crate_interface 0.1.4", - "memory_addr", -] - -[[package]] -name = "axvisor_api" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axvisor_api?branch=aar-master#657ef629e46738f8b32987cf1de7a5950c1ba904" -dependencies = [ - "axaddrspace 0.2.0", - "axvisor_api_proc 0.2.0", - "cpumask", - "crate_interface 0.2.0", - "memory_addr", -] - [[package]] name = "axvisor_api" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7959b2dd8afbac2a0cda189986df6ceb753a92e985c28ce2c279cf432cbe2dfc" dependencies = [ - "axaddrspace 0.3.0", - "axvisor_api_proc 0.3.0", + "axaddrspace", + "axvisor_api_proc", "cpumask", "crate_interface 0.3.0", "memory_addr", ] -[[package]] -name = "axvisor_api_proc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a64eb4410ae8357ac8c01c2fb201e57d7aeeb5436ed4d0f5774bfa11cc5902" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "axvisor_api_proc" -version = "0.2.0" -source = "git+https://github.com/arceos-hypervisor/axvisor_api?branch=aar-master#657ef629e46738f8b32987cf1de7a5950c1ba904" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "axvisor_api_proc" version = "0.3.0" @@ -1333,16 +1205,18 @@ dependencies = [ [[package]] name = "axvm" version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f6406a71e7af560b7d544fb697f3071e045d304a20d8525502b5a906dbbaab" dependencies = [ "arm_vcpu", "arm_vgic", - "axaddrspace 0.3.0", - "axdevice 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "axdevice_base 0.2.2", + "axaddrspace", + "axdevice", + "axdevice_base", "axerrno 0.2.2", - "axvcpu 0.3.0", - "axvisor_api 0.3.0", - "axvmconfig 0.2.2", + "axvcpu", + "axvisor_api", + "axvmconfig", "cfg-if", "cpumask", "log", @@ -1350,28 +1224,16 @@ dependencies = [ "page_table_entry 0.6.1", "page_table_multiarch 0.6.1", "percpu", - "riscv_vcpu 0.3.0", + "riscv_vcpu", "spin 0.10.0", "x86_vcpu", ] -[[package]] -name = "axvmconfig" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3618f2ebd9b25027b70f423c48a8482dc2883ca17f76d2a8d1fdac377e762f02" -dependencies = [ - "axerrno 0.1.2", - "enumerable", - "log", - "serde", - "serde_repr", - "toml 0.9.10+spec-1.1.0", -] - [[package]] name = "axvmconfig" version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35f2cf8bfcabc84e636f5cf3cd7b1c1ddcf1f584d6fa91791a572056204db35a" dependencies = [ "axerrno 0.2.2", "clap", @@ -1931,17 +1793,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "crate_interface" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15627e437dc14b22c0a7b8cfc7143fbab68aa6d740df2d695152b1dca58cdf17" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "crate_interface" version = "0.3.0" @@ -4066,6 +3917,18 @@ dependencies = [ "x86_64", ] +[[package]] +name = "page_table_entry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9a63b9b86d32f64c3874a90936939281d045ef1751d0aca3d82d5e4e06b2ef" +dependencies = [ + "aarch64-cpu 11.2.0", + "bitflags 2.10.0", + "memory_addr", + "x86_64", +] + [[package]] name = "page_table_multiarch" version = "0.5.7" @@ -4074,8 +3937,22 @@ checksum = "9fa11a21844255e14aa6688ef0eafb058d7be19338633024fb59417f1bfb07f8" dependencies = [ "log", "memory_addr", - "page_table_entry", - "riscv", + "page_table_entry 0.5.7", + "riscv 0.14.0", + "x86", +] + +[[package]] +name = "page_table_multiarch" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42c5b75d5d9bdbee44c827b0dd2766fa3d478a76b9c6735419228089d1b24536" +dependencies = [ + "arrayvec", + "log", + "memory_addr", + "page_table_entry 0.6.1", + "riscv 0.16.0", "x86", ] @@ -4889,19 +4766,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b59d645e392e041ad18f5e529ed13242d8405c66bb192f59703ea2137017d0" -[[package]] -name = "riscv-h" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cffa652689d01c5f7033abe105e69f4d57ac85bf7e17da688bab10e4b9d3a2d8" -dependencies = [ - "bare-metal", - "bit_field", - "bitflags 2.10.0", - "log", - "riscv 0.14.0", -] - [[package]] name = "riscv-h" version = "0.2.0" @@ -4953,42 +4817,16 @@ dependencies = [ "tock-registers 0.10.1", ] -[[package]] -name = "riscv_vcpu" -version = "0.1.2" -source = "git+https://github.com/arceos-hypervisor/riscv_vcpu?branch=aar-master#4cad20373c85d150e509821c3551fefb16084a7a" -dependencies = [ - "axaddrspace 0.2.0", - "axerrno 0.2.2", - "axvcpu 0.1.2", - "axvisor_api 0.2.0", - "bit_field", - "bitflags 2.10.0", - "cfg-if", - "crate_interface 0.2.0", - "log", - "memoffset", - "memory_addr", - "page_table_entry", - "riscv", - "riscv-decode", - "riscv-h 0.1.0", - "rustsbi", - "sbi-rt", - "sbi-spec", - "tock-registers 0.10.1", -] - [[package]] name = "riscv_vcpu" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f7d192465c7a3e2f674c56d3e49cfeb00f84d0616137cbecb8aacb250e40c53" dependencies = [ - "axaddrspace 0.3.0", + "axaddrspace", "axerrno 0.2.2", - "axvcpu 0.3.0", - "axvisor_api 0.3.0", + "axvcpu", + "axvisor_api", "bit_field", "bitflags 2.10.0", "cfg-if", @@ -4999,41 +4837,26 @@ dependencies = [ "page_table_entry 0.6.1", "riscv 0.14.0", "riscv-decode", - "riscv-h 0.2.0", + "riscv-h", "rustsbi", "sbi-rt", "sbi-spec", "tock-registers 0.10.1", ] -[[package]] -name = "riscv_vplic" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/riscv_vplic?rev=8bc5213#8bc5213c77139755e1106b49133248392fcb4f58" -dependencies = [ - "axaddrspace 0.1.5", - "axdevice_base 0.1.0", - "axerrno 0.1.2", - "axvisor_api 0.1.0", - "bitmaps", - "log", - "riscv-h 0.1.0", - "spin 0.9.8", -] - [[package]] name = "riscv_vplic" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec84bba7d814f072afdd11a61c64ad55bedaeb17937a78bb6b9cec44b63a70fb" dependencies = [ - "axaddrspace 0.3.0", - "axdevice_base 0.2.2", + "axaddrspace", + "axdevice_base", "axerrno 0.2.2", - "axvisor_api 0.3.0", + "axvisor_api", "bitmaps", "log", - "riscv-h 0.2.0", + "riscv-h", "spin 0.10.0", ] @@ -7216,11 +7039,11 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "906f6ead2156dde21b712f0eb654b620d1c2652e62b6b0731a7807a565454692" dependencies = [ - "axaddrspace 0.3.0", - "axdevice_base 0.2.2", + "axaddrspace", + "axdevice_base", "axerrno 0.2.2", - "axvcpu 0.3.0", - "axvisor_api 0.3.0", + "axvcpu", + "axvisor_api", "bit_field", "bitflags 2.10.0", "cfg-if", @@ -7243,10 +7066,10 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73364dacf1435c64e3395567405311456c3087f7bb4852904332e0fa1379eb65" dependencies = [ - "axaddrspace 0.3.0", - "axdevice_base 0.2.2", + "axaddrspace", + "axdevice_base", "axerrno 0.2.2", - "axvisor_api 0.3.0", + "axvisor_api", "bit", "log", "memory_addr", @@ -7275,7 +7098,7 @@ name = "xtask" version = "0.1.0" dependencies = [ "anyhow", - "axvmconfig 0.2.2", + "axvmconfig", "cargo_metadata 0.23.1", "chrono", "clap", @@ -7417,27 +7240,3 @@ dependencies = [ "quote", "syn 2.0.111", ] - -[[patch.unused]] -name = "arm_vcpu" -version = "0.1.1" -source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=aar-master#3170912a4ff784385691f1ca169e4f87d687e3bf" - -[[patch.unused]] -name = "arm_vgic" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arm_vgic?branch=aar-master#1b145dc767a8d3e0c6f677f26474959de10e6ccf" - -[[patch.unused]] -name = "x86_vcpu" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/x86_vcpu?branch=aar-master#24fce09b11af95077f7efc03ff6634bf78ffa187" - -[[patch.unused]] -name = "x86_vlapic" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/x86_vlapic?branch=aar-master#207fb0dfa10ff549b46a77f2d767483fad0c29f6" - -[[patch.unused]] -name = "riscv_vplic" -version = "0.2.2" diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index ce57a49e..d95fbd30 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -64,8 +64,8 @@ arm-gic-driver = {version = "0.15.5", features = ["rdif"]} [target.'cfg(target_arch = "riscv64")'.dependencies] axplat-riscv64-qemu-virt.workspace = true -riscv_vplic.workspace = true -riscv_vcpu.workspace = true +riscv_vplic = "0.2.2" +riscv_vcpu = "0.3" [build-dependencies] axconfig.workspace = true diff --git a/kernel/src/hal/mod.rs b/kernel/src/hal/mod.rs index 74e26d89..96f08b92 100644 --- a/kernel/src/hal/mod.rs +++ b/kernel/src/hal/mod.rs @@ -14,17 +14,13 @@ use std::os::arceos::{ self, - modules::{axhal::percpu::this_cpu_id, axtask}, + modules::{axhal::percpu::this_cpu_id}, }; -use axerrno::{AxResult, ax_err_type}; -use memory_addr::PAGE_SIZE_4K; use page_table_multiarch::PagingHandler; - use arceos::modules::axhal; use axaddrspace::{AxMmHal, HostPhysAddr, HostVirtAddr}; use axvm::AxVMPerCpu; -use page_table_multiarch::PagingHandler; #[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/mod.rs")] #[cfg_attr(target_arch = "x86_64", path = "arch/x86_64/mod.rs")] From 912cd5632dd9f824f2861eefdc43c4382505a99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E7=9D=BF?= Date: Fri, 13 Mar 2026 09:45:43 +0800 Subject: [PATCH 17/22] refactor: simplify xtask command and update dependencies feat: add target OS configuration for no_std environment fix: improve error handling for schema file writing --- Cargo.toml | 59 +++++++++++++++------------------------------- src/main.rs | 1 + xtask/src/tbuld.rs | 6 +++-- 3 files changed, 24 insertions(+), 42 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index beb33782..8274addf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,6 @@ lto = true [[bin]] name = "xtask" path = "xtask/src/main.rs" -required-features = ["xtask"] [features] default = [] @@ -44,26 +43,6 @@ rk3588-clk = ["dep:rk3588-clk"] sdmmc = ["dep:sdmmc"] rockchip-pm = ["dep:rockchip-pm"] phytium-blk = ["dep:phytium-mci"] -xtask = [ - "dep:anyhow", - "dep:axvmconfig", - "dep:cargo_metadata", - "dep:chrono", - "dep:clap", - "dep:colored", - "dep:flate2", - "dep:jkconfig", - "dep:ostool", - "dep:regex", - "dep:reqwest", - "dep:schemars", - "dep:serde", - "dep:serde_json", - "dep:sha2", - "dep:tar", - "dep:tokio", - "dep:toml", -] [target.'cfg(not(any(windows, unix)))'.dependencies] bitflags = "2.2" @@ -138,27 +117,27 @@ axplat-x86-qemu-q35 = { version = "0.2.0", default-features = false, features = ] } axconfig = { version = "=0.3.0-preview.3", features = ["plat-dyn"] } -# xtask dependencies (only used when xtask feature is enabled) +# xtask dependencies (only used on host platforms) [target.'cfg(any(windows, unix))'.dependencies] -anyhow = { version = "1.0", optional = true } -cargo_metadata = { version = "0.23", optional = true } -chrono = { version = "0.4", features = ["serde"], optional = true } -clap = {version = "4.4", features = ["derive"], optional = true } -colored = { version = "3", optional = true } -flate2 = { version = "1.0", optional = true } -jkconfig = { version = "0.1", optional = true } -ostool = { version = "0.8.4", optional = true } -regex = { version = "1.12", optional = true } -reqwest = { version = "0.13", optional = true } -schemars = {version = "1", features = ["derive"], optional = true } -serde = {version = "1.0", features = ["derive"], optional = true } -serde_json = { version = "1", optional = true } -sha2 = { version = "0.10", optional = true } -tar = { version = "0.4", optional = true } -tokio = {version = "1", features = ["full"], optional = true } -toml = { version = "0.9", optional = true } +anyhow = { version = "1.0" } +cargo_metadata = { version = "0.23" } +chrono = { version = "0.4", features = ["serde"] } +clap = {version = "4.4", features = ["derive"] } +colored = { version = "3" } +flate2 = { version = "1.0" } +jkconfig = { version = "0.1" } +ostool = { version = "0.8.4" } +regex = { version = "1.12" } +reqwest = { version = "0.13" } +schemars = {version = "1", features = ["derive"] } +serde = {version = "1.0", features = ["derive"] } +serde_json = { version = "1" } +sha2 = { version = "0.10" } +tar = { version = "0.4" } +tokio = {version = "1", features = ["full"] } +toml = { version = "0.9" } -axvmconfig = { version = "0.2", features = ["std"], optional = true } +axvmconfig = { version = "0.2", features = ["std"] } [build-dependencies] axconfig = "=0.3.0-preview.3" diff --git a/src/main.rs b/src/main.rs index 99721034..f9093226 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ #![no_std] #![no_main] #![feature(used_with_arg)] +#![cfg(target_os = "none")] #[macro_use] extern crate log; diff --git a/xtask/src/tbuld.rs b/xtask/src/tbuld.rs index 6b7f85b2..e2e5dc76 100644 --- a/xtask/src/tbuld.rs +++ b/xtask/src/tbuld.rs @@ -46,11 +46,13 @@ impl Context { config_path = c.clone(); } + let path = config_path.parent().unwrap().join(".build-schema.json"); + std::fs::write( - config_path.parent().unwrap().join(".build-schema.json"), + &path, serde_json::to_string_pretty(&json).unwrap(), ) - .with_context(|| "Failed to write schema file .build-schema.json")?; + .with_context(|| format!("Failed to write schema file: {}", path.display()))?; let config_str = std::fs::read_to_string(&config_path) .with_context(|| format!("Failed to read config file: {}", config_path.display()))?; From 3c347e8f014e3dc44558afece044d4025fd31208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E7=9D=BF?= Date: Fri, 13 Mar 2026 10:01:40 +0800 Subject: [PATCH 18/22] refactor: simplify xtask command and improve config file handling --- .cargo/config.toml | 2 +- xtask/src/cargo.rs | 11 +++++------ xtask/src/tbuld.rs | 30 +++++++++++++++++++++++++----- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 867d1a6b..d5bfb565 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -21,4 +21,4 @@ rustflags = [ ] [alias] -xtask = "run --bin xtask --no-default-features --features xtask --" +xtask = "run --bin xtask --" diff --git a/xtask/src/cargo.rs b/xtask/src/cargo.rs index f5262e49..432f8837 100644 --- a/xtask/src/cargo.rs +++ b/xtask/src/cargo.rs @@ -37,15 +37,14 @@ impl Context { } else { PathBuf::from(format!(".qemu-{arch:?}.toml").to_lowercase()) }; + let default_config_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("scripts") + .join("ostool") + .join(format!("qemu-{arch:?}.toml").to_lowercase()); // If the configuration file does not exist, copy from the default location if !config_path.exists() { - fs::copy( - PathBuf::from("scripts") - .join("ostool") - .join(format!("qemu-{arch:?}.toml").to_lowercase()), - &config_path, - )?; + fs::copy(&default_config_path, &config_path)?; } let kind = CargoRunnerKind::Qemu { diff --git a/xtask/src/tbuld.rs b/xtask/src/tbuld.rs index e2e5dc76..addc62e8 100644 --- a/xtask/src/tbuld.rs +++ b/xtask/src/tbuld.rs @@ -48,11 +48,8 @@ impl Context { let path = config_path.parent().unwrap().join(".build-schema.json"); - std::fs::write( - &path, - serde_json::to_string_pretty(&json).unwrap(), - ) - .with_context(|| format!("Failed to write schema file: {}", path.display()))?; + std::fs::write(&path, serde_json::to_string_pretty(&json).unwrap()) + .with_context(|| format!("Failed to write schema file: {}", path.display()))?; let config_str = std::fs::read_to_string(&config_path) .with_context(|| format!("Failed to read config file: {}", config_path.display()))?; @@ -93,6 +90,18 @@ impl Context { to_bin: config.to_bin, ..Default::default() }; + if cargo.target == "aarch64-unknown-none-softfloat" + && cargo.features.iter().any(|feature| feature == "dyn-plat") + { + // Dynamic-platform AArch64 builds link as PIE, so core/alloc must be + // rebuilt with the same PIC settings instead of using prebuilt std. + ensure_cargo_arg_pair(&mut cargo.args, "-Z", "build-std=core,alloc"); + ensure_cargo_arg_pair( + &mut cargo.args, + "-Z", + "build-std-features=compiler-builtins-mem", + ); + } cargo.args.extend(config.cargo_args); if let Some(smp) = config.smp { @@ -121,3 +130,14 @@ impl Context { Ok(()) } } + +fn ensure_cargo_arg_pair(args: &mut Vec, flag: &str, value: &str) { + if args + .windows(2) + .any(|window| window[0] == flag && window[1] == value) + { + return; + } + args.push(flag.to_string()); + args.push(value.to_string()); +} From 61ec188ba624c9e85558959bccb1338c3a5f8e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E7=9D=BF?= Date: Fri, 13 Mar 2026 10:24:08 +0800 Subject: [PATCH 19/22] refactor: streamline configuration files and update cargo arguments for board targets --- .cargo/config.toml | 8 -------- configs/board/orangepi-5-plus.toml | 5 ++++- configs/board/phytiumpi.toml | 5 ++++- configs/board/qemu-aarch64.toml | 7 +++++-- configs/board/roc-rk3568-pc.toml | 5 ++++- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index d5bfb565..0da14d5b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,14 +2,6 @@ # 使用系统 git 拉取依赖,可利用已配置的 git 凭证(如 gh auth、credential helper) git-fetch-with-cli = true -[target.aarch64-unknown-none-softfloat] -rustflags = [ - "-Crelocation-model=pic", - "-Clink-args=-pie", - "-Clink-args=-znostart-stop-gc", - "-Clink-args=-Taxplat.x", -] - [target.'cfg(target_os = "none")'] runner = "cargo osrun" diff --git a/configs/board/orangepi-5-plus.toml b/configs/board/orangepi-5-plus.toml index 21559ce5..465a3b29 100644 --- a/configs/board/orangepi-5-plus.toml +++ b/configs/board/orangepi-5-plus.toml @@ -1,4 +1,7 @@ -cargo_args = [] +cargo_args = [ + "--config", + 'target.aarch64-unknown-none-softfloat.rustflags = ["-Crelocation-model=pic", "-Clink-args=-pie", "-Clink-args=-znostart-stop-gc", "-Clink-args=-Taxplat.x"]', +] features = [ # "ept-level-4", "dyn-plat", diff --git a/configs/board/phytiumpi.toml b/configs/board/phytiumpi.toml index 2fc970ca..d55d7489 100644 --- a/configs/board/phytiumpi.toml +++ b/configs/board/phytiumpi.toml @@ -1,4 +1,7 @@ -cargo_args = [] +cargo_args = [ + "--config", + 'target.aarch64-unknown-none-softfloat.rustflags = ["-Crelocation-model=pic", "-Clink-args=-pie", "-Clink-args=-znostart-stop-gc", "-Clink-args=-Taxplat.x"]', +] features = [ # "ept-level-4", "dyn-plat", diff --git a/configs/board/qemu-aarch64.toml b/configs/board/qemu-aarch64.toml index c379cc79..cfeacfd3 100644 --- a/configs/board/qemu-aarch64.toml +++ b/configs/board/qemu-aarch64.toml @@ -1,4 +1,7 @@ -cargo_args = [] +cargo_args = [ + "--config", + 'target.aarch64-unknown-none-softfloat.rustflags = ["-Crelocation-model=pic", "-Clink-args=-pie", "-Clink-args=-znostart-stop-gc", "-Clink-args=-Taxplat.x"]', +] features = [ "ept-level-4", "axstd/bus-mmio", @@ -7,4 +10,4 @@ features = [ log = "Info" target = "aarch64-unknown-none-softfloat" to_bin = true -vm_configs = [] \ No newline at end of file +vm_configs = [] diff --git a/configs/board/roc-rk3568-pc.toml b/configs/board/roc-rk3568-pc.toml index 5ccf6633..9a40e555 100644 --- a/configs/board/roc-rk3568-pc.toml +++ b/configs/board/roc-rk3568-pc.toml @@ -1,4 +1,7 @@ -cargo_args = [] +cargo_args = [ + "--config", + 'target.aarch64-unknown-none-softfloat.rustflags = ["-Crelocation-model=pic", "-Clink-args=-pie", "-Clink-args=-znostart-stop-gc", "-Clink-args=-Taxplat.x"]', +] features = [ # "ept-level-4", "dyn-plat", From 14d3cbcc4e1059d753ae99e18888d553804c9bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E7=9D=BF?= <34859362+ZR233@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:16:17 +0800 Subject: [PATCH 20/22] feat: add arceos tests (#6) * chore: update Cargo.lock and qemu-aarch64.toml for dependency adjustments * feat: Add QEMU runner and configuration for ArceOS - Implemented QEMU runner in `qemu.rs` to facilitate running ArceOS applications in QEMU. - Added board configuration files for AArch64, RISC-V, and x86_64 architectures. - Introduced `xtask` commands for building and running ArceOS applications. - Enhanced configuration loading to support command line arguments and board-specific settings. - Implemented default configuration setup for specified boards. - Updated dependencies in `Cargo.toml` for enhanced functionality. - Added tests for QEMU runner and configuration loading. * feat: add wait queue test suite for ArceOS * style: apply cargo fmt * refactor(axbuild): reuse ostool build and qemu runners * fix: simplify xtask alias in Cargo configuration * style: fix comment indentation in build.rs template * Refactor board configuration loading and QEMU runner integration - Updated `load_board_config` to use the new config module's board loader for backward compatibility. - Refactored `QemuRunner` to accept `manifest_dir` instead of `image_path` and `arceos_dir`, simplifying the constructor and related methods. - Removed redundant code and improved error handling in `run_defconfig` by leveraging `apply_defconfig`. - Enhanced configuration loading logic to prioritize command line arguments and board configurations. - Updated tests to reflect changes in the QEMU runner and configuration loading. - Cleaned up unused functions and imports in the configuration module. - Bumped `ostool` version in `Cargo.lock` to 0.8.13. * feat: add support for ArceOS targets and improve configuration management * feat: enhance ArceOS configuration with SMP support and QEMU integration * fix: update .gitignore to include axconfig wildcard and modify NUM_TASKS constant in main.rs * fix: prevent negative initialization value in TimeIf implementation * fix std test flakiness in scope-local and smoltcp doctest * feat: Introduce AxContext and AxBuild for improved configuration management - Added AxContext struct to encapsulate application context including configuration, manifest directory, and QEMU configuration path. - Implemented AxBuild struct to facilitate building and running applications with QEMU. - Refactored existing code to utilize AxContext and AxBuild, enhancing modularity and readability. - Removed deprecated board configuration files for QEMU (aarch64, riscv64, x86_64) as they are no longer needed. - Updated build and run commands to leverage new AxBuild structure, simplifying the command flow. - Adjusted tests and configuration overrides to align with the new context management approach. * fix: update Cargo.toml to include axerrno patch and clean up unused code in ostool * fix: update ostool to improve platform handling and cargo argument construction * refactor: improve test cases for config loading and cleanup functionality * fix: update axbuild dependency path and remove unnecessary features * refactor: rename log level conversion method and improve formatting in config handling --- configs/board/qemu-aarch64.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs/board/qemu-aarch64.toml b/configs/board/qemu-aarch64.toml index cfeacfd3..77eeb678 100644 --- a/configs/board/qemu-aarch64.toml +++ b/configs/board/qemu-aarch64.toml @@ -2,6 +2,10 @@ cargo_args = [ "--config", 'target.aarch64-unknown-none-softfloat.rustflags = ["-Crelocation-model=pic", "-Clink-args=-pie", "-Clink-args=-znostart-stop-gc", "-Clink-args=-Taxplat.x"]', ] +# cargo_args = [ +# "--config", +# 'target.aarch64-unknown-none-softfloat.rustflags = ["-Clink-args=-Taxplat.x"]', +# ] features = [ "ept-level-4", "axstd/bus-mmio", From 09bcc9aaa5fc118df85d1dcc2e784a31490921db Mon Sep 17 00:00:00 2001 From: aarkegz Date: Wed, 18 Mar 2026 22:45:56 +0800 Subject: [PATCH 21/22] fixes after merge, still wip --- Cargo.lock | 33 --------------------------- Cargo.toml | 3 +-- platform/riscv64-qemu-virt/Cargo.toml | 8 +++---- 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0e791bcd..4c69006f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -619,17 +619,6 @@ dependencies = [ "spin 0.10.0", ] -[[package]] -name = "axfs_devfs" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b87ae981272ca8d5d8f106a4452c63f4b5ac36e17ee8f848ee1b250538b9f8" -dependencies = [ - "axfs_vfs", - "log", - "spin 0.9.8", -] - [[package]] name = "axfs" version = "0.2.0" @@ -651,17 +640,6 @@ dependencies = [ "scope-local", ] -[[package]] -name = "axfs_devfs" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b87ae981272ca8d5d8f106a4452c63f4b5ac36e17ee8f848ee1b250538b9f8" -dependencies = [ - "axfs_vfs", - "log", - "spin 0.9.8", -] - [[package]] name = "axfs_ramfs" version = "0.1.2" @@ -1782,17 +1760,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "crate_interface" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e5c7109dea31fc91ab584e99752baa997f76d46e49bab0a17b5e9679248df7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "crc" version = "3.4.0" diff --git a/Cargo.toml b/Cargo.toml index 6bea1ad6..58944e6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,11 +35,10 @@ required-features = ["xtask"] [features] default = [] -ept-level-4 = ["axaddrspace/4-level-ept"] +ept-level-4 = [] fs = ["axstd/fs"] dyn-plat = ["axstd/plat-dyn"] # Driver features (from former driver crate) -rk3568-clk = ["dep:rk3568_clk"] rk3588-clk = ["dep:rk3588-clk"] sdmmc = ["dep:sdmmc"] rockchip-pm = ["dep:rockchip-pm"] diff --git a/platform/riscv64-qemu-virt/Cargo.toml b/platform/riscv64-qemu-virt/Cargo.toml index 8bfe9dc1..869095be 100644 --- a/platform/riscv64-qemu-virt/Cargo.toml +++ b/platform/riscv64-qemu-virt/Cargo.toml @@ -24,10 +24,10 @@ sbi-rt = { version = "0.0.3", features = ["legacy"] } uart_16550 = "0.4.0" axconfig-macros = "0.2" -axcpu = { workspace = true } -axplat = { workspace = true } -axvisor_api = { workspace = true } -crate_interface = { workspace = true } +axcpu = { version = "0.3.0-preview.8", features = ["arm-el2"] } +axplat = "0.3.1-pre.6" +axvisor_api = "0.3" +crate_interface = "0.3" [package.metadata.docs.rs] targets = ["riscv64gc-unknown-none-elf"] From fd419aae124c49b854d32ccdcddd3aba31832cb7 Mon Sep 17 00:00:00 2001 From: aarkegz Date: Fri, 20 Mar 2026 23:43:48 +0800 Subject: [PATCH 22/22] fixes --- Cargo.toml | 14 +++++++------- src/hal/arch/aarch64/api.rs | 4 ++-- src/hal/impl_host.rs | 3 +-- src/hal/impl_vmm.rs | 1 - src/hal/mod.rs | 7 ++----- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 58944e6b..4e1a8dfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,19 +118,12 @@ rdrive = "0.20" rd-block = "0.1" pcie = "0.5.0" -# platform -axplat-riscv64-qemu-virt = {path = "platform/riscv64-qemu-virt"} - # Optional driver dependencies sdmmc = { version = "0.1", default-features = false, features = ["pio"], optional = true } rk3588-clk = { version = "0.1", optional = true } rockchip-pm = { version = "0.4", optional = true } phytium-mci = { version = "0.1", default-features = false, features = ["pio"], optional = true } -[target.'cfg(target_arch = "aarch64")'.dependencies] -aarch64-cpu-ext = "0.1" -arm-gic-driver = {version = "0.17", features = ["rdif"]} - [target.'cfg(target_arch = "x86_64")'.dependencies] axplat-x86-qemu-q35 = { version = "0.2.0", default-features = false, features = [ "reboot-on-system-off", @@ -139,6 +132,13 @@ axplat-x86-qemu-q35 = { version = "0.2.0", default-features = false, features = ] } axconfig = { version = "=0.3.0-preview.3", features = ["plat-dyn"] } +[target.'cfg(target_arch = "aarch64")'.dependencies] +aarch64-cpu-ext = "0.1" +arm-gic-driver = {version = "0.17", features = ["rdif"]} + +[target.'cfg(target_arch = "riscv64")'.dependencies] +axplat-riscv64-qemu-virt = "0.3.1-pre.6" + # xtask dependencies (only used when xtask feature is enabled) [target.'cfg(any(windows, unix))'.dependencies] anyhow = { version = "1.0", optional = true } diff --git a/src/hal/arch/aarch64/api.rs b/src/hal/arch/aarch64/api.rs index 205fd29b..32ca2441 100644 --- a/src/hal/arch/aarch64/api.rs +++ b/src/hal/arch/aarch64/api.rs @@ -95,10 +95,10 @@ impl ArchIf for ArchImpl { .lock() .unwrap(); if let Some(gic) = gic.typed_mut::() { - return u32::from(gic.cpu_interface().ack()) as _ + return u32::from(gic.cpu_interface().ack()) as _; } if let Some(gic) = gic.typed_mut::() { - return gic.cpu_interface().ack1().to_u32() as _ + return gic.cpu_interface().ack1().to_u32() as _; } panic!("No GIC driver found"); } diff --git a/src/hal/impl_host.rs b/src/hal/impl_host.rs index 0643e3ad..831160f9 100644 --- a/src/hal/impl_host.rs +++ b/src/hal/impl_host.rs @@ -5,7 +5,6 @@ struct HostImpl; #[axvisor_api::api_impl] impl HostIf for HostImpl { fn get_host_cpu_num() -> usize { - // std::os::arceos::modules::axconfig::plat::CPU_NUM - axruntime::cpu_count() + std::os::arceos::modules::axhal::cpu_num() } } diff --git a/src/hal/impl_vmm.rs b/src/hal/impl_vmm.rs index c42462cd..44717cc4 100644 --- a/src/hal/impl_vmm.rs +++ b/src/hal/impl_vmm.rs @@ -3,7 +3,6 @@ use std::os::arceos::modules::{axhal, axtask}; use axaddrspace::{HostPhysAddr, HostVirtAddr}; use axerrno::{AxResult, ax_err_type}; use axvisor_api::vmm::{InterruptVector, VCpuId, VCpuSet, VMId, VmmIf}; -use axvm::AxVMHal; use crate::{task::AsVCpuTask, vmm}; diff --git a/src/hal/mod.rs b/src/hal/mod.rs index 00bf71ff..183c7c79 100644 --- a/src/hal/mod.rs +++ b/src/hal/mod.rs @@ -12,15 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::os::arceos::{ - self, - modules::{axhal::percpu::this_cpu_id}, -}; +use std::os::arceos::{self, modules::axhal::percpu::this_cpu_id}; -use page_table_multiarch::PagingHandler; use arceos::modules::axhal; use axaddrspace::{AxMmHal, HostPhysAddr, HostVirtAddr}; use axvm::AxVMPerCpu; +use page_table_multiarch::PagingHandler; #[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/mod.rs")] #[cfg_attr(target_arch = "x86_64", path = "arch/x86_64/mod.rs")]