Unable to handle kernel paging request at virtual address 0x7e005070 解决办法
来源:互联网 发布:天下三捏脸数据 编辑:程序博客网 时间:2024/04/19 12:07
有点标题党的味道了~
对于readl() 和 inl() 读取I/O端口报错的探究
给s3c6410的RTC写demo driver的时候遇到这个问题...
如图
这是虚拟内存技术导致的问题,不能直接使用物理地址(不过这里有个疑问,我上次给PC写的CMOS driver貌似用的是物理地址,布吉岛为嘛)
解决办法就是调用ioremap函数转换物理地址,重新映射IO端口到虚拟地址中
Once equipped with ioremap (and iounmap), a device driver can access any I/O memory address, whether or not it is directly mapped to virtual address space. Remember, though, that the addresses returned from ioremap should not be dereferenced directly; instead, accessor functions provided by the kernel should be used. Before we get into those functions, we’d better review the ioremap prototypes and introduce a few details that we passed over in the previous chapter.
The functions are called according to the following definition:
#include <asm/io.h>void *ioremap(unsigned long phys_addr, unsigned long size);void *ioremap_nocache(unsigned long phys_addr, unsigned long size);void iounmap(void * addr);
First of all, you notice the new function ioremap_nocache. We didn’t cover it in Chapter 8, because its meaning is definitely hardware related. Quoting from one of the kernel headers: “It’s useful if some control registers are in such an area, and write combining or read caching is not desirable.” Actually, the function’s implementation
is identical to ioremap on most computer platforms: in situations where all of I/O memory is already visible through noncacheable addresses, there’s no reason to implement a separate, noncaching version of ioremap.
这里我重新改用了ioremap,everything work correctly...
- Unable to handle kernel paging request at virtual address 0x7e005070 解决办法
- Unable to handle kernel paging request at virtual address f600030a
- Unable to handle kernel paging request at virtual address
- Unable to handle kernel paging request at virtual address
- Unable to handle kernel paging request at virtual address 的解决办法
- Unable to handle kernel paging request at virtual address 的解决办法
- kernel oops (Unable to handle kernel paging request at virtual address )三种内存访问异常
- 解决遇到的Unable to handle kernel paging request at virtual address 错误
- Thinking About "Unable to handle kernel paging request at virtual address ffc05000"
- Thinking About "Unable to handle kernel paging request at virtual address ffc05000"
- 触摸屏移植问题Unable to handle kernel paging request at virtual address 错误
- Unable to handle kernel paging request at virtual address错误的解决
- 关于Linux驱动的一种错误:Unable to handle kernel paging request at virtual address
- 卸载驱动报错:“Unable to handle kernel paging request at virtual address bf018000 ..........”
- Unable to handle kernel paging request for data at address 0x00000000
- mips平台报错:报错信息:CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 802bc
- unable to handle kernel null pointer dereference at virtual address
- Unable to handle kernel NULL pointer dereference at virtual address-----------原因分析 ,及解决办法
- OpenCV基础篇之图片叠加
- linux core设置
- android Toast大全(五种情形)建立属于你自己的Toast
- uva-572 - Oil Deposits
- dom4j操作xml的练习
- Unable to handle kernel paging request at virtual address 0x7e005070 解决办法
- 循环的角度求均值
- OpenCV基础篇之使用CMake管理工程
- 字典树sdutoj 1500模板
- XDOJ1180 - 对称数
- OpenCV基础篇之查找表
- 图像二值化
- 找出二叉树中和为某一定值的所有路径
- docker学习 主流的pass平台(体验的是设计模式)