extension.rs 545 B

12345678910111213141516
  1. use crate::ecall::*;
  2. #[inline]
  3. pub fn probe_extension(extension: usize) -> bool {
  4. match extension {
  5. EXTENSION_BASE => true,
  6. EXTENSION_TIMER => crate::timer::probe_timer(),
  7. EXTENSION_IPI => crate::ipi::probe_ipi(),
  8. EXTENSION_RFENCE => crate::rfence::probe_rfence(),
  9. EXTENSION_SRST => crate::reset::probe_reset(),
  10. EXTENSION_HSM => crate::hsm::probe_hsm(),
  11. EXTENSION_PMU => crate::pmu::probe_pmu(),
  12. // new extensions should be added here to be probed
  13. _ => false,
  14. }
  15. }