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.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to