From: "R. Ebersole (VTI - new)" <rje@valleytech.com>
To: linuxppc-embedded@ozlabs.org
Subject: mmap + segfaults on MPC8349E
Date: Sat, 08 Dec 2007 21:44:16 -0500 [thread overview]
Message-ID: <475B5680.30303@valleytech.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]
Hi.
We've run into an .... interesting (and frustrating) occurance recently
while testing
out a new board (and BSP). We were wondering if anybody has seen anything
like this.
A description follows:
We wrote some simple drivers/modules to mmap() FPGA registers to user space.
At the moment, for testing, we reserve the upper x-MB of RAM, and mmap()
there, instead.
We open 4 such devices, and mmap() 64KB of space (memory, in this case)
for each.
Accessing the first device opened & mmapped was fine. But accesssing
the 2nd device
yielded some odd behavior. We could read and write the first and 3rd 4K
regions fine, but
if we read from the 2nd one (at offset 0x1000) before we wrote to it, we
get a segmentation
fault. If, however, we wrote first (to the 2nd region), then things
were OK.
Addendum: With the real device, this same behavior happens at the 10th
4-KB region of the device.
Without any of the others mmap()-ed. If we mmap() just that 4-KB
region, things are fine. We
can access the region with ioremap() in the driver w/o issues.
We are running on an MPC8349-E.
Any thoughts or ideas?
vti
--
This message contains confidential information and is intended only for the
individual named. If you are not the intended recipient you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system.
[-- Attachment #2: Type: text/html, Size: 1987 bytes --]
next reply other threads:[~2007-12-09 2:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-09 2:44 R. Ebersole (VTI - new) [this message]
2007-12-09 4:01 ` mmap + segfaults on MPC8349E David Hawkins
2007-12-11 1:53 ` R. Ebersole (VTI - new)
2007-12-11 2:16 ` David Hawkins
2007-12-15 6:40 ` R. Ebersole (VTI - new)
2007-12-15 19:55 ` David Hawkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=475B5680.30303@valleytech.com \
--to=rje@valleytech.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).