Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* mmap of pci card memory
@ 2002-07-19 18:14 Bob Irwin
  2002-07-22 12:17 ` Andrew Duane USG
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Irwin @ 2002-07-19 18:14 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mmap of pci card memory
  2002-07-19 18:14 mmap of pci card memory Bob Irwin
@ 2002-07-22 12:17 ` Andrew Duane USG
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Duane USG @ 2002-07-22 12:17 UTC (permalink / raw)


In article <3D385707.E279C6E0@sis-dev.com> Bob Irwin <bobi@sis-dev.com> writes:
>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.

I can't offhand say anything about the mmap issue, haven't had a chance
to check the arguments out.

The cfgmgr message is "normal", it signals that the end of the transaction
was found and the main loop is being exited. That's why we don't print out
those messages by default :-)

-

Andrew L. Duane (JOT-7)			duane@zk3.dec.com
HP/Compaq Corporation			Andrew.Duane@compaq.com
110 Spit Brook Road			Andrew.Duane@hp.com
M/S ZKO3-3/U14
Nashua, NH    03062-2698		(603)-884-1294



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-22 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-19 18:14 mmap of pci card memory Bob Irwin
2002-07-22 12:17 ` Andrew Duane USG

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox