mod.rs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //! RISC-V CSR's
  2. //!
  3. //! The following registers are not available on 64-bit implementations.
  4. //!
  5. //! - cycleh
  6. //! - timeh
  7. //! - instreth
  8. //! - hpmcounter[3-31]h
  9. //! - mcycleh
  10. //! - minstreth
  11. //! - mhpmcounter[3-31]h
  12. #[macro_use]
  13. mod macros;
  14. // User Trap Setup
  15. pub mod uie;
  16. pub mod ustatus;
  17. pub mod utvec;
  18. // User Trap Handling
  19. pub mod ucause;
  20. pub mod uepc;
  21. pub mod uip;
  22. pub mod uscratch;
  23. pub mod utval;
  24. // User Floating-Point CSRs
  25. // TODO: frm, fflags
  26. pub mod fcsr;
  27. // User Counter/Timers
  28. // TODO: cycle[h], instret[h]
  29. pub mod time;
  30. #[rustfmt::skip] // long macro use
  31. mod hpmcounterx;
  32. pub use self::hpmcounterx::*;
  33. pub mod timeh;
  34. // Supervisor Trap Setup
  35. // TODO: sedeleg, sideleg
  36. pub mod sie;
  37. pub mod sstatus;
  38. pub mod stvec;
  39. // TODO: scounteren
  40. // Supervisor Trap Handling
  41. pub mod scause;
  42. pub mod sepc;
  43. pub mod sip;
  44. pub mod sscratch;
  45. pub mod stval;
  46. // Supervisor Protection and Translation
  47. pub mod satp;
  48. // Machine Information Registers
  49. pub mod marchid;
  50. pub mod mhartid;
  51. pub mod mimpid;
  52. pub mod mvendorid;
  53. // Machine Trap Setup
  54. pub mod misa;
  55. pub mod mstatus;
  56. pub mod medeleg;
  57. pub mod mideleg;
  58. pub mod mie;
  59. pub mod mtvec;
  60. // TODO: mcounteren
  61. // Machine Trap Handling
  62. pub mod mcause;
  63. pub mod mepc;
  64. pub mod mip;
  65. pub mod mscratch;
  66. pub mod mtval;
  67. // Machine Protection and Translation
  68. mod pmpcfgx;
  69. pub use self::pmpcfgx::*;
  70. mod pmpaddrx;
  71. pub use self::pmpaddrx::*;
  72. // Machine Counter/Timers
  73. pub mod mcycle;
  74. #[rustfmt::skip] // long macro use
  75. mod mhpmcounterx;
  76. pub mod minstret;
  77. pub use self::mhpmcounterx::*;
  78. pub mod mcycleh;
  79. pub mod minstreth;
  80. // Machine Counter Setup
  81. mod mhpmeventx;
  82. pub use self::mhpmeventx::*;
  83. // TODO: Debug/Trace Registers (shared with Debug Mode)
  84. // TODO: Debug Mode Registers