Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -138,15 +138,15 @@ jobs:
strategy:
matrix:
rust:
- 1.83
- 1.93
- stable
- ""
action:
- build
- clippy
- doc
exclude:
- rust: 1.83
- rust: 1.93
action: clippy
- rust: stable
action: clippy
Expand Down
2 changes: 1 addition & 1 deletion aarch32-cpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion aarch32-cpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion aarch32-rt-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion aarch32-rt-macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion aarch32-rt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion aarch32-rt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion aarch32-rt/src/arch_v4/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion aarch32-rt/src/arch_v7/boot_from_el1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion aarch32-rt/src/arch_v7/boot_from_el2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions aarch32-rt/src/arch_v8_hyp/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
71 changes: 0 additions & 71 deletions aarch32-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
// *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion arm-targets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion arm-targets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down