From: Dan Malek <dan@netx4.com>
To: "Mark S. Mathews" <mark@absoval.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Can't mmap the top 1MB of /dev/mem?
Date: Thu, 22 Jun 2000 13:43:03 -0400 [thread overview]
Message-ID: <39525027.A7343F66@embeddededge.com> (raw)
In-Reply-To: Pine.LNX.3.96.1000622130831.10550A-100000@tristar.cc.absoval.com
"Mark S. Mathews" wrote:
> ...... One thing I've noticed is that it won't let me mmap the
> top 1MB of the address space.
That should work, I do this quite regularly. What actually fails,
the mmap() or your access to the mapped region?
There is what I do:
mem_addr = (u_char *)mmap(NULL, FLASH_MEM_SIZE,
(PROT_READ | PROT_WRITE), MAP_SHARED,
mem_fd, FLASH_MEM_ADDR);
#define FLASH_MEM_SIZE and FLASH_MEM_ADDR accordingly. I hope there
isn't some weird arithmetic rounding problem when we hit the top. I
just usually tell this to map the upper 8M bytes.
The MMU doesn't care, if the generic Linux VM subsystem creates the PTEs
it just loads them. I don't remember any code in the mem driver that
would prevent this either. None of this is unique to the 8xx.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-06-22 17:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-22 17:15 Can't mmap the top 1MB of /dev/mem? Mark S. Mathews
2000-06-22 17:43 ` Dan Malek [this message]
2000-06-22 18:47 ` Pavel Roskin
2000-06-22 18:54 ` Dan Malek
2000-06-22 19:58 ` Pavel Roskin
2000-06-22 21:46 ` Dan Malek
2000-06-22 19:00 ` Mark S. Mathews
2000-06-22 19:37 ` Pavel Roskin
2000-06-22 19:50 ` Mark S. Mathews
2000-06-22 20:24 ` Pavel Roskin
2000-06-22 17:50 ` Pavel Roskin
2000-06-22 18:14 ` Frank Smith
2000-06-22 18:37 ` Dan Malek
2000-06-22 19:06 ` Frank Smith
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=39525027.A7343F66@embeddededge.com \
--to=dan@netx4.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=mark@absoval.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.