Thursday, January 18, 2018

Access mmio register under Linux / Android


Simple program to read & write to a pci device from userspace :

https://github.com/billfarrow/pcimem


Need to turn on CONFIG_DEV_MEM :
CONFIG_DEVMEM=y

And if mmap fail to /dev/mem, make sure strict devmem turned off :
# CONFIG_STRICT_DEVMEM is not set

Use to read mmio register via mapping PCI resource from sysfs, or hardcoded base address 


No comments: