diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2014-05-19 17:27:55 +0200 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2014-10-06 09:34:24 +0200 |
commit | ce4a7ae9da4c0999ac3ff90603e8198f136171b5 (patch) | |
tree | c7ee8bd590f355f5728579d5cf6337664262f6f4 /c/src/lib/libbsp/sparc/shared/startup | |
parent | SPARC BSPs: remove BSP_fatal_return unreached code (diff) | |
download | rtems-ce4a7ae9da4c0999ac3ff90603e8198f136171b5.tar.bz2 |
SPARC: add BSP specific error handler
Instead of calling the system call TA instruction directly it
is better paractise to isolate the trap implementation to the
system call functions.
BSP_fatal_exit() is added.
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/startup')
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/startup/bsp_fatal_exit.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/startup/bsp_fatal_exit.c b/c/src/lib/libbsp/sparc/shared/startup/bsp_fatal_exit.c new file mode 100644 index 0000000000..c7ba6c2b87 --- /dev/null +++ b/c/src/lib/libbsp/sparc/shared/startup/bsp_fatal_exit.c @@ -0,0 +1,19 @@ +/** + * @file + * @ingroup sparc_bsp + * @brief ERC32/LEON2/LEON3 BSP specific exit handler. + * + * COPYRIGHT (c) 2014. + * Aeroflex Gaisler AB. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#include <rtems.h> + +void BSP_fatal_exit(uint32_t error) +{ + sparc_syscall_exit(RTEMS_FATAL_SOURCE_BSP, error); +} |