mod.rs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 ustatus;
  16. pub mod uie;
  17. pub mod utvec;
  18. // User Trap Handling
  19. pub mod uscratch;
  20. pub mod uepc;
  21. pub mod ucause;
  22. pub mod utval;
  23. pub mod uip;
  24. // User Floating-Point CSRs
  25. // TODO: frm, fflags
  26. pub mod fcsr;
  27. // User Counter/Timers
  28. pub mod cycle;
  29. pub mod instret;
  30. pub mod time;
  31. mod hpmcounterx;
  32. pub use self::hpmcounterx::*;
  33. pub mod cycleh;
  34. pub mod instreth;
  35. pub mod timeh;
  36. // Supervisor Trap Setup
  37. // TODO: sedeleg, sideleg
  38. pub mod sstatus;
  39. pub mod sie;
  40. pub mod stvec;
  41. // TODO: scounteren
  42. // Supervisor Trap Handling
  43. pub mod sscratch;
  44. pub mod sepc;
  45. pub mod scause;
  46. pub mod stval;
  47. pub mod sip;
  48. // Supervisor Protection and Translation
  49. pub mod satp;
  50. // Machine Information Registers
  51. pub mod mvendorid;
  52. pub mod marchid;
  53. pub mod mimpid;
  54. pub mod mhartid;
  55. // Machine Trap Setup
  56. pub mod mstatus;
  57. pub mod misa;
  58. // TODO: medeleg, mideleg
  59. pub mod mie;
  60. pub mod mtvec;
  61. pub mod mcounteren;
  62. // Machine Trap Handling
  63. pub mod mscratch;
  64. pub mod mepc;
  65. pub mod mcause;
  66. pub mod mtval;
  67. pub mod mip;
  68. // Machine Protection and Translation
  69. mod pmpcfgx;
  70. pub use self::pmpcfgx::*;
  71. mod pmpaddrx;
  72. pub use self::pmpaddrx::*;
  73. // Machine Counter/Timers
  74. pub mod mcycle;
  75. pub mod minstret;
  76. mod mhpmcounterx;
  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