source: rtems/testsuites/sptests/spfatal08/testcase.h @ c199cf8

4.104.114.95
Last change on this file since c199cf8 was c199cf8, checked in by Joel Sherrill <joel.sherrill@…>, on 05/12/08 at 18:44:30

2008-05-12 Joel Sherrill <joel.sherrill@…>

  • spfatal/fatal.c, spfatal06/testcase.h, spfatal07/testcase.h, spfatal08/testcase.h, spfatal09/testcase.h, spfatal10/testcase.h: Refactored and renamed initialization routines to rtems_initialize_data_structures, rtems_initialize_before_drivers, rtems_initialize_device_drivers, and rtems_initialize_start_multitasking. This opened the sequence up so that bootcard() could provide a more robust and flexible framework which is easier to explain and understand. This also lays the groundwork for sharing the division of available memory between the RTEMS workspace and heap and the C library initialization across all BSPs.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 * Classic API Init task create failure
3 *
4 *  $Id$
5 */
6
7/*
8 *  Way too much stack space.  Should generate a fatal error
9 *  on the init task create.
10 */
11#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE
12#define CONFIGURE_INIT_TASK_STACK_SIZE   RTEMS_MINIMUM_STACK_SIZE
13rtems_initialization_tasks_table Initialization_tasks[] = {
14  { rtems_build_name('I', 'N', 'I', ' '),
15    RTEMS_MINIMUM_STACK_SIZE,
16    1,
17    RTEMS_DEFAULT_ATTRIBUTES,
18    Init,
19    RTEMS_DEFAULT_MODES,
20    0
21  }
22};
23#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks
24#define CONFIGURE_INIT_TASK_TABLE_SIZE \
25  sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)
26
27#define FATAL_ERROR_DESCRIPTION          "Core workspace too small"
28#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_CORE
29#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
30#define FATAL_ERROR_EXPECTED_ERROR       INTERNAL_ERROR_WORKSPACE_ALLOCATION
31
32char Workspace[ 64 * 1024 ] CPU_STRUCTURE_ALIGNMENT;
33
34void force_error()
35{
36  rtems_configuration_table New_Configuration;
37  New_Configuration = *_Configuration_Table;
38 
39  New_Configuration.work_space_start = Workspace;
40  New_Configuration.work_space_size  = 256;
41
42  rtems_initialize_data_structures( &New_Configuration );
43  /* we will not run this far */
44}
Note: See TracBrowser for help on using the repository browser.