diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8182c57..60d2812d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,11 +41,11 @@ jobs: uses: taiki-e/install-action@just - name: Install Rust run: | - rustup install 1.83 - rustup target add ${{ matrix.target }} --toolchain=1.83 + rustup install 1.93 + rustup target add ${{ matrix.target }} --toolchain=1.93 - name: Run just run: | - RUSTUP_TOOLCHAIN=1.83 just ${{ matrix.action }}-tier2 ${{ matrix.target }} + RUSTUP_TOOLCHAIN=1.93 just ${{ matrix.action }}-tier2 ${{ matrix.target }} # Build the workspace for a target architecture using latest stable build-tier2-stable: @@ -138,7 +138,7 @@ jobs: strategy: matrix: rust: - - 1.83 + - 1.93 - stable - "" action: @@ -146,7 +146,7 @@ jobs: - clippy - doc exclude: - - rust: 1.83 + - rust: 1.93 action: clippy - rust: stable action: clippy diff --git a/aarch32-cpu/Cargo.toml b/aarch32-cpu/Cargo.toml index 75296051..3da851c6 100644 --- a/aarch32-cpu/Cargo.toml +++ b/aarch32-cpu/Cargo.toml @@ -21,7 +21,7 @@ name = "aarch32-cpu" readme = "README.md" repository = "https://github.com/rust-embedded/aarch32.git" homepage = "https://github.com/rust-embedded/aarch32" -rust-version = "1.83" +rust-version = "1.93" version = "0.3.0" [dependencies] diff --git a/aarch32-cpu/README.md b/aarch32-cpu/README.md index 495b739e..7fece702 100644 --- a/aarch32-cpu/README.md +++ b/aarch32-cpu/README.md @@ -29,7 +29,7 @@ If you need a driver for the Arm Generic Interrupt Controller, see ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.83.0 and up, as recorded +This crate is guaranteed to compile on stable Rust 1.93.0 and up, as recorded by the `package.rust-version` property in `Cargo.toml`. Increasing the MSRV is not considered a breaking change and may occur in a diff --git a/aarch32-rt-macros/Cargo.toml b/aarch32-rt-macros/Cargo.toml index 6d572038..5aa39693 100644 --- a/aarch32-rt-macros/Cargo.toml +++ b/aarch32-rt-macros/Cargo.toml @@ -11,7 +11,7 @@ name = "aarch32-rt-macros" readme = "README.md" repository = "https://github.com/rust-embedded/aarch32.git" homepage = "https://github.com/rust-embedded/aarch32" -rust-version = "1.83" +rust-version = "1.93" version = "0.3.0" [lib] diff --git a/aarch32-rt-macros/README.md b/aarch32-rt-macros/README.md index 64e3c979..a314c43e 100644 --- a/aarch32-rt-macros/README.md +++ b/aarch32-rt-macros/README.md @@ -6,7 +6,7 @@ This crate contains proc-macros that are re-exported through the `aarch32-rt` cr ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.83.0 and up, as recorded +This crate is guaranteed to compile on stable Rust 1.93.0 and up, as recorded by the `package.rust-version` property in `Cargo.toml`. Increasing the MSRV is not considered a breaking change and may occur in a diff --git a/aarch32-rt/Cargo.toml b/aarch32-rt/Cargo.toml index a6686f15..6287a410 100644 --- a/aarch32-rt/Cargo.toml +++ b/aarch32-rt/Cargo.toml @@ -20,7 +20,7 @@ license = "MIT OR Apache-2.0" name = "aarch32-rt" readme = "README.md" repository = "https://github.com/rust-embedded/aarch32.git" -rust-version = "1.83" +rust-version = "1.93" version = "0.3.0" [dependencies] diff --git a/aarch32-rt/README.md b/aarch32-rt/README.md index a94854e8..6840dea8 100644 --- a/aarch32-rt/README.md +++ b/aarch32-rt/README.md @@ -22,7 +22,7 @@ uses different instructions for reading/writing system registers. ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.83.0 and up, as recorded +This crate is guaranteed to compile on stable Rust 1.93.0 and up, as recorded by the `package.rust-version` property in `Cargo.toml`. Increasing the MSRV is not considered a breaking change and may occur in a diff --git a/aarch32-rt/src/arch_v4/boot.rs b/aarch32-rt/src/arch_v4/boot.rs index e07289ae..901130c2 100644 --- a/aarch32-rt/src/arch_v4/boot.rs +++ b/aarch32-rt/src/arch_v4/boot.rs @@ -16,7 +16,16 @@ core::arch::global_asm!( mov r0, #0 bl _stack_setup_preallocated "#, - crate::system_init!(), + #[cfg(any(target_abi = "eabihf", feature = "eabi-fpu"))] + r#" + // Allow VFP coprocessor access + mrc p15, 0, r0, c1, c0, 2 + orr r0, r0, #0xF00000 + mcr p15, 0, r0, c1, c0, 2 + // Enable VFP + mov r0, #0x40000000 + vmsr fpexc, r0 + "#, r#" // Zero all registers before calling kmain mov r0, 0 diff --git a/aarch32-rt/src/arch_v7/boot_from_el1.rs b/aarch32-rt/src/arch_v7/boot_from_el1.rs index e07289ae..b98a5526 100644 --- a/aarch32-rt/src/arch_v7/boot_from_el1.rs +++ b/aarch32-rt/src/arch_v7/boot_from_el1.rs @@ -15,8 +15,21 @@ core::arch::global_asm!( // Set up stacks. mov r0, #0 bl _stack_setup_preallocated + // Clear Thumb Exception bit + mrc p15, 0, r0, c1, c0, 0 + bic r0, #0x40000000 + mcr p15, 0, r0, c1, c0, 0 + "#, + #[cfg(any(target_abi = "eabihf", feature = "eabi-fpu"))] + r#" + // Allow VFP coprocessor access + mrc p15, 0, r0, c1, c0, 2 + orr r0, r0, #0xF00000 + mcr p15, 0, r0, c1, c0, 2 + // Enable VFP + mov r0, #0x40000000 + vmsr fpexc, r0 "#, - crate::system_init!(), r#" // Zero all registers before calling kmain mov r0, 0 diff --git a/aarch32-rt/src/arch_v7/boot_from_el2.rs b/aarch32-rt/src/arch_v7/boot_from_el2.rs index 7e750733..e72c384c 100644 --- a/aarch32-rt/src/arch_v7/boot_from_el2.rs +++ b/aarch32-rt/src/arch_v7/boot_from_el2.rs @@ -46,8 +46,21 @@ core::arch::global_asm!( // Set up stacks. mov r0, #0 bl _stack_setup_preallocated + // Clear Thumb Exception bit + mrc p15, 0, r0, c1, c0, 0 + bic r0, #0x40000000 + mcr p15, 0, r0, c1, c0, 0 + "#, + #[cfg(any(target_abi = "eabihf", feature = "eabi-fpu"))] + r#" + // Allow VFP coprocessor access + mrc p15, 0, r0, c1, c0, 2 + orr r0, r0, #0xF00000 + mcr p15, 0, r0, c1, c0, 2 + // Enable VFP + mov r0, #0x40000000 + vmsr fpexc, r0 "#, - crate::system_init!(), r#" // Zero all registers before calling kmain mov r0, 0 diff --git a/aarch32-rt/src/arch_v8_hyp/boot.rs b/aarch32-rt/src/arch_v8_hyp/boot.rs index 262432ce..b756f31e 100644 --- a/aarch32-rt/src/arch_v8_hyp/boot.rs +++ b/aarch32-rt/src/arch_v8_hyp/boot.rs @@ -22,9 +22,17 @@ core::arch::global_asm!( mrs r0, CPSR orr r0, {irq_fiq} msr CPSR, r0 - "#, - crate::system_init!(), - r#" + // Clear Thumb Exception bit + mrc p15, 0, r0, c1, c0, 0 + bic r0, #0x40000000 + mcr p15, 0, r0, c1, c0, 0 + // Allow VFP coprocessor access + mrc p15, 0, r0, c1, c0, 2 + orr r0, r0, #0xF00000 + mcr p15, 0, r0, c1, c0, 2 + // Enable VFP + mov r0, #0x40000000 + vmsr fpexc, r0 // Zero all registers before calling kmain mov r0, 0 mov r1, 0 diff --git a/aarch32-rt/src/lib.rs b/aarch32-rt/src/lib.rs index 391863ee..5efc73fe 100644 --- a/aarch32-rt/src/lib.rs +++ b/aarch32-rt/src/lib.rs @@ -730,77 +730,6 @@ macro_rules! restore_fpu_context { }; } -/// This is for ARMv7 and ARMv8 systems with an FPU -/// -/// It just disables Thumb Exceptions and turns on the FPU -#[cfg(all(armv7_or_higher, any(target_abi = "eabihf", feature = "eabi-fpu")))] -#[macro_export] -macro_rules! system_init { - () => { - r#" - // Allow VFP coprocessor access - mrc p15, 0, r0, c1, c0, 2 - orr r0, r0, #0xF00000 - mcr p15, 0, r0, c1, c0, 2 - // Enable VFP - mov r0, #0x40000000 - vmsr fpexc, r0 - // Clear Thumb Exception bit - mrc p15, 0, r0, c1, c0, 0 - bic r0, #0x40000000 - mcr p15, 0, r0, c1, c0, 0 - "# - }; -} - -/// This is for ARMv7 and ARMv8 systems without an FPU -/// -/// It just disables Thumb Exceptions -#[cfg(all(armv7_or_higher, not(any(target_abi = "eabihf", feature = "eabi-fpu"))))] -#[macro_export] -macro_rules! system_init { - () => { - r#" - // Clear Thumb Exception bit - mrc p15, 0, r0, c1, c0, 0 - bic r0, #0x40000000 - mcr p15, 0, r0, c1, c0, 0 - "# - }; -} - -/// This is for ARMv6 and earlier systems with an FPU -/// -/// It enables the FPU -#[cfg(all(armv6_or_lower, any(target_abi = "eabihf", feature = "eabi-fpu")))] -#[macro_export] -macro_rules! system_init { - () => { - r#" - // Allow VFP coprocessor access - mrc p15, 0, r0, c1, c0, 2 - orr r0, r0, #0xF00000 - mcr p15, 0, r0, c1, c0, 2 - // Enable VFP - mov r0, #0x40000000 - vmsr fpexc, r0 - "# - }; -} - -/// This is for ARMv6 and earlier systems without an FPU -/// -/// It does nothing -#[cfg(all(armv6_or_lower, not(any(target_abi = "eabihf", feature = "eabi-fpu"))))] -#[macro_export] -macro_rules! system_init { - () => { - r#" - // No system init required - "# - }; -} - // ***************************************************************************** // Functions // ***************************************************************************** diff --git a/arm-targets/Cargo.toml b/arm-targets/Cargo.toml index 44c79e8e..7813742d 100644 --- a/arm-targets/Cargo.toml +++ b/arm-targets/Cargo.toml @@ -11,7 +11,7 @@ name = "arm-targets" readme = "README.md" repository = "https://github.com/rust-embedded/aarch32.git" homepage = "https://github.com/rust-embedded/aarch32" -rust-version = "1.83" +rust-version = "1.93" version = "0.4.2" [dependencies] diff --git a/arm-targets/README.md b/arm-targets/README.md index c7743b9e..7b4bd308 100644 --- a/arm-targets/README.md +++ b/arm-targets/README.md @@ -35,7 +35,7 @@ This allows you to write Rust code in your firmware like: ## Minimum Supported Rust Version (MSRV) -This crate is guaranteed to compile on stable Rust 1.83.0 and up, as recorded +This crate is guaranteed to compile on stable Rust 1.93.0 and up, as recorded by the `package.rust-version` property in `Cargo.toml`. Increasing the MSRV is not considered a breaking change and may occur in a