Control: tag -1 confirmed upstream help
strace micro-evtd:
open("/dev/mem", O_RDWR|O_SYNC) = 4
mmap2(NULL, 4095, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0xf1010000) = -1 EPERM
(Operation not permitted)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x10b} ---
+++ killed by SIGSEGV +++
micro-evtd.c:
static void open_gpio(void)
{
#ifndef NO_GPIO
off_t target = 0xF1010100;
// Grab memory resource
m_fd = open("/dev/mem", O_RDWR | O_SYNC);
if (m_fd>0) {
// Grab GPIO resource
gpio = (unsigned long*)mmap(NULL, MAP_MASK, PROT_READ | PROT_WRITE,
MAP_SHARED, m_fd, (target & ~MAP_MA
// Our GPIO pointer valid?
if (gpio >0) {
// MICON detect bit please
gpio[GPP_DATA_IN_POL_REG] |= MICON;
// Clear MICON interrupt BIT
gpio[GPP_INT_CAUSE_REG] &= ~MICON;
}
}
#else
#warning "Button events via serial control"
#endif
}
src:linux changelog:
linux (4.8.4-1~exp1) experimental; urgency=medium
[...]
[ Ben Hutchings ]
* [arm*] Enable STRICT_DEVMEM
* [arm*,powerpc*,s390x,x86] Enable IO_STRICT_DEVMEM. This breaks dosemu and
some old graphics drivers, and can be reverted using the kernel parameter:
iomem=relaxed
This is somewhat outside my area of expertise. Help would be welcome.