Re:Ratification of the RISC-V Base ISA and Privileged Archit...
by amluto on Wednesday July 10, 2019 @07:29PM
(#20407663)
I haven’t read the latest version, but early versions had a mechanism for kernel entries that was too simple. An interrupt that happened right after a kernel entry but before any instructions executed would be unrecoverable. A good CPU design should help enough with exceptions and interrupts that state won’t be lost.
As an example of the wrong approach, x86’s SYSENTER just switches to kernel mode and updates the program counter. x86’s interrupts are better — they push all clobbered state to the stack.
As an example of the wrong approach, x86’s SYSENTER just switches to kernel mode and updates the program counter. x86’s interrupts are better — they push all clobbered state to the stack.