Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 296561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:33:35+00:00 2026-05-12T06:33:35+00:00

I’m trying to map a VME address space through a PCI bus into user

  • 0

I’m trying to map a VME address space through a PCI bus into user space so I can perform regular read/writes on the memory.
I have done this with another PCI device like this :-

unsigned long *mapArea(unsigned int barAddr, unsigned int mapSize, int *fd)
{
    unsigned long *mem;

    *fd = open("/dev/mem", O_RDWR);
    if ( *fd<0 ) {
       printf("Cannot open /dev/vme_mem\n");
    exit(-1);
}

unsigned long *mem = (unsigned long*) mmap ( 0, mapSize, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, *fd,  barAddr); 
if ( (mem == NULL) || (mem == (unsigned long*)-1) ) {
    printf ( "Cannot map memory, error is %s\n", strerror(errno) );
    exit(-1);
    }

    return mem;
}

volatile unsigned long *bar = (volatile unsigned long *)mapArea(barAddr, mapSize, &fd);

And then “bar” can be used normally for read/writes.

So to VME, and with a Tundra Universe II PCI-VME Bridge chip :-

Should I open “/dev/vme_m0”
Where do I map my BAR from? the lspci -vv : “Region 1: Memory at 80020000”

Also the addresses within the VME BUS are offset by 0x20000000, so how does that work wrt accessing/mapping it?!

(Using Linux 2.6.18-128.el5 #1 SMP)
(Need new tag “vme”!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:33:35+00:00Added an answer on May 12, 2026 at 6:33 am

    Where does /dev/vme_m0 come from and what does it represent? It is hard to tell what opening and accessing it will do without knowing more.

    You need to look at the bridge chip manual to figure out how a read/write to Region 1 will translate to a read/write on the VME bus. The bridge chip should have a set of registers that define PCI -> VME address translations. The VME address generated by accessing 0x80020000 would depend on the VME address specified in one of those registers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.