Ignore:
Timestamp:
Sep 11, 2009, 5:13:42 PM (11 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 5, master
Children:
507d382
Parents:
1b290ce7
Message:

2009-09-11 Till Straumann <strauman@…>

  • Makefile.am, preinstall.am, irq/no_pic.c (REMOVED), irq/irq.h, irq/irq_init.c: use openpic from 'shared' area instead of no_pic.
  • inlude/psim.h: use openpic from 'shared' area instead of no_pic. Added 'extern' declaration for (linker-script defined) RamBase? and RamSize? symbols. Let CPP macros expand to these symbols instead of static constants. Added register definitions for OpenPIC in the register area. Added register definitions for ethernet controller in the register area.
  • startup/linkcmds: Increased RamSize? to 16M. Increased 'RAM' memory region to 32M (there is really no disadvantage in making this large). Added comment explaining the inter-relation between RamSize?, the size of the memory region, the device-tree property "oea-memory-size" and the DBAT setting.
  • tools/psim-shared: Try to determine RamSize? from executable and set 'oea-memory-size' accordingly. May be overridden if 'RAM_SIZE' envvar is set. Added openpic to device-tree. Added ethernet controller to device-tree (commented because a PSIM patch is currently required to use this device).
  • startup/bspstart: Increase DBAT0 mapping to size of 32M.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/psim/tools/psim-shared

    r1b290ce7 rb094233  
    3838  fi
    3939
     40  if [ X${RAM_SIZE} = X ] ; then
     41    if [ X${NM} = X ] ; then
     42      NM=${rtemsTarget}-nm
     43    fi
     44    RAM_SIZE=`$NM ${1} | awk '/\<RamSize\>/{print "0x"$1}'`
     45  fi
     46
    4047cat <<EOF
    4148#
     
    4653/#address-cells 1
    4754/openprom/init/register/pvr 0xfffe0000
    48 /openprom/options/oea-memory-size 8388608
     55# This must be >= than linkcmds defined RamSize!
     56/openprom/options/oea-memory-size $RAM_SIZE
    4957##### EEPROM @ 0x0c000000 for 512K
    5058/eeprom@0x0c000000/reg 0x0c000000 0x80000
     
    6169/nvram@0x0c080000/reg 0x0c080000 524300
    6270/nvram@0x0c080000/timezone -3600
     71
     72##### OPENPIC @ 0x0c130000 - 0x0c170000 (512K)
     73/opic@0x0c130000/reg              0x0c130000 0 0x0c130000 0x40000
     74/opic@0x0c130000/interrupt-ranges 0 0 0 16
     75/opic@0x0c130000/device_type      open-pic
     76# interupt out -> CPU's interrupt pin
     77/opic@0x0c130000 > intr0 int /cpus/cpu@0
     78
     79##### ETHTAP @ 0x0c100020 for 0x40
     80##
     81## NOTE 'ethtap' currently (200902) requires psim to
     82##      be patched -- also, it is only supported on
     83##      a linux host.
     84##      the 'ethtap' device transfers data from/to the
     85##      simulated network interface to/from a 'ethertap'
     86##      interface on the linux host (consult tun/tap
     87##      device documentation).
     88##      A very useful tool is 'tunctl' which allows for
     89##      configuring user-accessible, persistent 'tap'
     90##      devices so that psim may be executed w/o special
     91##      (root) privileges.
     92#
     93#/ethtap@0x0c100020/reg           0x0c100020 0x40
     94## route interrupt to open-pic
     95#/ethtap@0x0c100020               > 0 irq0 /opic@0x0c130000
     96## 'tun' device on host
     97#/ethtap@0x0c100020/tun-device    "/dev/net/tun"
     98## name of 'tap' device to use
     99#/ethtap@0x0c100020/tap-ifname    "tap0"
     100## ethernet address of simulated IF
     101#/ethtap@0x0c100020/hw-address    "00:00:00:22:11:00"
     102## generate CRC and append to received packet before
     103## handing over to the simulation. This is mostly for
     104## debugging the rtems device driver. If unsure, leave 'false'.
     105#/ethtap@0x0c100020/enable-crc    false
    63106EOF
    64107
Note: See TracChangeset for help on using the changeset viewer.