vme csr access

Artem Kazakov kazakov at gmail.com
Tue Jun 6 02:42:41 UTC 2006


On Mon, 2006-06-05 at 19:13 -0700, Till Straumann wrote:

> You might want to talk to Dayle Kotturi - she already ported this driver
> to RTEMS.
> 
Thank you for the information. 

> 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.
Yes, you are right, but this is testing environment, so it's ok for now
not to see A32. 

> Could you attach the console messages, please?
Here they are:

Bytes Received =&212460, Bytes Loaded =&212460
Bytes/Seco-----------------------------------------
Welcome to rtems-4.6.99.3(PowerPC/PowerPC 750/mvme5500) on MVME5500-0163
-----------------------------------------
Now BSP_mem_size = 0x1FE00000
BSP_Configuration.work_space_size = F800
Universe II PCI-VME bridge detected at 0x82000000, IRQ 12
Universe Master Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0x20000000 0x0F000000 0x90000000 A32, Dat, Sup
1:    0x00000000 0x00FF0000 0x9F000000 A24, Dat, Sup
2:    0x00000000 0x00010000 0x9FFF0000 A16, Dat, Sup
Universe Slave Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0x90000000 0x1FE00000 0x00000000 A32, Pgm, Dat, Sup, Usr
Overriding main IRQ line PCI info with 76
Registering /dev/console as minor 0 (==/dev/ttyS0)

 **** START ****
Universe Master Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0x20000000 0x0f000000 0x90000000 A32, Dat, Sup
1:    0x00000000 0x00ff0000 0x9f000000 A24, Dat, Sup
2:    0x00000000 0x00010000 0x9fff0000 A16, Dat, Sup
Universe Slave Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0x90000000 0x1fe00000 0x00000000 A32, Pgm, Dat, Sup, Usr
Universe Master Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0xff000000 0x01000000 0x90000000 CSR, Dat, Sup
1:    0x00000000 0x00ff0000 0x9f000000 A24, Dat, Sup
2:    0x00000000 0x00010000 0x9fff0000 A16, Dat, Sup
1 90080000: ff ff ff
2 90100000: ff ff ff
3 90180000: ff ff ff
4 90200000: ff ff ff
5 90280000: ff ff ff
6 90300000: ff ff ff
7 90380000: ff ff ff
8 90400000: ff ff ff
9 90480000: ff ff ff
10 90500000: ff ff ff
11 90580000: ff ff ff
12 90600000: ff ff ff
13 90680000: ff ff ff
14 90700000: ff ff ff
15 90780000: ff ff ff
16 90800000: ff ff ff
17 90880000: ff ff ff
18 90900000: ff ff ff
19 90980000: ff ff ff
20 90a00000: ff ff ff
21 90a80000: ff ff ff
22 90b00000: ff ff ff
23 90b80000: ff ff ff
24 90c00000: ff ff ff
25 90c80000: ff ff ff
26 90d00000: ff ff ff
27 90d80000: ff ff ff
28 90e00000: ff ff ff
29 90e80000: ff ff ff
30 90f00000: ff ff ff
31 90f80000: ff ff ff

 **** STOP *****

Printing a stack trace for your convenience :-)

0x0000CA08--> 0x0000CA08--> 0x0000C818--> 0x0000C7A8--> 0x00003240



And this is the source: 
#include <bsp.h>
#include <bsp/pci.h>
#include <libcpu/byteorder.h>
#include <stdio.h>
#include <bsp/VME.h>
#define _VME_UNIVERSE_DECLARE_SHOW_ROUTINES
#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);

vmeUniverseMasterPortCfg(0,VME_AM_CSR,0xff000000,0x90000000,16*1024*1024);
        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 */
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INIT
#include <rtems/confdefs.h>

Thank you, 
Artem.





More information about the users mailing list