mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
ScoreIsrValIsr checks that the context which an interrupt during the multitasking start interrupted ran on the stack of the thread which was running. A wrapper of the interrupt dispatch of the architecture takes the address of that stack, and there is one for six architectures only. Everywhere else the address stays zero, the check cannot pass, and it reports nothing but a line number, which says neither that the architecture is unsupported nor what was expected. Add the wrapper for mips, i386 and x86_64, and say in the check what a zero address means, so that the next port is told why it fails rather than left to find out. The frame which the mips dispatch receives is built on the stack of the interrupted context, so the address of the frame is an address within that stack. Its stack pointer member is not used. Only the path which the debugger stub takes fills it, and the interrupt path leaves it zero. The two x86 ports keep the frame base of the interrupted context in the frame pointer register and may then switch to the interrupt stack, so the wrapper has to take the value before the compiler establishes a frame of its own. A register variable does not do that, because the compiler emits its prologue first and the wrapper then reads its own frame. They get the same treatment as sparc, which has the problem for the same reason. Close #5712. Assisted-by: Claude:claude-opus-5 claude-code Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>