This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ti8168 PCIE endpoint模式运行报错



我在DM8168S上运行pci endpoint 模式,内核使用TI816X-LINUX-PSP-04.00.02.14.tgz。

我依照http://processors.wiki.ti.com/index.php/DM81xx_AM38xx_PCI_Express_Endpoint_Driver_User_Guide说明,

禁止PCI bus support,使能PCIE endpoint module,并冲SD卡启动UBOOT,从网络加载内核,我的RC是powerpc cpu,运行vxworks,启动时未给ti8168加载任何数据信息(100M的时钟是有的)。

当我在TI8168 板卡insmod ti81xx_pcie_epdrv.ko,后报错如下:

Unhandled fault: external abort on non-linefetch (0x1028) at 0xcb001004
Internal error: : 1028 [#1]
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in: ti81xx_pcie_epdrv(+)
CPU: 0    Not tainted  (2.6.37 #1)
PC is at ti81xx_ep_pcie_init+0x1b8/0x290 [ti81xx_pcie_epdrv]
LR is at kobject_put+0x48/0x5c
pc : [<bf000c1c>]    lr : [<c018e724>]    psr: 60000013
sp : c57cff18  ip : cb001050  fp : c57cff44
r10: 00000000  r9 : c57ce000  r8 : bf000e37
r7 : bf0011a8  r6 : 00000000  r5 : bf001198  r4 : cb000000
r3 : 00000000  r2 : cb001004  r1 : bf001210  r0 : bf001200
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 854a4019  DAC: 00000015
Process insmod (pid: 1152, stack limit = 0xc57ce2e8)
Stack: (0xc57cff18 to 0xc57d0000)
ff00:                                                       bf000e37 bf0011a8
ff20: c0085678 00000000 bf001074 00012008 00012018 bf000a64 c57cff7c c57cff48
ff40: c003942c bf000a70 bf001074 00012008 00012018 c0043fa8 00000000 bf001074
ff60: 00012008 00012018 c0043fa8 00000000 c57cffa4 c57cff80 c009574c c0039368
ff80: c00c0f64 c00c0e7c 00000000 00004000 00000003 00000080 00000000 c57cffa8
ffa0: c0043e00 c00956bc 00000000 00004000 00012018 00002d43 00012008 00000001
ffc0: 00000000 00004000 00000003 00000080 00012008 00000000 00012018 00000000
ffe0: bedbdead bedbdc3c 00008da0 401ae7d4 60000010 00012018 00000000 00000000
Backtrace:
[<bf000a64>] (ti81xx_ep_pcie_init+0x0/0x290 [ti81xx_pcie_epdrv]) from [<c003942c>] (do_one_initcall+0xd0/0x1a4)
 r8:bf000a64 r7:00012018 r6:00012008 r5:bf001074 r4:00000000
[<c003935c>] (do_one_initcall+0x0/0x1a4) from [<c009574c>] (sys_init_module+0x9c/0x1bc)
[<c00956b0>] (sys_init_module+0x0/0x1bc) from [<c0043e00>] (ret_fast_syscall+0x0/0x30)
 r7:00000080 r6:00000003 r5:00004000 r4:00000000
Code: e284cd41 e2822004 e584618c e28cc010 (e5923000)
---[ end trace baf535189e0c806b ]---

我试着调试ti81xx_pcie_epdrv.c.,发现 ti81xx_setup_msi()中读控制寄存器的0x51000000寄存器出错,

我直接在程序中读取寄存器空间0x51000000和配置空间0x51001000都报同样错误。

我有个疑问是不是,ti8168的pcie endpoint模式必须运行在boot driver模式,即必须从RC通过PCIE加载启动??

还是其他什么问题导致出错??

谁能帮我解答一下??谢谢

  • 问题还没解决,有人知道没??

  • 注意到你的PSP版本比较老,不知道能否更新到最新的PSP?是否有关注文档中提到的Known Issues?

    Known Issues/Restrictions (Read this before you proceed)

    • Booting EP from a non-DM81xx RC is possible for DM816x EP but will require the boot driver and application to be built on respective RC. Note that the boot driver and application are written and tested to work with Linux kernel version 2.6.32 onwards. So make sure that the RC is running Linux kernel as supported. This document will cover steps for building these components on a PC as RC running Linux. In addition, you may need to do hardware modifications/configurations as described in Clocking Schemes Guide
  • ME扫描设备一次获取PCI bridge信息,BIOS之后会发送reset后根据桥的信息再扫描具体的设备.也就是说PCIE模块要初始化两次.并且第二次需要在对端发送reset的时候初始化.我用的是8148+x86调试的.

    初始化代码可以参考demo编写.

    以上供参考.