summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-04 17:18:51 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-04 17:18:51 +0000
commitb48cfa94aee2b6c74cf2583d15f37d78cf3b67c5 (patch)
tree3e9c6daa7aac0459e4170c449adb8da38788fac4 /c
parent2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-b48cfa94aee2b6c74cf2583d15f37d78cf3b67c5.tar.bz2
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.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/psim/tools/ChangeLog8
-rwxr-xr-xc/src/lib/libbsp/powerpc/psim/tools/psim-bottom13
-rwxr-xr-xc/src/lib/libbsp/powerpc/psim/tools/psim-gdb-bottom8
-rwxr-xr-xc/src/lib/libbsp/powerpc/psim/tools/psim-shared42
-rwxr-xr-xc/src/lib/libbsp/powerpc/psim/tools/psim-top.in1
5 files changed, 49 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog b/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog
index 069c578c5b..1eecf47157 100644
--- a/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog
@@ -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>
* runtest-bottom: Work on .exe and .ralf files.
diff --git a/c/src/lib/libbsp/powerpc/psim/tools/psim-bottom b/c/src/lib/libbsp/powerpc/psim/tools/psim-bottom
index 93987cca53..caac4a1d02 100755
--- a/c/src/lib/libbsp/powerpc/psim/tools/psim-bottom
+++ b/c/src/lib/libbsp/powerpc/psim/tools/psim-bottom
@@ -6,17 +6,16 @@
verbose=""
limit="0"
+use_sysv_ipc="auto"
## TODO: may want command line ability to turn on some psim tracing
-while getopts vl: OPT
+while getopts vsl: OPT
do
case "$OPT" in
- v)
- verbose="yes";;
- l)
- limit="$OPTARG";;
- *)
- fatal;;
+ v) verbose="yes";;
+ l) limit="$OPTARG";;
+ s) use_sysv_ipc="yes";;
+ *) fatal;;
esac
done
shiftcount=`expr $OPTIND - 1`
diff --git a/c/src/lib/libbsp/powerpc/psim/tools/psim-gdb-bottom b/c/src/lib/libbsp/powerpc/psim/tools/psim-gdb-bottom
index ce85622fa1..f85fb42f1d 100755
--- a/c/src/lib/libbsp/powerpc/psim/tools/psim-gdb-bottom
+++ b/c/src/lib/libbsp/powerpc/psim/tools/psim-gdb-bottom
@@ -1,6 +1,14 @@
## 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
gen_gdb_script()
{
diff --git a/c/src/lib/libbsp/powerpc/psim/tools/psim-shared b/c/src/lib/libbsp/powerpc/psim/tools/psim-shared
index a3b5c062d8..e57e14521f 100755
--- a/c/src/lib/libbsp/powerpc/psim/tools/psim-shared
+++ b/c/src/lib/libbsp/powerpc/psim/tools/psim-shared
@@ -4,22 +4,31 @@ TREE_FILE=psim_tree.${LOGNAME}
### Generate the PSIM device tree based upon the type of application being run
gen_device_tree()
{
- case ${1} in
- *mp*)
- 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
+ enable_sys_ipc="yes"
- use_sysv_devices=yes
- case ${1} in
- *node1*) value=1 ;;
- *) value=-1 ;;
- esac
- ;;
- *)
- use_sysv_devices=no
- ;;
- esac
+ 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
+ *mp*)
+ enable_sysv_devices="yes"
+ case ${1} in
+ *node1*) value=1 ;;
+ *) value=-1 ;;
+ esac
+ ;;
+ *)
+ enable_sysv_devices="no"
+ ;;
+ 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
#
@@ -46,7 +55,7 @@ cat <<EOF
/nvram@0x0c080000/timezone -3600
EOF
- if [ ${use_sysv_devices} = yes ] ; then
+ if [ ${enable_sysv_devices} = yes ] ; then
echo "##### System V IPC (Semaphore) 0x0c100010 for 12"
echo "/sem@0x0c100010/reg 0x0c100010 12"
echo "/sem@0x0c100010/key ${RTEMS_SHM_SEMAPHORE_KEY}"
@@ -57,6 +66,7 @@ EOF
echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}"
fi
+exit 0
}
### run the specified test with the time limit
diff --git a/c/src/lib/libbsp/powerpc/psim/tools/psim-top.in b/c/src/lib/libbsp/powerpc/psim/tools/psim-top.in
index 59784f55fd..d14c77e8bb 100755
--- a/c/src/lib/libbsp/powerpc/psim/tools/psim-top.in
+++ b/c/src/lib/libbsp/powerpc/psim/tools/psim-top.in
@@ -23,6 +23,7 @@ progname=${0##*/} # fast basename hack for ksh, bash
USAGE=\
"usage: $progname [ -opts ] test [ test ... ]
-v -- verbose
+ -s -- force System V IPC support on (default=auto)
-l limit -- specify time limit (default is 'no limit')
"