Skip to content

Commit 00367d4

Browse files
committed
Add sections to the registers module
1 parent 370a654 commit 00367d4

File tree

1 file changed

+70
-21
lines changed

1 file changed

+70
-21
lines changed

src/register/mod.rs

Lines changed: 70 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,82 @@
1313
#[macro_use]
1414
mod macros;
1515

16+
// TODO: User Trap Setup
17+
18+
19+
// TODO: User Trap Handling
20+
21+
22+
// User Floating-Point CSRs
23+
// TODO: frm, fflags
1624
pub mod fcsr;
1725

18-
pub mod marchid;
19-
pub mod mcause;
20-
pub mod mcycle;
21-
pub mod mcycleh;
22-
pub mod mepc;
23-
pub mod mhartid;
24-
pub mod mie;
25-
pub mod mimpid;
26-
pub mod minstret;
27-
pub mod minstreth;
28-
pub mod mip;
29-
pub mod misa;
30-
pub mod mstatus;
31-
pub mod mtvec;
32-
pub mod mvendorid;
3326

27+
// User Counter/Timers
28+
// TODO: cycle[h], instret[h], hpmcounter*[h]
29+
pub mod time;
30+
pub mod timeh;
31+
32+
33+
// Supervisor Trap Setup
34+
// TODO: sedeleg, sideleg
3435
pub mod sstatus;
35-
pub mod stvec;
3636
pub mod sie;
37-
pub mod sip;
37+
pub mod stvec;
38+
// TODO: scounteren
39+
40+
41+
// Supervisor Trap Handling
42+
pub mod sscratch;
43+
pub mod sepc;
3844
pub mod scause;
3945
pub mod stval;
46+
pub mod sip;
47+
48+
49+
// Supervisor Protection and Translation
4050
pub mod satp;
41-
pub mod sscratch;
42-
pub mod sepc;
4351

44-
pub mod time;
45-
pub mod timeh;
52+
53+
// Machine Information Registers
54+
pub mod mvendorid;
55+
pub mod marchid;
56+
pub mod mimpid;
57+
pub mod mhartid;
58+
59+
60+
// Machine Trap Setup
61+
pub mod mstatus;
62+
pub mod misa;
63+
// TODO: medeleg, mideleg
64+
pub mod mie;
65+
pub mod mtvec;
66+
// TODO: mcounteren
67+
68+
69+
// Machine Trap Handling
70+
// TODO: mscratch
71+
pub mod mepc;
72+
pub mod mcause;
73+
// TODO: mtval
74+
pub mod mip;
75+
76+
77+
// TODO: Machine Protection and Translation
78+
79+
// Machine Counter/Timers
80+
pub mod mcycle;
81+
pub mod minstret;
82+
// TODO: mhpmcounter*
83+
pub mod mcycleh;
84+
pub mod minstreth;
85+
// TODO: mhpmcounter*h
86+
87+
88+
// TODO: Machine Counter Setup
89+
90+
91+
// TODO: Debug/Trace Registers (shared with Debug Mode)
92+
93+
94+
// TODO: Debug Mode Registers

0 commit comments

Comments
 (0)