提交 6af3f92c 编写于 作者: W William Wang

mmu: ignore crosspage ipf caused xtval mismatch

上级 3f072846
...@@ -137,7 +137,11 @@ int force_raise_pf(vaddr_t vaddr, int type){ ...@@ -137,7 +137,11 @@ int force_raise_pf(vaddr_t vaddr, int type){
} }
if (cpu.mode == MODE_M) { if (cpu.mode == MODE_M) {
mtval->val = cpu.disambiguation_state.mtval; mtval->val = cpu.disambiguation_state.mtval;
if(vaddr != cpu.disambiguation_state.mtval){ if(
vaddr != cpu.disambiguation_state.mtval &&
// cross page ipf caused mismatch is legal
!((vaddr & 0xfff) == 0xffe && (cpu.disambiguation_state.mtval & 0xfff) == 0x000)
){
printf("[WRANING] nemu mtval %lx does not match core mtval %lx\n", printf("[WRANING] nemu mtval %lx does not match core mtval %lx\n",
vaddr, vaddr,
cpu.disambiguation_state.mtval cpu.disambiguation_state.mtval
...@@ -145,7 +149,11 @@ int force_raise_pf(vaddr_t vaddr, int type){ ...@@ -145,7 +149,11 @@ int force_raise_pf(vaddr_t vaddr, int type){
} }
} else { } else {
stval->val = cpu.disambiguation_state.stval; stval->val = cpu.disambiguation_state.stval;
if(vaddr != cpu.disambiguation_state.stval){ if(
vaddr != cpu.disambiguation_state.stval &&
// cross page ipf caused mismatch is legal
!((vaddr & 0xfff) == 0xffe && (cpu.disambiguation_state.stval & 0xfff) == 0x000)
){
printf("[WRANING] nemu stval %lx does not match core stval %lx\n", printf("[WRANING] nemu stval %lx does not match core stval %lx\n",
vaddr, vaddr,
cpu.disambiguation_state.stval cpu.disambiguation_state.stval
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册