Open Terminus-IMRC opened 6 years ago
We can use /dev/vc-mem
instead of /dev/mem
!!! -- though it's not merged into stable yet...: https://github.com/torvalds/linux/blob/master/drivers/staging/vc04_services/interface/vchi/TODO#L6
So we should at first try /dev/vc-mem
to access peripheral on standard Raspbian but STRICT_DEVMEM=y
kernel, and then try /dev/mem
.
Current implementation
mmap
's entire peripheral memory, whileCONFIG_STRICT_DEVMEM=y
kernel refuses memory mapping of which area is already used by drivers. So such mapping fails withEPERM
on most cases.So what should we do? Map peripheral on demand? How?