Linux 模块 - I/O 内存寄存器读/写挂起系统
我正在尝试读取/写入平台设备的 I/O 内存寄存器,但系统一旦到达执行读取/写入的行就会挂起。
我能够检查以下内容:
request_mem_region 返回 OK
请求了正确的物理地址(ioremap 正常)
- 返回有效的逻辑地址;用它来阅读
登记; ioread32(逻辑地址)
我对linux内核很陌生,有没有办法禁用I/O寄存器? 我检查了/proc/iomem,我希望访问的内存区域出现在列表中。
从这里到哪里去?
I am trying to read/write to a I/O Memory Register of a platform device but the system hangs as soon as it goes to the line where read/write is performed.
I was able to check the following:
request_mem_region returns OK
the correct physical addr was requested (ioremap is OK)
- a valid logical address is returned; used this to read the
register; ioread32(logical_addr)
I am quite new to the linux kernel, is there a way that the I/O registers are disabled?
I checked /proc/iomem, and the memory region that I wish to access appears in the list.
Where to go from here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案。感谢您对朗菲尔德的回复。
我忘了检查司机使用的名字。它与正在注册的设备名称不匹配。他们应该匹配。
I found the answer. Thank you for your response Longfield.
I forgot to check the name used by the driver. It didn't match the device name being registered. They should match.