1 | /* |
---|
2 | * Copyright (c) 2012 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Obere Lagerstr. 30 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@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 | #ifdef HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <bsp.h> |
---|
20 | #include <bsp/bootcard.h> |
---|
21 | |
---|
22 | #include <rtems/test.h> |
---|
23 | |
---|
24 | const char rtems_test_name[] = "SPINTERNALERROR 1"; |
---|
25 | |
---|
26 | #define FATAL_SOURCE 0xdeadbeef |
---|
27 | |
---|
28 | #define FATAL_IS_INTERNAL false |
---|
29 | |
---|
30 | #define FATAL_ERROR 0x600df00d |
---|
31 | |
---|
32 | void boot_card( const char *cmdline ) |
---|
33 | { |
---|
34 | _Terminate( FATAL_SOURCE, FATAL_IS_INTERNAL, FATAL_ERROR ); |
---|
35 | } |
---|
36 | |
---|
37 | static void fatal_extension( |
---|
38 | Internal_errors_Source source, |
---|
39 | bool is_internal, |
---|
40 | Internal_errors_t error |
---|
41 | ) |
---|
42 | { |
---|
43 | rtems_test_begink(); |
---|
44 | |
---|
45 | if ( |
---|
46 | source == FATAL_SOURCE |
---|
47 | && is_internal == FATAL_IS_INTERNAL |
---|
48 | && error == FATAL_ERROR |
---|
49 | ) { |
---|
50 | rtems_test_endk(); |
---|
51 | } |
---|
52 | } |
---|
53 | |
---|
54 | static void *idle_body(uintptr_t ignored) |
---|
55 | { |
---|
56 | while ( true ) { |
---|
57 | /* Do nothing */ |
---|
58 | } |
---|
59 | |
---|
60 | return NULL; |
---|
61 | } |
---|
62 | |
---|
63 | #define CONFIGURE_INITIAL_EXTENSIONS \ |
---|
64 | { .fatal = fatal_extension }, \ |
---|
65 | RTEMS_TEST_INITIAL_EXTENSION |
---|
66 | |
---|
67 | #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER |
---|
68 | |
---|
69 | #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
70 | |
---|
71 | #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY |
---|
72 | |
---|
73 | #define CONFIGURE_SCHEDULER_ENTRY_POINTS NULL |
---|
74 | |
---|
75 | #define CONFIGURE_SCHEDULER_USER |
---|
76 | |
---|
77 | #define CONFIGURE_MEMORY_FOR_SCHEDULER 0 |
---|
78 | |
---|
79 | #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER 0 |
---|
80 | |
---|
81 | #define CONFIGURE_TASK_STACK_ALLOCATOR NULL |
---|
82 | |
---|
83 | #define CONFIGURE_TASK_STACK_DEALLOCATOR NULL |
---|
84 | |
---|
85 | #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION |
---|
86 | |
---|
87 | #define CONFIGURE_IDLE_TASK_BODY idle_body |
---|
88 | |
---|
89 | #define CONFIGURE_INIT |
---|
90 | |
---|
91 | #include <rtems/confdefs.h> |
---|