menvcfg -> 0x30a
This commit is contained in:
parent
56aacf5261
commit
53c5c818d3
@ -196,14 +196,16 @@ static inline uint64
|
||||
r_menvcfg()
|
||||
{
|
||||
uint64 x;
|
||||
asm volatile("csrr %0, menvcfg" : "=r" (x) );
|
||||
// asm volatile("csrr %0, menvcfg" : "=r" (x) );
|
||||
asm volatile("csrr %0, 0x30a" : "=r" (x) );
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline void
|
||||
w_menvcfg(uint64 x)
|
||||
{
|
||||
asm volatile("csrw menvcfg, %0" : : "r" (x));
|
||||
//asm volatile("csrw menvcfg, %0" : : "r" (x));
|
||||
asm volatile("csrw 0x30a, %0" : : "r" (x));
|
||||
}
|
||||
|
||||
// Physical Memory Protection
|
||||
|
||||
Loading…
Reference in New Issue
Block a user