change stimecmp to 0x14d
This commit is contained in:
parent
9b9ab5e130
commit
4060b671d8
1 changed files with 4 additions and 2 deletions
|
@ -179,14 +179,16 @@ static inline uint64
|
||||||
r_stimecmp()
|
r_stimecmp()
|
||||||
{
|
{
|
||||||
uint64 x;
|
uint64 x;
|
||||||
asm volatile("csrr %0, stimecmp" : "=r" (x) );
|
// asm volatile("csrr %0, stimecmp" : "=r" (x) );
|
||||||
|
asm volatile("csrr %0, 0x14d" : "=r" (x) );
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
w_stimecmp(uint64 x)
|
w_stimecmp(uint64 x)
|
||||||
{
|
{
|
||||||
asm volatile("csrw stimecmp, %0" : : "r" (x));
|
// asm volatile("csrw stimecmp, %0" : : "r" (x));
|
||||||
|
asm volatile("csrw 0x14d, %0" : : "r" (x));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Machine Environment Configuration Register
|
// Machine Environment Configuration Register
|
||||||
|
|
Loading…
Add table
Reference in a new issue