From f488812bc7fb1b191e18b0f6d439315ecca92555 Mon Sep 17 00:00:00 2001 From: Yuekai Jia Date: Fri, 2 Aug 2024 14:10:01 +0800 Subject: [PATCH] [dep] Update dependencies versions --- .github/workflows/test.yml | 2 +- Cargo.lock | 49 ++++++++++--------- modules/axhal/Cargo.toml | 4 +- .../platform/aarch64_common/generic_timer.rs | 5 +- modules/axmm/src/aspace.rs | 2 +- 5 files changed, 33 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cc4d61536..17cb35047a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,5 +44,5 @@ jobs: run: | make disk_img git clone https://github.com/arceos-org/arceos-apps.git - cd arceos-apps && git reset --hard ${{ env.arceos-apps }} && cd .. + cd arceos-apps cp ../Cargo.lock . && git reset --hard ${{ env.arceos-apps }} && cd .. make -C arceos-apps test AX_ROOT=$(pwd) ARCH=${{ matrix.arch }} diff --git a/Cargo.lock b/Cargo.lock index f37a7859cb..a4ba25fe7a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,9 +141,12 @@ dependencies = [ [[package]] name = "arm_pl031" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3392676d21de757a82e91af9a38c1dad24a93fb024b8e6b9e27f113e876d2d73" +checksum = "13696b1c2b59992f4223e0ae5bb173c81c63039367ca90eee845346ad2a13421" +dependencies = [ + "chrono", +] [[package]] name = "atomic-polyfill" @@ -367,7 +370,7 @@ dependencies = [ "page_table_entry", "page_table_multiarch", "percpu", - "raw-cpuid 11.0.2", + "raw-cpuid 11.1.0", "riscv", "riscv_goldfish", "sbi-rt", @@ -678,9 +681,9 @@ checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" [[package]] name = "crate_interface" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2aab5f8027e4b744b40c4a66403a71292695e83f7e16b3e0a5045d3b2093c" +checksum = "6af24c4862260a825484470f5526a91ad1031e04ab899be62478241231f62b46" dependencies = [ "proc-macro2", "quote", @@ -927,9 +930,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "lazyinit" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0525312fb000d0444661821cf950222404103a989a4ddbb4b5ac23b90d0c77b" +checksum = "3861aac8febbb038673bf945ee47ac67940ca741b94d1bb3ff6066af2a181338" [[package]] name = "libc" @@ -1002,9 +1005,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memory_addr" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea53f55564acdbe43e404118414b5fb45dfe9bea0dfc9bd80b8e5bb02aeb047" +checksum = "4c59c2ac537a8198f50fe22e8783bdbef2011cd133d5c03748d1e5bc85c9fc4d" [[package]] name = "minimal-lexical" @@ -1039,9 +1042,9 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "page_table_entry" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75bcbfcef16b8ede39c4ff975e8dc12556eece0554667ed5dd2dd3ba958a5ad" +checksum = "edc092806cb37303daef2cf5119e0ec6693c23d7e73f1af33efb6c1f3b3bffb3" dependencies = [ "aarch64-cpu", "bitflags 2.6.0", @@ -1051,9 +1054,9 @@ dependencies = [ [[package]] name = "page_table_multiarch" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4235f68d9c35dd143b4c005764bd002361407687b9cc7c57465e9f8c77f7fbd3" +checksum = "1772e825763a7f1d577a0c59da29e0fb5912c71a5fe8f9169a7e4698435d3304" dependencies = [ "log", "memory_addr", @@ -1070,9 +1073,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percpu" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe17617fadbff9b221435e0fb91c7a7387c3bc87afab0ce92b21b0d108bdd17" +checksum = "8b18ccf6b20ed7e535732172ec446134690500417e1142625dc026e7e19b3d78" dependencies = [ "cfg-if", "kernel_guard", @@ -1191,9 +1194,9 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.0.2" +version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd" +checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" dependencies = [ "bitflags 2.6.0", ] @@ -1449,15 +1452,15 @@ checksum = "696941a0aee7e276a165a978b37918fd5d22c55c3d6bda197813070ca9c0f21c" [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.22.15" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "toml_datetime", @@ -1679,9 +1682,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] diff --git a/modules/axhal/Cargo.toml b/modules/axhal/Cargo.toml index d58b8e7b3d..d8f1071e1a 100644 --- a/modules/axhal/Cargo.toml +++ b/modules/axhal/Cargo.toml @@ -42,7 +42,7 @@ axalloc = { workspace = true, optional = true } x86 = "0.52" x86_64 = "0.15" x2apic = "0.4" -raw-cpuid = "11.0" +raw-cpuid = "11.1" x86_rtc = { version = "0.1", optional = true } [target.'cfg(any(target_arch = "riscv32", target_arch = "riscv64"))'.dependencies] @@ -55,7 +55,7 @@ aarch64-cpu = "9.4" tock-registers = "0.8" arm_gicv2 = "0.1" arm_pl011 = "0.1" -arm_pl031 = { version = "0.1", optional = true } +arm_pl031 = { version = "0.2", optional = true } dw_apb_uart = "0.1" [build-dependencies] diff --git a/modules/axhal/src/platform/aarch64_common/generic_timer.rs b/modules/axhal/src/platform/aarch64_common/generic_timer.rs index 6e479c2f9e..2fe0f3e4ad 100644 --- a/modules/axhal/src/platform/aarch64_common/generic_timer.rs +++ b/modules/axhal/src/platform/aarch64_common/generic_timer.rs @@ -64,10 +64,11 @@ pub(crate) fn init_early() { use memory_addr::PhysAddr; const PL031_BASE: PhysAddr = PhysAddr::from(axconfig::RTC_PADDR); + + let rtc = unsafe { Rtc::new(phys_to_virt(PL031_BASE).as_usize() as _) }; // Get the current time in microseconds since the epoch (1970-01-01) from the aarch64 pl031 RTC. // Subtract the timer ticks to get the actual time when ArceOS was booted. - let epoch_time_nanos = - Rtc::new(phys_to_virt(PL031_BASE).as_usize()).get_unix_timestamp() * 1_000_000_000; + let epoch_time_nanos = rtc.get_unix_timestamp() as u64 * 1_000_000_000; unsafe { RTC_EPOCHOFFSET_NANOS = epoch_time_nanos - ticks_to_nanos(current_ticks()); diff --git a/modules/axmm/src/aspace.rs b/modules/axmm/src/aspace.rs index 9d8d16f617..cadac67dd3 100644 --- a/modules/axmm/src/aspace.rs +++ b/modules/axmm/src/aspace.rs @@ -86,7 +86,7 @@ impl AddrSpace { false, // flush_tlb_by_page ) .map_err(paging_err_to_ax_err)? - .flush(); + .flush_all(); Ok(()) }