Flutterby™! : Bit twiddling on ARM processors under Linux

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Bit twiddling on ARM processors under Linux

2009-03-04 00:21:09.602786+00 by Dan Lyke 2 comments

Sometimes you're working on a Linux platform, maybe it's an ARM, maybe it's an Atmel ARM like an AT91SAM9261 or AT91SAM9XE or AT91SAM9RL, and you want to bang some bits but don't want to write a kernel module to do that. Your applications are running as root, and the dog-eared pages of "Linux Device Drivers" seems to suggest that even though the ARM ports are memory mapped, you request access to them via ioperm() or iopl() and then read and write to them with insl() and outsl(), but just requesting access is always failing.

The correct answer is use mmap() on /dev/mem. And all is right with the world.

[ related topics: Free Software Hardware Hackery Open Source Embedded Devices ]

comments in ascending chronological order (reverse):

#Comment Re: made: 2009-03-04 00:31:21.39486+00 by: meuon

Your value as a worker is high. :)

#Comment Re: Pop! made: 2009-03-04 01:00:17.250943+00 by: jeff

Open up that good bottle of red from just up the road!