mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-09 05:16:47 +00:00
Disable RISC-V FPU by default
This commit is contained in:
parent
14b8c48859
commit
5630fa8b36
@ -64,6 +64,8 @@ pub fn read_random() -> Option<u64> {
|
||||
|
||||
pub(crate) fn enable_cpu_features() {
|
||||
unsafe {
|
||||
riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Clean);
|
||||
// We adopt a lazy approach to enable the floating-point unit; it's not
|
||||
// enabled before the first FPU trap.
|
||||
riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Off);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user