rfnc.rs 946 B

12345678910111213141516171819202122232425
  1. use sbi_spec::binary::SbiRet;
  2. #[inline]
  3. pub fn handle_ecall(
  4. function: usize,
  5. param0: usize,
  6. param1: usize,
  7. param2: usize,
  8. param3: usize,
  9. param4: usize,
  10. ) -> SbiRet {
  11. use crate::rfence::*;
  12. use sbi_spec::rfnc::*;
  13. let hart_mask = crate::HartMask::from_mask_base(param0, param1);
  14. match function {
  15. REMOTE_FENCE_I => remote_fence_i(hart_mask),
  16. REMOTE_SFENCE_VMA => remote_sfence_vma(hart_mask, param2, param3),
  17. REMOTE_SFENCE_VMA_ASID => remote_sfence_vma_asid(hart_mask, param2, param3, param4),
  18. REMOTE_HFENCE_GVMA_VMID => remote_hfence_gvma_vmid(hart_mask, param2, param3, param4),
  19. REMOTE_HFENCE_GVMA => remote_hfence_gvma(hart_mask, param2, param3),
  20. REMOTE_HFENCE_VVMA_ASID => remote_hfence_vvma_asid(hart_mask, param2, param3, param4),
  21. REMOTE_HFENCE_VVMA => remote_hfence_vvma(hart_mask, param2, param3),
  22. _ => SbiRet::not_supported(),
  23. }
  24. }