This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Serial RapidIO

Other Parts Discussed in Thread: TMS320C6474

Dear All,

I'm using c6x Linux on C6474 and I want to test Serial RapidIO.

The full-root kernel compilation succeeded.

During the kernel boot I get the following traces :

RIO: register sRIO controller for hostid 0
TCI648x RapidIO driver v2.1
RIO: setting EDMA threshold to 0xffffffff

But according to the website (http://linux-c6x.org/wiki/index.php/Serial_RapidIO) I must have the following message :

     RIO: register sRIO controller for hostid 0
RIO: enumerate master port 0, RIO0 mport
TCI648x RapidIO driver v2.1
RIO: setting EDMA threshold to 0x8000


And when I execute the command : ls -la /dev/ | grep rio I have no response.

I will be thankful if you can help me.
  • Hello,

     You need to check if the sRIO parameters are configured properly in kernel command line, as well as the switch setting for sRIO boot mode. An example is list on the wiki page: http://linux-c6x.org/wiki/index.php/Serial_RapidIO.

     riohdid=0 rioports=1 rioinit=enum riomode=0 rioedma-threshold=32768 (for TCI6474 device #1)

     riohdid=-1 rioports=1 rioinit=discov riomode=0 rioedma-threshold=32768 (for TCI6474 device #2)

     riomode=0 (BOOTM0 on, BOOTM1 on, BOOTM2 on and BOOTM3 off).

     

    Regards,

    Garrett

     

  • Hi,

    Thank's for your reply.

    The SRIO parameters are now  configured properly in kernel command line .

    CMDLINE = console=cio ip=192.168.0.2 root=/dev/nfs nfsroot=192.168.0.1:/opt/full-root-c6x-le rw riohdid=0 rioports=1 rioinit=enum riomode=0 rioedma-threshold=32768

    and it's the same for the switch setting for sRIO boot mode

    BOOTM0 on, BOOTM1 on, BOOTM2 on and BOOTM3 off

    During the kenel boot I get :

    RIO: register sRIO controller for hostid 0
    TCI648x RapidIO driver v2.1
    RIO: setting EDMA threshold to 0x8000

    But according to the c6x wiki I must have :

         RIO: register sRIO controller for hostid 0
    RIO: enumerate master port 0, RIO0 mport
    TCI648x RapidIO driver v2.1
    RIO: setting EDMA threshold to 0x8000


    When I execute ls -la /dev/ | grep rio there is no response.

    And I don't understand well the "rio init" parameter (enum, discov, discov_wait).



  • A sRIO enumeration (rioinit=enum) in core #1 with host devID set to 0 (riohdid=0), the other sRIO devices on the bus will be enumerated like this:
    devID = 0 for self.
    devID = 1 for the remote site to which is connected and the process continue if the remote site is a switch (with DevID = 2, 3 , …)
    Then boot the core #2 with a sRIO discovery (rioinit=discov) without setting host devID (riohdid=-1). The host devID will be read from the configuration space with the value set by the enumeration performed previously by the core #1. discov_wait peformes sRIO bus discovery after waiting for being enumerated by remote host. Please refer to int __devinit rio_enum_mport(struct rio_mport *mport) and int __devinit rio_disc_mport(struct rio_mport *mport) in drivers/rapidio/rio-scan.c for details.

    Below is a complete log for core #1 with rioinit=enum on Spectrum Digital C6474 EVM board, you may post your log as well so we can take a look.

    [C64XP_1A] Designed for the EVM6474 board, Texas Instruments.
    [C64XP_1A] CPU0: C64x+ rev 0x10, 1.2 volts, 1000MHz
    [C64XP_1A] Initializing kernel
    [C64XP_1A] no initrd specified
    [C64XP_1A] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    [C64XP_1A] Kernel command line: console=cio root=/dev/nfs rw nfsroot=158.218.109.88:/opt/min-root-073 ip=dhcp riohdid=0 rioports=1 rioinit=enum riomode=0 rioedma-threshold=32768
    [C64XP_1A] PID hash table entries: 512 (order: -1, 2048 bytes)
    [C64XP_1A] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    [C64XP_1A] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    [C64XP_1A] Memory available: 126204k/127340k RAM, 0k/0k ROM (742k kernel code, 188k data)
    [C64XP_1A] SLUB: Genslabs=7, HWalign=128, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [C64XP_1A] Hierarchical RCU implementation.
    [C64XP_1A] RCU-based detection of stalled CPUs is enabled.
    [C64XP_1A] NR_IRQS:192
    [C64XP_1A] console [cio0] enabled
    [C64XP_1A] Console: colour dummy device 80x25
    [C64XP_1A] Calibrating delay loop... [C64XP_1A] 999.42 BogoMIPS (lpj=1998848)
    [C64XP_1A] Mount-cache hash table entries: 512
    [C64XP_1A] C64x: 16 gpio irqs
    [C64XP_1A] NET: Registered protocol family 16
    [C64XP_1A] RIO: register sRIO controller for hostid 0
    [C64XP_1A] RIO: enumerate master port 1, RIO1 mport
    [C64XP_1A] TCI648x RapidIO driver v2.1
    [C64XP_1A] RIO: setting EDMA threshold to 0x8000
    [C64XP_1A] bio: create slab <bio-0> at 0
    [C64XP_1A] Switching to clocksource TSC64
    [C64XP_1A] NET: Registered protocol family 2
    [C64XP_1A] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    [C64XP_1A] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    [C64XP_1A] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [C64XP_1A] TCP: Hash tables configured (established 4096 bind 4096)
    [C64XP_1A] TCP reno registered
    [C64XP_1A] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [C64XP_1A] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [C64XP_1A] NET: Registered protocol family 1
    [C64XP_1A] RPC: Registered udp transport module.
    [C64XP_1A] RPC: Registered tcp transport module.
    [C64XP_1A] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [C64XP_1A] MCORE: create SRAM, core=0, start=0x10800000 size=0x100000
    [C64XP_1A] MCORE: create SRAM, core=1, start=0x11800000 size=0x100000
    [C64XP_1A] MCORE: create DDR, core=1, start=0x80000000 size=0x80000000
    [C64XP_1A] MCORE: create SRAM, core=2, start=0x12800000 size=0x100000
    [C64XP_1A] MCORE: create DDR, core=2, start=0x80000000 size=0x80000000
    [C64XP_1A] eth0: EMAC(0) driver version 2.1 IRQ=6 queue=0
    [C64XP_1A] eth0: MAC address=[C64XP_1A] 3c:[C64XP_1A] 2d:[C64XP_1A] b7:[C64XP_1A] 23:[C64XP_1A] 4c:[C64XP_1A] 21 PHY=SGMII
    [C64XP_1A] ROMFS MTD (C) 2007 Red Hat, Inc.
    [C64XP_1A] msgmni has been set to 246
    [C64XP_1A] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
    [C64XP_1A] io scheduler noop registered
    [C64XP_1A] io scheduler deadline registered
    [C64XP_1A] io scheduler cfq registered (default)
    [C64XP_1A] brd: module loaded
    [C64XP_1A] loop: module loaded
    [C64XP_1A] at24 1-0050: 32768 byte 24c256 EEPROM (writable)
    [C64XP_1A] uclinux[mtd]: RAM probe address=0x803a48e0 size=0x80680000
    [C64XP_1A] Creating 1 MTD partitions on "RAM":
    [C64XP_1A] 0x000000000000-0x000080680000 : "ROMfs"
    [C64XP_1A] Generic platform RAM MTD, (c) 2004 Simtec Electronics
    [C64XP_1A] eth1: rionet Ethernet over RapidIO Version 0.2, MAC 00:01:00:01:00:00
    [C64XP_1A] Using 00:e:0001 (vid 0030 did 0092)
    [C64XP_1A] console [netcon0] enabled
    [C64XP_1A] netconsole: network logging started
    [C64XP_1A] TCP cubic registered
    [C64XP_1A] NET: Registered protocol family 17
    [C64XP_1A] Sending DHCP requests .[C64XP_1A]
    [C64XP_1A] DHCP/BOOTP: Ignoring delayed packet
    [C64XP_1A] DHCP/BOOTP: Ignoring delayed packet
    [C64XP_1A] .[C64XP_1A] ,[C64XP_1A]  OK
    [C64XP_1A] IP-Config: Got DHCP answer from 0.0.0.0, [C64XP_1A] my address is 158.218.109.191
    [C64XP_1A] IP-Config: Complete:[C64XP_1A]
    [C64XP_1A]      device=eth0[C64XP_1A] , addr=158.218.109.191[C64XP_1A] , mask=255.255.255.0[C64XP_1A] , gw=158.218.109.2[C64XP_1A] ,
    [C64XP_1A]      host=158.218.109.191, domain=am.dhcp.ti.com, nis-domain=(none)[C64XP_1A] ,
    [C64XP_1A]      bootserver=0.0.0.0[C64XP_1A] , rootserver=158.218.109.88[C64XP_1A] , rootpath=[C64XP_1A]
    [C64XP_1A] Looking up port of RPC 100003/2 on 158.218.109.88
    [C64XP_1A] Looking up port of RPC 100005/1 on 158.218.109.88
    [C64XP_1A] VFS: Mounted root (nfs filesystem) on device 0:11.
    [C64XP_1A] Freeing unused kernel memory: 140K freed
    [C64XP_1A]
    starting pid 15, tty '': '/etc/rc.sysinit'[C64XP_1A]
    [C64XP_1A]
    [C64XP_1A] Starting system...[C64XP_1A]
    [C64XP_1A]

  • Thank you Garrett Ding for your reply.

    I didn't understand well what do you mean by "boot core #2 with a sRIO discovery (rioinit=discov) without setting host devID (riohdid=-1)"?

    do you mean that I must have two linux kernels running on two cores . for the first one I set riohdid=0 , rioinit=enum and for the second one I set riohdid=-1 , rioinit=discov ???

    This is a complete log for core #1 with rioinit=enum and iohdid=0 on my C6474

     

    Linux version 2.6.34-evmc6474.el-20110502 (majdoub@localhost.localdomain) (gcc version 4.5.1 (Sourcery G++ Lite 4.5-97) ) #14 Mon May 2 10:46:36 CEST 2011
    Designed for the EVM6474 board, Texas Instruments.
    CPU0: C64x+ rev 0x10, 1.2 volts, 1000MHz
    Initializing kernel
    no initrd specified
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    Kernel command line: console=cio ip=192.168.0.2 root=/dev/nfs nfsroot=192.168.0.1:/opt/full-root-c6x-le rw riohdid=0 rioports=1 rioinit=enum riomode=0 rioedma-threshold=32768
    PID hash table entries: 512 (order: -1, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory available: 126204k/127340k RAM, 0k/0k ROM (742k kernel code, 188k data)
    SLUB: Genslabs=7, HWalign=128, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    RCU-based detection of stalled CPUs is enabled.
    NR_IRQS:192
    console [cio0] enabled
    Console: colour dummy device 80x25
    Calibrating delay loop... 999.42 BogoMIPS (lpj=1998848)
    Mount-cache hash table entries: 512
    C64x: 16 gpio irqs
    NET: Registered protocol family 16
    RIO: register sRIO controller for hostid 0
    TCI648x RapidIO driver v2.1
    RIO: setting EDMA threshold to 0x8000
    bio: create slab <bio-0> at 0
    Switching to clocksource TSC64
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    MCORE: create SRAM, core=0, start=0x10800000 size=0x100000
    MCORE: create SRAM, core=1, start=0x11800000 size=0x100000
    MCORE: create DDR, core=1, start=0x80000000 size=0x80000000
    MCORE: create SRAM, core=2, start=0x12800000 size=0x100000
    MCORE: create DDR, core=2, start=0x80000000 size=0x80000000
    Warning sharing of GEMAC has issues with silicon rev 1.3!
    eth0: EMAC(0) driver version 2.1 IRQ=6 queue=0 
    eth0: MAC address=00:21:ba:13:89:ec PHY=SGMII
    ROMFS MTD (C) 2007 Red Hat, Inc.
    msgmni has been set to 246
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    brd: module loaded
    loop: module loaded
    at24 1-0050: 32768 byte 24c256 EEPROM (writable)
    uclinux[mtd]: RAM probe address=0x803a48e0 size=0x88ec2000
    Creating 1 MTD partitions on "RAM":
    0x000000000000-0x000088ec2000 : "ROMfs"
    Generic platform RAM MTD, (c) 2004 Simtec Electronics
    console [netcon0] enabled
    netconsole: network logging started
    TCP cubic registered
    NET: Registered protocol family 17
    IP-Config: Guessing netmask 255.255.255.0
    IP-Config: Complete:
         device=eth0, addr=192.168.0.2, mask=255.255.255.0, gw=255.255.255.255,
         host=192.168.0.2, domain=, nis-domain=(none),
         bootserver=255.255.255.255, rootserver=192.168.0.1, rootpath=
    Looking up port of RPC 100003/2 on 192.168.0.1
    Looking up port of RPC 100005/1 on 192.168.0.1
    VFS: Mounted root (nfs filesystem) on device 0:11.
    Freeing unused kernel memory: 140K freed
     
    starting pid 15, tty '': '/etc/rc.sysinit'
     
    Starting system...
     
    Mounting proc filesystem: done.
    Mounting other filesystems: done.
    Starting mdev
    Setting hostname 192.168.0.2: done.
    Bringing up loopback interface: done.
    Starting inetd: done.
     
    System started.
     
     
    starting pid 51, tty '/dev/console': '/bin/sh'
    / # Nov 30 00:01:00 login[53]: root login on 'pts/0'

     

  • Hi

     

    You must have two linux kernels running on two cores (core #1 in C6474 device #1 and core #2 in C6474 device #2) to make sRIO discovery work. For the first one, set riohdid=0 , rioinit=enum and for the second one set riohdid=-1 , rioinit=discov. For sRIO enum initialization, you just need one kernel.

     

    I saw the warning ‘sharing of GEMAC has issues with silicon rev 1.3!’ in your log, what’s the EVM you are using? The sRIO feature is tested on Spectrum Digital EVM with dual C6474 devices.

     

    Regards,

    Garrett

  • Hi,

    I'm using Spectrum Digital TMS320C6474 Messanine EVM Board. (with dual c6474 devices).

    I changed my board (it's always a Spectrum Digital with dual c6474 devices) and now I don't have the warning message like before. but I still can't use the sRIO driver.

    This is my new log :

    Linux version 2.6.34-evmc6474.el-20110502 (majdoub@localhost.localdomain) (gcc version 4.5.1 (Sourcery G++ Lite 4.5-97) ) #14 Mon May 2 10:46:36 CEST 2011
    Designed for the EVM6474 board, Texas Instruments.
    CPU0: C64x+ rev 0x10, 1.2 volts, 1000MHz
    Initializing kernel
    no initrd specified
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    Kernel command line: console=cio ip=192.168.0.2 root=/dev/nfs nfsroot=192.168.0.1:/opt/full-root-c6x-le rw riohdid=0 rioports=1 rioinit=enum riomode=0 rioedma-threshold=32768
    PID hash table entries: 512 (order: -1, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory available: 126204k/127340k RAM, 0k/0k ROM (742k kernel code, 188k data)
    SLUB: Genslabs=7, HWalign=128, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    RCU-based detection of stalled CPUs is enabled.
    NR_IRQS:192
    console [cio0] enabled
    Console: colour dummy device 80x25
    Calibrating delay loop... 999.42 BogoMIPS (lpj=1998848)
    Mount-cache hash table entries: 512
    C64x: 16 gpio irqs
    NET: Registered protocol family 16
    RIO: register sRIO controller for hostid 0
    TCI648x RapidIO driver v2.1
    RIO: setting EDMA threshold to 0x8000
    bio: create slab <bio-0> at 0
    Switching to clocksource TSC64
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    MCORE: create SRAM, core=0, start=0x10800000 size=0x100000
    MCORE: create SRAM, core=1, start=0x11800000 size=0x100000
    MCORE: create DDR, core=1, start=0x80000000 size=0x80000000
    MCORE: create SRAM, core=2, start=0x12800000 size=0x100000
    MCORE: create DDR, core=2, start=0x80000000 size=0x80000000
    eth0: EMAC(0) driver version 2.1 IRQ=6 queue=0 
    eth0: MAC address=00:24:ba:58:0a:78 PHY=SGMII
    ROMFS MTD (C) 2007 Red Hat, Inc.
    msgmni has been set to 246
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    brd: module loaded
    loop: module loaded
    at24 1-0050: 32768 byte 24c256 EEPROM (writable)
    uclinux[mtd]: RAM probe address=0x803a48e0 size=0xa214a000
    Creating 1 MTD partitions on "RAM":
    0x000000000000-0x0000a214a000 : "ROMfs"
    Generic platform RAM MTD, (c) 2004 Simtec Electronics
    console [netcon0] enabled
    netconsole: network logging started
    TCP cubic registered
    NET: Registered protocol family 17
    IP-Config: Guessing netmask 255.255.255.0
    IP-Config: Complete:
         device=eth0, addr=192.168.0.2, mask=255.255.255.0, gw=255.255.255.255,
         host=192.168.0.2, domain=, nis-domain=(none),
         bootserver=255.255.255.255, rootserver=192.168.0.1, rootpath=
    Looking up port of RPC 100003/2 on 192.168.0.1
    Looking up port of RPC 100005/1 on 192.168.0.1
    VFS: Mounted root (nfs filesystem) on device 0:11.
    Freeing unused kernel memory: 140K freed
     
    starting pid 15, tty '': '/etc/rc.sysinit'
     
    Starting system...
     
    Mounting proc filesystem: done.
    Mounting other filesystems: done.
    Starting mdev
    Setting hostname 192.168.0.2: done.
    Bringing up loopback interface: done.
    Starting inetd: done.
     
    System started.

     

     

  • 8551.cmdline.zip

    I modified the release 0.7.3 pre-built image with your kernel cmd line, and was able to see “RIO: enumerate master port 1, RIO1 mport”.  I am attaching the cmdline.dat (saved from cmd line memory starting from 0x80001000 with length 44 words), so after you download the pre-built image vmlinux-2.6.34-evmc6474.el-20110223-1 from http://linux-c6x.org/files/releases/linux-c6x-0.7.3/kernel-images/, load it from CCS and then simply load the cmdline.dat (unzip cmdline.zip) to memory 0x80001000 in memory browser window, you will see the cmdline you were using in 0x80001000. And then run the kernel, you should be able to sRIO enumerate master port 1, if not, you need review your DIP switch setting.

     

    Regards,

    Garrett

     

  • Hi,

    when I set SW5 switch to ON ON ON OFF (as you said before) and  load linux, during the kernel boot the kernel send a DHCP request which is not normal because in the kernel commande line I specified a static ip adress. so I have a message error and I can't run linux.

    error message :

    Sending DHCP and RARP requests .

    DHCP/BOOTP: Ignoring delayed packet

    ..... timed out !

    IP-config: Retrying forever (NFS root) ...

    I don't understand  why I get a DHCP request ?!?

  •  

    Hi

     

    Could you try to modify the cmd line ip=192.168.0.2 to ip=192.168.0.2:::255.255.255.0::eth0: to see if the problem still exists? You can also use the attached cmdline2.dat to load into memory 0x80001000 (length 50), which will overwrite the pre-built kernel cmd line.

     

    If everything works fine with the pre-built image (plus modified kernel command line), You may post your setenv or ‘make clean’ and re-build your kernel and file system.

     

    Regards,8585.cmdline2.zip

    Garrett

     

     

     

  • Hi,

    I changed my kernel command as you already said and now it works.

    Thank you so much for your help. I appreciate your efforts.

  • Hi mwere9

     

    It’s good to know you are making progress. Hope you have fun with TI Linux-C6x!

     

    Regards,

    Garrett