From owner-freebsd-current Thu Jan 11 17:33:49 2001 Delivered-To: freebsd-current@freebsd.org Received: from email_server.midstream.com (unknown [63.113.115.195]) by hub.freebsd.org (Postfix) with ESMTP id EEF2A37B404 for ; Thu, 11 Jan 2001 17:33:31 -0800 (PST) Received: by EMAIL_SERVER with Internet Mail Service (5.5.2650.21) id ; Thu, 11 Jan 2001 17:35:43 -0800 Message-ID: <31E4B6337A4FD411BD45000102472E0C05E729@EMAIL_SERVER> From: Jeff Roberson To: "'freebsd-current@freebsd.org'" Subject: Broken mmap in current? Date: Thu, 11 Jan 2001 17:35:37 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C07C37.FA49D1D0" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C07C37.FA49D1D0 Content-Type: text/plain; charset="iso-8859-1" I have written a character device driver for a proprietary PCI device that has a large sum of mapable memory. The character device supports mmap() which I use to export the memory into a user process. I have no problems accessing the memory on this device, but I notice that my mmap routine is called for every access! Is this a problem with current, or a problem with my mmap? I use bus_alloc_resource and then rman_get_start to get the physical address in my attach, and then the mmap just returns atop(physical address). I assumed this is correct since I have verified with a logical analyzer that I am indeed writing to the memory on the device. Also, I noticed that the device's mmap interface does not provide any way to limit the size of the block being mapped? Can I specify the length of the region? Thanks, Jeff ------_=_NextPart_001_01C07C37.FA49D1D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Broken mmap in current?

I have written a character device driver for a = proprietary PCI device that has a large sum of mapable memory.  = The character device supports mmap() which I use to export the memory = into a user process.  I have no problems accessing the memory on = this device, but I notice that my mmap routine is called for every = access!  Is this a problem with current, or a problem with my = mmap?

I use bus_alloc_resource and then rman_get_start to = get the physical address in my attach, and then the mmap just returns = atop(physical address).  I assumed this is correct since I have = verified with a logical analyzer that I am indeed writing to the memory = on the device.  Also, I noticed that the device's mmap interface = does not provide any way to limit the size of the block being = mapped?  Can I specify the length of the region?

Thanks,
Jeff

------_=_NextPart_001_01C07C37.FA49D1D0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message