Unable to handle kernel paging request at virtual address 0x7e005070 解决办法

有点标题党的味道了~

对于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...

时间: 2024-11-06 16:17:08

Unable to handle kernel paging request at virtual address 0x7e005070 解决办法的相关文章

Unable to handle kernel paging request at virtual address

kernel里调试时写alc5642时机器会时而重启,终于抓到了log,如下: Unable to handle kernel paging request at virtual address xxxx 网上一搜,如下: Restarting system. Unable to handle kernel paging request at virtual address b13bffe0 pgd = c9184000 [b13bffe0] *pgd=00000000 Internal err

ddr不稳定导致1-bit error引起kernel panic(Unable to handle kernel paging request )

Panic log: [ 939.136378] c0 11060 (kworker/u8:5) binder: release 29969:29969 transaction 41327 out, still active [ 951.095433] c1 1026 (Binder_6) binder: 644:1026 transaction failed 29189, size 18336-0 [ 951.103360] c1 1026 (Binder_6) binder: send fa

eclipse faild to creat the java Virtual Machine的解决办法

打开eclipse的时候突然出现了 faild to creat the java Virtual Machine 解决办法:打开解压后的Eclipse文件夹,找到eclipse.ini配置文件 打开该文件,以下为用nodepad++打开为例 按照以上提示修改,然后重启eclipse即可. 原因:本机内存太小了,不够用,eclipse方法区(Perm Gen)用不了那么多,256M,设128就够了,这样eclipse觉得能保证MaxPerm为128的设置,所以可顺利启动eclipse.但是如果设

[转]Git – fatal: Unable to create &#39;XXX/.git/index.lock’: File exists.的解决办法

参考资料: http://sheshui.me/articles/git-quickly-tutorial-20120517 http://stackoverflow.com/questions/9282632/git-index-lock-file-exists-when-i-try-to-commit-but-cannot-delete-the-file 我的说明: 我操作的是ubuntu环境.window远程 1 若在window下远程打开操作窗口(不是console),进入.git目录删

NuGet Package Explorer上传时报:failed to process request:&#39;Method Not Allowed&#39;错误解决办法

相关日志:PUT /api/v2/package - 1000 -  NuGet+Package+Explorer/3.15.0.0+(Microsoft+Windows+NT+6.2.9200.0) - 405 0 0 0 解决办法Web.config里面加入设置: <system.webServer> <modules>     <remove name="WebDAVModule" />   </modules>   <han

启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法

我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的啊,近期也没用,可能是近期升级了本地单独安装的jre版本导致的吧(Myeclipse使用自己的jre的). 整理了如下2个解决办法,可以选择一个使用,我选择的是第2个.经测试都ok. 方法一: 找到Myeclpise路径下的myeclipse.ini文件: 编辑将Xmx(JVM Heap最大允许的尺

SpringMvc出现No mapping found for HTTP request with URI的终极解决办法

No mapping found for HTTP request with URI 出现这个问题的原因是在web.xml中配置错了,如: <servlet> <servlet-name>springMVCDispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init

Fedora安装VirtualBox时出现错误Kernel driver not installed (rc=-1908)的解决办法

新建虚拟机后启动时出现如下错误: Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Re-setup the kernel module by executing '/etc/init.d/vboxdrv setup' as root.

mvn打包spring工程成jar时报Unable to locate Spring NamespaceHandler for XML schema namespace错误解决办法

有一个小工程,使用了spring,在使用maven的assembly打包成独立可执行的jar包后,在执行时报如下错误:Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace      网上对这个问题也有提及,这是assembly的一个bug.参见:http://jira.codehaus.org/browse/MASSEMBLY-360 原因是spring的多个jar包中都含