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

來源:互聯網
上載者:User

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.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.