source: rtems/c/src/lib/libbsp/arm/altera-cyclone-v/startup/bspclean.c @ e56090ef

5
Last change on this file since e56090ef was d62dfc7, checked in by Sebastian Huber <sebastian.huber@…>, on 11/24/15 at 07:33:52

bsp/altera-cyclone-v: Add fatal extension handler

  • Property mode set to 100644
File size: 915 bytes
Line 
1/*
2 * Copyright (c) 2015 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <info@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#include <bsp.h>
16#include <bsp/bootcard.h>
17#include <rtems/bspIo.h>
18#include <rtems/score/smpimpl.h>
19
20void bsp_fatal_extension(
21  rtems_fatal_source src,
22  bool is_internal,
23  rtems_fatal_code code
24)
25{
26#ifdef RTEMS_SMP
27  if (src == RTEMS_FATAL_SOURCE_SMP && code == SMP_FATAL_SHUTDOWN_RESPONSE) {
28    while (true) {
29      _ARM_Wait_for_event();
30    }
31  }
32#endif
33
34#if BSP_PRINT_EXCEPTION_CONTEXT
35  if (src == RTEMS_FATAL_SOURCE_EXCEPTION) {
36    rtems_exception_frame_print((const rtems_exception_frame *) code);
37  }
38#endif
39
40#if BSP_RESET_BOARD_AT_EXIT
41  bsp_reset();
42#endif
43}
Note: See TracBrowser for help on using the repository browser.