Support RISC-V ISA extension detection

This commit is contained in:
Zejun Zhao
2025-06-03 00:43:33 +08:00
committed by Tate, Hongliang Tian
parent 0ddc1bb2d2
commit bd24ed9ba7
3 changed files with 375 additions and 0 deletions

View File

@ -61,6 +61,7 @@ pub fn read_random() -> Option<u64> {
}
pub(crate) fn enable_cpu_features() {
cpu::extension::init();
unsafe {
// We adopt a lazy approach to enable the floating-point unit; it's not
// enabled before the first FPU trap.