From: Bob Irwin <bobi@sis-dev.com>
Subject: mmap of pci card memory
Date: Fri, 19 Jul 2002 13:14:31 -0500 [thread overview]
Message-ID: <3D385707.E279C6E0@sis-dev.com> (raw)
Running tru64 on a compaq alpha. (tru64 V5.1A Rev 1885). I've written a
device driver for a pci card that seems to identify and configure OK.
printfs in the configure code shows correct PCI id and unique values
in the PCI memory via BAR0.
A test program shows that xxopen, xxioctl, xxclose functions are being
entered.
However mmap() call fails with error 22 (EINVAL). The xxmmap function
in the driver is not entered. It appears that the mmap() never makes
it to the kernel.
The test program runs fine using a
disk file instead of /dev/xx, mmap is OK.
Here's the mmap call (and card has 32 mbytes of onboard mem)
pWindow = mmap( (caddr_t) 0, (size_t)16384,
(int)(PROT_READ | PROT_WRITE),
(int)MAP_SHARED | MAP_VARIABLE, (int)fd, (off_t) 0 );
Another quirk, when I do the 'sysconfig -v -c', cfgmgr seems happy
til the end when it exits with:
xx driver V.100 configured
sending reply packet
waiting for new packet
cfgmgr: read failed (errno 2)
errno.h shows 2 to be 'no such file or directory. There's no truss
command on this system, so don't have a clue what cfgmgr was trying
to read.
Anyone have any clues to this cfgmgr behavior or why mmap is
saying Invalid Argument? The driver is a character driver based
on the sample driver generated by the web 'Driver Builder'.
any pointers or suggestions will be appreciated.
thanks, bob
--
Bob Irwin <bobi@sis-dev.com> SIS Development 832-448-3200 x13 Houston, TX
next reply other threads:[~2002-07-19 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-19 18:14 Bob Irwin [this message]
2002-07-22 12:17 ` mmap of pci card memory Andrew Duane USG
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox