RTEMS | testsuites/validation: Fix the MicroBlaze stack (!1452)
Kinsey Moore (@opticron)
gitlab at rtems.org
Thu Aug 27 22:37:48 UTC 2026
Kinsey Moore started a new discussion on testsuites/validation/tc-score-isr.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1452#note_158200
> - register uintptr_t sp __asm__( "1" );
> -
> if ( interrupted_stack_at_multitasking_start == 0 ) {
> - interrupted_stack_at_multitasking_start = sp;
> + const Per_CPU_Control *cpu_self;
> + const uintptr_t *frame;
> +
> + /*
> + * The dispatch runs on the interrupt stack. The switch to that stack
> + * stores the stack pointer of the interrupted context at the begin of the
> + * frame at the top of the interrupt stack.
> + */
> + cpu_self = _Per_CPU_Get();
> + frame = (const uintptr_t *) ( (uintptr_t) cpu_self->interrupt_stack_high -
> + CPU_INTERRUPT_FRAME_SIZE );
> + interrupted_stack_at_multitasking_start = *frame;
This code is technically correct, but I would much prefer if it used `CPU_Exception_frame` to access r1, instead.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1452#note_158200
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-1nwjem3yef8xjhv6n6i1f940s-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260827/cee51cb7/attachment-0001.htm>
More information about the bugs
mailing list