PCI mmap - How do I access a PCI board address space?

Hugo hv at uninova.pt
Thu Sep 25 11:58:20 UTC 2003


Hi!

I am using RTEMS for an i386 target architecture.

I am trying to communicate with a PCI board.

I have tryed the board outside RTEMS and it works fine. 

I was able to read the base address where the board should be mapped
into memory.

The Board should be mapped into memory at address 0x1400, unfortunately
I am unable to operate the board properly.

I am guessing that I have been unable to access the board space
properly.

Since there is no mmap function in RTEMS could anyone please tell me how
do I access the board address space?


If I could use the memcpy function I would want to do something like:


/* This is very simplified */

unsigned short data[4];
unsigned short status;

...


for( index=0; index<4; index++ ) {

  memcpy( 0x1400 + index*2, &(data[index]), 2 );

  do {
    /* I should sleep a bit here */

    memcpy( &status, 0x1400, 2 );

  } while ( status & 0x0001 );

}







More information about the users mailing list