Discussion:
[OpenRISC] EEAR is not enough.
Matt Thomas
2014-09-05 17:19:46 UTC
Permalink
On a data page fault or dtlb miss, the exception handler doesn't know why it failed. Was it protection fault? was it for a read or a write? On a bus error, it's even worse since you have no idea whatsoever what caused.

A symdrome register indicating why the fault happened would be nice (for l.sys, the syscall number could be placed in it). Otherwise the kernel is forced to read the instruction to determine the fault.
Stefan Kristiansson
2014-09-06 12:52:37 UTC
Permalink
Post by Matt Thomas
On a data page fault or dtlb miss, the exception handler doesn't know why it failed. Was it protection fault? was it for a read or a write? On a bus error, it's even worse since you have no idea whatsoever what caused.
A symdrome register indicating why the fault happened would be nice (for l.sys, the syscall number could be placed in it). Otherwise the kernel is forced to read the instruction to determine the fault.
The only information you need to know is if it was a read or write, if
it was a dtlb miss, you don't care about that information (unless the
miss ends up as a fault).
If it was a data page fault exception, then it was a protection fault.

Once you go into the slow data page fault handler, reading the
instruction isn't much of an overhead, or are there other concerns you
have over reading the instruction?

Stefan

Loading...