Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix incorrect return to physical address upon ITLB page fault exception

When returning from itlb page fault we need to return to
the virtual address which caused the page fault and not the physical address.
We therefore overwrite the content of "ea" (exception address) register with
the result of rcsr ITLBMA.
  • Loading branch information...
commit 0b65466c149be9125e05cc9d7a72210bfb943d63 1 parent 4225524
Yann Sionneau authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  software/mmu-bios/crt0.S
3  software/mmu-bios/crt0.S
View
@@ -122,11 +122,12 @@ _dtlb_miss_exception_handler:
_itlb_miss_exception_handler:
sw (sp+0), ra
calli .save_all
+ rcsr r1, itlbma /* get virtual address which caused the page fault */
+ mv ea, r1 /* when returning from exception we branch back to that virtual address */
calli itlb_miss_handler
bi .restore_all_and_eret
nop
nop
- nop
macaddress:
.byte 0x10
Please sign in to comment.
Something went wrong with that request. Please try again.