Changeset 2fbdbd4 in rtems


Ignore:
Timestamp:
05/24/00 14:36:52 (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
2c8485b
Parents:
1a9006a
Message:

Significantly lowered the default memory requirements:

  • CONFIGURE_RTEMS_INIT_TASKS_TABLE was 10 now 0
  • CONFIGURE_POSIX_INIT_THREAD_TABLE was 10 now 0
  • CONFIGURE_ITRON_INIT_TASK_TABLE was 10 now 0
  • CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS was 20 now 3
  • added CONFIGURE_NUMBER_OF_TERMIOS_PORTS and defaulted to 1
  • added CONFIGURE_TERMIOS_DISABLED defaulted to "enabled"
  • miniIMFS is now the default

Added configuration error checks that:

+ Ensure > 0 tasks/threads are configured
+ Ensure at least one inititalization task/thread is defined

bsp.h now defines so BSP specific requirements are accounted for:

+ CONFIGURE_NUMBER_OF_TERMIOS_PORTS
+ CONFIGURE_INTERRUPT_STACK_MEMORY

console_reserve_resources and rtems_termios_reserve_resources
are no longer required and considered obsolete. Calls to
rtems_termios_reserve_resources have been eliminated although
the routine is still there and the body "if 0'ed".

We are very close to having NO reason to modify the
configuration tables in the BSP. Be warned that eventually
we would like to see the need for BSP_Configuration
eliminated!

Location:
c/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/sapi/include/confdefs.h

    r1a9006a r2fbdbd4  
    22 *
    33 *  This include file contains the configuration table template that will
    4  *  be used by the single processor tests to define its default configuration
    5  *  parameters.
     4 *  be instantiated by an application based on the setting of a number
     5 *  of macros.  The macros are documented in the Configuring a System
     6 *  chapter of the Classic API User's Guide
    67 *
     8 *  The model is to estimate the memory required for each configured item
     9 *  and sum those estimates.  The estimate can be too high or too low for
     10 *  a variety of reasons:
     11 *
     12 *  Reasons estimate is too high:
     13 *    + FP contexts (not all tasks are FP)
     14 *
     15 *  Reasons estimate is too low:
     16 *    + stacks greater than minimum size
     17 *    + messages
     18 *    + application must account for device driver resources
     19 *    + application must account for add-on library resource requirements
     20 *
     21 *  NOTE:  Eventually this may be able to take into account some of
     22 *         the above.  This procedure has evolved from just enough to
     23 *         support the RTEMS Test Suites into something that can be
     24 *         used remarkably reliably by most applications.
    725 *  COPYRIGHT (c) 1989-1999.
    826 *  On-Line Applications Research Corporation (OAR).
     
    4260#define CONFIGURE_MALLOC_REGION 1
    4361
     62/*
     63 *  File descriptors managed by libio
     64 */
     65
    4466#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
    45 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
     67#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3
    4668#endif
    4769
     
    5476
    5577/*
     78 *  Termios resources
     79 */
     80
     81#ifdef CONFIGURE_TERMIOS_DISABLED
     82#define CONFIGURE_TERMIOS_SEMAPHORES 0
     83#else
     84
     85#ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS
     86#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
     87#endif
     88
     89#define CONFIGURE_TERMIOS_SEMAPHORES \
     90  ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
     91#endif
     92
     93/*
    5694 *  Mount Table Configuration
    5795 */
     
    63101#ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE
    64102rtems_filesystem_mount_table_t configuration_mount_table = {
    65 #ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
     103#ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
     104  &IMFS_ops,
     105#else  /* using miniIMFS as base filesystem */
    66106  &miniIMFS_ops,
    67 #else  /* using IMFS as base filesystem */
    68   &IMFS_ops,
    69107#endif
    70108  RTEMS_FILESYSTEM_READ_WRITE,
     
    95133/*
    96134 *  Interrupt Stack Space
     135 *
     136 *  NOTE: There is currently no way for the application to override
     137 *        the interrupt stack size set by the BSP.
    97138 */
    98139
    99140#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
     141#undef CONFIGURE_INTERRUPT_STACK_MEMORY
    100142#define CONFIGURE_INTERRUPT_STACK_MEMORY 0
    101143#else
    102144  #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
    103145  #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
    104   #else
    105   #define CONFIGURE_INTERRUPT_STACK_MEMORY 0
    106146  #endif
    107147#endif
     
    246286
    247287/*
    248  *  Default Configuration Table.  This table contains the most values set in
    249  *  the RTEMS Test Suite.  Each value may be overridden within each test to
    250  *  customize the environment.
     288 *  Default Multiprocessing Configuration Table.  The defaults are
     289 *  appropriate for most of the RTEMS Multiprocessor Test Suite.  Each
     290 *  value may be overridden within each test to customize the environment.
    251291 */
    252292
     
    296336 
    297337/*
    298  *  Default Configuration Table.  This table contains the most values set in
    299  *  the RTEMS Test Suite.  Each value may be overridden within each test to
    300  *  customize the environment.
     338 *  Default Configuration Table. 
    301339 */
    302340
     
    308346
    309347#ifndef CONFIGURE_MAXIMUM_TASKS
    310 #define CONFIGURE_MAXIMUM_TASKS               10
     348#define CONFIGURE_MAXIMUM_TASKS               0
    311349#endif
    312350
     
    394432
    395433#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
    396 #define CONFIGURE_MAXIMUM_POSIX_THREADS      10
     434#define CONFIGURE_MAXIMUM_POSIX_THREADS      0
    397435#endif
    398436
     
    431469/*
    432470 *  The user is defining their own table information and setting the
    433  *  appropriate variables.
     471 *  appropriate variables for the POSIX Initialization Thread Table.
    434472 */
    435473 
     
    548586
    549587#ifndef CONFIGURE_MAXIMUM_ITRON_TASKS
    550 #define CONFIGURE_MAXIMUM_ITRON_TASKS      10
     588#define CONFIGURE_MAXIMUM_ITRON_TASKS      0
    551589#endif
    552590
     
    585623/*
    586624 *  The user is defining their own table information and setting the
    587  *  appropriate variables.
     625 *  appropriate variables for the ITRON Initialization Task Table.
    588626 */
    589627
     
    710748/*
    711749 *  Calculate the RAM size based on the maximum number of objects configured.
    712  *  The model is to estimate the memory required for each configured item,
    713  *  sum the memory requirements and insure that there is at least 32K greater
    714  *  than that for things not directly addressed such as:
    715  *
    716  *    + stacks greater than minimum size
    717  *    + FP contexts
    718  *    + API areas (should be optional)
    719  *    + messages
    720  *    + object name and local pointer table overhead
    721  *    + per node memory requirements
    722  *    + executive fixed requirements (including at least internal threads
    723  *       and the Ready chains)
    724  *
    725  *  NOTE:  Eventually this should take into account some of the above.
    726  *         Basically, this is a "back of the envelope" estimate for
    727  *         memory requirements.  It could be more accurate.
    728750 */
    729751
     
    823845   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
    824846   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
    825      CONFIGURE_LIBIO_SEMAPHORES) + \
     847     CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \
    826848   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
    827849   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
     
    873895  CONFIGURE_MAXIMUM_TASKS,
    874896  CONFIGURE_MAXIMUM_TIMERS,
    875   CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES,
     897  CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES +
     898    CONFIGURE_TERMIOS_SEMAPHORES,
    876899  CONFIGURE_MAXIMUM_MESSAGE_QUEUES,
    877900  CONFIGURE_MAXIMUM_PARTITIONS,
     
    949972#endif
    950973 
     974/*
     975 *  Some warnings and error checking
     976 */
     977
     978/*
     979 *  Make sure a task/thread of some sort is configured
     980 */
     981
     982#if (CONFIGURE_MAXIMUM_TASKS == 0) && \
     983    (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
     984    (CONFIGURE_MAXIMUM_ADA_TASKS == 0) &&  \
     985    (CONFIGURE_MAXIMUM_ITRON_TASKS == 0)
     986#error "CONFIGURATION ERROR: No tasks or threads configured!!
     987#endif
     988
     989/*
     990 *  Make sure at least one of the initialization task/thread
     991 *  tables was defined.
     992 */
     993
     994#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
     995    !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
     996    !defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
     997#error "CONFIGURATION ERROR: No initialization tasks or threads configured!!
     998#endif
     999
    9511000#endif
    9521001/* end of include file */
  • c/src/lib/include/console.h

    r1a9006a r2fbdbd4  
    2424  { console_initialize, console_open, console_close, \
    2525    console_read, console_write, console_control }
    26 
    27 void console_reserve_resources(
    28   rtems_configuration_table *configuration
    29 );
    3026
    3127rtems_device_driver console_initialize(
  • c/src/lib/libbsp/a29k/portsw/include/bsp.h

    r1a9006a r2fbdbd4  
    2525#include <console.h>
    2626#include <clockdrv.h>
     27
     28/*
     29 *  confdefs.h overrides for this BSP:
     30 *   - number of termios serial ports (defaults to 1)
     31 *   - Interrupt stack space is not minimum if defined.
     32 */
     33
     34/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
     35#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
    2736
    2837/*
  • c/src/lib/libbsp/a29k/portsw/startup/bspstart.c

    r1a9006a r2fbdbd4  
    141141  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    142142  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    143   Cpu_table.interrupt_stack_size = 4096;
     143  Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
    144144
    145145  _settrap( 109,&a29k_enable_sup);
  • c/src/lib/libbsp/bare/include/bsp.h

    r1a9006a r2fbdbd4  
    2525#include <console.h>
    2626#include <clockdrv.h>
     27
     28/*
     29 *  confdefs.h overrides for this BSP:
     30 *   - number of termios serial ports (defaults to 1)
     31 *   - Interrupt stack space is not minimum if defined.
     32 */
     33
     34/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
     35#define CONFIGURE_INTERRUPT_STACK_MEMORY  (12 * 1024)
    2736
    2837/*
  • c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h

    r1a9006a r2fbdbd4  
    2323#include <clockdrv.h>
    2424#include <rtems/ttydrv.h>
     25
     26/*
     27 *  confdefs.h overrides for this BSP:
     28 *   - number of termios serial ports (defaults to 1)
     29 *   - Interrupt stack space is not minimum if defined.
     30 */
     31
     32/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
     33/* #define CONFIGURE_INTERRUPT_STACK_MEMORY  (TBD * 1024) */
    2534
    2635/*
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c

    r1a9006a r2fbdbd4  
    190190
    191191    Cpu_table.do_zero_of_workspace = FALSE;
    192     Cpu_table.interrupt_stack_size = (12 * 1024);
     192    Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
    193193
    194194    /*
     
    230230    BSP_Configuration.maximum_extensions++;
    231231#endif
    232 
    233     /*
    234      * Add 1 extension for MPCI_fatal
    235      */
    236 
    237     if (BSP_Configuration.User_multiprocessing_table)
    238         BSP_Configuration.maximum_extensions++;
    239232
    240233    /*
  • c/src/lib/libbsp/i386/i386ex/console/console.c

    r1a9006a r2fbdbd4  
    9696}
    9797
    98 void console_reserve_resources(rtems_configuration_table *conf)
    99 {
    100   rtems_termios_reserve_resources(conf, 1);
    101   return;
    102 }
    103 
    10498void __assert (const char *file, int line, const char *msg)
    10599{
  • c/src/lib/libbsp/i386/i386ex/include/bsp.h

    r1a9006a r2fbdbd4  
    2626#include <irq.h>
    2727 
     28/*
     29 *  confdefs.h overrides for this BSP:
     30 *   - number of termios serial ports (defaults to 1)
     31 *   - Interrupt stack space is not minimum if defined.
     32 */
     33
     34/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
     35#define CONFIGURE_INTERRUPT_STACK_MEMORY  (8 * 1024)
     36
    2837/*
    2938 *  Define the time limits for RTEMS Test Suite test durations.
Note: See TracChangeset for help on using the changeset viewer.