RTEMS | Draft: Simplify termination procedure (!121)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Wed Aug 14 23:33:11 UTC 2024
Sebastian Huber commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/121#note_111047
The function is declared in `<bsp/bootcard.h>`:
```c
RTEMS_NO_RETURN void bsp_reset(rtems_fatal_source source, rtems_fatal_code code);
```
The system termination changes are something for the hand written release notes. In existing applications, you can use RTEMS version defines to ensure compatibility to a certain RTEMS version.
The sparc `bsp_reset()` uses a system call with two parameters to do the reset:
```c
SYM(bsp_reset):
SYM(sparc_syscall_exit):
mov SYS_exit, %g1
mov %o0, %g2 ! Additional exit code 1
mov %o1, %g3 ! Additional exit code 2
ta SPARC_SWTRAP_SYSCALL
```
Another use case could be to save the source/code in a reset safe register. After reset, the boot code could check this register and do do some actions depending on the reset cause.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/121#note_111047
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240814/b0a8d43f/attachment-0001.htm>
More information about the bugs
mailing list