Skip to content

Commit 98ae3aa

Browse files
bors[bot]luojia65
andauthored
Merge #108
108: fix: clearify that mip.{MSIP, MTIP} are read-only r=almindor a=luojia65 closes #62 In RISC-V privileged specification, it says: > Bits mip.MTIP and mie.MTIE are the interrupt-pending and interrupt-enable bits for machine timer interrupts. MTIP is read-only in mip, and is cleared by writing to the memory-mapped machine-mode timer compare register. > > Bits mip.MSIP and mie.MSIE are the interrupt-pending and interrupt-enable bits for machine-level software interrupts. MSIP is read-only in mip, and is written by accesses to memory-mapped control registers, which are used by remote harts to provide machine-level interprocessor interrupts. indicated by the specification, mip.MSIP and mip.MTIP bits are read-only. This pull request clearifies this by removing {set, clear}_{msoft, mtimer} functions from mip module of riscv crate. Co-authored-by: luojia65 <[email protected]>
2 parents e38a68d + 9418b6c commit 98ae3aa

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/register/mip.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,12 @@ set_clear_csr!(
8080
set_clear_csr!(
8181
/// Supervisor Software Interrupt Pending
8282
, set_ssoft, clear_ssoft, 1 << 1);
83-
set_clear_csr!(
84-
/// Machine Software Interrupt Pending
85-
, set_msoft, clear_msoft, 1 << 3);
8683
set_clear_csr!(
8784
/// User Timer Interrupt Pending
8885
, set_utimer, clear_utimer, 1 << 4);
8986
set_clear_csr!(
9087
/// Supervisor Timer Interrupt Pending
9188
, set_stimer, clear_stimer, 1 << 5);
92-
set_clear_csr!(
93-
/// Machine Timer Interrupt Pending
94-
, set_mtimer, clear_mtimer, 1 << 7);
9589
set_clear_csr!(
9690
/// User External Interrupt Pending
9791
, set_uext, clear_uext, 1 << 8);

0 commit comments

Comments
 (0)