mips中,通过pcie驱动和fpga通信时出现的问题,有没有人能帮我解答啊
在做pic驱动时ioremap映射过来的地址我没有办法访问writel没反映,readl就会报错,具体错误如下
# insmod xbmd.ko
//代码
gBaseHdwr = pci_resource_start (gDev, 0); //物理地址
XPCIe_init: xbmd: Init: Base hw val 10100000
//代码
gBaseLen = pci_resource_len (gDev, 0); //大小
XPCIe_init: xbmd: Init: Base hw len 2048
//代码
gBaseVirt = ioremap(gBaseHdwr, gBaseLen);//映射的后的地址
XPCIe_init: xbmd: Init: Virt HW address B0100000
XPCIe_init: xbmd: Init: Initialize Hardware Done..
XPCIe_init: xbmd driver is loaded
//在这里我对映射过来的地址进行操作
writel(1,gBaseVirt);
printk("%x\n" ,readl(gBaseVirt));
编译后就出现这问题了
ar7240 data bus error: cause 0x80001c
Data bus error, epc == 800285a4, ra == c005ef24
Oops[#1]:
Cpu 0
$ 0 : 00000000 80220000 c0061b94 00000001
$ 4 : c005fd7c 81149ebc deadbeef b0100000
$ 8 : 8128c3f8 0000f400 00000000 81078000
$12 : 00000000 00000000 00000000 00000000
$16 : c0060000 80028594 c0060000 c0060000
$20 : 80015100 c0060000 c0060000 c0060000
$24 : 00000000 00000000
$28 : 81148000 81149ea0 00400340 c005ef24
Hi : 00000240
Lo : 000001f8
epc : 800285a4 printk+0x10/0x28 Tainted: GF
ra : c005ef24 XPCIe_init+0x2d8/0x4dc
Status: 1000f403 KERNEL EXL IE
Cause : 0080001c
PrId: 00019374
Modules linked in: xbmd ag7240_mod flowmac_mod
Process insmod (pid: 277, threadinfo=81148000, task=8128c000)
Stack : 00000001 00000000 c0060000 80028594 c005ef24 c005eee0 000000a2 00000000
c0061970 8021d964 01c00000 00000048 0000004c 00000028 801c0000 801c0000
c00619c0 801c0000 801c5794 801c5788 004000cc 00000002 80046bc0 80046aa8
00000000 000054f9 00000001 00000000 00000003 1001e008 000054f9 00000002
7fa43f5b 7fa43ea4 8000ef00 8000ef00 10007fcc 10007f9c 10007fac 1001f17a
...
Call Trace:
[<80028594>] printk+0x0/0x28
[<c005ef24>] XPCIe_init+0x2d8/0x4dc
[<c005eee0>] XPCIe_init+0x294/0x4dc
[<80046bc0>] sys_init_module+0x290/0x3b8
[<80046aa8>] sys_init_module+0x178/0x3b8
[<8000ef00>] stack_done+0x20/0x3c
[<8000ef00>] stack_done+0x20/0x3c
Code: afa5001c27a5001cafbf0010 <afa60020> 0c00a063afa700248fbf001003e0000827bd0018
ready to read from fpga!
Segmentation fault
有没有知道到底是怎么了,求高手帮忙解答
页:
[1]