Merge branch 'riscv64-pmp' into 'master'
riscv64-nemu,cte: set PMP before entering S-mode See merge request projectn/nexus-am!33
This commit is contained in:
commit
ee66350b06
|
@ -37,6 +37,10 @@ void __am_init_cte64() {
|
|||
asm volatile("csrw mideleg, %0" : : "r"(0xffff));
|
||||
asm volatile("csrw medeleg, %0" : : "r"(0xffff));
|
||||
|
||||
// set PMP to access all memory in S-mode
|
||||
asm volatile("csrw pmpaddr0, %0" : : "r"(-1));
|
||||
asm volatile("csrw pmpcfg0, %0" : : "r"(31));
|
||||
|
||||
init_timer();
|
||||
|
||||
// enter S-mode
|
||||
|
|
Loading…
Reference in New Issue