Changeset 4856251 in rtems-testing


Ignore:
Timestamp:
May 29, 2013, 8:24:31 PM (6 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
3918e8f
Parents:
a249bc2
git-author:
Joel Sherrill <joel.sherrill@…> (05/29/13 20:24:31)
git-committer:
Joel Sherrill <joel.sherrill@…> (05/29/13 20:44:27)
Message:

sim-scripts: Add initial support for specifying number of cores

Attempted to add support to pc386 (untested).

Location:
sim-scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sim-scripts/gdb-sim-run.in

    ra249bc2 r4856251  
    3030        -G         -- put simulator in GDB server mode (default=no)
    3131        -i         -- interactive (default=no time limit)
     32        -p cores   -- number of cores for SMP (default=1)
    3233        -s         -- force System V IPC support (default=no)
    3334        -S         -- skip Interrupt Critical Section Tests (default=no)
    3435        -l limit   -- specify time limit (default is 'BSP dependent')
    3536        -L dir     -- specify log directory (default is 'log')
    36         -T         -- rtems-test command mode
    3737
    3838NOTES:
     39  + Most simulators do not support multicore support.
    3940  + System V IPC and Coverage are not supported by all BSPs or simulators.
    4041  + GDB Server mode is only supported by stand-along simulators.
     
    8788enable_display_adapter="no"
    8889enable_network="no"
    89 rtems_test="no"
    9090skip_interrupt_critical_section_tests="no"
    91 
    92 while getopts "vcCgGil:L:DsNT" OPT
     91number_of_cores=1
     92
     93while getopts "vcCgGil:L:p:DsNT" OPT
    9394do
    9495 case "$OPT" in
     
    103104   l) defaultLimit="$OPTARG";;
    104105   L) logdir="$OPTARG";;
     106   p) number_of_cores="$OPTARG";;
    105107   s) use_sysv_ipc="yes";;
    106108   S) skip_interrupt_critical_section_tests="yes";;
    107109   t) doTrace="yes";;
    108    T) rtems_test="yes";;
    109110   *) fatal;;
    110111 esac
     
    115116
    116117args=$*
     118
     119case ${number_of_cores} in
     120  [1-9]) ;;
     121  0)
     122    echo "Zero cores does not make sense"
     123    exit 1
     124    ;;
     125  *) 
     126    echo "Cores specified (${number_of_cores}) is either not a valid"
     127    echo "  number or supported quantity."
     128    exit 1
     129esac
    117130
    118131if [ ${interactive} = "yes" ] ; then
     
    139152bspRedirectInput=no
    140153bspSkipInterruptCriticalSectionTests="no"
     154bspSupportsSMP="no"
    141155
    142156for v in 4.11 4.10 4.9 4.8 4.7 ""
     
    169183  exit 1
    170184fi
     185
    171186if [ ${bspSupportsDisplayAdapter} = "no" -a \
    172187     ${enable_display_adapter} = "yes"  ]; then
    173188  echo "Simulator does not support Graphics Display Adapter."
     189  exit 1
     190fi
     191
     192if [ ${bspSupportsSMP} = "no" -a ${number_of_cores} != 1 ] ; then
     193  echo "Simulator does not support multiple cores."
    174194  exit 1
    175195fi
  • sim-scripts/pc386.in

    ra249bc2 r4856251  
    44
    55bspUsesGDBSimulator="no"
     6bspSupportsSMP="yes"
    67runBSP=NOT_OVERRIDDEN
    78if [ ! -r ${runBSP} ] ; then
     
    7677     GRAPHIC_ARG="-vga cirrus"
    7778  fi
    78 # core2duo with newer qemu for smp support
    79 # 486 or pentium for older qemu
    80   echo "-m 512 -boot a -cpu 486 \
     79
     80  # core2duo with newer qemu for SMP support
     81  # 486 or pentium for non-SMP
     82  if [ ${number_of_cores} = 1 ] ; then
     83    CPUARGS="-cpu 486"
     84  else
     85    CPUARGS="-cpu core2duo -smp ${number_of_cores}"
     86  fi
     87  echo "-m 512 -boot a ${CPUARGS} \
    8188       -fda ${fd0Image} -hda fat:${hd0Dir} ${COVERAGE_ARG} \
    8289       -monitor null ${GRAPHIC_ARG} -serial ${SERIAL_ARG} --no-reboot"
Note: See TracChangeset for help on using the changeset viewer.