Thinking About “Unable to handle kernel paging request at virtual address ffc05000”

Thinking About “Unable to handle kernel paging request at virtual address ffc05000″Howtothinkaboutissuelikethis?Maybecomebacktooriginalcodemodifiations,andtrytorefinecodejustinput.Unfortunate

How to think about issue like this? Maybe come back to original code modifiations, and try to refine code just input. Unfortunately, it can’t track the base reason why this error occur, which could just enumerate possible answers and try to get the proper correct one. I think the right way facing this issue is “tracing back”.

 

 

1. Definate what address it is?

DMA mapping address? vmalloc/ioremap space? or user space? In my case, it’s DMA mapping area.

 

2. Use debugger to clarify what you think about.

Connect ICE to board, and display virtual address 0xffc05000, that is unavailable, which make kernel report this error.

 

3. Be sure which module this address belong to?

printk dma allocated address of some modules which use dma to transfer data. uart 0xffc00000 or 0xffc01000, usp 0xffc02000, 0xffc03000, 0xffc04000. Though 1kB size when alloc, but 4KB address aligned by kernel. No 0xffc05000, why?

 

4. Go into the function tty_insert_flip_string(), in which memcpy cause the error (read from oops by kernel). Only way I can do is clarify parameters I pass to memcpy. In tty function, dma address is increased by 0x700 to oxffc05000, which is original 0xffc00000. why 0x700, not 0x200 we expected?

 

5. TTY_BUFFER_PAGE equal to 0x700, goal=min(size-copied, TTY_BUFFER_PAGE), size maybe the wrong value. So next print out varialbe size. Oh, no 0xf8740000, negtive value. Search rx_dma_len in serial driver, only here modified this variable 

rx_dma_len = RX_DMA_BUF_SIZE – get_dma_residue(rx_dma_chan). 

 

6. Conclude: problem caused by get_dma_residue.

今天的文章Thinking About “Unable to handle kernel paging request at virtual address ffc05000”分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/65852.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注