Linux 寄存器从用户空间读取 arm i.mx257 - devmem 不工作 [英] Linux register read arm i.mx257 from userland - devmem not working

查看:37
本文介绍了Linux 寄存器从用户空间读取 arm i.mx257 - devmem 不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在 i.mx257 平台上工作,想读取一些外围寄存器(具体来说是 iomux 寄存器)以查看它是如何配置的或是否设置正确.

I'm currently working on a i.mx257 platform and want to read some peripheral registers (the iomux register to be specific) to see how it is configured or if it is set right.

我也从busybox 和devmem2 中读到了有关devmem 的内容.两个都试了,都报错.目前,定制板正在运行来自 meta-fsl-arm yocto meta 包的 linux 内核版本 4.6.0-rc7.系统使用yocto构建.

I've read about the devmem from busybox and devmem2, too. Tried both and both get an error. Currently there the custom board is running linux kernel version 4.6.0-rc7 from the meta-fsl-arm yocto meta package. The system is built with yocto.

root@system/]#./tmp/devmem2 0x43fac190/dev/mem 打开.

root@system /]#./tmp/devmem2 0x43fac190 /dev/mem opened.

未处理的故障:在 0xb6f3a190 处的非行获取 (0x008) 上的外部中止pgd = c3334000[b6f3a190] *pgd=8285e831, *pte=43fac103, *ppte=43facaa2

Unhandled fault: external abort on non-linefetch (0x008) at 0xb6f3a190 pgd = c3334000 [b6f3a190] *pgd=8285e831, *pte=43fac103, *ppte=43facaa2

内存映射到地址 0xb6f3a000.

Memory mapped at address 0xb6f3a000.

总线错误

该工具收到信号错误.CONFIG_STRICT_DEVMEM 选项未在内核配置中设置.

The tool gets an Signal Err. The CONFIG_STRICT_DEVMEM option is not set in the kernel config.

我发现了另一个帖子 http://thread.gmane.org/gmane.linux.ports.arm.kernel/26878 但我找不到有关 i-mx25 的这些寄存器的一些信息.

I found another post http://thread.gmane.org/gmane.linux.ports.arm.kernel/26878 but I can't find some information about these registers for an i-mx25.

是否有其他内核安全功能或我缺少的东西?

Is there another kernel security feature or something I'm missing?

devmem 或 devmem2 仅适用于低于 0x4000 的值.对于上述所有地址,我收到信号总线错误.

The devmem or devmem2 is only working with values below 0x4000. For all addresses above i get the signal bus error.

推荐答案

好的,我找到了我自己问题的答案.AIPS 控制寄存器必须添加到设备树中.他们正在保护我想读取的寄存器.在我添加这些补丁后,它起作用了.

Okay, i found an answer to my own question. The AIPS control registers have to be added to the devicetree. They are protecting the register i want to read. After i added these patches it worked.

https://github.com/torvalds/linux/commit/24bb244e02a6bead5b854d842002df0d38ae7b7b"

https://github.com/torvalds/linux/commit/24bb244e02a6bead5b854d842002df0d38ae7b7b

https://github.com/torvalds/linux/commit/c33576cbf86bedf9ad3812479c3b4f36d5fadba8#diff-64c444a874c565fd98cf1ab538c1e0cd

这篇关于Linux 寄存器从用户空间读取 arm i.mx257 - devmem 不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆