blob: 723d5fbcc0a5f8fa14924983e89ed59c9c17b731 (
plain) (
tree)
|
|
#
# PowerPC/psim Support
#
runARGS()
{
if [ ${doTrace} = "yes" ] ; then
TRACEARGS="-t all"
fi
echo "-f ${bspTreeFile} ${TRACEARGS} ${1}"
}
checkBSPFaults()
{
return 0
}
bspLimit()
{
testname=$1
case ${testname} in
*stackchk*)limit=5 ;;
*fatal*) limit=1 ;;
*minimum*) limit=1 ;;
*psxtime*) limit=180 ;;
*) limit=60 ;;
esac
echo ${limit}
}
bspGeneratesGDBCommands="yes"
bspGenerateGDBCommands()
{
if [ ${doTrace} = "yes" ] ; then
TRACEARGS="-t all"
fi
echo "tar sim -f ${bspTreeFile} ${TRACEARGS}"
echo "load"
}
bspSupportsSystemVIPC="yes"
bspGeneratesDeviceTree="yes"
bspTreeFile=psim_tree.${LOGNAME}
### Generate the PSIM device tree based upon the type of application being run
bspGenerateDeviceTree()
{
enable_sysv_devices="yes"
if [ X${use_sysv_ipc} = X"yes" ] ; then
enable_sysv_devices="yes"
value=-1 # for now assume we are slave in this mode
else
case ${1} in
*node*)
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
#
# Device Tree for PSIM
#
# Automatically Generated -- DO NOT EDIT!!
#
/#address-cells 1
/openprom/init/register/pvr 0xfffe0000
/openprom/options/oea-memory-size 16777216
##### EEPROM @ 0x0c000000 for 512K
/eeprom@0x0c000000/reg 0x0c000000 0x80000
/eeprom@0x0c000000/nr-sectors 8
/eeprom@0x0c000000/sector-size 0x10000
/eeprom@0x0c000000/byte-write-delay 1000
/eeprom@0x0c000000/sector-start-delay 100
/eeprom@0x0c000000/erase-delay 1000
/eeprom@0x0c000000/manufacture-code 0x01
/eeprom@0x0c000000/device-code 0xa4
##### NVRAM/RTC NVRAM Portion is 0x0c080000 for 512K
##### NVRAM/RTC RTC Portion is 0x0c100000 for 12
/nvram@0x0c080000/reg 0x0c080000 524300
/nvram@0x0c080000/timezone -3600
##### OPENPIC @ 0x0c130000 - 0x0c170000 (512K)
/opic@0x0c130000/reg 0x0c130000 0 0x0c130000 0x40000
/opic@0x0c130000/interrupt-ranges 0 0 0 16
/opic@0x0c130000/device_type open-pic
## interupt out -> CPU's interrupt pin
/opic@0x0c130000 > intr0 int /cpus/cpu@0
EOF
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}"
echo "/sem@0x0c100010/value ${value}"
echo
echo "##### System V IPC (Shared Memory) 0x0c110000 for 128K"
echo "/shm@0x0c110000/reg 0x0c110000 0x20000"
echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}"
fi
}
|