cpukit/score/cpu/mips: Add the exception resume

The port had no _CPU_Exception_resume().  A fatal error extension
which inspects an exception frame could not continue the interrupted
context.  Every exception therefore ended the system.

The chain which reaches such an extension ends in a fatal error.  No
function of that chain returns, so no function of it puts a call-saved
register back.  _Terminate() also clears the interrupt enable before
it calls the extensions.  The frame is the only source of s0 to s7 and
of the interrupt level.

Add the routine.  It restores the registers which the interrupted
context owns and continues at the exception program counter of the
frame.  The header comment of the file names the registers which it
leaves out and the reason for each.

Update #5754.

Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber
2026-09-21 20:02:55 -05:00
committed by Kinsey Moore
parent a8a7319a1d
commit a29441c5f6
3 changed files with 216 additions and 0 deletions
@@ -70,6 +70,8 @@ void _CPU_Context_volatile_clobber( uintptr_t pattern );
void _CPU_Context_validate( uintptr_t pattern );
RTEMS_NO_RETURN void _CPU_Exception_resume( CPU_Exception_frame *frame );
static inline void _CPU_Instruction_illegal( void )
{
__asm__ volatile ( ".word -1" );
File diff suppressed because it is too large Load Diff
+1
View File
@@ -29,5 +29,6 @@ source:
- cpukit/score/cpu/mips/cpu.c
- cpukit/score/cpu/mips/cpu_asm.S
- cpukit/score/cpu/mips/mips-context-validate.S
- cpukit/score/cpu/mips/mips-exception-resume.S
- cpukit/score/cpu/mips/mips-context-volatile-clobber.S
type: build