mmaping device memory into userspace.
am 28.03.2007 06:15:52 von Daniel Rodrick
Hi list,
If we map device memory into user space using mmap(), the user will be
able to do read / write into device using normal memory handling
routines, right?
But as mentioned in LDD3, should appropriate readb() / writeb()
routines be actually used to read / write into device memory?
Thanks,
Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: mmaping device memory into userspace.
am 28.03.2007 12:29:38 von Erik Mouw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, Mar 28, 2007 at 09:45:52AM +0530, Daniel Rodrick wrote:
> If we map device memory into user space using mmap(), the user will be
> able to do read / write into device using normal memory handling
> routines, right?
Right.
> But as mentioned in LDD3, should appropriate readb() / writeb()
> routines be actually used to read / write into device memory?
LDD3 is right (as usual :).
Erik
- --
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGCkOS/PlVHJtIto0RAlkIAJwMalJoA8QoQavSVCkNWUUmKCbsQACf XN9F
KBBecJiZkGziQYhrx0bt8kU=
=XlKa
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: mmaping device memory into userspace.
am 28.03.2007 18:47:50 von Daniel Rodrick
On 3/28/07, Erik Mouw wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Wed, Mar 28, 2007 at 09:45:52AM +0530, Daniel Rodrick wrote:
> > If we map device memory into user space using mmap(), the user will be
> > able to do read / write into device using normal memory handling
> > routines, right?
>
> Right.
>
> > But as mentioned in LDD3, should appropriate readb() / writeb()
> > routines be actually used to read / write into device memory?
>
> LDD3 is right (as usual :).
>
So using mmap() to map device memory into user space, and then reading
/ writing to device memory in same way as normal memory isn't correct?
Thanks,
Dan.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs