register.rs 1.7 KB

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