blob: bae9d21889c90d631cb97cd01ef9f4585ac058a9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* 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 <bsp.h>
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
#include <rtems/version.h>
void bsp_fatal_extension(
rtems_fatal_source source,
bool always_set_to_false,
rtems_fatal_code code
)
{
#if BSP_VERBOSE_FATAL_EXTENSION
printk(
"\n"
"*** FATAL ***\n"
"fatal source: %i (%s)\n"
"fatal code: %ju (0x%08jx)\n"
"RTEMS version: %s\n"
"RTEMS tools: %s\n",
source,
rtems_fatal_source_text( source ),
(uintmax_t) code,
(uintmax_t) code,
rtems_version(),
__VERSION__
);
#endif
#if (BSP_PRINT_EXCEPTION_CONTEXT) || BSP_VERBOSE_FATAL_EXTENSION
if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
rtems_exception_frame_print( (const rtems_exception_frame *) code );
}
#endif
#if (BSP_PRESS_KEY_FOR_RESET)
printk( "\nFATAL ERROR - Executive shutdown! Any key to reboot..." );
/*
* Wait for a key to be pressed
*/
while ( getchark() == -1 )
;
printk("\n");
#endif
/*
* Check both conditions -- if you want to ask for reboot, then
* you must have meant to reset the board.
*/
#if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT)
bsp_reset();
#endif
}
|