Implement mscratch and mtval registers
This commit is contained in:
parent
00367d4fd2
commit
7a8d3d1f6c
|
@ -67,10 +67,10 @@ pub mod mtvec;
|
||||||
|
|
||||||
|
|
||||||
// Machine Trap Handling
|
// Machine Trap Handling
|
||||||
// TODO: mscratch
|
pub mod mscratch;
|
||||||
pub mod mepc;
|
pub mod mepc;
|
||||||
pub mod mcause;
|
pub mod mcause;
|
||||||
// TODO: mtval
|
pub mod mtval;
|
||||||
pub mod mip;
|
pub mod mip;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
//! mscratch register
|
||||||
|
|
||||||
|
read_csr_as_usize!(0x340, __read_mscratch);
|
||||||
|
write_csr_as_usize!(0x340, __write_mscratch);
|
|
@ -0,0 +1,3 @@
|
||||||
|
//! mtval register
|
||||||
|
|
||||||
|
read_csr_as_usize!(0x343, __read_mtval);
|
Loading…
Reference in New Issue