source: rtems-testing/sim-scripts/psim.in @ 2e284ff

4.11
Last change on this file since 2e284ff was 2e284ff, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 20, 2009 at 1:11:22 AM

2009-01-19 Joel Sherrill <joel.sherrill@…>

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