From owner-freebsd-hackers Wed Apr 30 11:17:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA08719 for hackers-outgoing; Wed, 30 Apr 1997 11:17:04 -0700 (PDT) Received: from zephyr.isi.edu (zephyr.isi.edu [128.9.160.160]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA08714 for ; Wed, 30 Apr 1997 11:17:02 -0700 (PDT) Received: from roo.isi.edu by zephyr.isi.edu (5.65c/5.61+local-24) id ; Wed, 30 Apr 1997 11:16:55 -0700 Message-Id: <199704301816.AA24723@zephyr.isi.edu> X-Mailer: exmh version 1.6.4 10/10/95 To: hackers@freebsd.org Subject: pci device drivers and user memory mapping code Reply-To: hutton@ISI.EDU Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 30 Apr 97 11:16:01 PDT From: Anne Hutton Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I'm trying to add some code to a pci device driver to do user memory mapping and it doesn't seem to be working. I've looked at the device driver tutorial on the FreeBSD web pages but find it doesn't go into sufficient detail. Basically, I have followed the structure for a pci driver and I now need to add code which will do a device_mmap, device_ioctl, device_open and device_close. I have added a cdevsw to conf.c and added the apropriate functions to my driver in /sys/pci. I'm not sure that my data structures in the pci driver are correct. Can anyone provide an outline/help? I'm using FreeBSD 2.1.5. thanks, Anne Hutton