2008-12-04 Joel Sherrill <joel.sherrill@oarcorp.com>

* psim-bottom, psim-gdb-bottom, psim-shared, psim-top.in: Add ability
	to force psim configuration to include System V IPC devices even when
	the test does not appear to be multiprocessing. This is used by some
	RTEMS application developers for system simulation and could be used
	to simulate a framebuffer if a UNIX process mirrored the buffer.
This commit is contained in:
Joel Sherrill
2008-12-04 17:19:03 +00:00
parent 447d2b4029
commit c0b8d7b421
5 changed files with 49 additions and 23 deletions

View File

@@ -1,3 +1,11 @@
2008-12-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* psim-bottom, psim-gdb-bottom, psim-shared, psim-top.in: Add ability
to force psim configuration to include System V IPC devices even when
the test does not appear to be multiprocessing. This is used by some
RTEMS application developers for system simulation and could be used
to simulate a framebuffer if a UNIX process mirrored the buffer.
2008-09-08 Joel Sherrill <joel.sherrill@oarcorp.com> 2008-09-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* runtest-bottom: Work on .exe and .ralf files. * runtest-bottom: Work on .exe and .ralf files.

View File

@@ -6,17 +6,16 @@
verbose="" verbose=""
limit="0" limit="0"
use_sysv_ipc="auto"
## TODO: may want command line ability to turn on some psim tracing ## TODO: may want command line ability to turn on some psim tracing
while getopts vl: OPT while getopts vsl: OPT
do do
case "$OPT" in case "$OPT" in
v) v) verbose="yes";;
verbose="yes";; l) limit="$OPTARG";;
l) s) use_sysv_ipc="yes";;
limit="$OPTARG";; *) fatal;;
*)
fatal;;
esac esac
done done
shiftcount=`expr $OPTIND - 1` shiftcount=`expr $OPTIND - 1`

View File

@@ -1,6 +1,14 @@
## TODO: may want command line ability to turn on some psim tracing ## TODO: may want command line ability to turn on some psim tracing
# Recognize special argument to force System V IPC support on
if [ X${1} = "X-psim_sysv" ] ; then
use_sysv_ipc="yes"
shift
else
use_sysv_ipc="auto"
fi
## Generate the GDB Command Script ## Generate the GDB Command Script
gen_gdb_script() gen_gdb_script()
{ {

View File

@@ -4,22 +4,31 @@ TREE_FILE=psim_tree.${LOGNAME}
### Generate the PSIM device tree based upon the type of application being run ### Generate the PSIM device tree based upon the type of application being run
gen_device_tree() gen_device_tree()
{ {
enable_sys_ipc="yes"
if [ ${use_sys_ipc} = "yes" ] ; then
enable_sysv_ipc="yes"
value=-1 # for now assume we are slave in this mode
else
case ${1} in case ${1} in
*mp*) *mp*)
if [ X${RTEMS_SHM_SEMAPHORE_KEY} = X -o X${RTEMS_SHM_KEY} = X ] ; then enable_sysv_devices="yes"
fatal RTEMS_SHM_SEMAPHORE_KEY and/or RTEMS_SHM_KEY not set
fi
use_sysv_devices=yes
case ${1} in case ${1} in
*node1*) value=1 ;; *node1*) value=1 ;;
*) value=-1 ;; *) value=-1 ;;
esac esac
;; ;;
*) *)
use_sysv_devices=no enable_sysv_devices="no"
;; ;;
esac esac
fi
if [ ${enable_sysv_devices} = "yes" ] ; then
if [ X${RTEMS_SHM_SEMAPHORE_KEY} = X -o X${RTEMS_SHM_KEY} = X ] ; then
fatal RTEMS_SHM_SEMAPHORE_KEY and/or RTEMS_SHM_KEY not set
fi
fi
cat <<EOF cat <<EOF
# #
@@ -46,7 +55,7 @@ cat <<EOF
/nvram@0x0c080000/timezone -3600 /nvram@0x0c080000/timezone -3600
EOF EOF
if [ ${use_sysv_devices} = yes ] ; then if [ ${enable_sysv_devices} = yes ] ; then
echo "##### System V IPC (Semaphore) 0x0c100010 for 12" echo "##### System V IPC (Semaphore) 0x0c100010 for 12"
echo "/sem@0x0c100010/reg 0x0c100010 12" echo "/sem@0x0c100010/reg 0x0c100010 12"
echo "/sem@0x0c100010/key ${RTEMS_SHM_SEMAPHORE_KEY}" echo "/sem@0x0c100010/key ${RTEMS_SHM_SEMAPHORE_KEY}"
@@ -57,6 +66,7 @@ EOF
echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}" echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}"
fi fi
exit 0
} }
### run the specified test with the time limit ### run the specified test with the time limit

View File

@@ -23,6 +23,7 @@ progname=${0##*/} # fast basename hack for ksh, bash
USAGE=\ USAGE=\
"usage: $progname [ -opts ] test [ test ... ] "usage: $progname [ -opts ] test [ test ... ]
-v -- verbose -v -- verbose
-s -- force System V IPC support on (default=auto)
-l limit -- specify time limit (default is 'no limit') -l limit -- specify time limit (default is 'no limit')
" "