vme csr access

Till Straumann strauman at slac.stanford.edu
Tue Jun 6 02:13:06 UTC 2006

Artem Kazakov wrote:

>Hello All, 
>I'm using MVM5500 to run rtems-
>I'm trying to access vme boards through pci-to-vme bridge (Universe II).
>So, the first task is to access CR/CSR to find my boards
> (EVG-200 &
>EVR-200 by Microresearch Oy);
You might want to talk to Dayle Kotturi - she already ported this driver

>it's my first experience with vme bus, and think I missed something
>Could anyone tell me, what is CR/CSR address space on VME bus exactly?
Something similar to PCI configuration space.

>at least where should I search for my boards in that address space. 
>Or what vme address should I provide to 
>vmeUniverseMasterPortCfg - function? 
The address 0.  Note that you lose A32 if you reconfigure
master port 0 so you should be able to see the CSR but
you won't see the ordinary A32 anymore.

I'd reduce the A32 window (port 0) to free up some
PCI address range and open a new port to map CSR.

>I tried two options: 0, and 0xff000000 (this is from sample code for
>But none of them works for me. 
>When I read from mapped area I only get 0xffffffff values, which is
>somewhat strange. 
>What do I do wrong? 
Could you attach the console messages, please?

-- Till

>Here is the code I use: 
>#include <bsp.h>
>#include <bsp/pci.h>
>#include <libcpu/byteorder.h>
>#include <stdio.h>
>#include <bsp/VME.h>
>#include <bsp/vmeUniverse.h>
>#include <stdlib.h>
>rtems_task Init(
>  rtems_task_argument ignored
>        unsigned long addr;
>        int status, slot;
>        unsigned int *ptr;
>        printf("\n **** START **** \n");
>        vmeUniverseMasterPortsShow(NULL);
>        vmeUniverseSlavePortsShow(NULL);
>        vmeUniverseMasterPortsShow(NULL);
>        for (slot = 1; slot < 32; slot++)
>        {
>                addr = 0x90000000 + (slot << 19);
>                printf("%d %8lx: %2x %2x %2x\n",slot, addr,
>*(char*)(addr + 0x27), *(char *)(addr + 0x2b), *(char *)(addr + 0x2f));
>        }
>        printf("\n **** STOP ***** \n");
>        exit( 0 );
>/* configuration information */
>#include <rtems/confdefs.h>

More information about the users mailing list