作者FUFrench (行在自我上)
看板LinuxDev
标题[问题] 在ARM板上执行Drivertest档 发生错误
时间Tue Jun 21 11:01:23 2011
好不容易 写出driver
好不容易 让arm板可以insmod
然後开开心心的写了个 test.c 要和driver 沟通看看!!
but.....
执行./test 後
9f80: 00000005 c0030088 c3b39fa4 c3b39f98 c009927c c0099174 00000000 c3b39fa8
9fa0: c002fee0 c0099268 00000000 00000000 000087e8 00000000 4014b000 00008590
9fc0: 00000000 00000000 00000000 00000005 00000000 00000000 40024000 beef9d54
9fe0: 00000000 beef9d40 000085b8 400daa6c 60000010 000087e8 00000000 00000000
Backtrace:
[<c009dc24>] (chrdev_open+0x0/0x160) from [<c0099374>]
(__dentry_open+0xd4/0x26c
)
r7:c3a7a280 r6:c34e3a80 r5:c34e4550 r4:c3928f00
[<c00992a0>] (__dentry_open+0x0/0x26c) from [<c0099604>]
(nameidata_to_filp+0x60
/0x68)
[<c00995a4>] (nameidata_to_filp+0x0/0x68) from [<c00a6860>]
(do_filp_open+0x54c/
0x878)
r5:00000024 r4:00000001
[<c00a6314>] (do_filp_open+0x0/0x878) from [<c00991c8>]
(do_sys_open+0x64/0xe0)
[<c0099164>] (do_sys_open+0x0/0xe0) from [<c009927c>] (sys_open+0x24/0x28)
r8:c0030088 r7:00000005 r6:00000000 r5:00000000 r4:00000000
[<c0099258>] (sys_open+0x0/0x28) from [<c002fee0>] (ret_fast_syscall+0x0/0x28)
Code: e58470e8 e1a03007 e5b3102c e28420e0 (e5812004)
---[ end trace 662a98e0c0a167c1 ]---
Segmentation fault
[root@FriendlyARM /]#
出现以上一堆看不懂的东西 然後 显示Segmentation fault ....
我有设定mknod
/dev/ 下也找的到设定好的档案
可是这个dev 档 不管是 cat 还是用 open函数 呼叫 都会有类似错误....
请问我大概问题出在哪里.....残念 Orz
补充发现的新问题 rmmod 该 driver 系统会跟我说 没有这个东西
可是lsmod 明明就有.... 这两个问题 的原因 是不是相同啊...
--
_\^^^^^^^^/ ◣\◣◣
◣◢)◢
\ \\\ // / 万事屋的.. ★
\/ \◣ /∠◢
★ \ /★ ◢
\◤◤◤◤\◣
⊙ ⊙ ☆ ◥┬ ┬" ▼
○ o ◤
/|≡
≡|\ /
\▼/◣ by freijaking
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.115.236.24
※ 编辑: FUFrench 来自: 140.115.236.24 (06/21 11:20)
1F:→ iman00b:modinfo? 06/21 15:37
2F:→ heoris:你的cdev结构有没有注册到核心内,file_operations有定义吗 06/21 18:33
3F:推 q1mail:这个目前只能看出你在 device open时有问题 06/21 19:21