diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8214a80..db8eab6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - rust-toolchain: [nightly-2024-12-25, nightly] + rust-toolchain: [nightly-2025-05-20, nightly] targets: [riscv64gc-unknown-none-elf] steps: - uses: actions/checkout@v4 @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: - rust-toolchain: [nightly-2024-12-25] + rust-toolchain: [nightly-2025-05-20] targets: [riscv64gc-unknown-none-elf] permissions: contents: write diff --git a/src/detect.rs b/src/detect.rs index 6d9e123..f9f0c5c 100644 --- a/src/detect.rs +++ b/src/detect.rs @@ -151,9 +151,8 @@ struct TrapFrame { // This function should not be used in conventional trap handling, // as it does not preserve a special trap stack, and it's designed to // handle exceptions only rather than interrupts. -#[naked] +#[unsafe(naked)] unsafe extern "C" fn on_detect_trap() -> ! { - unsafe { naked_asm!( ".p2align 2", "addi sp, sp, -8*21", @@ -213,5 +212,4 @@ unsafe extern "C" fn on_detect_trap() -> ! { "sret", rust_detect_trap = sym rust_detect_trap, ) - } } diff --git a/src/lib.rs b/src/lib.rs index 903a6af..43d8a10 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![feature(doc_cfg)] -#![feature(naked_functions)] #![feature(riscv_ext_intrinsics)] #![doc = include_str!("../README.md")] diff --git a/src/vcpu.rs b/src/vcpu.rs index e7d740d..93dbc6a 100644 --- a/src/vcpu.rs +++ b/src/vcpu.rs @@ -1,5 +1,3 @@ -use core::ops::{Shl, Shr}; - use crate::sbi_console::*; use axaddrspace::device::AccessWidth; use riscv::register::hstatus;