source: rtems-testing/sim-scripts/psim.in

Last change on this file was 1273785, checked in by Joel Sherrill <joel.sherrill@…>, on May 15, 2012 at 9:03:18 PM

rtems-testing - Remove CVS Ids (scripted)

  • Property mode set to 100644
File size: 2.7 KB
Line 
1#
2#  PowerPC/psim Support
3#
4
5runARGS()
6{
7  if [ ${doTrace} = "yes" ] ; then
8    TRACEARGS="-t all"
9  fi
10  echo "-f ${bspTreeFile} ${TRACEARGS} ${1}"
11}
12
13checkBSPFaults()
14{
15  return 0
16}
17
18bspLimit()
19{
20  testname=$1
21  case ${testname} in
22    *stackchk*)limit=5 ;;
23    *fatal*)   limit=1 ;;
24    *minimum*) limit=1 ;;
25    *psxtime*) limit=180 ;;
26    *)         limit=60 ;;
27  esac
28  echo ${limit}
29}
30
31bspGeneratesGDBCommands="yes"
32
33bspGenerateGDBCommands()
34{
35if [ ${doTrace} = "yes" ] ; then
36  TRACEARGS="-t all"
37fi
38echo "tar sim -f ${bspTreeFile} ${TRACEARGS}"
39echo "load"
40}
41
42bspSupportsSystemVIPC="yes"
43
44bspGeneratesDeviceTree="yes"
45bspTreeFile=psim_tree.${LOGNAME}
46
47### Generate the PSIM device tree based upon the type of application being run
48bspGenerateDeviceTree()
49{
50  enable_sysv_devices="yes"
51
52  if [ X${use_sysv_ipc} = X"yes" ] ; then
53    enable_sysv_devices="yes"
54    value=-1               # for now assume we are slave in this mode
55  else
56    case ${1} in
57      *node*)
58        enable_sysv_devices="yes"
59        case ${1} in
60          *node1*) value=1 ;;
61          *)       value=-1 ;;
62        esac
63        ;;
64      *)
65        enable_sysv_devices="no"
66        ;;
67    esac
68  fi
69
70  if [ ${enable_sysv_devices} = "yes" ] ; then
71    if [ X${RTEMS_SHM_SEMAPHORE_KEY} = X -o X${RTEMS_SHM_KEY} = X ] ; then
72      fatal  RTEMS_SHM_SEMAPHORE_KEY and/or RTEMS_SHM_KEY not set
73    fi
74  fi
75
76cat <<EOF
77#
78#  Device Tree for PSIM
79#
80#  Automatically Generated -- DO NOT EDIT!!
81#
82/#address-cells 1
83/openprom/init/register/pvr 0xfffe0000
84/openprom/options/oea-memory-size 16777216
85##### EEPROM @ 0x0c000000 for 512K
86/eeprom@0x0c000000/reg 0x0c000000 0x80000
87/eeprom@0x0c000000/nr-sectors 8
88/eeprom@0x0c000000/sector-size 0x10000
89/eeprom@0x0c000000/byte-write-delay 1000
90/eeprom@0x0c000000/sector-start-delay 100
91/eeprom@0x0c000000/erase-delay 1000
92/eeprom@0x0c000000/manufacture-code 0x01
93/eeprom@0x0c000000/device-code 0xa4
94
95##### NVRAM/RTC NVRAM Portion is 0x0c080000 for 512K
96##### NVRAM/RTC RTC   Portion is 0x0c100000 for 12
97/nvram@0x0c080000/reg 0x0c080000 524300
98/nvram@0x0c080000/timezone -3600
99
100##### OPENPIC @ 0x0c130000 - 0x0c170000 (512K)
101/opic@0x0c130000/reg              0x0c130000 0 0x0c130000 0x40000
102/opic@0x0c130000/interrupt-ranges 0 0 0 16
103/opic@0x0c130000/device_type      open-pic
104## interupt out -> CPU's interrupt pin
105/opic@0x0c130000 > intr0 int /cpus/cpu@0
106EOF
107
108  if [ ${enable_sysv_devices} = yes ] ; then
109    echo "##### System V IPC (Semaphore) 0x0c100010 for 12"
110    echo "/sem@0x0c100010/reg 0x0c100010 12"
111    echo "/sem@0x0c100010/key ${RTEMS_SHM_SEMAPHORE_KEY}"
112    echo "/sem@0x0c100010/value ${value}"
113    echo
114    echo "##### System V IPC (Shared Memory) 0x0c110000 for 128K"
115    echo "/shm@0x0c110000/reg 0x0c110000 0x20000"
116    echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}"
117  fi
118}
Note: See TracBrowser for help on using the repository browser.