From 6799bf57fda003c2e8e3a1fa397ed69b7b8d4e18 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Wed, 4 Dec 2013 11:46:33 -0500 Subject: initial commit --- README | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..1030a30 --- /dev/null +++ b/README @@ -0,0 +1,54 @@ + + _ _ _ + _ _(_) ___ ___| |_| | + | | | | |/ _ \ / __| __| | + | |_| | | (_) | (__| |_| | + \__,_|_|\___/ \___|\__|_| + + +trivial utility for manipulating simple Linux UIO devices ("Userspace I/O"). +eg, reading and writing bytes to memory mapped devices or monitoring +interrupts. +can list all devices and their mappings. +little-endian by default. + +------------------------------------------------------------------------------- + +gcc uioctl.c -o uioctl + +------------------------------------------------------------------------------- + +./uioctl -h +little-endian by default + -w select word width (default: 4) + -s size of mmap (default: base + length, rounded up to PAGE_SIZE) + +./uioctl /dev/uio0 0 -n 100 -w 1 -r 0 +./uioctl /dev/uio0 0x818 0 +./uioctl /dev/uio0 -m +./uioctl -l + +also, secret trick: + +sudo ./uioctl /dev/mem 0x818 -n 5 + +BUT WAIT? + +hexdump -C /dev/uio0 -s 0x + +------------------------------------------------------------------------------- + +UIO: user-space drivers (2007) +https://lwn.net/Articles/232575/ + +The Userspace I/O HOWTO (2006-2009) +https://www.kernel.org/doc/htmldocs/uio-howto/ + +Simple userland drivers for FPGA interfaces (eg, AXI) +http://svenand.blogdrive.com/archive/150.html + +devmem2.c: Simple program to read/write from/to any location in memory +http://sources.buildroot.net/devmem2.c + +pydevmem +https://github.com/kylemanna/pydevmem -- cgit v1.2.3