Luke Kenneth Casson Leighton
lkcl at lkcl.net
Tue Jun 11 12:50:39 BST 2019
I remembered how to do privileged isamux. The mtvec /stvec / utvec table
has to be per isamux permutation. A *short* routine in each vector point
pushes the current isamux to the stack and calls the "standard" one as a
function. On return from that function the calling trap routine pops and
sets isamux to its former value before exiting the trap.
The "per trap per isamux permutation" routines can therefore use the
opcodes that are supported in that namespace, and by calling the common
traps there is no need to recompile or rewrite all the trap handlers.
Without this permutation scheme the danger is that you have to choose a
"preferred" (default) isamux namespace, and that starts to hugely interfere
with the recursive provision of supervisor and hypervisor modes.
This was the piece of the puzzle that I had forgotten about which was
preventing me from recommending that we go ahead with isamux to give
SimpleV its own namespace.
It also means that we are free and clear to use the entirety of the RVV
opcode space for 3D and other instructions: texturisation, Z buffering, and
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
More information about the libre-riscv-dev