加载xilinx的xdma驱动出错
Ubuntu系统,出错log如下:interrupt_selection 1.
Loading driver...insmod xdma.ko interrupt_mode=2 ...
[ 79.039826] xdma:probe_one: pdev 0x00000000805013c7, err -22.
Error: The Kernel module installed correctly, but no devices were recognized.
FAILED
提供相应的ko文件,更多的log帮助分析复现 799959745 发表于 2022-6-27 14:32
提供相应的ko文件,更多的log帮助分析复现
1、加载驱动命令
./load_driver.sh
打印如下:Loading driver...
Error: The Kernel module installed correctly, but no devices were recognized.
FAILED
2、列举PCIe设备信息命令
lspci
打印如下:0000:00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3588 (rev 01)
0000:01:00.0 Memory controller: Xilinx Corporation Device 7024
0002:20:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 3588 (rev 01)
0002:21:00.0 Network controller: Broadcom Inc. and subsidiaries Device 449d (rev 02)
rudy_jenny 发表于 2022-6-27 15:21
1、加载驱动命令
./load_driver.sh
打印如下:Loading driver...
按照log来说驱动加载并没有问题。只是没有识别到pcie设备 799959745 发表于 2022-6-27 14:32
提供相应的ko文件,更多的log帮助分析复现
以下是dmesg中的pci信息,怀疑是不是能够给其他PCIe设备分配的内存不够导致的。
[ 2.447142] vcc3v3_pcie30: 3300 mV, disabled
[ 2.447188] reg-fixed-voltage vcc3v3-pcie30: Looking up vin-supply from device tree
[ 2.447191] vcc3v3_pcie30: supplied by vcc12v_dcin
[ 2.447225] reg-fixed-voltage vcc3v3-pcie30: vcc3v3_pcie30 supplying 3300000uV
[ 2.994201] rk-pcie fe150000.pcie: invalid prsnt-gpios property in node
[ 2.994225] rk-pcie fe150000.pcie: Looking up vpcie3v3-supply from device tree
[ 2.994245] rk-pcie fe170000.pcie: invalid prsnt-gpios property in node
[ 2.994253] rk-pcie fe170000.pcie: Looking up vpcie3v3-supply from device tree
[ 2.994262] rk-pcie fe170000.pcie: Looking up vpcie3v3-supply property in node /pcie@fe170000 failed
[ 2.994268] rk-pcie fe170000.pcie: no vpcie3v3 regulator found
[ 2.994451] rk-pcie fe170000.pcie: missing legacy IRQ resource
[ 2.994461] rk-pcie fe170000.pcie: IRQ msi not found
[ 2.994465] rk-pcie fe170000.pcie: use outband MSI support
[ 2.994469] rk-pcie fe170000.pcie: Missing *config* reg space
[ 2.994477] rk-pcie fe170000.pcie: host bridge /pcie@fe170000 ranges:
[ 2.994490] rk-pcie fe170000.pcie: err 0x00f2000000..0x00f20fffff -> 0x00f2000000
[ 2.994499] rk-pcie fe170000.pcie: IO 0x00f2100000..0x00f21fffff -> 0x00f2100000
[ 2.994508] rk-pcie fe170000.pcie: MEM 0x00f2200000..0x00f2ffffff -> 0x00f2200000
[ 2.994516] rk-pcie fe170000.pcie: MEM 0x0980000000..0x09bfffffff -> 0x0980000000
[ 2.994539] rk-pcie fe170000.pcie: Missing *config* reg space
[ 2.994564] rk-pcie fe170000.pcie: invalid resource
[ 3.010838] rk-pcie fe150000.pcie: missing legacy IRQ resource
[ 3.010858] rk-pcie fe150000.pcie: IRQ msi not found
[ 3.010868] rk-pcie fe150000.pcie: use outband MSI support
[ 3.010878] rk-pcie fe150000.pcie: Missing *config* reg space
[ 3.010895] rk-pcie fe150000.pcie: host bridge /pcie@fe150000 ranges:
[ 3.010922] rk-pcie fe150000.pcie: err 0x00f0000000..0x00f00fffff -> 0x00f0000000
[ 3.010949] rk-pcie fe150000.pcie: IO 0x00f0100000..0x00f01fffff -> 0x00f0100000
[ 3.010977] rk-pcie fe150000.pcie: MEM 0x00f0200000..0x00f0ffffff -> 0x00f0200000
[ 3.010995] rk-pcie fe150000.pcie: MEM 0x0900000000..0x093fffffff -> 0x0900000000
[ 3.011033] rk-pcie fe150000.pcie: Missing *config* reg space
[ 3.011066] rk-pcie fe150000.pcie: invalid resource
[ 3.199139] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.224695] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.251359] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.271387] rk-pcie fe150000.pcie: PCIe Link up, LTSSM is 0x130011
[ 3.271579] rk-pcie fe150000.pcie: PCI host bridge to bus 0000:00
[ 3.271599] pci_bus 0000:00: root bus resource
[ 3.271614] pci_bus 0000:00: root bus resource [??? 0xf0000000-0xf00fffff flags 0x0]
[ 3.271631] pci_bus 0000:00: root bus resource (bus address )
[ 3.271644] pci_bus 0000:00: root bus resource
[ 3.271657] pci_bus 0000:00: root bus resource
[ 3.271707] pci 0000:00:00.0: type 01 class 0x060400
[ 3.271732] pci 0000:00:00.0: reg 0x10:
[ 3.271750] pci 0000:00:00.0: reg 0x14:
[ 3.271767] pci 0000:00:00.0: reg 0x38:
[ 3.271848] pci 0000:00:00.0: supports D1 D2
[ 3.271862] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 3.278024] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.282362] pci_bus 0000:01: busn_res: can not insert under (conflicts with (null) )
[ 3.282473] pci 0000:01:00.0: type 00 class 0x058000
[ 3.282541] pci 0000:01:00.0: reg 0x10:
[ 3.282578] pci 0000:01:00.0: reg 0x14:
[ 3.282615] pci 0000:01:00.0: reg 0x18:
[ 3.282744] pci 0000:01:00.0: enabling Extended Tags
[ 3.282950] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
[ 3.293278] pci 0000:00:00.0: BAR 0: no space for
[ 3.293308] pci 0000:00:00.0: BAR 0: failed to assign
[ 3.293324] pci 0000:00:00.0: BAR 1: no space for
[ 3.293337] pci 0000:00:00.0: BAR 1: failed to assign
[ 3.293351] pci 0000:00:00.0: BAR 8: no space for
[ 3.293364] pci 0000:00:00.0: BAR 8: failed to assign
[ 3.293380] pci 0000:00:00.0: BAR 6: assigned
[ 3.293400] pci 0000:01:00.0: BAR 0: no space for
[ 3.293413] pci 0000:01:00.0: BAR 0: failed to assign
[ 3.293426] pci 0000:01:00.0: BAR 2: no space for
[ 3.293438] pci 0000:01:00.0: BAR 2: failed to assign
[ 3.293451] pci 0000:01:00.0: BAR 1: no space for
[ 3.293463] pci 0000:01:00.0: BAR 1: failed to assign
[ 3.293477] pci 0000:00:00.0: PCI bridge to
[ 3.296775] pcieport 0000:00:00.0: PME: Signaling with IRQ 142
[ 3.304692] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.331358] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.358027] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.374942] ehci-pci: EHCI PCI platform driver
[ 3.384691] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.411358] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.438023] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[ 3.619781] reg-fixed-voltage pcie30-avdd1v8: Looking up vin-supply from device tree
[ 3.619863] pcie30_avdd1v8: supplied by avcc_1v8_s0
[ 3.620091] pcie30_avdd1v8: 1800 mV, enabled
[ 3.620264] reg-fixed-voltage pcie30-avdd1v8: pcie30_avdd1v8 supplying 1800000uV
[ 3.620383] reg-fixed-voltage pcie30-avdd0v75: Looking up vin-supply from device tree
[ 3.620435] pcie30_avdd0v75: supplied by avdd_0v75_s0
[ 3.620589] pcie30_avdd0v75: 750 mV, enabled
[ 3.620744] reg-fixed-voltage pcie30-avdd0v75: pcie30_avdd0v75 supplying 750000uV
[ 3.654754] rk-pcie fe170000.pcie: PCIe Link up, LTSSM is 0x30011
[ 3.654970] rk-pcie fe170000.pcie: PCI host bridge to bus 0002:20
[ 3.654990] pci_bus 0002:20: root bus resource
[ 3.655005] pci_bus 0002:20: root bus resource [??? 0xf2000000-0xf20fffff flags 0x0]
[ 3.655021] pci_bus 0002:20: root bus resource (bus address )
[ 3.655035] pci_bus 0002:20: root bus resource
[ 3.655051] pci_bus 0002:20: root bus resource
[ 3.655100] pci 0002:20:00.0: type 01 class 0x060400
[ 3.655141] pci 0002:20:00.0: reg 0x38:
[ 3.655335] pci 0002:20:00.0: supports D1 D2
[ 3.655351] pci 0002:20:00.0: PME# supported from D0 D1 D3hot
[ 3.658739] pci 0002:20:00.0: Primary bus is hard wired to 0
[ 3.658744] pci 0002:20:00.0: bridge configuration invalid (), reconfiguring
[ 3.658884] pci 0002:21:00.0: type 00 class 0x028000
[ 3.658956] pci 0002:21:00.0: reg 0x10:
[ 3.659002] pci 0002:21:00.0: reg 0x18:
[ 3.659449] pci 0002:21:00.0: supports D1 D2
[ 3.659452] pci 0002:21:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 3.675040] pci_bus 0002:21: busn_res: end is updated to 21
[ 3.675074] pci 0002:20:00.0: BAR 8: assigned
[ 3.675086] pci 0002:20:00.0: BAR 6: assigned
[ 3.675099] pci 0002:21:00.0: BAR 2: assigned
[ 3.675148] pci 0002:21:00.0: BAR 0: assigned
[ 3.675193] pci 0002:20:00.0: PCI bridge to
[ 3.675203] pci 0002:20:00.0: bridge window
[ 3.677404] pcieport 0002:20:00.0: PME: Signaling with IRQ 159
[ 7.455652] dhdpcie_pci_probe : no mutex held. set lock
[ 7.455656] dhdpcie_init: found adapter info 'DHD generic adapter'
[ 7.455712] pcieh 0002:21:00.0: enabling device (0000 -> 0002)
[ 7.533366] dhdpcie_bar1_window_switch_enab: bar1_switch_enab=0 ramstart=0x170000 ramend=0x2affff bar1_size=0x0
[ 7.580221] dhdpcie_bus_attach: making DHD_BUS_DOWN
[ 7.580231] dhdpcie_init: rc_dev from dev->bus->self (1d87:3588) is ffffff8005fa0000
[ 7.580339] dhdpcie_init: rc_ep_aspm_cap: 1 rc_ep_l1ss_cap: 1
[ 7.580351] dhdpcie_request_irq: INTx enabled
[ 7.580405] dhdpcie_bar1_window_switch_enab: bar1_switch_enab=0 ramstart=0x170000 ramend=0x2affff bar1_size=0x400000
[ 7.581000] dhdpcie_oob_intr_unregister: irq is not registered
[ 7.688040] dhdpcie_pci_probe : the lock is released.
[ 8.971510] dhd_bus_devreset: dhdpcie_bus_start_host_dev OK
[ 8.972807] dhdpcie_bar1_window_switch_enab: bar1_switch_enab=0 ramstart=0x170000 ramend=0x2affff bar1_size=0x400000
[ 8.972828] dhdpcie_request_irq: INTx enabled
[ 8.972868] dhdpcie_dump_resource: BAR0(VA): 0x0000000000000000, BAR0(PA): 0x00000000f2200000, SIZE: 32768
[ 8.972873] dhdpcie_dump_resource: BAR1(VA): 0x0000000000000000, BAR1(PA): 0x00000000f2400000, SIZE: 4194304
[ 8.974102] dhd_conf_set_path_params : Final fw_path=/vendor/etc/firmware/fw_bcm43752a2_pcie_ag.bin
[ 8.974116] dhd_conf_set_path_params : Final clm_path=/vendor/etc/firmware/clm_bcm43752a2_pcie_ag.blob
[ 8.974208] dhdpcie_download_code_file: dhd_tcm_test_enable 0
[ 8.974213] dhdpcie_download_code_file: download firmware /vendor/etc/firmware/fw_bcm43752a2_pcie_ag.bin
[ 8.974272] dhd_os_open_image1: /vendor/etc/firmware/fw_bcm43752a2_pcie_ag.bin (857142 bytes) open success
[ 9.062195] dhdpcie_download_nvram: dhd_get_download_buffer len 7335
[ 9.062221] dhdpcie_download_nvram: process_nvram_vars len 5860
[ 9.079980] dhdpcie_bus_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 9.160382] dhdpcie_readshared: PCIe shared addr (0x001f8974) read took 80000 usec before dongle is ready
[ 9.160837] dhdpcie_readshared: max H2D queues 40
[ 9.160878] dhdpcie_oob_intr_register OOB irq=161 flags=0x1
[ 9.160919] dhdpcie_oob_intr_register: enable_irq_wake
[ 9.161035] dhd_bus_dump_dar_registers: dar_errlog(0xa60:0x0) dar_erraddr(0xa64:0x0) dar_pcie_mbint(0xa68:0x0)
[ 9.190336] dhd_os_open_image1: /vendor/etc/firmware/clm_bcm43752a2_pcie_ag.blob (29225 bytes) open success
问题已解决 rudy_jenny 发表于 2022-6-29 08:49
问题已解决
解决方法可以说一下吗? Liuth 发表于 2022-6-29 09:04
解决方法可以说一下吗?
pci 0000:01:00.0: BAR 2: no space for ,看这一句,主要是rk3588的pcie低端bar内存大小只有16MB,对端FPGA把内存配置减小就好了 请问您做的是itx 3588j和fpga板卡通过pcie互联嘛,我想咨询一下3588开发板的pcie的endpoint模式切换能不能实现,通过rk3588官方的修改dts就可以吗 wx__BkXu5u 发表于 2022-8-2 10:41
请问您做的是itx 3588j和fpga板卡通过pcie互联嘛,我想咨询一下3588开发板的pcie的endpoint模式切换能不能 ...
dts没有修改,主要是FPGA那边进行适配,你要看一下3588的dts文件,最大能支持多少的内存
页:
[1]
2