Changeset aebb1ca in rtems-schedsim


Ignore:
Timestamp:
May 17, 2011, 7:31:24 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
f7494ad
Parents:
ac6e5c7
Message:

2011-05-17 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, rtems_init.c, sched_cpu/cpu.c, sched_cpu/rtems/score/cpu.h: Merge and update code. Simulators for Deterministic Priority and SMP Simple Schedulers now work.
  • debugio.c: New file.
  • sched_cpu/rtems/score/cpuopts.h: Removed.
Location:
schedsim/rtems
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • schedsim/rtems/ChangeLog

    rac6e5c7 raebb1ca  
     12011-05-17      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, rtems_init.c, sched_cpu/cpu.c,
     4        sched_cpu/rtems/score/cpu.h: Merge and update code. Simulators for
     5        Deterministic Priority and SMP Simple Schedulers now work.
     6        * debugio.c: New file.
     7        * sched_cpu/rtems/score/cpuopts.h: Removed.
     8
    192011-04-11      Joel Sherrill <joel.sherrill@oarcorp.com>
    210
  • schedsim/rtems/Makefile.am

    rac6e5c7 raebb1ca  
    99cpukitdir=@rtems_srcdir@/cpukit
    1010librtems_a_CPPFLAGS  = -D__RTEMS_VIOLATE_KERNEL_VISIBILITY__
     11librtems_a_CPPFLAGS += -I$(top_builddir)/score/include
    1112librtems_a_CPPFLAGS += -I$(srcdir)/sched_cpu
    1213librtems_a_CPPFLAGS += -I$(cpukitdir)/include
     
    2122
    2223## Have own version of these
    23 librtems_a_SOURCES = rtems_init.c wkspace.c
     24librtems_a_SOURCES = rtems_init.c
     25librtems_a_SOURCES += wkspace.c
     26librtems_a_SOURCES += debugio.c
    2427librtems_a_SOURCES += sched_cpu/cpu_asm.c
    2528librtems_a_SOURCES += sched_cpu/cpu.c
     
    5659librtems_a_SOURCES += $(cpukitdir)/score/src/coretodtickspersec.c
    5760librtems_a_SOURCES += $(cpukitdir)/score/src/coretodusectoticks.c
     61librtems_a_SOURCES += $(cpukitdir)/score/src/isr.c
    5862librtems_a_SOURCES += $(cpukitdir)/score/src/objectallocate.c
    5963librtems_a_SOURCES += $(cpukitdir)/score/src/objectapimaximumclass.c
     
    215219librtems_a_SOURCES += $(cpukitdir)/libcsupport/src/assocremotebyname.c
    216220librtems_a_SOURCES += $(cpukitdir)/libcsupport/src/error.c
     221librtems_a_SOURCES += $(cpukitdir)/libcsupport/src/printk.c
     222librtems_a_SOURCES += $(cpukitdir)/libcsupport/src/vprintk.c
    217223librtems_a_SOURCES += $(cpukitdir)/libmisc/stringto/stringtodouble.c
    218224librtems_a_SOURCES += $(cpukitdir)/libmisc/stringto/stringtofloat.c
     
    223229librtems_a_SOURCES += $(cpukitdir)/libmisc/stringto/stringtounsignedint.c
    224230librtems_a_SOURCES += $(cpukitdir)/libmisc/stringto/stringtounsignedlong.c
     231
     232if HAS_SMP
     233librtems_a_SOURCES += $(cpukitdir)/score/src/smp.c
     234librtems_a_SOURCES += $(cpukitdir)/score/src/smplock.c
     235librtems_a_SOURCES += $(cpukitdir)/score/src/isrsmp.c
     236librtems_a_SOURCES += $(cpukitdir)/score/src/threaddisabledispatch.c
     237librtems_a_SOURCES += $(cpukitdir)/score/src/threadenabledispatch.c
     238librtems_a_SOURCES += $(cpukitdir)/score/src/threaddispatchdisablelevel.c
     239librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimplesmpblock.c
     240librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimplesmpschedule.c
     241librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimplesmpunblock.c
     242endif
    225243
    226244schedsim_includedir = $(includedir)/schedsim
     
    332350  $(cpukitdir)/score/inline/rtems/score/thread.inl \
    333351  sched_cpu/rtems/score/cpu_asm.h \
    334   sched_cpu/rtems/score/cpuopts.h \
     352  $(top_builddir)/score/include/rtems/score/cpuopts.h \
    335353  sched_cpu/rtems/score/cpu.h \
    336354  sched_cpu/rtems/score/types.h \
  • schedsim/rtems/rtems_init.c

    rac6e5c7 raebb1ca  
    4949  _Workspace_Handler_initialization();
    5050
     51  #if defined(RTEMS_SMP)
     52    _SMP_Handler_initialize();
     53  #endif
     54
    5155  _User_extensions_Handler_initialization();
    5256
    53   // _ISR_Handler_initialization();
     57  _ISR_Handler_initialization();
    5458
    5559  /*
     
    7983  _RTEMS_tasks_Manager_initialization();
    8084  _Semaphore_Manager_initialization();
     85
     86  /*
     87   * Discover and initialize the secondary cores in an SMP system.
     88   */
     89  #if defined(RTEMS_SMP)
     90    _SMP_Processor_count =
     91      bsp_smp_initialize( rtems_configuration_smp_maximum_processors );
     92  #endif
    8193
    8294  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
  • schedsim/rtems/sched_cpu/cpu.c

    rac6e5c7 raebb1ca  
    168168    /* insert your "halt" instruction here */ ;
    169169}
     170
     171#include <stdio.h>
     172void _SMP_cpu_swap(
     173  uint32_t *a,
     174  uint32_t *value,
     175  uint32_t *prev
     176)
     177{
     178  *prev = *a;
     179  *a = *value;
     180  // printf( "(%d %d) ", *prev, *value );
     181}
  • schedsim/rtems/sched_cpu/rtems/score/cpu.h

    rac6e5c7 raebb1ca  
    12581258  (((value&0xff) << 8) | ((value >> 8)&0xff))
    12591259
     1260/*
     1261 *  SMP Support
     1262 */
     1263void __SMP_cpu_swap(
     1264  uint32_t *a,
     1265  uint32_t *value,
     1266  uint32_t *prev
     1267);
     1268#define SMP_CPU_SWAP( _address, _value, _previous ) \
     1269  do { \
     1270    volatile unsigned int *_a = (volatile unsigned int *)_address; \
     1271    _previous = *(_a); \
     1272    *(_a) = _value; \
     1273  } while (0)
     1274
     1275#define _CPU_Context_switch_to_first_task_smp(_ignored)
     1276
    12601277#ifdef __cplusplus
    12611278}
Note: See TracChangeset for help on using the changeset viewer.