Changeset 6aa25da in rtems


Ignore:
Timestamp:
Dec 4, 2007, 10:19:19 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
4216c57
Parents:
ee29de05
Message:

2007-12-04 Joel Sherrill <joel.sherrill@…>

  • sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/src/exinit.c, score/include/rtems/system.h, score/src/isr.c: Move interrupt_stack_size field from CPU Table to Configuration Table. Eliminate CPU Table from all ports. Delete references to CPU Table in all forms.
Location:
cpukit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    ree29de05 r6aa25da  
     12007-12-04      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * sapi/include/confdefs.h, sapi/include/rtems/config.h,
     4        sapi/include/rtems/init.h, sapi/src/exinit.c,
     5        score/include/rtems/system.h, score/src/isr.c: Move
     6        interrupt_stack_size field from CPU Table to Configuration Table.
     7        Eliminate CPU Table from all ports. Delete references to CPU Table in
     8        all forms.
     9
    1102007-12-04      Joel Sherrill <joel.sherrill@oarcorp.com>
    211
  • cpukit/sapi/include/confdefs.h

    ree29de05 r6aa25da  
    163163#endif
    164164
    165 /*
    166  *  Interrupt Stack Space
    167  *
    168  *  NOTE: There is currently no way for the application to override
    169  *        the interrupt stack size set by the BSP.
    170  */
    171 
    172 #if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
    173 #undef CONFIGURE_INTERRUPT_STACK_MEMORY
    174 #define CONFIGURE_INTERRUPT_STACK_MEMORY 0
    175 #else
    176   #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
    177   #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
    178   #endif
    179 #endif
    180165
    181166/*
     
    207192    #define CONFIGURE_IDLE_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
    208193  #endif
     194#endif
     195
     196/*
     197 *  Interrupt stack size configuration
     198 *
     199 *  By default, the interrupt stack will be of minimum size.
     200 *  The BSP or application may override this value.
     201 */
     202#ifndef CONFIGURE_INTERRUPT_STACK_SIZE
     203  #ifdef BSP_INTERRUPT_STACK_SIZE
     204    #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE
     205  #else
     206    #define CONFIGURE_INTERRUPT_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
     207  #endif
     208#endif
     209
     210/* XXX try to get to the point where all BSP support allocating the
     211 * XXX memory from the Workspace
     212 */
     213#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
     214  #undef CONFIGURE_INTERRUPT_STACK_SIZE
     215  #define CONFIGURE_INTERRUPT_STACK_SIZE 0
    209216#endif
    210217
     
    10991106    ((PRIORITY_MAXIMUM+1) * sizeof(Chain_Control)) + /* Ready chains */ \
    11001107    256 +                                 /* name/ptr table overhead */ \
    1101     CONFIGURE_INTERRUPT_STACK_MEMORY +    /* interrupt stack */ \
     1108    CONFIGURE_INTERRUPT_STACK_SIZE  +     /* interrupt stack */ \
    11021109    CONFIGURE_API_MUTEX_MEMORY            /* allocation mutex */ \
    11031110  )
     
    12471254  CONFIGURE_IDLE_TASK_BODY,                  /* user's IDLE task */
    12481255  CONFIGURE_IDLE_TASK_STACK_SIZE,            /* IDLE task stack size */
     1256  CONFIGURE_INTERRUPT_STACK_SIZE,            /* interrupt stack size */
    12491257  CONFIGURE_TASK_STACK_ALLOCATOR,            /* stack allocator */
    12501258  CONFIGURE_TASK_STACK_DEALLOCATOR,          /* stack deallocator */
  • cpukit/sapi/include/rtems/config.h

    ree29de05 r6aa25da  
    122122  uint32_t                       idle_task_stack_size;
    123123
     124  /** This field specifies the size of the interrupt stack.  If less than or
     125   *  equal to the minimum stack size, then the interrupt stack will be of
     126   *  minimum stack size.
     127   */
     128  uint32_t                       interrupt_stack_size;
     129
    124130  /** The BSP may want to provide it's own stack allocation routines.
    125131   *  In this case, the BSP will provide this stack allocation hook.
     
    192198#define rtems_configuration_get_idle_task_stack_size() \
    193199        (_Configuration_Table->idle_task_stack_size)
     200
     201#define rtems_configuration_get_interrupt_stack_size() \
     202        (_Configuration_Table->interrupt_stack_size)
    194203
    195204#define rtems_configuration_get_stack_allocate_hook() \
     
    221230        (_Configuration_Table->user_extension_table)
    222231
    223 #define rtems_configuration_get_user_multiprocessing_table() \
    224         (_Configuration_Table->User_multiprocessing_table)
     232#if defined(RTEMS_MULTIPROCESSING)
     233  #define rtems_configuration_get_user_multiprocessing_table() \
     234          (_Configuration_Table->User_multiprocessing_table)
     235#else
     236  #define rtems_configuration_get_user_multiprocessing_table() NULL
     237#endif
    225238
    226239#define rtems_configuration_get_rtems_api_configuration() \
  • cpukit/sapi/include/rtems/init.h

    ree29de05 r6aa25da  
    5858
    5959rtems_interrupt_level rtems_initialize_executive_early(
    60   rtems_configuration_table *configuration_table,
    61   rtems_cpu_table           *cpu_table
     60  rtems_configuration_table *configuration_table
    6261);
    6362
  • cpukit/sapi/src/exinit.c

    ree29de05 r6aa25da  
    6363
    6464rtems_interrupt_level rtems_initialize_executive_early(
    65   rtems_configuration_table *configuration_table,
    66   rtems_cpu_table           *cpu_table
     65  rtems_configuration_table *configuration_table
    6766)
    6867{
     
    8685    );
    8786
    88   if ( cpu_table == NULL )
    89     _Internal_error_Occurred(
    90       INTERNAL_ERROR_CORE,
    91       TRUE,
    92       INTERNAL_ERROR_NO_CPU_TABLE
    93     );
    94 
    95   /*
    96    *  Grab our own copy of the user's CPU table.
    97    */
    98   _CPU_Table = *cpu_table;
    99 
    10087  /*
    10188   *  Provide pointers just for later convenience.
     
    10693   * Initialize any target architecture specific support as early as possible
    10794   */
    108   _CPU_Initialize( cpu_table, _Thread_Dispatch );
     95  _CPU_Initialize( _Thread_Dispatch );
    10996
    11097#if defined(RTEMS_MULTIPROCESSING)
  • cpukit/score/include/rtems/system.h

    ree29de05 r6aa25da  
    188188extern const char _Copyright_Notice[];
    189189
    190 /**
    191  *  The following defines the CPU dependent information table.
    192  */
    193 SCORE_EXTERN rtems_cpu_table _CPU_Table;
    194 
    195 /*
    196  *  Macros to access CPU Table fields required by ALL ports.
    197  */
    198 
    199 /** This macro assists in accessing the CPU Specific Configuration Table. */
    200 #define rtems_cpu_configuration_get_table() (&_CPU_Table)
    201 
    202 /** This macro assists in accessing the pretasking BSP hook. */
    203 #define rtems_cpu_configuration_get_pretasking_hook() \
    204    (_CPU_Table.pretasking_hook)
    205 
    206 /** This macro assists in accessing the predriver BSP hook. */
    207 #define rtems_cpu_configuration_get_predriver_hook() \
    208    (_CPU_Table.predriver_hook)
    209 
    210 /** This macro assists in accessing the postdriver BSP hook. */
    211 #define rtems_cpu_configuration_get_postdriver_hook() \
    212    (_CPU_Table.postdriver_hook)
    213 
    214 /** This macro assists in accessing the interrupt stack size. */
    215 #define rtems_cpu_configuration_get_interrupt_stack_size() \
    216    (_CPU_Table.interrupt_stack_size)
    217 
    218190/** This macro defines the maximum length of a Classic API name. */
    219191#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
  • cpukit/score/src/isr.c

    ree29de05 r6aa25da  
    2222#include <rtems/score/interr.h>
    2323#include <rtems/score/wkspace.h>
     24#include <rtems/config.h>
    2425
    2526/*  _ISR_Handler_initialization
     
    4647#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
    4748
    48   if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE )
     49  if ( _Configuration_Table->interrupt_stack_size < STACK_MINIMUM_SIZE )
    4950    _Internal_error_Occurred(
    5051      INTERNAL_ERROR_CORE,
     
    5354    );
    5455
    55   _CPU_Interrupt_stack_low =
    56     _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size );
     56  _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
     57    _Configuration_Table->interrupt_stack_size
     58  );
    5759
    5860  _CPU_Interrupt_stack_high = _Addresses_Add_offset(
    5961    _CPU_Interrupt_stack_low,
    60     _CPU_Table.interrupt_stack_size
     62    _Configuration_Table->interrupt_stack_size
    6163  );
    6264
Note: See TracChangeset for help on using the changeset viewer.