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