mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
Fix the detection of RISC-V SSTC extension
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
bd24ed9ba7
commit
492898d1d5
@ -8,8 +8,8 @@ use core::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
arch::boot::DEVICE_TREE,
|
||||
cpu::{CpuId, PinCurrentCpu},
|
||||
arch::{self, boot::DEVICE_TREE},
|
||||
cpu::{CpuId, IsaExtensions, PinCurrentCpu},
|
||||
timer::INTERRUPT_CALLBACKS,
|
||||
trap,
|
||||
};
|
||||
@ -107,10 +107,7 @@ fn set_next_timer_sstc() {
|
||||
}
|
||||
|
||||
fn is_sstc_enabled() -> bool {
|
||||
let Some(misa) = riscv::register::misa::read() else {
|
||||
return false;
|
||||
};
|
||||
misa.has_extension('S')
|
||||
arch::cpu::has_extensions(IsaExtensions::SSTC)
|
||||
}
|
||||
|
||||
fn get_next_when() -> u64 {
|
||||
|
Reference in New Issue
Block a user