diff --git a/Cargo.lock b/Cargo.lock index 414a3f8503..da007a0dc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -207,7 +207,7 @@ dependencies = [ "axruntime", "axsync", "axtask", - "bindgen", + "bindgen 0.66.1", "flatten_objects", "lazy_static", "spin 0.9.8", @@ -421,7 +421,7 @@ dependencies = [ "axerrno", "axfeat", "axio", - "bindgen", + "bindgen 0.66.1", ] [[package]] @@ -619,6 +619,29 @@ dependencies = [ "which", ] +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.4.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.39", + "which", +] + [[package]] name = "bit" version = "0.1.1" @@ -1312,9 +1335,9 @@ checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "lwext4_rust" version = "0.1.0" -source = "git+https://github.com/elliott10/lwext4_rust.git?rev=562fbfce#562fbfceabe51228ad144ba5ac7b7573ba8f4f4e" +source = "git+https://github.com/elliott10/lwext4_rust.git?rev=f3048f87#f3048f8762ebf0f750ec923112e135244a153d50" dependencies = [ - "bindgen", + "bindgen 0.69.4", "log", ] diff --git a/apps/monolithic_userboot/features.txt b/apps/monolithic_userboot/features.txt index fbb4c848c5..30bb1d7d23 100644 --- a/apps/monolithic_userboot/features.txt +++ b/apps/monolithic_userboot/features.txt @@ -6,4 +6,4 @@ signal img syscall_net schedule -monolithic \ No newline at end of file +monolithic diff --git a/modules/axhal/src/platform/aarch64_common/mem.rs b/modules/axhal/src/platform/aarch64_common/mem.rs index 6fdb5b8da8..0b8aa54f9f 100644 --- a/modules/axhal/src/platform/aarch64_common/mem.rs +++ b/modules/axhal/src/platform/aarch64_common/mem.rs @@ -139,7 +139,6 @@ pub(crate) unsafe fn idmap_kernel(kernel_phys_addr: usize) { // 0x0000_0000_0000 ~ 0x0080_0000_0000, table BOOT_PT_L0[0] = A64PTE::new_table(PhysAddr::from(BOOT_PT_L1.as_ptr() as usize)); - // 1G block, kernel img BOOT_PT_L1[l1_index] = A64PTE::new_page( PhysAddr::from(aligned_address), @@ -151,7 +150,6 @@ pub(crate) unsafe fn idmap_kernel(kernel_phys_addr: usize) { pub(crate) unsafe fn idmap_device(phys_addr: usize) { let aligned_address = (phys_addr) & !(BOOT_MAP_SIZE - 1); let l1_index = phys_addr >> BOOT_MAP_SHIFT; - if BOOT_PT_L1[l1_index].is_unused() { BOOT_PT_L1[l1_index] = A64PTE::new_page( PhysAddr::from(aligned_address), diff --git a/modules/axhal/src/platform/dummy/mod.rs b/modules/axhal/src/platform/dummy/mod.rs index a09fea497d..1790d23d86 100644 --- a/modules/axhal/src/platform/dummy/mod.rs +++ b/modules/axhal/src/platform/dummy/mod.rs @@ -87,6 +87,7 @@ pub fn platform_init() {} pub fn platform_init_secondary() {} pub fn set_tss_stack_top(_kernel_stack_top: memory_addr::VirtAddr) {} + pub fn platform_name() -> &'static str { "dummy" } diff --git a/modules/axprocess/src/process.rs b/modules/axprocess/src/process.rs index 74c1ab3580..bb7bab6c40 100644 --- a/modules/axprocess/src/process.rs +++ b/modules/axprocess/src/process.rs @@ -640,6 +640,7 @@ impl Process { new_task.set_tls_force(tls); } } + // 设置用户栈 // 若给定了用户栈,则使用给定的用户栈 // 若没有给定用户栈,则使用当前用户栈 diff --git a/testcases/aarch64/unixbench_testcode.sh b/testcases/aarch64/unixbench_testcode.sh index 366674832b..f3d79bb624 100755 --- a/testcases/aarch64/unixbench_testcode.sh +++ b/testcases/aarch64/unixbench_testcode.sh @@ -1,14 +1,6 @@ #!/bin/bash #export CC=gcc -./arithoh 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench ARITHOH test(lps): "$0}' -./short 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench SHORT test(lps): "$0}' -./int 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench INT test(lps): "$0}' -./long 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench LONG test(lps): "$0}' -./float 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FLOAT test(lps): "$0}' -./double 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench DOUBLE test(lps): "$0}' -./hanoi 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench HANOI test(lps): "$0}' -./syscall 10 exec | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench EXEC test(lps): "$0}' ./dhry2reg 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench DHRY2 test(lps): "$0}' ./whetstone-double 10 | ./busybox grep -o "COUNT|[[:digit:]]\+.[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+.[[:digit:]]\+" | ./busybox awk '{print "Unixbench WHETSTONE test(MFLOPS): "$0}' @@ -18,3 +10,28 @@ ./spawn 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench SPAWN test(lps): "$0}' UB_BINDIR=./ ./execl 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench EXECL test(lps): "$0}' +#./fstime +./fstime -w -t 20 -b 256 -m 500 | ./busybox grep -o "WRITE COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FS_WRITE_SMALL test(KBps): "$0}' +./fstime -r -t 20 -b 256 -m 500 | ./busybox grep -o "READ COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FS_READ_SMALL test(KBps): "$0}' +./fstime -c -t 20 -b 256 -m 500 | ./busybox grep -o "COPY COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FS_COPY_SMALL test(KBps): "$0}' + +./fstime -w -t 20 -b 1024 -m 2000 | ./busybox grep -o "WRITE COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FS_WRITE_MIDDLE test(KBps): "$0}' +./fstime -r -t 20 -b 1024 -m 2000 | ./busybox grep -o "READ COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FS_READ_MIDDLE test(KBps): "$0}' +./fstime -c -t 20 -b 1024 -m 2000 | ./busybox grep -o "COPY COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FS_COPY_MIDDLE test(KBps): "$0}' + +./fstime -c -t 20 -b 4096 -m 8000 | ./busybox grep -o "COPY COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FS_COPY_BIG test(KBps): "$0}' + + +./looper 20 ./multi.sh 1 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench SHELL1 test(lpm): "$0}' +./looper 20 ./multi.sh 8 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench SHELL8 test(lpm): "$0}' +./looper 20 ./multi.sh 16 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench SHELL16 test(lpm): "$0}' +#./looper 30 dc < ../testdir/dc.dat 2>&1 + +./arithoh 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench ARITHOH test(lps): "$0}' +./short 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench SHORT test(lps): "$0}' +./int 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench INT test(lps): "$0}' +./long 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench LONG test(lps): "$0}' +./float 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench FLOAT test(lps): "$0}' +./double 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench DOUBLE test(lps): "$0}' +./hanoi 10 | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench HANOI test(lps): "$0}' +./syscall 10 exec | ./busybox grep -o "COUNT|[[:digit:]]\+|" | ./busybox grep -o "[[:digit:]]\+" | ./busybox awk '{print "Unixbench EXEC test(lps): "$0}' diff --git a/ulib/axstarry/syscall_entry/src/trap.rs b/ulib/axstarry/syscall_entry/src/trap.rs index 3771c30583..edaeec2733 100644 --- a/ulib/axstarry/syscall_entry/src/trap.rs +++ b/ulib/axstarry/syscall_entry/src/trap.rs @@ -15,7 +15,6 @@ impl axhal::trap::TrapHandler for TrapHandlerImpl { if from_user { axprocess::time_stat_from_user_to_kernel(); } - axhal::irq::dispatch_irq(_irq_num); if from_user { axprocess::time_stat_from_kernel_to_user();