Greetings!
I'm trying to access a PCI card from linux 2.2.14 user space via the
mbuff module. An lspci -vv shows my PCI card at efdffd00 in region 0 of
the card. My program is basically a copy of demo.c from the mbuff package
and modified to use mbuff_alloc_at. The variable "a" is loaded with the
address I want to access on the card. If I set "a' to oxefdffd00 the
program fails with "mbuff_alloc_at failed". If I set a to 0xa0000000, it
will not fail and returns: shm1=0xa0000000 0.
Any ideas why this doesn't work?
Best regards,
C. Wayne Wright
The program is:
#include <stdio.h>
#include "mbuff.h"
/* the contents of shared memory may change at any time, thus volatile */
volatile unsigned long * shm1, *shm2;
main (){
char *a;
a = (char *)0xefdffd00;
// a = (char *)0xa0000000;
/// inline void * mbuff_alloc_at(const char *name, int size, void * addr)
printf("\na=%p", a);
shm1 = (volatile unsigned long *) mbuff_alloc_at("demo1",32, a);
if( shm1 == NULL ) {
printf("\nmbuff_alloc_at failed\n");
exit(2);
}
printf("\nshm1=%p %0x", shm1, *shm1);
mbuff_free("demo1",(void*)shm1);
printf("\n");
return(0);
}
#lspci -vv
03:0f.0 Class ff00: ACQIRIS: Unknown device 0000
Subsystem: PLX Technology, Inc.: Unknown device 9080
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop-
ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 64 set, cache line size 08
Interrupt: pin A routed to IRQ 11
Region 0: Memory at efdffd00 (32-bit, non-prefetchable)
Region 1: I/O ports at 9400
Region 2: Memory at efdfc000 (32-bit, non-prefetchable)
--<<< We are committed to exceeding requirements >>>----->-+
C.W. Wright,[EMAIL PROTECTED], Ph:757-824-1698
http://lidar.wff.nasa.gov Fax:603-925-6886
NASA, Goddard Space Flight Center
Building N-159 Room E117, Code 972,Wallops Flight Facility
Wallops Island, Va. 23337 Telecommute phone: 410-742-7333
-------+-<-------------------------------------------------
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/