Changeset 458bd34 in rtems


Ignore:
Timestamp:
Nov 5, 1999, 4:44:02 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
968f7742
Parents:
707f5c7
Message:

This is another pass at making sure that nothing outside the BSP
unnecessarily uses any variables defined by the BSP. On this
sweep, use of BSP_Configuration and Cpu_table was eliminated.

A significant part of this modification was the addition of
macros to access fields in the RTEMS configuration structures.

This is necessary to strengthen the division between the BSP independent
parts of RTEMS and the BSPs themselves. This started after
comments and analysis by Ralf Corsepius <corsepiu@…>.

Files:
66 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/malloc.c

    r707f5c7 r458bd34  
    3333size_t RTEMS_Malloc_Sbrk_amount;
    3434
    35 extern rtems_cpu_table   Cpu_table;
    3635#ifdef RTEMS_DEBUG
    3736#define MALLOC_STATS
     
    110109   */
    111110
    112   if ( Cpu_table.do_zero_of_workspace )
     111  if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
    113112     memset( starting_address, 0, length );
    114113
  • c/src/exec/sapi/include/confdefs.h

    r707f5c7 r458bd34  
    8181/*
    8282 *  Stack Checker Requirements
     83 *
     84 *  NOTE: This does not automatically enable reporting at program exit.
    8385 */
    8486
  • c/src/exec/sapi/include/rtems/config.h

    r707f5c7 r458bd34  
    122122 */
    123123
     124#define rtems_configuration_get_table() \
     125        (&_Configuration_Table)
     126
    124127#define rtems_configuration_get_work_space_start() \
    125128        (_Configuration_Table->work_space_start)
  • c/src/exec/score/cpu/a29k/rtems/score/cpu.h

    r707f5c7 r458bd34  
    460460  unsigned32   interrupt_stack_size;
    461461  unsigned32   extra_system_initialization_stack;
    462   unsigned32   some_other_cpu_dependent_info;
    463462}   rtems_cpu_table;
     463
     464/*
     465 *  Macros to access required entires in the CPU Table are in
     466 *  the file rtems/system.h.
     467 */
     468
     469/*
     470 *  Macros to access AMD A29K specific additions to the CPU Table
     471 */
     472
     473/* There are no CPU specific additions to the CPU Table for this port. */
    464474
    465475/*
  • c/src/exec/score/cpu/hppa1.1/rtems/score/cpu.h

    r707f5c7 r458bd34  
    239239}   rtems_cpu_table;
    240240
     241/*
     242 *  Macros to access required entires in the CPU Table are in
     243 *  the file rtems/system.h.
     244 */
     245
     246/*
     247 *  Macros to access HPPA specific additions to the CPU Table
     248 */
     249
     250#define rtems_cpu_configuration_get_spurious_handler() \
     251   (_CPU_Table.spurious_handler)
     252
     253#define rtems_cpu_configuration_get_itimer_clicks_per_microsecond() \
     254   (_CPU_Table.itimer_clicks_per_microsecond)
     255
    241256/* variables */
    242257
  • c/src/exec/score/cpu/i386/rtems/score/cpu.h

    r707f5c7 r458bd34  
    199199
    200200/*
     201 *  Macros to access required entires in the CPU Table are in
     202 *  the file rtems/system.h.
     203 */
     204
     205/*
     206 *  Macros to access i386 specific additions to the CPU Table
     207 */
     208
     209#define rtems_cpu_configuration_get_interrupt_table_segment() \
     210   (_CPU_Table.interrupt_table_segment)
     211
     212#define rtems_cpu_configuration_get_interrupt_table_offset() \
     213   (_CPU_Table.interrupt_table_offset)
     214
     215/*
    201216 *  context size area for floating point
    202217 *
  • c/src/exec/score/cpu/i960/rtems/score/cpu.h

    r707f5c7 r458bd34  
    172172  i960_PRCB *Prcb;
    173173}   rtems_cpu_table;
     174
     175/*
     176 *  Macros to access required entires in the CPU Table are in
     177 *  the file rtems/system.h.
     178 */
     179
     180/*
     181 *  Macros to access i960 specific additions to the CPU Table
     182 */
     183
     184#define rtems_cpu_configuration_get_prcb() \
     185   (_CPU_Table.Prcb)
    174186
    175187/* variables */
  • c/src/exec/score/cpu/m68k/rtems/score/cpu.h

    r707f5c7 r458bd34  
    195195  m68k_isr    *interrupt_vector_table;
    196196}   rtems_cpu_table;
     197
     198/*
     199 *  Macros to access required entires in the CPU Table are in
     200 *  the file rtems/system.h.
     201 */
     202
     203/*
     204 *  Macros to access M68K specific additions to the CPU Table
     205 */
     206
     207#define rtems_cpu_configuration_get_interrupt_vector_table() \
     208   (_CPU_Table.interrupt_vector_table)
    197209
    198210/* variables */
  • c/src/exec/score/cpu/mips/rtems/score/cpu.h

    r707f5c7 r458bd34  
    439439}   rtems_cpu_table;
    440440
     441/*
     442 *  Macros to access required entires in the CPU Table are in
     443 *  the file rtems/system.h.
     444 */
     445
     446/*
     447 *  Macros to access MIPS64ORION specific additions to the CPU Table
     448 */
     449
    441450#define rtems_cpu_configuration_get_clicks_per_microsecond() \
    442451   (_CPU_Table.clicks_per_microsecond)
  • c/src/exec/score/cpu/mips64orion/rtems/score/cpu.h

    r707f5c7 r458bd34  
    439439}   rtems_cpu_table;
    440440
     441/*
     442 *  Macros to access required entires in the CPU Table are in
     443 *  the file rtems/system.h.
     444 */
     445
     446/*
     447 *  Macros to access MIPS64ORION specific additions to the CPU Table
     448 */
     449
    441450#define rtems_cpu_configuration_get_clicks_per_microsecond() \
    442451   (_CPU_Table.clicks_per_microsecond)
  • c/src/exec/score/cpu/no_cpu/rtems/score/cpu.h

    r707f5c7 r458bd34  
    361361  /* end of fields required on all CPUs */
    362362
    363   unsigned32   some_other_cpu_dependent_info;
    364363}   rtems_cpu_table;
     364
     365/*
     366 *  Macros to access required entires in the CPU Table are in
     367 *  the file rtems/system.h.
     368 */
     369
     370/*
     371 *  Macros to access NO_CPU specific additions to the CPU Table
     372 */
     373
     374/* There are no CPU specific additions to the CPU Table for this port. */
    365375
    366376/*
  • c/src/exec/score/cpu/powerpc/mpc750/cpu.h

    r707f5c7 r458bd34  
    444444
    445445/*
     446 *  Macros to access required entires in the CPU Table are in
     447 *  the file rtems/system.h.
     448 */
     449
     450/*
     451 *  Macros to access PowerPC MPC750 specific additions to the CPU Table
     452 */
     453
     454#define rtems_cpu_configuration_get_clicks_per_usec() \
     455   (_CPU_Table.clicks_per_usec)
     456
     457#define rtems_cpu_configuration_get_exceptions_in_ram() \
     458   (_CPU_Table.exceptions_in_RAM)
     459
     460/*
    446461 *  This variable is optional.  It is used on CPUs on which it is difficult
    447462 *  to generate an "uninitialized" FP context.  It is filled in by
  • c/src/exec/score/cpu/powerpc/other_cpu/cpu.h

    r707f5c7 r458bd34  
    493493
    494494/*
     495 *  Macros to access required entires in the CPU Table are in
     496 *  the file rtems/system.h.
     497 */
     498
     499/*
     500 *  Macros to access PowerPC specific additions to the CPU Table
     501 */
     502
     503#define rtems_cpu_configuration_get_clicks_per_usec() \
     504   (_CPU_Table.clicks_per_usec)
     505
     506#define rtems_cpu_configuration_get_spurious_handler() \
     507   (_CPU_Table.spurious_handler)
     508
     509#define rtems_cpu_configuration_get_exceptions_in_ram() \
     510   (_CPU_Table.exceptions_in_RAM)
     511
     512#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
     513
     514#define rtems_cpu_configuration_get_serial_per_sec() \
     515   (_CPU_Table.serial_per_sec)
     516
     517#define rtems_cpu_configuration_get_serial_external_clock() \
     518   (_CPU_Table.serial_external_clock)
     519
     520#define rtems_cpu_configuration_get_serial_xon_xoff() \
     521   (_CPU_Table.serial_xon_xoff)
     522
     523#define rtems_cpu_configuration_get_serial_cts_rts() \
     524   (_CPU_Table.serial_cts_rts)
     525
     526#define rtems_cpu_configuration_get_serial_rate() \
     527   (_CPU_Table.serial_rate)
     528
     529#define rtems_cpu_configuration_get_timer_average_overhead() \
     530   (_CPU_Table.timer_average_overhead)
     531
     532#define rtems_cpu_configuration_get_timer_least_valid() \
     533   (_CPU_Table.timer_least_valid)
     534
     535#define rtems_cpu_configuration_get_timer_internal_clock() \
     536   (_CPU_Table.timer_internal_clock)
     537
     538#endif
     539
     540#if (defined(mpc860) || defined(mpc821))
     541#define rtems_cpu_configuration_get_clock_speed() \
     542   (_CPU_Table.clock_speed)
     543#endif
     544
     545
     546/*
    495547 *  The following type defines an entry in the PPC's trap table.
    496548 *
     
    790842    unsigned32 start, ticks, now; \
    791843    CPU_Get_timebase_low( start ) ; \
    792     ticks = (_microseconds) * Cpu_table.clicks_per_usec; \
     844    ticks = (_microseconds) * _CPU_Table.clicks_per_usec; \
    793845    do \
    794846      CPU_Get_timebase_low( now ) ; \
  • c/src/exec/score/cpu/sh/rtems/score/cpu.h

    r707f5c7 r458bd34  
    381381
    382382/*
     383 *  Macros to access required entires in the CPU Table are in
     384 *  the file rtems/system.h.
     385 */
     386
     387/*
     388 *  Macros to access SH specific additions to the CPU Table
     389 */
     390
     391/* There are no CPU specific additions to the CPU Table for this port. */
     392
     393/*
    383394 *  This variable is optional.  It is used on CPUs on which it is difficult
    384395 *  to generate an "uninitialized" FP context.  It is filled in by
  • c/src/exec/score/cpu/sparc/rtems/score/cpu.h

    r707f5c7 r458bd34  
    528528
    529529/*
     530 *  Macros to access required entires in the CPU Table are in
     531 *  the file rtems/system.h.
     532 */
     533
     534/*
     535 *  Macros to access SPARC specific additions to the CPU Table
     536 */
     537
     538/* There are no CPU specific additions to the CPU Table for this port. */
     539
     540/*
    530541 *  This variable is contains the initialize context for the FP unit.
    531542 *  It is filled in by _CPU_Initialize and copied into the task's FP
  • c/src/exec/score/cpu/unix/rtems/score/cpu.h

    r707f5c7 r458bd34  
    514514
    515515/*
     516 *  Macros to access required entires in the CPU Table are in
     517 *  the file rtems/system.h.
     518 */
     519
     520/*
     521 *  Macros to access UNIX specific additions to the CPU Table
     522 */
     523
     524/* There are no CPU specific additions to the CPU Table for this port. */
     525
     526/*
    516527 *  This variable is optional.  It is used on CPUs on which it is difficult
    517528 *  to generate an "uninitialized" FP context.  It is filled in by
  • c/src/exec/score/include/rtems/system.h

    r707f5c7 r458bd34  
    141141
    142142/*
     143 *  Macros to access CPU Table fields required by ALL ports.
     144 *
     145 *  NOTE: Similar macros to access port specific fields in in the
     146 *        appropriate cpu.h file.
     147 */
     148
     149#define rtems_cpu_configuration_get_table() \
     150   (&_CPU_Table)
     151
     152#define rtems_cpu_configuration_get_pretasking_hook() \
     153   (_CPU_Table.pretasking_hook)
     154
     155#define rtems_cpu_configuration_get_predriver_hook() \
     156   (_CPU_Table.predriver_hook)
     157
     158#define rtems_cpu_configuration_get_postdriver_hook() \
     159   (_CPU_Table.postdriver_hook)
     160
     161#define rtems_cpu_configuration_get_idle_task() \
     162   (_CPU_Table.idle_task)
     163
     164#define rtems_cpu_configuration_get_do_zero_of_workspace() \
     165   (_CPU_Table.do_zero_of_workspace)
     166
     167#define rtems_cpu_configuration_get_idle_task_stack_size() \
     168   (_CPU_Table.idle_task_stack_size)
     169
     170#define rtems_cpu_configuration_get_interrupt_stack_size() \
     171   (_CPU_Table.interrupt_stack_size)
     172
     173#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
     174   (_CPU_Table.extra_mpci_receive_server_stack)
     175
     176#define rtems_cpu_configuration_get_stack_allocate_hook() \
     177   (_CPU_Table.stack_allocate_hook)
     178
     179#define rtems_cpu_configuration_get_stack_free_hook() \
     180   (_CPU_Table.stack_free_hook)
     181
     182/*
    143183 *  XXX weird RTEMS stuff
    144184 */
  • c/src/lib/libc/malloc.c

    r707f5c7 r458bd34  
    3333size_t RTEMS_Malloc_Sbrk_amount;
    3434
    35 extern rtems_cpu_table   Cpu_table;
    3635#ifdef RTEMS_DEBUG
    3736#define MALLOC_STATS
     
    110109   */
    111110
    112   if ( Cpu_table.do_zero_of_workspace )
     111  if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
    113112     memset( starting_address, 0, length );
    114113
  • c/src/lib/libcpu/hppa1.1/clock/clock.c

    r707f5c7 r458bd34  
    2222
    2323#include <stdlib.h>                     /* for atexit() */
    24 
    25 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    2624
    2725typedef unsigned long long hppa_click_count_t;
     
    208206    future_time = Clock_clicks +
    209207      ((rtems_unsigned64) microseconds) *
    210         Cpu_table.itimer_clicks_per_microsecond;
     208        rtems_cpu_configuration_get_itimer_clicks_per_microsecond();
    211209
    212210    for (;;)
  • c/src/lib/libcpu/powerpc/mpc821/clock/clock.c

    r707f5c7 r458bd34  
    4343#include <mpc821.h>
    4444
    45 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    46 
    4745volatile rtems_unsigned32 Clock_driver_ticks;
    4846extern volatile m821_t m821;
     
    7573 
    7674  pit_value = rtems_configuration_get_microseconds_per_tick() /
    77                Cpu_table.clicks_per_usec;
     75               rtems_cpu_configuration_get_clicks_per_usec();
    7876  if (pit_value == 0) {
    7977    pit_value = 0xffff;
  • c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c

    r707f5c7 r458bd34  
    5252#define NIFACES 4        /* number of console devices (serial ports) */
    5353
    54 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    55 
    5654static Buf_t *rxBufList[NIFACES];
    5755static Buf_t *rxBufListTail[NIFACES];
     
    8886  int div16 = 0;
    8987 
    90   divisor = ((Cpu_table.clock_speed / 16) + (baud / 2)) / baud;
     88  divisor = ((rtems_cpu_configuration_get_clock_speed() / 16) +
     89              (baud / 2)) / baud;
    9190  if (divisor > 4096) {
    9291    div16 = 1;
  • c/src/lib/libcpu/powerpc/mpc821/timer/timer.c

    r707f5c7 r458bd34  
    4747#include <mpc821.h>
    4848
    49 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    50 
    5149static volatile rtems_unsigned32 Timer_starting;
    5250static rtems_boolean Timer_driver_Find_average_overhead;
     
    8684
    8785  else {
    88     if ( total < Cpu_table.timer_least_valid ) {
     86    if ( total < rtems_cpu_configuration_get_timer_least_valid() ) {
    8987      return 0;            /* below timer resolution */
    9088    }
    91     return (total - Cpu_table.timer_average_overhead);
     89    return (total - rtems_cpu_configuration_get_timer_average_overhead());
    9290  }
    9391}
  • c/src/lib/libcpu/powerpc/mpc860/clock/clock.c

    r707f5c7 r458bd34  
    4444#include <mpc860.h>
    4545
    46 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    47 
    4846volatile rtems_unsigned32 Clock_driver_ticks;
    4947extern volatile m860_t m860;
     
    7674 
    7775  pit_value = rtems_configuration_get_microseconds_per_tick() /
    78                Cpu_table.clicks_per_usec;
     76               rtems_cpu_configuration_get_clicks_per_usec();
    7977  if (pit_value == 0) {
    8078    pit_value = 0xffff;
  • c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c

    r707f5c7 r458bd34  
    5555#define NIFACES 6        /* number of console devices (serial ports) */
    5656
    57 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    58 
    5957static Buf_t *rxBufList[NIFACES];
    6058static Buf_t *rxBufListTail[NIFACES];
     
    9189  int div16 = 0;
    9290 
    93   divisor = ((Cpu_table.clock_speed / 16) + (baud / 2)) / baud;
     91  divisor = ((rtems_cpu_configuration_get_clock_speed() / 16) +
     92                 (baud / 2)) / baud;
    9493  if (divisor > 4096) {
    9594    div16 = 1;
  • c/src/lib/libcpu/powerpc/mpc860/timer/timer.c

    r707f5c7 r458bd34  
    4747#include <mpc860.h>
    4848
    49 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    50 
    5149static volatile rtems_unsigned32 Timer_starting;
    5250static rtems_boolean Timer_driver_Find_average_overhead;
     
    8684
    8785  else {
    88     if ( total < Cpu_table.timer_least_valid ) {
     86    if ( total < rtems_cpu_configuration_get_timer_least_valid() ) {
    8987      return 0;            /* below timer resolution */
    9088    }
    91     return (total - Cpu_table.timer_average_overhead);
     89    return (total - rtems_cpu_configuration_get_timer_average_overhead());
    9290  }
    9391}
  • c/src/lib/libcpu/powerpc/ppc403/clock/clock.c

    r707f5c7 r458bd34  
    4444#include <stdlib.h>                     /* for atexit() */
    4545
    46 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    47 
    4846volatile rtems_unsigned32 Clock_driver_ticks;
    4947static rtems_unsigned32 pit_value, tick_time;
     
    141139    asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */
    142140
    143     if (Cpu_table.timer_internal_clock) {
     141    if (rtems_cpu_configuration_get_timer_internal_clock()) {
    144142        iocr &= ~4; /* timer clocked from system clock */
    145143    }
     
    166164 
    167165    pit_value = rtems_configuration_get_microseconds_per_tick() *
    168       Cpu_table.clicks_per_usec;
     166      rtems_cpu_configuration_get_clicks_per_usec();
    169167 
    170168    if ( rtems_configuration_get_ticks_per_timeslice() ) {
  • c/src/lib/libcpu/powerpc/ppc403/console/console.c

    r707f5c7 r458bd34  
    6161#include "../ictrl/ictrl.h"
    6262#include <stdlib.h>                                     /* for atexit() */
    63 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    6463
    6564struct async {
     
    216215{
    217216  unsigned32 tmp;
    218   tmp = Cpu_table.serial_per_sec / baudrate;
     217  tmp = rtems_cpu_configuration_get_serial_per_sec() / baudrate;
    219218  tmp = ((tmp) >> 4) - 1;
    220219  port->BRDL = tmp & 0xff;
     
    315314
    316315  /* set up baud rate to original state */
    317   spiBaudSet(Cpu_table.serial_rate);
     316  spiBaudSet(rtems_cpu_configuration_get_serial_rate());
    318317
    319318  /* clear any receive (error) status */
     
    357356
    358357  tmp &= ~3;
    359   tmp |= (Cpu_table.serial_external_clock ? 2 : 0) | 1;
     358  tmp |= (rtems_cpu_configuration_get_serial_external_clock() ? 2 : 0) | 1;
    360359
    361360  asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */
     
    366365
    367366  /* set up baud rate */
    368   spiBaudSet(Cpu_table.serial_rate);
     367  spiBaudSet(rtems_cpu_configuration_get_serial_rate());
    369368
    370369  /* set up port control: DTR/RTS active,8 bit,1 stop,no parity */
  • c/src/lib/libcpu/powerpc/ppc403/console/console.c.polled

    r707f5c7 r458bd34  
    3434#include <rtems.h>
    3535#include <rtems/libio.h>
    36 
    37 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    3836
    3937struct async {
     
    148146  asm volatile ("mfdcr %0, 0xa0" : "=r" (tmp)); /* IOCR */
    149147  tmp &= ~3;
    150   tmp |= (Cpu_table.serial_external_clock ? 2 : 0) |
    151       (Cpu_table.serial_cts_rts ? 1 : 0);
     148  tmp |= (rtems_cpu_configuration_get_serial_external_clock() ? 2 : 0) |
     149      (rtems_cpu_configuration_get_serial_cts_rts() ? 1 : 0);
    152150  asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */
    153151  port->SPLS = (LSRDataReady | LSRFramingError | LSROverrunError |
    154152         LSRParityError | LSRBreakInterrupt);
    155   tmp = Cpu_table.serial_per_sec / Cpu_table.serial_rate;
     153  tmp = rtems_cpu_configuration_get_serial_per_sec() /
     154          rtems_cpu_configuration_get_serial_rate();
    156155#if 0 /* replaced by IMD... */
    157156  tmp = ((tmp + 8) >> 4) - 1;
     
    279278    }
    280279
    281   if (Cpu_table.serial_xon_xoff)
     280  if (rtems_cpu_configuration_get_serial_xon_xoff())
    282281    while (is_character_ready(&status))
    283282    {
  • c/src/lib/libcpu/powerpc/ppc403/ictrl/ictrl.c

    r707f5c7 r458bd34  
    109109 *  enabled but there is no handler installed. It will clear
    110110 *  the corresponding enable bits and call the spurious handler
    111  *  present in the _CPU_Table, if any.
     111 *  present in the CPU Configuration Table, if any.
    112112 *
    113113 */
     
    126126             vector, cpu_frame->Interrupt.pcoqfront);
    127127#endif
    128       if (_CPU_Table.spurious_handler) {
    129         _CPU_Table.spurious_handler(v + PPC_IRQ_EXT_BASE,cpu_frame);
     128      if (rtems_cpu_configuration_get_spurious_handler()) {
     129        rtems_cpu_configuration_get_spurious_handler()(v + PPC_IRQ_EXT_BASE,cpu_frame);
    130130      }
    131131    }
  • c/src/lib/libcpu/powerpc/ppc403/timer/timer.c

    r707f5c7 r458bd34  
    3636
    3737#include <rtems.h>
    38 
    39 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    4038
    4139static volatile rtems_unsigned32 Timer_starting;
     
    7977
    8078  else {
    81     if ( total < Cpu_table.timer_least_valid )
     79    if ( total < rtems_cpu_configuration_get_timer_least_valid() )
    8280      return 0;            /* below timer resolution */
    83     return (total - Cpu_table.timer_average_overhead);
     81    return (total - rtems_cpu_configuration_get_timer_average_overhead());
    8482  }
    8583}
  • c/src/lib/libcpu/powerpc/shared/cpu.h

    r707f5c7 r458bd34  
    248248    unsigned32 start, ticks, now; \
    249249    CPU_Get_timebase_low( start ) ; \
    250     ticks = (_microseconds) * Cpu_table.clicks_per_usec; \
     250    ticks = (_microseconds) * rtems_cpu_configuration_get_clicks_per_usec(); \
    251251    do \
    252252      CPU_Get_timebase_low( now ) ; \
  • c/src/libmisc/cpuuse/cpuuse.c

    r707f5c7 r458bd34  
    1515
    1616#include <rtems.h>
    17 
    18 extern rtems_configuration_table BSP_Configuration;
    1917
    2018#include <assert.h>
  • c/src/libmisc/monitor/mon-command.c

    r707f5c7 r458bd34  
    5151                           char **argv)
    5252{
    53     extern rtems_configuration_table  BSP_Configuration;
    5453    static char monitor_prompt[32];
    5554   
     
    5857     */
    5958
    60     if (BSP_Configuration.User_multiprocessing_table == 0)
     59    if (!rtems_configuration_get_user_multiprocessing_table())
    6160        sprintf(monitor_prompt, "%s", MONITOR_PROMPT);
    6261    else if (rtems_monitor_default_node != rtems_monitor_node)
  • c/src/libmisc/stackchk/check.c

    r707f5c7 r458bd34  
    3232 */
    3333#define DONT_USE_FATAL_EXTENSION
    34 
    35 
    36 extern rtems_configuration_table BSP_Configuration;
    3734
    3835#include <assert.h>
     
    319316    fflush(stderr);
    320317
    321     if (BSP_Configuration.User_multiprocessing_table)
     318    if (rtems_configuration_get_user_multiprocessing_table())
    322319        fprintf(
    323320          stderr,
    324321          "; node=%d\n",
    325           BSP_Configuration.User_multiprocessing_table->node
     322          rtems_configuration_get_user_multiprocessing_table()->node
    326323       );
    327324    else
  • c/src/tests/psxtests/psx07/init.c

    r707f5c7 r458bd34  
    3434}
    3535 
    36 extern rtems_configuration_table BSP_Configuration;
    37 
    3836void *POSIX_Init(
    3937  void *argument
     
    108106  assert( !status );
    109107
    110   attr.stacksize = BSP_Configuration.work_space_size * 10;
     108  attr.stacksize = rtems_configuration_get_work_space_size() * 10;
    111109  puts( "Init: pthread_create - EAGAIN (stacksize too large)" );
    112110  status = pthread_create( &Task_id, &attr, Task_1, NULL );
  • c/src/tests/sptests/sp09/screen03.c

    r707f5c7 r458bd34  
    1919
    2020#include "system.h"
    21 
    22 extern rtems_configuration_table BSP_Configuration;
    23 extern rtems_cpu_table           _CPU_Table;
    2421
    2522void Screen3()
     
    4946   */
    5047
    51   if (_CPU_Table.stack_allocate_hook)
    52   {
     48  if (rtems_cpu_configuration_get_stack_allocate_hook()) {
    5349      puts( "TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED  -- SKIPPED" );
    54   }
    55   else
    56   {
     50  } else {
    5751      status = rtems_task_create(
    5852        task_name,
    5953        1,
    60         BSP_Configuration.work_space_size,
     54        rtems_configuration_get_work_space_size(),
    6155        RTEMS_DEFAULT_MODES,
    6256        RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp13/task1.c

    r707f5c7 r458bd34  
    2121#include "system.h"
    2222#include <string.h>             /* for memcmp */
    23 
    24 extern rtems_configuration_table BSP_Configuration;
    2523
    2624char    big_send_buffer[2048];
  • c/src/tests/sptests/spfatal/fatal.c

    r707f5c7 r458bd34  
    104104  switch ( Case_in_switch ) {
    105105    case FATAL_WORKSPACE_OF_ZERO:
    106       New_Configuration = BSP_Configuration;
     106      New_Configuration = rtems_configuration_get_table();
    107107      New_Configuration.work_space_start = NULL;
    108108      Case_in_switch = FATAL_NULL_WORKSPACE;
     
    132132      break;
    133133  }
    134   rtems_initialize_executive( &New_Configuration, &Cpu_table );
     134  rtems_initialize_executive(
     135    &New_Configuration, rtems_cpu_configuration_get_table() );
    135136}
    136137
  • c/src/tests/sptests/spfatal/system.h

    r707f5c7 r458bd34  
    7474
    7575extern rtems_extensions_table           Extensions;
    76 extern rtems_configuration_table        BSP_Configuration;
    77 extern rtems_cpu_table                  Cpu_table;
    7876
    7977/* end of include file */
  • c/src/tests/support/include/tmacros.h

    r707f5c7 r458bd34  
    123123#define task_number( tid ) \
    124124  ( rtems_get_index( tid ) - \
    125      BSP_Configuration.RTEMS_api_configuration->number_of_initialization_tasks )
     125     rtems_configuration_get_rtems_api_configuration()->number_of_initialization_tasks )
    126126
    127127static inline rtems_unsigned32 get_ticks_per_second( void )
  • c/src/tests/tmtests/tmoverhd/testtask.c

    r707f5c7 r458bd34  
    9797  Timer_initialize();
    9898    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    99       (void) rtems_initialize_executive( &BSP_Configuration, &cpu_table );
     99      (void) rtems_initialize_executive( rtems_configuration_get_table(), &cpu_table );
    100100  end_time = Read_timer();
    101101
  • cpukit/libcsupport/src/malloc.c

    r707f5c7 r458bd34  
    3333size_t RTEMS_Malloc_Sbrk_amount;
    3434
    35 extern rtems_cpu_table   Cpu_table;
    3635#ifdef RTEMS_DEBUG
    3736#define MALLOC_STATS
     
    110109   */
    111110
    112   if ( Cpu_table.do_zero_of_workspace )
     111  if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
    113112     memset( starting_address, 0, length );
    114113
  • cpukit/libmisc/cpuuse/cpuuse.c

    r707f5c7 r458bd34  
    1515
    1616#include <rtems.h>
    17 
    18 extern rtems_configuration_table BSP_Configuration;
    1917
    2018#include <assert.h>
  • cpukit/libmisc/monitor/mon-command.c

    r707f5c7 r458bd34  
    5151                           char **argv)
    5252{
    53     extern rtems_configuration_table  BSP_Configuration;
    5453    static char monitor_prompt[32];
    5554   
     
    5857     */
    5958
    60     if (BSP_Configuration.User_multiprocessing_table == 0)
     59    if (!rtems_configuration_get_user_multiprocessing_table())
    6160        sprintf(monitor_prompt, "%s", MONITOR_PROMPT);
    6261    else if (rtems_monitor_default_node != rtems_monitor_node)
  • cpukit/libmisc/stackchk/check.c

    r707f5c7 r458bd34  
    3232 */
    3333#define DONT_USE_FATAL_EXTENSION
    34 
    35 
    36 extern rtems_configuration_table BSP_Configuration;
    3734
    3835#include <assert.h>
     
    319316    fflush(stderr);
    320317
    321     if (BSP_Configuration.User_multiprocessing_table)
     318    if (rtems_configuration_get_user_multiprocessing_table())
    322319        fprintf(
    323320          stderr,
    324321          "; node=%d\n",
    325           BSP_Configuration.User_multiprocessing_table->node
     322          rtems_configuration_get_user_multiprocessing_table()->node
    326323       );
    327324    else
  • cpukit/sapi/include/confdefs.h

    r707f5c7 r458bd34  
    8181/*
    8282 *  Stack Checker Requirements
     83 *
     84 *  NOTE: This does not automatically enable reporting at program exit.
    8385 */
    8486
  • cpukit/sapi/include/rtems/config.h

    r707f5c7 r458bd34  
    122122 */
    123123
     124#define rtems_configuration_get_table() \
     125        (&_Configuration_Table)
     126
    124127#define rtems_configuration_get_work_space_start() \
    125128        (_Configuration_Table->work_space_start)
  • cpukit/score/cpu/a29k/rtems/score/cpu.h

    r707f5c7 r458bd34  
    460460  unsigned32   interrupt_stack_size;
    461461  unsigned32   extra_system_initialization_stack;
    462   unsigned32   some_other_cpu_dependent_info;
    463462}   rtems_cpu_table;
     463
     464/*
     465 *  Macros to access required entires in the CPU Table are in
     466 *  the file rtems/system.h.
     467 */
     468
     469/*
     470 *  Macros to access AMD A29K specific additions to the CPU Table
     471 */
     472
     473/* There are no CPU specific additions to the CPU Table for this port. */
    464474
    465475/*
  • cpukit/score/cpu/hppa1.1/rtems/score/cpu.h

    r707f5c7 r458bd34  
    239239}   rtems_cpu_table;
    240240
     241/*
     242 *  Macros to access required entires in the CPU Table are in
     243 *  the file rtems/system.h.
     244 */
     245
     246/*
     247 *  Macros to access HPPA specific additions to the CPU Table
     248 */
     249
     250#define rtems_cpu_configuration_get_spurious_handler() \
     251   (_CPU_Table.spurious_handler)
     252
     253#define rtems_cpu_configuration_get_itimer_clicks_per_microsecond() \
     254   (_CPU_Table.itimer_clicks_per_microsecond)
     255
    241256/* variables */
    242257
  • cpukit/score/cpu/i386/rtems/score/cpu.h

    r707f5c7 r458bd34  
    199199
    200200/*
     201 *  Macros to access required entires in the CPU Table are in
     202 *  the file rtems/system.h.
     203 */
     204
     205/*
     206 *  Macros to access i386 specific additions to the CPU Table
     207 */
     208
     209#define rtems_cpu_configuration_get_interrupt_table_segment() \
     210   (_CPU_Table.interrupt_table_segment)
     211
     212#define rtems_cpu_configuration_get_interrupt_table_offset() \
     213   (_CPU_Table.interrupt_table_offset)
     214
     215/*
    201216 *  context size area for floating point
    202217 *
  • cpukit/score/cpu/i960/rtems/score/cpu.h

    r707f5c7 r458bd34  
    172172  i960_PRCB *Prcb;
    173173}   rtems_cpu_table;
     174
     175/*
     176 *  Macros to access required entires in the CPU Table are in
     177 *  the file rtems/system.h.
     178 */
     179
     180/*
     181 *  Macros to access i960 specific additions to the CPU Table
     182 */
     183
     184#define rtems_cpu_configuration_get_prcb() \
     185   (_CPU_Table.Prcb)
    174186
    175187/* variables */
  • cpukit/score/cpu/m68k/rtems/score/cpu.h

    r707f5c7 r458bd34  
    195195  m68k_isr    *interrupt_vector_table;
    196196}   rtems_cpu_table;
     197
     198/*
     199 *  Macros to access required entires in the CPU Table are in
     200 *  the file rtems/system.h.
     201 */
     202
     203/*
     204 *  Macros to access M68K specific additions to the CPU Table
     205 */
     206
     207#define rtems_cpu_configuration_get_interrupt_vector_table() \
     208   (_CPU_Table.interrupt_vector_table)
    197209
    198210/* variables */
  • cpukit/score/cpu/mips/rtems/score/cpu.h

    r707f5c7 r458bd34  
    439439}   rtems_cpu_table;
    440440
     441/*
     442 *  Macros to access required entires in the CPU Table are in
     443 *  the file rtems/system.h.
     444 */
     445
     446/*
     447 *  Macros to access MIPS64ORION specific additions to the CPU Table
     448 */
     449
    441450#define rtems_cpu_configuration_get_clicks_per_microsecond() \
    442451   (_CPU_Table.clicks_per_microsecond)
  • cpukit/score/cpu/mips64orion/rtems/score/cpu.h

    r707f5c7 r458bd34  
    439439}   rtems_cpu_table;
    440440
     441/*
     442 *  Macros to access required entires in the CPU Table are in
     443 *  the file rtems/system.h.
     444 */
     445
     446/*
     447 *  Macros to access MIPS64ORION specific additions to the CPU Table
     448 */
     449
    441450#define rtems_cpu_configuration_get_clicks_per_microsecond() \
    442451   (_CPU_Table.clicks_per_microsecond)
  • cpukit/score/cpu/no_cpu/rtems/score/cpu.h

    r707f5c7 r458bd34  
    361361  /* end of fields required on all CPUs */
    362362
    363   unsigned32   some_other_cpu_dependent_info;
    364363}   rtems_cpu_table;
     364
     365/*
     366 *  Macros to access required entires in the CPU Table are in
     367 *  the file rtems/system.h.
     368 */
     369
     370/*
     371 *  Macros to access NO_CPU specific additions to the CPU Table
     372 */
     373
     374/* There are no CPU specific additions to the CPU Table for this port. */
    365375
    366376/*
  • cpukit/score/cpu/sh/rtems/score/cpu.h

    r707f5c7 r458bd34  
    381381
    382382/*
     383 *  Macros to access required entires in the CPU Table are in
     384 *  the file rtems/system.h.
     385 */
     386
     387/*
     388 *  Macros to access SH specific additions to the CPU Table
     389 */
     390
     391/* There are no CPU specific additions to the CPU Table for this port. */
     392
     393/*
    383394 *  This variable is optional.  It is used on CPUs on which it is difficult
    384395 *  to generate an "uninitialized" FP context.  It is filled in by
  • cpukit/score/cpu/sparc/rtems/score/cpu.h

    r707f5c7 r458bd34  
    528528
    529529/*
     530 *  Macros to access required entires in the CPU Table are in
     531 *  the file rtems/system.h.
     532 */
     533
     534/*
     535 *  Macros to access SPARC specific additions to the CPU Table
     536 */
     537
     538/* There are no CPU specific additions to the CPU Table for this port. */
     539
     540/*
    530541 *  This variable is contains the initialize context for the FP unit.
    531542 *  It is filled in by _CPU_Initialize and copied into the task's FP
  • cpukit/score/cpu/unix/rtems/score/cpu.h

    r707f5c7 r458bd34  
    514514
    515515/*
     516 *  Macros to access required entires in the CPU Table are in
     517 *  the file rtems/system.h.
     518 */
     519
     520/*
     521 *  Macros to access UNIX specific additions to the CPU Table
     522 */
     523
     524/* There are no CPU specific additions to the CPU Table for this port. */
     525
     526/*
    516527 *  This variable is optional.  It is used on CPUs on which it is difficult
    517528 *  to generate an "uninitialized" FP context.  It is filled in by
  • cpukit/score/include/rtems/system.h

    r707f5c7 r458bd34  
    141141
    142142/*
     143 *  Macros to access CPU Table fields required by ALL ports.
     144 *
     145 *  NOTE: Similar macros to access port specific fields in in the
     146 *        appropriate cpu.h file.
     147 */
     148
     149#define rtems_cpu_configuration_get_table() \
     150   (&_CPU_Table)
     151
     152#define rtems_cpu_configuration_get_pretasking_hook() \
     153   (_CPU_Table.pretasking_hook)
     154
     155#define rtems_cpu_configuration_get_predriver_hook() \
     156   (_CPU_Table.predriver_hook)
     157
     158#define rtems_cpu_configuration_get_postdriver_hook() \
     159   (_CPU_Table.postdriver_hook)
     160
     161#define rtems_cpu_configuration_get_idle_task() \
     162   (_CPU_Table.idle_task)
     163
     164#define rtems_cpu_configuration_get_do_zero_of_workspace() \
     165   (_CPU_Table.do_zero_of_workspace)
     166
     167#define rtems_cpu_configuration_get_idle_task_stack_size() \
     168   (_CPU_Table.idle_task_stack_size)
     169
     170#define rtems_cpu_configuration_get_interrupt_stack_size() \
     171   (_CPU_Table.interrupt_stack_size)
     172
     173#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
     174   (_CPU_Table.extra_mpci_receive_server_stack)
     175
     176#define rtems_cpu_configuration_get_stack_allocate_hook() \
     177   (_CPU_Table.stack_allocate_hook)
     178
     179#define rtems_cpu_configuration_get_stack_free_hook() \
     180   (_CPU_Table.stack_free_hook)
     181
     182/*
    143183 *  XXX weird RTEMS stuff
    144184 */
  • testsuites/psxtests/psx07/init.c

    r707f5c7 r458bd34  
    3434}
    3535 
    36 extern rtems_configuration_table BSP_Configuration;
    37 
    3836void *POSIX_Init(
    3937  void *argument
     
    108106  assert( !status );
    109107
    110   attr.stacksize = BSP_Configuration.work_space_size * 10;
     108  attr.stacksize = rtems_configuration_get_work_space_size() * 10;
    111109  puts( "Init: pthread_create - EAGAIN (stacksize too large)" );
    112110  status = pthread_create( &Task_id, &attr, Task_1, NULL );
  • testsuites/sptests/sp09/screen03.c

    r707f5c7 r458bd34  
    1919
    2020#include "system.h"
    21 
    22 extern rtems_configuration_table BSP_Configuration;
    23 extern rtems_cpu_table           _CPU_Table;
    2421
    2522void Screen3()
     
    4946   */
    5047
    51   if (_CPU_Table.stack_allocate_hook)
    52   {
     48  if (rtems_cpu_configuration_get_stack_allocate_hook()) {
    5349      puts( "TA1 - rtems_task_create - stack size - RTEMS_UNSATISFIED  -- SKIPPED" );
    54   }
    55   else
    56   {
     50  } else {
    5751      status = rtems_task_create(
    5852        task_name,
    5953        1,
    60         BSP_Configuration.work_space_size,
     54        rtems_configuration_get_work_space_size(),
    6155        RTEMS_DEFAULT_MODES,
    6256        RTEMS_DEFAULT_ATTRIBUTES,
  • testsuites/sptests/sp13/task1.c

    r707f5c7 r458bd34  
    2121#include "system.h"
    2222#include <string.h>             /* for memcmp */
    23 
    24 extern rtems_configuration_table BSP_Configuration;
    2523
    2624char    big_send_buffer[2048];
  • testsuites/sptests/spfatal/fatal.c

    r707f5c7 r458bd34  
    104104  switch ( Case_in_switch ) {
    105105    case FATAL_WORKSPACE_OF_ZERO:
    106       New_Configuration = BSP_Configuration;
     106      New_Configuration = rtems_configuration_get_table();
    107107      New_Configuration.work_space_start = NULL;
    108108      Case_in_switch = FATAL_NULL_WORKSPACE;
     
    132132      break;
    133133  }
    134   rtems_initialize_executive( &New_Configuration, &Cpu_table );
     134  rtems_initialize_executive(
     135    &New_Configuration, rtems_cpu_configuration_get_table() );
    135136}
    136137
  • testsuites/sptests/spfatal/system.h

    r707f5c7 r458bd34  
    7474
    7575extern rtems_extensions_table           Extensions;
    76 extern rtems_configuration_table        BSP_Configuration;
    77 extern rtems_cpu_table                  Cpu_table;
    7876
    7977/* end of include file */
  • testsuites/support/include/tmacros.h

    r707f5c7 r458bd34  
    123123#define task_number( tid ) \
    124124  ( rtems_get_index( tid ) - \
    125      BSP_Configuration.RTEMS_api_configuration->number_of_initialization_tasks )
     125     rtems_configuration_get_rtems_api_configuration()->number_of_initialization_tasks )
    126126
    127127static inline rtems_unsigned32 get_ticks_per_second( void )
  • testsuites/tmtests/tmoverhd/testtask.c

    r707f5c7 r458bd34  
    9797  Timer_initialize();
    9898    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    99       (void) rtems_initialize_executive( &BSP_Configuration, &cpu_table );
     99      (void) rtems_initialize_executive( rtems_configuration_get_table(), &cpu_table );
    100100  end_time = Read_timer();
    101101
Note: See TracChangeset for help on using the changeset viewer.